Fix some zone entrance ghosting

This commit is contained in:
Akkadius
2017-09-17 10:12:41 -05:00
parent 6d8b96068d
commit 2a4d6523b1
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -838,7 +838,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();
@@ -849,7 +850,7 @@ void Mob::FixZ() {
(zone->HasWaterMap() && !zone->watermap->InWater(glm::vec3(m_Position))))
{
/* 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);
float new_z = this->FindGroundZ(m_Position.x, m_Position.y, z_find_offset);
new_z += this->GetZOffset();
auto duration = timer.elapsed();