1
Fork 0
mirror of https://github.com/thegeneralist01/Scene-Manager-DevRepo synced 2026-01-11 23:50:29 +01:00

Removed dead code

This commit is contained in:
Rich Dunne 2020-10-04 14:49:06 -06:00
parent bf8985179d
commit 5f0fb16160

View file

@ -73,17 +73,7 @@ namespace SceneManager
GameFiber.StartNew(() => GameFiber.StartNew(() =>
{ {
// check if the vehicle is near any of the path's collector waypoints // check if the vehicle is near any of the path's collector waypoints
//var nearestCollectorWaypoint = Path.Waypoints.Where(wp => wp.IsCollector && Vehicle.DistanceTo2D(wp.Position) <= wp.CollectorRadius * 2).FirstOrDefault();
var nearestCollectorWaypoint = Path.Waypoints.Where(wp => wp.IsCollector).OrderBy(wp => Vehicle.DistanceTo2D(wp.Position)).FirstOrDefault(); var nearestCollectorWaypoint = Path.Waypoints.Where(wp => wp.IsCollector).OrderBy(wp => Vehicle.DistanceTo2D(wp.Position)).FirstOrDefault();
//if(nearestCollectorWaypoint != null && Vehicle.FrontPosition.DistanceTo2D(nearestCollectorWaypoint.Position) <= 5f)
//{
// while (nearestCollectorWaypoint != null && Vehicle && Driver && Vehicle.FrontPosition.DistanceTo2D(nearestCollectorWaypoint.Position) <= 5f)
// {
// Game.LogTrivial($"{Vehicle.Model.Name} is within 5f of nearest collector to be fully dismissed.");
// GameFiber.Yield();
// }
//}
//else if
if(nearestCollectorWaypoint != null) if(nearestCollectorWaypoint != null)
{ {
while (nearestCollectorWaypoint != null && Vehicle && Driver && Vehicle.FrontPosition.DistanceTo2D(nearestCollectorWaypoint.Position) <= nearestCollectorWaypoint.CollectorRadius * 2) while (nearestCollectorWaypoint != null && Vehicle && Driver && Vehicle.FrontPosition.DistanceTo2D(nearestCollectorWaypoint.Position) <= nearestCollectorWaypoint.CollectorRadius * 2)