From dbbae0e735ad229b5a8b614f2db7f373cfecea5c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 28 May 2015 13:26:55 -0400 Subject: [PATCH] Crash for no zonemap --- zone/attack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 49b5df187..c5dfcc6d7 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3717,7 +3717,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons // update NPC stuff 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); - 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()) { // Is this adequate? Teleport(new_pos);