diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/zone.cc | 4 | ||||
-rw-r--r-- | src/core/zone.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/zone.cc b/src/core/zone.cc index c298f78..8c74457 100644 --- a/src/core/zone.cc +++ b/src/core/zone.cc @@ -191,11 +191,11 @@ void Zone::remove(Entity *entity) } } -Entity *Zone::find_entity(Entity *entity) +Entity *Zone::find_entity(const Entity *entity) { for (Content::iterator it = zone_content.begin(); it != zone_content.end(); it++) { if ((*it) == entity) { - return entity; + return (*it); } } diff --git a/src/core/zone.h b/src/core/zone.h index d2cdf2c..f80999d 100644 --- a/src/core/zone.h +++ b/src/core/zone.h @@ -97,7 +97,7 @@ public: } /// find an entity inside a zone - Entity *find_entity(Entity *entity); + Entity *find_entity(const Entity *entity); /// find an entity inside a zone Entity *find_entity(unsigned int id); |