Merge fix

This commit is contained in:
KimLS
2017-09-17 13:20:48 -07:00
17 changed files with 140 additions and 74 deletions
+3 -3
View File
@@ -757,7 +757,8 @@ void Mob::SendToFixZ(float new_x, float new_y, float new_z) {
}
}
void Mob::FixZ() {
void Mob::FixZ(int32 z_find_offset /*= 5*/)
{
BenchTimer timer;
timer.reset();
@@ -770,7 +771,6 @@ void Mob::FixZ() {
/* Any more than 5 in the offset makes NPC's hop/snap to ceiling in small corridors */
float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5);
new_z += GetModelOffset();
auto duration = timer.elapsed();
Log(
@@ -785,7 +785,7 @@ void Mob::FixZ() {
duration
);
if ((new_z > -2000) && new_z != -999999) {
if ((new_z > -2000) && new_z != BEST_Z_INVALID) {
if (RuleB(Map, MobZVisualDebug))
this->SendAppearanceEffect(78, 0, 0, 0, 0);