Why does sv_maxspeed have a legal value ?
Just wondering...
Players speed is set by weapon type, so sv_maxspeed could be set to any value above 260 which is the max speed a player will ever be set on without plugin.
change it's value would allow to unblock sv_spectatormaxspeed (320 is slow when you spec in free view)
From http://scripting.elxdraco.net/cvarlist/ :
Sets the maximum speed. In CS it doesn't change anything after 260, because of the weapon's speed(You go faster with scout, which is 260)
I'm not really sure, to be honest.
Yes it`s true.
In HLSDK physics code HL/CS choose minimal value between weaponSpeed and sv_maxspeed value
pmove->maxspeed = min( pmove->clientmaxspeed, pmove->maxspeed );
//where clientmaxspeed - speed from CBasePlayer::ResetMaxSpeed (or VIP speed 227.0 or Weapon Speed or 240.0 speed if no weapons etc (last not possible in CS without additional plugins or special maps) )
//and maxspeed - sv_maxspeed cvar
But to unlock fast moving in spectator free view, you need to set (for example):
sv_maxpseed 9000
sv_spectatormaxspeed 9000
but it`s not all, it`s only server speed, and client speed cuted at 400 by cl_forwardspeed cl_sidespeed cl_backspeed cl_upspeed cvars. But those cvars have only one legal value - 400.0 changing it (for example) to 500 (all of them) will lead to advantage...
Oh really ?
I thought that cl_XXXspeed had to be equal to be legal, not to be all at 400.0.
I thought that you can get advantage only if 1 of them has not the same value of the 2 other one.
Anyway 400 speed as spectator would still be better than 320 :)
Yes, look into CL_CreateMove (input.cpp) HLSDK
In HL/CS player movement when you press the key, hold it and release is different.
KeyStates:
0.25 if a key was pressed and released during the frame,
0.5 if it was pressed and held
0 if held then released
1.0 if held for the entire time
And move parameters calculated like:
sidemove_maxpseed = cl_sidespeed * KeyState(of Right button) - cl_sidespeed * KeyState (of left button); then capped at weapon maxspeed.
So when we press D key its like:
sidemove_maxpseed = 400 * 0.5 - 400 * 0.0 = 200
so actually in that one frame our sidemove maxspeed would be 200 and not ~250 as weapons maxspeed
Let`s change 400 value to 600 (for example)
sidemove_maxpseed = 600 * 0.5 - 600 * 0.0 = 300 -> then capped to weapon_maxspeed ~> 250 value
Same with forwardmove_maxspeed and upmove_maxpseed.
So, if our cl_XXXspeed would be changed to greater equal values, we have advantage while pressing and changing the buttons. It`s not much, coz that effect only in one frame. But in 32+ strafe LongJump we have bad effect from it, and our distance would be lesser compared to 16+ strafe longjump.
Also exists bad keyboards, they can`t hold WD WA buttons together, its working like holding one button, and second pressing/releasing during frame several times. As i wrote our coefficient for pressing/releasing would be 0.25 instead of 1.0. And such players in some moments have advantage, and in some disadvantage.
Then, sv_maxspeed lega value should be 400 because 320 or 400 compared to 250.0 or 260.0 it doesn't make any difference.
Please log in to post replies.