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

Updated reference to vehicle tasking based on AITasking refactor. Fixed speed zone radius not updating correctly.

This commit is contained in:
Rich Dunne 2020-10-24 07:47:09 -06:00
parent ebf8884842
commit a187d8bac9

View file

@ -97,7 +97,7 @@ namespace SceneManager
{
IsCollector = true;
RemoveSpeedZone();
SpeedZone = World.AddSpeedZone(currentWaypoint.Position, SpeedZoneRadius, speed);
SpeedZone = World.AddSpeedZone(currentWaypoint.Position, speedZoneRadius, speed);
Blip.Color = Color.Blue;
if (CollectorRadiusBlip)
{
@ -321,8 +321,8 @@ namespace SceneManager
if (collectedVehicle == null)
{
CollectedVehicle newCollectedVehicle = AddVehicleToCollection(vehicle);
//Logger.Log($"Vehicle's front position distance to waypoint: {vehicle.FrontPosition.DistanceTo2D(waypoint.Position)}, collector radius: {waypoint.CollectorRadius}");
GameFiber AssignTasksFiber = new GameFiber(() => AITasking.AssignWaypointTasks(newCollectedVehicle, Path, this));
GameFiber AssignTasksFiber = new GameFiber(() => newCollectedVehicle.AssignWaypointTasks(Path, this));
//GameFiber AssignTasksFiber = new GameFiber(() => AITasking.AssignWaypointTasks(newCollectedVehicle, Path, this));
AssignTasksFiber.Start();
}
}