mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 07:21:48 +00:00
Crash for no zonemap
This commit is contained in:
parent
dbd615572c
commit
dbbae0e735
@ -3717,7 +3717,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
|||||||
// update NPC stuff
|
// update NPC stuff
|
||||||
auto new_pos = glm::vec3(m_Position.x + (a->force * std::sin(a->meleepush_xy) + m_Delta.x),
|
auto new_pos = glm::vec3(m_Position.x + (a->force * std::sin(a->meleepush_xy) + m_Delta.x),
|
||||||
m_Position.y + (a->force * std::cos(a->meleepush_xy) + m_Delta.y), m_Position.z);
|
m_Position.y + (a->force * std::cos(a->meleepush_xy) + m_Delta.y), m_Position.z);
|
||||||
if (zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable.
|
if (zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable.
|
||||||
if (IsNPC()) {
|
if (IsNPC()) {
|
||||||
// Is this adequate?
|
// Is this adequate?
|
||||||
Teleport(new_pos);
|
Teleport(new_pos);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user