Skip to content

Commit 862140e

Browse files
authored
Merge pull request #481 from Autodesk/multiplayer-fix-4.3.3.0
Fixed bug that added bots and messed up controls Former-commit-id: 29a6508
2 parents c84ab4c + f084feb commit 862140e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

engine/Assets/Scripts/States/MainState.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -530,16 +530,17 @@ public bool ChangeRobot(string directory, bool isMixAndMatch)
530530
UnityEngine.Object.Destroy(SpawnedRobots[index].gameObject);
531531
ActiveRobot = null;
532532

533-
int i = 0;
534-
foreach (SimulatorRobot robot in SpawnedRobots)
535-
{
536-
robot.ControlIndex = i;
537-
i++;
538-
}
539-
540-
if (LoadRobot(directory, isMixAndMatch))
533+
if (LoadRobot(directory, isMixAndMatch, index))
541534
{
542535
DynamicCamera.ControlEnabled = true;
536+
537+
int i = 0;
538+
foreach (SimulatorRobot robot in SpawnedRobots)
539+
{
540+
robot.ControlIndex = i;
541+
i++;
542+
}
543+
543544
return true;
544545
}
545546

0 commit comments

Comments
 (0)