Fixed potential command-ordering issue

This commit is contained in:
mathusummut
2018-09-26 22:25:44 +02:00
parent 5d250fb60b
commit b040a479bc
2 changed files with 4 additions and 4 deletions

View File

@@ -486,7 +486,7 @@ namespace
unitId, commandType->getId(), currPos,
-1, targetId, -1, tryQueue, cst_None,
-1, unitCommandGroupId);
resultCur = pushNetworkCommand(&networkCommand);
resultCur = pushNetworkCommand(&networkCommand, isMove);
}
results.push_back(resultCur);
} else if (!ignoreBuildings && unit->isMeetingPointSettable()) {
@@ -645,7 +645,7 @@ namespace
std::pair < CommandResult,
string >
Commander::pushNetworkCommand(const NetworkCommand *
networkCommand) const {
networkCommand, bool insertAtStart) const {
GameNetworkInterface *
gameNetworkInterface =
NetworkManager::getInstance().getGameNetworkInterface();
@@ -689,7 +689,7 @@ namespace
}
//add the command to the interface
gameNetworkInterface->requestCommand(networkCommand, true);
gameNetworkInterface->requestCommand(networkCommand, insertAtStart);
//calculate the result of the command
if (unit != NULL

View File

@@ -177,7 +177,7 @@ namespace
std::pair <
CommandResult,
string >
pushNetworkCommand(const NetworkCommand * networkCommand) const;
pushNetworkCommand(const NetworkCommand * networkCommand, bool insertAtStart = false) const;
std::pair <
CommandResult,
string >