From c62fe609a69058e2e30f757e9a06f72a98464232 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 17 Sep 2010 15:19:34 +0000 Subject: Bump network protocol version to 19, menudescriptions use the info infrastructure, client-side lazy info update requests. Updated ROADMAP --- src/core/gameconnection.cc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/core/gameconnection.cc') diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc index ce33dc6..3167790 100644 --- a/src/core/gameconnection.cc +++ b/src/core/gameconnection.cc @@ -100,20 +100,16 @@ Info *GameConnection::info(unsigned int id) // find the info record Info *info = Info::find(id); - if (info) { - if (!info->timestamp() || (connection_timestamp - info->timestamp()) < INFOTIMEOUT) - return info; - } else { + if (!info) { info = new Info(id); - info->add_text("Requesting information..."); } - + if ( !info->timestamp() || (connection_timestamp < info->timestamp() + INFOTIMEOUT) ) + return info; + // send an information request to the server if (connection_network) { - //con_debug << "Requesting info for " << info->id() << std::endl; info->set_timestamp(connection_timestamp); - connection_network->send_info_request(info); connection_network->transmit(); } else { @@ -121,9 +117,9 @@ Info *GameConnection::info(unsigned int id) info->set_timestamp(0); } return info; - } +/* Info *GameConnection::info(const std::string &type, const std::string &label) { if (!type.size()) { @@ -166,6 +162,7 @@ Info *GameConnection::info(const std::string &type, const std::string &label) } return info; } +*/ void GameConnection::abort() { -- cgit v1.2.3