From ba995d1131ca21fd56ae4fbad9a42ab724e9bb6b Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 28 Dec 2010 02:57:36 +0000 Subject: [PATCH] - show more friendly message when out of synch detected. --- source/glest_game/game/commander.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/glest_game/game/commander.cpp b/source/glest_game/game/commander.cpp index 817a5755..5303aefe 100644 --- a/source/glest_game/game/commander.cpp +++ b/source/glest_game/game/commander.cpp @@ -143,7 +143,7 @@ CommandResult Commander::tryGiveCommand(const Unit* unit, const CommandType *com } CommandResult Commander::tryGiveCommand(const Selection *selection, CommandClass commandClass, const Vec2i &pos, const Unit *targetUnit, bool tryQueue) const{ - + if(!selection->isEmpty()){ Vec2i refPos, currPos; CommandResultContainer results; @@ -503,7 +503,8 @@ Command* Commander::buildCommand(const NetworkCommand* networkCommand) const { SystemFlags::OutputDebug(SystemFlags::debugSystem,"%s\n",szBuf); std::string worldLog = world->DumpWorldToLog(); - std::string sError = "worldLog = " + worldLog + " " + string(szBuf); + //std::string sError = "worldLog = " + worldLog + " " + string(szBuf); + std::string sError = "Error [#1]: Game is out of sync, please check log files for details."; throw runtime_error(sError); } @@ -522,7 +523,8 @@ Command* Commander::buildCommand(const NetworkCommand* networkCommand) const { SystemFlags::OutputDebug(SystemFlags::debugSystem,"%s\n",szBuf); std::string worldLog = world->DumpWorldToLog(); - std::string sError = "worldLog = " + worldLog + " " + string(szBuf); + //std::string sError = "worldLog = " + worldLog + " " + string(szBuf); + std::string sError = "Error [#2]: Game is out of sync, please check log files for details."; throw runtime_error(sError); }