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

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 11/11/2013 ==
demonstar55: Changed the way walk speed is calculated to allow mobs to have their walk speed equal a 100% movement reduction
== 11/09/2013 ==
Leere: Fixed Bard mana regen, they now only are affected by items and AA.

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.