From fb18eff66171e855e378575b534683e4fb9c20f5 Mon Sep 17 00:00:00 2001
From: Stijn Buys <ingar@osirion.org>
Date: Sun, 3 Nov 2013 23:33:56 +0000
Subject: Added gameserver comments.

---
 src/core/gameserver.cc | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src')

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());
 			}
-- 
cgit v1.2.3