diff options
Diffstat (limited to 'src/game/Object.h')
-rw-r--r-- | src/game/Object.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/game/Object.h b/src/game/Object.h index 9544021a2a0..dd8b808b920 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -321,6 +321,7 @@ class Object Player* ToPlayer(){ if(GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player*>(this); else return NULL; } const Player* ToPlayer() const { if(GetTypeId() == TYPEID_PLAYER) return (const Player*)((Player*)this); else return NULL; } Creature* ToCreature(){ if(GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature*>(this); else return NULL; } + const Creature* ToCreature() const {if(GetTypeId() == TYPEID_UNIT) return (const Creature*)((Creature*)this); else return NULL; } protected: |