diff options
author | megamage <none@none> | 2009-04-17 15:08:58 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-17 15:08:58 -0500 |
commit | c7d78b5ff930b433c7f09471e825b79e6d9bee4f (patch) | |
tree | 127c9aed7e8ac65d379ac4bcdd18fc73049e3e37 /src/game/Map.cpp | |
parent | af935468df3af499bcae5018845ea6609f026a5b (diff) |
*Some work on vehicles.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r-- | src/game/Map.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp index d53c617e374..c6c74a74493 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -35,6 +35,7 @@ #include "ScriptCalls.h" #include "Group.h" #include "MapRefManager.h" +#include "Vehicle.h" #include "MapInstanced.h" #include "InstanceSaveMgr.h" @@ -962,6 +963,17 @@ Map::CreatureRelocation(Creature *creature, float x, float y, float z, float ang creature->Relocate(x, y, z, ang); AddUnitToNotify(creature); } + + if(creature->isVehicle()) + { + for(SeatMap::iterator itr = ((Vehicle*)creature)->m_Seats.begin(); itr != ((Vehicle*)creature)->m_Seats.end(); ++itr) + if(itr->second.passenger) + if(itr->second.passenger->GetTypeId() == TYPEID_PLAYER) + PlayerRelocation((Player*)itr->second.passenger, x, y, z, ang); + else + CreatureRelocation((Creature*)itr->second.passenger, x, y, z, ang); + } + assert(CheckGridIntegrity(creature,true)); } |