diff options
author | megamage <none@none> | 2009-08-24 13:45:27 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-24 13:45:27 -0500 |
commit | 6602a9fc48df1859148aadb9bc1223c359e81c96 (patch) | |
tree | e4b2047ff110cfcd2f71f1b447fa7eb61973701b /src | |
parent | a029ae15e597bc3a1b07aa5b8802a86201cb10fd (diff) |
*Fix a logical error in IsOnVehicle check.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/Unit.h b/src/game/Unit.h index c7e2e838212..523b4c19f7a 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1838,7 +1838,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject bool CreateVehicleKit(uint32 id); Vehicle *GetVehicleKit()const { return m_vehicleKit; } Vehicle *GetVehicle() const { return m_vehicle; } - bool IsOnVehicle(const Unit *unit) const { return m_vehicle == unit->GetVehicleKit(); } + bool IsOnVehicle(const Unit *unit) const { return m_vehicle && m_vehicle == unit->GetVehicleKit(); } Unit *GetVehicleBase() const; Creature *GetVehicleCreatureBase() const; float GetTransOffsetX() const { return m_movementInfo.t_x; } |