Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/zone.cc4
-rw-r--r--src/core/zone.h2
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);