News | Forum | People | FAQ | Links | Search | Register | Log in
Coding Help
This is a counterpart to the "Mapping Help" thread. If you need help with QuakeC coding, or questions about how to do some engine modification, this is the place for you! We've got a few coders here on the forum and hopefully someone knows the answer.
First | Previous | Next | Last
Correct Suspicions 
Your guess is correct. There really is a file called pmove.c in the QuakeWorld source:
https://github.com/id-Software/Quake/blob/master/QW/client/pmove.c

The equivalent in the regular Quake engine is here:
https://github.com/id-Software/Quake/blob/master/WinQuake/sv_phys.c

This means that if you want to change how the player moves from within QuakeC, you have to work around what the engine is automatically doing on the player's behalf. 
Hooking Up To Run Key 
what exactly do i need to do to make the game execute an action when cl_movespeedkey/+speed is pressed? 
 
for example, while running it will spawn particles behind the player for 5sec 
See Above 
The previous post about player movement physics is immediately relevant again. The engine does nearly all the work of turning the player inputs into movement. The only part that's delegated to the QuakeC is how to respond to a jump command. And like the directional keys, +speed is not communicated to the QuakeC because it isn't necessary to make the movement work.

The same advice applies, you need to try and work around what the engine does on your behalf. Consider whether you can infer whether the player is running based on things that QuakeC can observe e.g. velocity, on-ground status, position. The PlayerPostThink function is the earliest opportunity as it runs right after engine physics.

You might find in practice checking the velocity is preferable. If the player is holding the run key but their attempted movement is blocked by a wall, should the particles spawn? Probably not! 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2025 John Fitzgibbons. All posts are copyright their respective authors.