mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Attempted to fix modified collection crash in waypoint collection loop
This commit is contained in:
parent
84223508cb
commit
4ee9d1e3da
1 changed files with 2 additions and 2 deletions
|
|
@ -239,9 +239,9 @@ namespace SceneManager.Paths
|
||||||
var collectorWaypoints = Waypoints.Where(x => x.IsCollector);
|
var collectorWaypoints = Waypoints.Where(x => x.IsCollector);
|
||||||
var vehiclesInWorld = World.GetAllVehicles().Where(x => x);
|
var vehiclesInWorld = World.GetAllVehicles().Where(x => x);
|
||||||
|
|
||||||
foreach (Waypoint waypoint in collectorWaypoints)
|
foreach (Waypoint waypoint in collectorWaypoints.ToList())
|
||||||
{
|
{
|
||||||
foreach (Vehicle vehicle in vehiclesInWorld)
|
foreach (Vehicle vehicle in vehiclesInWorld.ToList())
|
||||||
{
|
{
|
||||||
if (vehicle.IsNearCollectorWaypoint(waypoint) && vehicle.IsValidForPathCollection(this))
|
if (vehicle.IsNearCollectorWaypoint(waypoint) && vehicle.IsValidForPathCollection(this))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue