diff options
author | Stijn Buys <ingar@osirion.org> | 2008-09-10 19:17:52 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-09-10 19:17:52 +0000 |
commit | 83fb219e62113a9f41888af4f2726e5ce5305970 (patch) | |
tree | 3ba9780192fc7aa7d1fe7988b30a85c5ba08d422 /src/core/zone.cc | |
parent | 033bd59cfc2dff93529ad448459ad6348ea29c8d (diff) |
serverside entities
Diffstat (limited to 'src/core/zone.cc')
-rw-r--r-- | src/core/zone.cc | 11 |
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 << " "; |