Fix some NPC and Corpse falling through the ground issues

This commit is contained in:
Akkadius
2017-07-01 03:07:45 -05:00
parent 21ef83bcbe
commit 1f39a0cb3e
6 changed files with 43 additions and 6 deletions
+8
View File
@@ -48,6 +48,14 @@ void Mob::CalcBonuses()
SetAttackTimer();
CalcAC();
/* Fast walking NPC's are prone to disappear into walls/hills
We set this here because NPC's can cast spells to change walkspeed/runspeed
*/
float get_walk_speed = static_cast<float>(0.025f * this->GetWalkspeed());
if (get_walk_speed >= 0.9 && this->fix_z_timer.GetDuration() != 100) {
this->fix_z_timer.SetTimer(100);
}
rooted = FindType(SE_Root);
}