mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added check if the waypoint's collector radius is set before trying to update it
This commit is contained in:
parent
96b535675c
commit
25fbd0a8ec
1 changed files with 4 additions and 1 deletions
|
|
@ -56,7 +56,10 @@ namespace SceneManager
|
|||
editWaypointMenu.AddItem(collectorWaypoint = new UIMenuCheckboxItem("Collector Waypoint", PathMainMenu.GetPaths()[PathMainMenu.editPath.Index].Waypoints[editWaypoint.Index].IsCollector));
|
||||
|
||||
editWaypointMenu.AddItem(changeCollectorRadius = new UIMenuListScrollerItem<float>("Change Collection Radius", "", collectorRadii));
|
||||
changeCollectorRadius.Index = Array.IndexOf(collectorRadii, PathMainMenu.GetPaths()[PathMainMenu.editPath.Index].Waypoints[editWaypoint.Index].CollectorRadius);
|
||||
if (PathMainMenu.GetPaths()[PathMainMenu.editPath.Index].Waypoints[editWaypoint.Index].CollectorRadius != 0)
|
||||
{
|
||||
changeCollectorRadius.Index = Array.IndexOf(collectorRadii, PathMainMenu.GetPaths()[PathMainMenu.editPath.Index].Waypoints[editWaypoint.Index].CollectorRadius);
|
||||
}
|
||||
|
||||
editWaypointMenu.AddItem(updateWaypointPosition = new UIMenuCheckboxItem("Update Waypoint Position", false));
|
||||
editWaypointMenu.AddItem(editUpdateWaypoint = new UIMenuItem("Update Waypoint"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue