mirror of
https://github.com/glest/glest-source.git
synced 2025-09-08 23:10:42 +02:00
Fixed potential command-ordering issue
This commit is contained in:
@@ -486,7 +486,7 @@ namespace
|
|||||||
unitId, commandType->getId(), currPos,
|
unitId, commandType->getId(), currPos,
|
||||||
-1, targetId, -1, tryQueue, cst_None,
|
-1, targetId, -1, tryQueue, cst_None,
|
||||||
-1, unitCommandGroupId);
|
-1, unitCommandGroupId);
|
||||||
resultCur = pushNetworkCommand(&networkCommand);
|
resultCur = pushNetworkCommand(&networkCommand, isMove);
|
||||||
}
|
}
|
||||||
results.push_back(resultCur);
|
results.push_back(resultCur);
|
||||||
} else if (!ignoreBuildings && unit->isMeetingPointSettable()) {
|
} else if (!ignoreBuildings && unit->isMeetingPointSettable()) {
|
||||||
@@ -645,7 +645,7 @@ namespace
|
|||||||
std::pair < CommandResult,
|
std::pair < CommandResult,
|
||||||
string >
|
string >
|
||||||
Commander::pushNetworkCommand(const NetworkCommand *
|
Commander::pushNetworkCommand(const NetworkCommand *
|
||||||
networkCommand) const {
|
networkCommand, bool insertAtStart) const {
|
||||||
GameNetworkInterface *
|
GameNetworkInterface *
|
||||||
gameNetworkInterface =
|
gameNetworkInterface =
|
||||||
NetworkManager::getInstance().getGameNetworkInterface();
|
NetworkManager::getInstance().getGameNetworkInterface();
|
||||||
@@ -689,7 +689,7 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
//add the command to the interface
|
//add the command to the interface
|
||||||
gameNetworkInterface->requestCommand(networkCommand, true);
|
gameNetworkInterface->requestCommand(networkCommand, insertAtStart);
|
||||||
|
|
||||||
//calculate the result of the command
|
//calculate the result of the command
|
||||||
if (unit != NULL
|
if (unit != NULL
|
||||||
|
@@ -177,7 +177,7 @@ namespace
|
|||||||
std::pair <
|
std::pair <
|
||||||
CommandResult,
|
CommandResult,
|
||||||
string >
|
string >
|
||||||
pushNetworkCommand(const NetworkCommand * networkCommand) const;
|
pushNetworkCommand(const NetworkCommand * networkCommand, bool insertAtStart = false) const;
|
||||||
std::pair <
|
std::pair <
|
||||||
CommandResult,
|
CommandResult,
|
||||||
string >
|
string >
|
||||||
|
Reference in New Issue
Block a user