Fixed issues with Z correctness when NPCs are pathing on normal grids

Fixed issues with Z correctness when NPCs are engaged with players following
NPC corpses should fall into the ground far less
This commit is contained in:
Akkadius
2017-06-28 02:38:20 -05:00
parent 592bbd3180
commit 539fa8b262
7 changed files with 85 additions and 119 deletions
+7
View File
@@ -2388,6 +2388,13 @@ bool NPC::Death(Mob* killer_mob, int32 damage, uint16 spell, EQEmu::skills::Skil
entity_list.UnMarkNPC(GetID());
entity_list.RemoveNPC(GetID());
/* Fix Z on Corpse Creation */
glm::vec3 dest(m_Position.x, m_Position.y, m_Position.z);
float new_z = zone->zonemap->FindBestZ(dest, nullptr);
corpse->SetFlyMode(1);
corpse->GMMove(m_Position.x, m_Position.y, new_z + 5, m_Position.w);
this->SetID(0);
if (killer != 0 && emoteid != 0)