Quake Style - Quake 3 Tutorials
Newbie Tutorials - Player Speeds
How to modify player speed, derr :P
Well, here it is, the slightly requested tutorial on how to change your player's speed.
This one's real easy, only one line of code today.
Open up "g_active.c", and go down to the function entitled:
void ClientThink_real( gentity_t *ent )
(search for it, tis faster that way!)
Then as usual, find this section in the function and insert the blue code:
pm.trace = trap_Trace;
pm.pointcontents = trap_PointContents;
pm.debugLevel = g_debugMove.integer;
pm.noFootsteps = ( g_dmflags.integer & DF_NO_FOOTSTEPS ) > 0;
VectorCopy( client->ps.origin, oldOrigin );
// (NOBODY): Change our movement speed!
client->ps.speed *= 1.2;
// perform a pmove
// save results of pmove
This increases your speed just as the "Haste" powerup would. Of course you can change the 1.2 to any value you like, and of course, in tradition of tutorials from me :) you can always use different values for different classes.
Thankyou, please come again! :P~~
Tutorial by (nobody)
Return to QS Tutorials
If you do use something from QuakeStyle in your mod, please give us credit.
Our code is copyrighted, but we give permission to everyone to use it in any way they see fit, as long as we are recognized.