Fixed random-selecting ships in netplay

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3165 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2009-07-01 05:33:28 +00:00
parent d877ed58f1
commit 77bbf0e540
+4 -1
View File
@@ -529,6 +529,7 @@ GetMeleeStarShips (COUNT playerMask, HSTARSHIP *ships)
BOOLEAN ok; BOOLEAN ok;
GETMELEE_STATE gmstate; GETMELEE_STATE gmstate;
TimeCount now; TimeCount now;
COUNT i;
#ifdef NETPLAY #ifdef NETPLAY
for (playerI = 0; playerI < NUM_PLAYERS; playerI++) for (playerI = 0; playerI < NUM_PLAYERS; playerI++)
@@ -554,8 +555,10 @@ GetMeleeStarShips (COUNT playerMask, HSTARSHIP *ships)
now = GetTimeCounter (); now = GetTimeCounter ();
gmstate.InputFunc = DoGetMelee; gmstate.InputFunc = DoGetMelee;
gmstate.Initialized = FALSE; gmstate.Initialized = FALSE;
for (playerI = 0; playerI < NUM_PLAYERS; playerI++) for (i = 0; i < NUM_PLAYERS; ++i)
{ {
// We have to use TFB_Random() results in specific order
playerI = GetPlayerOrder (i);
gmstate.player[playerI].selecting = gmstate.player[playerI].selecting =
(playerMask & (1 << playerI)) != 0; (playerMask & (1 << playerI)) != 0;
gmstate.player[playerI].ships_left = battle_counter[playerI]; gmstate.player[playerI].ships_left = battle_counter[playerI];