*Fix a logical error in IsOnVehicle check.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-24 13:45:27 -05:00
parent a029ae15e5
commit 6602a9fc48
+1 -1
View File
@@ -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; }