mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 04:11:30 +00:00
Fix some zone entrance ghosting
This commit is contained in:
parent
6d8b96068d
commit
2a4d6523b1
@ -648,7 +648,7 @@ void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue)
|
|||||||
|
|
||||||
parse->EventNPC(EVENT_SPAWN, npc, nullptr, "", 0);
|
parse->EventNPC(EVENT_SPAWN, npc, nullptr, "", 0);
|
||||||
|
|
||||||
npc->FixZ();
|
npc->FixZ(1);
|
||||||
|
|
||||||
uint16 emoteid = npc->GetEmoteID();
|
uint16 emoteid = npc->GetEmoteID();
|
||||||
if (emoteid != 0)
|
if (emoteid != 0)
|
||||||
|
|||||||
@ -951,7 +951,7 @@ public:
|
|||||||
void SendTo(float new_x, float new_y, float new_z);
|
void SendTo(float new_x, float new_y, float new_z);
|
||||||
void SendToFixZ(float new_x, float new_y, float new_z);
|
void SendToFixZ(float new_x, float new_y, float new_z);
|
||||||
float GetZOffset() const;
|
float GetZOffset() const;
|
||||||
void FixZ();
|
void FixZ(int32 z_find_offset = 5);
|
||||||
void NPCSpecialAttacks(const char* parse, int permtag, bool reset = true, bool remove = false);
|
void NPCSpecialAttacks(const char* parse, int permtag, bool reset = true, bool remove = false);
|
||||||
inline uint32 DontHealMeBefore() const { return pDontHealMeBefore; }
|
inline uint32 DontHealMeBefore() const { return pDontHealMeBefore; }
|
||||||
inline uint32 DontBuffMeBefore() const { return pDontBuffMeBefore; }
|
inline uint32 DontBuffMeBefore() const { return pDontBuffMeBefore; }
|
||||||
|
|||||||
@ -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;
|
BenchTimer timer;
|
||||||
timer.reset();
|
timer.reset();
|
||||||
@ -849,7 +850,7 @@ void Mob::FixZ() {
|
|||||||
(zone->HasWaterMap() && !zone->watermap->InWater(glm::vec3(m_Position))))
|
(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 */
|
/* 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();
|
new_z += this->GetZOffset();
|
||||||
|
|
||||||
auto duration = timer.elapsed();
|
auto duration = timer.elapsed();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user