Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-10 20:44:07 +0000
committerStijn Buys <ingar@osirion.org>2013-11-10 20:44:07 +0000
commit2ae807c202489e0126733c29095947662ad527b1 (patch)
treed805ae8c81f5f15389b304e5c851619a73957da4 /src/core
parent5eaf6cc1f9ab772139a2dbe6d325a7ab9879e01b (diff)
Ignore server-side entities when using 'goto' and added a safety distance and a nudge check.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/zone.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/core/zone.cc b/src/core/zone.cc
index 2ea04fb..659e62f 100644
--- a/src/core/zone.cc
+++ b/src/core/zone.cc
@@ -274,14 +274,17 @@ Entity *Zone::search_entity(const std::string & searchname)
for (Content::iterator it = zone_content.begin(); it != zone_content.end(); it++) {
Entity *entity = (*it);
- label.assign(entity->label());
- if (label.size() && (label.find(strsearchkey) != std::string::npos)) {
- return entity;
- }
-
- name.assign(aux::lowercase(entity->name()));
- if (name.size() && (name.find(strsearchkey) != std::string::npos)) {
- return entity;
+ if (!entity->serverside())
+ {
+ label.assign(entity->label());
+ if (label.size() && (label.find(strsearchkey) != std::string::npos)) {
+ return entity;
+ }
+
+ name.assign(aux::lowercase(entity->name()));
+ if (name.size() && (name.find(strsearchkey) != std::string::npos)) {
+ return entity;
+ }
}
}