Skip to content

Commit

Permalink
switchd from a foreach to a for loop to avoid a timing related error …
Browse files Browse the repository at this point in the history
…(changing allowed area during drone spawn)
  • Loading branch information
Sn1p3rr3c0n committed Oct 13, 2020
1 parent bc79b99 commit cd62f52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/ProjectRimFactory/Drones/Building_DroneStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ public void Update_droneAllowedArea_forDrones(Area dr = null)
{
//Refresh the area
droneAllowedArea = dr ?? (Area)GetDroneAllowedArea;
foreach (Pawn_Drone sdrone in spawnedDrones)
for (int i = 0; i < spawnedDrones.Count; i++)
{
sdrone.playerSettings.AreaRestriction = droneAllowedArea;
spawnedDrones[i].playerSettings.AreaRestriction = droneAllowedArea;
}
}

Expand Down

0 comments on commit cd62f52

Please sign in to comment.