diff options
| author | silverice <none@none> | 2010-03-18 20:21:42 +0200 |
|---|---|---|
| committer | silverice <none@none> | 2010-03-18 20:21:42 +0200 |
| commit | aca2d26bc5060808b22bb268e3a04375a1ba6d18 (patch) | |
| tree | 07c1faeaede1bd9d8d0ceba7c02070f87c8db7b3 /src/game/Unit.cpp | |
| parent | 59e0d42260921d8d0d7d94ccdef78a4fcc149fbc (diff) | |
remove unused player's class member,cleanup
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index c11bff030c1..1b7813d6bbb 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -15287,9 +15287,10 @@ Unit *Unit::GetVehicleBase() const Creature *Unit::GetVehicleCreatureBase() const { - Unit *veh = GetVehicleBase(); - if (veh && veh->GetTypeId() == TYPEID_UNIT) - return dynamic_cast<Creature*>(veh); + if( Unit *veh = GetVehicleBase()) + if( Creature *c = veh->ToCreature()) + return c; + return NULL; } |
