Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-09-10 19:17:52 +0000
committerStijn Buys <ingar@osirion.org>2008-09-10 19:17:52 +0000
commit83fb219e62113a9f41888af4f2726e5ce5305970 (patch)
tree3ba9780192fc7aa7d1fe7988b30a85c5ba08d422 /src/core/zone.cc
parent033bd59cfc2dff93529ad448459ad6348ea29c8d (diff)
serverside entities
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 << " ";