diff options
author | megamage <none@none> | 2009-08-26 19:28:21 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-26 19:28:21 -0500 |
commit | 21af4cf832daeccb1617e37e15cd7b9bcebfb6c8 (patch) | |
tree | 04d46e30bc492ba8aa7b449ab2a3f721e95d96a3 /src/game/Vehicle.cpp | |
parent | 390257b2f6d4d4b03a3226a39b478b3ea92b4dea (diff) |
*Some clean up and add debug info to find the reason of crash.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Vehicle.cpp')
-rw-r--r-- | src/game/Vehicle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp index 7df2da734cc..4df462f57f4 100644 --- a/src/game/Vehicle.cpp +++ b/src/game/Vehicle.cpp @@ -44,6 +44,8 @@ Vehicle::Vehicle(Unit *unit, VehicleEntry const *vehInfo) : me(unit), m_vehicleI Vehicle::~Vehicle() { + for(SeatMap::const_iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr) + assert(!itr->second.passenger); } void Vehicle::Install() @@ -198,7 +200,7 @@ void Vehicle::InstallAccessory(uint32 entry, int8 seatId) passenger->ExitVehicle(); // this should not happen } - Creature *accessory = me->SummonCreature(entry, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, 0); + Creature *accessory = me->SummonCreature(entry, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); if(!accessory) return; accessory->AddUnitTypeMask(UNIT_MASK_ACCESSORY); |