Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/zone.cc')
-rw-r--r--src/core/zone.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/zone.cc b/src/core/zone.cc
index 87ab9b4..2dfc5c2 100644
--- a/src/core/zone.cc
+++ b/src/core/zone.cc
@@ -181,6 +181,17 @@ Entity *Zone::find_entity(unsigned int id)
return 0;
}
+Entity *Zone::find_entity(const std::string & label)
+{
+ for (Content::iterator it = zone_content.begin(); it != zone_content.end(); it++) {
+ if ((*it)->label().compare(label) == 0) {
+ return (*it);
+ }
+ }
+
+ return 0;
+}
+
void Zone::serialize_server_update(std::ostream & os) const
{
os << zone_label << " ";