From c060723762e7c2bf2d0ae654dee1745e298a922a Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Sun, 30 Nov 2014 14:34:27 -0800 Subject: [PATCH] guard_x_saved, guard_y_saved, guard_z_saved, guard_heading_saved converted to m_GuardPointSaved --- zone/npc.cpp | 7 ++----- zone/npc.h | 2 +- zone/waypoints.cpp | 10 ++-------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/zone/npc.cpp b/zone/npc.cpp index 4469292f6..b43a36611 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -115,7 +115,8 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float enraged_timer(1000), taunt_timer(TauntReuseTime * 1000), m_SpawnPoint(x,y,z,heading), - m_GuardPoint(-1,-1,-1,0) + m_GuardPoint(-1,-1,-1,0), + m_GuardPointSaved(0,0,0,0) { //What is the point of this, since the names get mangled.. Mob* mob = entity_list.GetMob(name); @@ -346,10 +347,6 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float reface_timer = new Timer(15000); reface_timer->Disable(); qGlobals = nullptr; - guard_x_saved = 0; - guard_y_saved = 0; - guard_z_saved = 0; - guard_heading_saved = 0; SetEmoteID(d->emoteid); InitializeBuffSlots(); CalcBonuses(); diff --git a/zone/npc.h b/zone/npc.h index ce943174c..9b0b68b28 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -474,7 +474,7 @@ protected: int max_wp; int save_wp; xyz_heading m_GuardPoint; - float guard_x_saved, guard_y_saved, guard_z_saved, guard_heading_saved; + xyz_heading m_GuardPointSaved; EmuAppearance guard_anim; float roambox_max_x; float roambox_max_y; diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 606149925..e3193c2c8 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -1328,16 +1328,10 @@ int ZoneDatabase::GetHighestWaypoint(uint32 zoneid, uint32 gridid) { void NPC::SaveGuardSpotCharm() { - guard_x_saved = m_GuardPoint.m_X; - guard_y_saved = m_GuardPoint.m_Y; - guard_z_saved = m_GuardPoint.m_Z; - guard_heading_saved = m_GuardPoint.m_Heading; + m_GuardPointSaved = m_GuardPoint; } void NPC::RestoreGuardSpotCharm() { - m_GuardPoint.m_X = guard_x_saved; - m_GuardPoint.m_Y = guard_y_saved; - m_GuardPoint.m_Z = guard_z_saved; - m_GuardPoint.m_Heading = guard_heading_saved; + m_GuardPoint = m_GuardPointSaved; }