Fix walk speed calculation

Walk speed should be calculated as a movement speed reduction that
stacks with snares so it's possible to snare a mob FD and have it
not be able to walk back.
This commit is contained in:
Michael Cook
2013-11-11 23:55:43 -05:00
parent d83b94d231
commit 78ab347171
2 changed files with 8 additions and 5 deletions
+5 -5
View File
@@ -561,16 +561,16 @@ float Mob::_GetMovementSpeed(int mod) const {
movemod = static_cast<int>(aa_mod);
}
if(movemod < -85) //cap it at moving very very slow
if(mod != 0)
movemod += mod;
if(IsClient() && movemod < -85) //cap it at moving very very slow
movemod = -85;
if (!has_horse && movemod != 0)
speed_mod += (speed_mod * float(movemod) / 100.0f);
if(mod != 0)
speed_mod += (speed_mod * (float)mod / 100.0f);
if(speed_mod <= 0.0f)
if(IsClient() && speed_mod <= 0.0f)
return(0.0001f);
//runspeed cap.