Skip to content

Commit

Permalink
Merge pull request #481 from Autodesk/multiplayer-fix-4.3.3.0
Browse files Browse the repository at this point in the history
Fixed bug that added bots and messed up controls
  • Loading branch information
MattMoradi authored Jan 14, 2020
2 parents d1fc0c1 + 3421654 commit 29a6508
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions engine/Assets/Scripts/States/MainState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -530,16 +530,17 @@ public bool ChangeRobot(string directory, bool isMixAndMatch)
UnityEngine.Object.Destroy(SpawnedRobots[index].gameObject);
ActiveRobot = null;

int i = 0;
foreach (SimulatorRobot robot in SpawnedRobots)
{
robot.ControlIndex = i;
i++;
}

if (LoadRobot(directory, isMixAndMatch))
if (LoadRobot(directory, isMixAndMatch, index))
{
DynamicCamera.ControlEnabled = true;

int i = 0;
foreach (SimulatorRobot robot in SpawnedRobots)
{
robot.ControlIndex = i;
i++;
}

return true;
}

Expand Down

0 comments on commit 29a6508

Please sign in to comment.