From 2ae807c202489e0126733c29095947662ad527b1 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 10 Nov 2013 20:44:07 +0000 Subject: Ignore server-side entities when using 'goto' and added a safety distance and a nudge check. --- src/core/zone.cc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/core') 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; + } } } -- cgit v1.2.3