From 217c92e939205753c99c862a8ca290f65e2d780d Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 30 Jun 2010 18:59:28 +0000 Subject: [PATCH] - updated warnhing message condition to also check LAG time in addition to lag count --- source/glest_game/network/server_interface.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/glest_game/network/server_interface.cpp b/source/glest_game/network/server_interface.cpp index 1d9471764..7a5d72d1f 100644 --- a/source/glest_game/network/server_interface.cpp +++ b/source/glest_game/network/server_interface.cpp @@ -263,8 +263,10 @@ bool ServerInterface::clientLagCheck(ConnectionSlot* connectionSlot) { } } // New lag check warning - else if(maxFrameCountLagAllowed > 0 && warnFrameCountLagPercent > 0 && - (clientLagCount > (maxFrameCountLagAllowed * warnFrameCountLagPercent))) { + else if((maxFrameCountLagAllowed > 0 && warnFrameCountLagPercent > 0 && + clientLagCount > (maxFrameCountLagAllowed * warnFrameCountLagPercent)) || + (maxClientLagTimeAllowed > 0 && warnFrameCountLagPercent > 0 && + clientLagTime > (maxClientLagTimeAllowed * warnFrameCountLagPercent)) ) { if(connectionSlot->getLagCountWarning() == false) { connectionSlot->setLagCountWarning(true);