diff --git a/source/glest_game/game/commander.cpp b/source/glest_game/game/commander.cpp index c77f6baed..e8d673960 100644 --- a/source/glest_game/game/commander.cpp +++ b/source/glest_game/game/commander.cpp @@ -860,8 +860,7 @@ namespace replayCommandList.push_back(make_pair(worldFrameCount, command)); } - void - Commander::giveNetworkCommand(NetworkCommand * networkCommand) const { + std::pair Commander::giveNetworkCommand(NetworkCommand * networkCommand) const { Chrono chrono; if (SystemFlags::getSystemSettingType(SystemFlags::debugPerformance). @@ -1549,8 +1548,7 @@ namespace break; default: - assert(false); - break; + return std::pair(crFailUndefined, ""); } } else { if (SystemFlags:: @@ -1563,6 +1561,7 @@ namespace networkCommand->getUnitId(), networkCommand-> getNetworkCommandType()); + return std::pair(crFailUndefined, ""); } } @@ -1573,6 +1572,7 @@ namespace extractFileFromDirectoryPath(__FILE__). c_str(), __FUNCTION__, __LINE__, chrono.getMillis()); + return std::pair(crSuccess, ""); } // Reconstruct a network command received. diff --git a/source/glest_game/game/commander.h b/source/glest_game/game/commander.h index 86f1701a4..6849e8c42 100644 --- a/source/glest_game/game/commander.h +++ b/source/glest_game/game/commander.h @@ -182,7 +182,7 @@ namespace CommandResult, string > computeResult(const CommandResultContainer & results) const; - void + std::pair giveNetworkCommand(NetworkCommand * networkCommand) const; bool canSubmitCommandType(const Unit * unit,