Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/gameserver.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/gameserver.cc b/src/core/gameserver.cc
index 1e2c9e9..c27f5d4 100644
--- a/src/core/gameserver.cc
+++ b/src/core/gameserver.cc
@@ -619,6 +619,7 @@ void GameServer::frame(const unsigned long timestamp)
for (Zone::Registry::iterator zit = Zone::registry().begin(); zit != Zone::registry().end(); ++zit) {
Zone *zone= (*zit).second;
+ // Note: zone->keepalive_run() is set to true by EntityControlable::frame()
zone->set_keepalive_run(false);
}
@@ -644,6 +645,7 @@ void GameServer::frame(const unsigned long timestamp)
Zone *zone = entity->zone();
if (zone && entity->has_flag(Entity::KeepAlive)) {
+ // reset timeout counter if the zone is active
if (zone->keepalive_run() && zone->keepalive_box().inside(entity->location())) {
entity->set_keepalive(this->timestamp());
}