mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Fixes
This commit is contained in:
parent
bca964aca8
commit
74668bb7db
@ -175,7 +175,7 @@ function AI_CARGO_DISPATCHER:OnAfterLoaded( From, Event, To, APC, Cargo )
|
|||||||
local RandomZone = self.SetDeployZones:GetRandomZone()
|
local RandomZone = self.SetDeployZones:GetRandomZone()
|
||||||
self:I( { RandomZone = RandomZone } )
|
self:I( { RandomZone = RandomZone } )
|
||||||
|
|
||||||
self.AICargoAPC[APC]:Deploy( RandomZone:GetCoordinate():GetRandomCoordinateInRadius(25,100), 70 )
|
self.AICargoAPC[APC]:Deploy( RandomZone:GetCoordinate():GetRandomCoordinateInRadius( 25, 200 ), 70 )
|
||||||
self.PickupCargo[Cargo] = nil
|
self.PickupCargo[Cargo] = nil
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|||||||
@ -227,17 +227,17 @@ function AI_CARGO_HELICOPTER:onafterPickup( Helicopter, From, Event, To, Coordin
|
|||||||
local Route = {}
|
local Route = {}
|
||||||
|
|
||||||
--- Calculate the target route point.
|
--- Calculate the target route point.
|
||||||
local CoordinateFrom = Helicopter:GetCoordinate()
|
--local CoordinateFrom = Helicopter:GetCoordinate()
|
||||||
local CoordinateTo = Coordinate
|
local CoordinateTo = Coordinate
|
||||||
|
|
||||||
--- Create a route point of type air.
|
--- Create a route point of type air.
|
||||||
local WaypointFrom = CoordinateFrom:WaypointAir(
|
-- local WaypointFrom = CoordinateFrom:WaypointAir(
|
||||||
"RADIO",
|
-- "RADIO",
|
||||||
POINT_VEC3.RoutePointType.TurningPoint,
|
-- POINT_VEC3.RoutePointType.TurningPoint,
|
||||||
POINT_VEC3.RoutePointAction.TurningPoint,
|
-- POINT_VEC3.RoutePointAction.TurningPoint,
|
||||||
Speed,
|
-- Speed,
|
||||||
true
|
-- true
|
||||||
)
|
-- )
|
||||||
|
|
||||||
--- Create a route point of type air.
|
--- Create a route point of type air.
|
||||||
local WaypointTo = CoordinateTo:WaypointAir(
|
local WaypointTo = CoordinateTo:WaypointAir(
|
||||||
@ -248,7 +248,7 @@ function AI_CARGO_HELICOPTER:onafterPickup( Helicopter, From, Event, To, Coordin
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
|
||||||
Route[#Route+1] = WaypointFrom
|
-- Route[#Route+1] = WaypointFrom
|
||||||
Route[#Route+1] = WaypointTo
|
Route[#Route+1] = WaypointTo
|
||||||
|
|
||||||
--- Now we're going to do something special, we're going to call a function from a waypoint action at the AIControllable...
|
--- Now we're going to do something special, we're going to call a function from a waypoint action at the AIControllable...
|
||||||
@ -259,6 +259,8 @@ function AI_CARGO_HELICOPTER:onafterPickup( Helicopter, From, Event, To, Coordin
|
|||||||
Tasks[#Tasks+1] = Helicopter:TaskLandAtVec2( CoordinateTo:GetVec2() )
|
Tasks[#Tasks+1] = Helicopter:TaskLandAtVec2( CoordinateTo:GetVec2() )
|
||||||
Route[#Route].task = Helicopter:TaskCombo( Tasks )
|
Route[#Route].task = Helicopter:TaskCombo( Tasks )
|
||||||
|
|
||||||
|
Route[#Route+1] = WaypointTo
|
||||||
|
|
||||||
-- Now route the helicopter
|
-- Now route the helicopter
|
||||||
Helicopter:Route( Route, 1 )
|
Helicopter:Route( Route, 1 )
|
||||||
|
|
||||||
@ -284,17 +286,17 @@ function AI_CARGO_HELICOPTER:onafterDeploy( Helicopter, From, Event, To, Coordin
|
|||||||
local Route = {}
|
local Route = {}
|
||||||
|
|
||||||
--- Calculate the target route point.
|
--- Calculate the target route point.
|
||||||
local CoordinateFrom = Helicopter:GetCoordinate()
|
-- local CoordinateFrom = Helicopter:GetCoordinate()
|
||||||
local CoordinateTo = Coordinate
|
local CoordinateTo = Coordinate
|
||||||
|
|
||||||
--- Create a route point of type air.
|
--- Create a route point of type air.
|
||||||
local WaypointFrom = CoordinateFrom:WaypointAir(
|
-- local WaypointFrom = CoordinateFrom:WaypointAir(
|
||||||
"RADIO",
|
-- "RADIO",
|
||||||
POINT_VEC3.RoutePointType.TurningPoint,
|
-- POINT_VEC3.RoutePointType.TurningPoint,
|
||||||
POINT_VEC3.RoutePointAction.TurningPoint,
|
-- POINT_VEC3.RoutePointAction.TurningPoint,
|
||||||
Speed,
|
-- Speed,
|
||||||
true
|
-- true
|
||||||
)
|
-- )
|
||||||
|
|
||||||
--- Create a route point of type air.
|
--- Create a route point of type air.
|
||||||
local WaypointTo = CoordinateTo:WaypointAir(
|
local WaypointTo = CoordinateTo:WaypointAir(
|
||||||
@ -305,7 +307,7 @@ function AI_CARGO_HELICOPTER:onafterDeploy( Helicopter, From, Event, To, Coordin
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
|
||||||
Route[#Route+1] = WaypointFrom
|
-- Route[#Route+1] = WaypointFrom
|
||||||
Route[#Route+1] = WaypointTo
|
Route[#Route+1] = WaypointTo
|
||||||
|
|
||||||
--- Now we're going to do something special, we're going to call a function from a waypoint action at the AIControllable...
|
--- Now we're going to do something special, we're going to call a function from a waypoint action at the AIControllable...
|
||||||
@ -316,6 +318,8 @@ function AI_CARGO_HELICOPTER:onafterDeploy( Helicopter, From, Event, To, Coordin
|
|||||||
Tasks[#Tasks+1] = Helicopter:TaskLandAtVec2( CoordinateTo:GetVec2() )
|
Tasks[#Tasks+1] = Helicopter:TaskLandAtVec2( CoordinateTo:GetVec2() )
|
||||||
Route[#Route].task = Helicopter:TaskCombo( Tasks )
|
Route[#Route].task = Helicopter:TaskCombo( Tasks )
|
||||||
|
|
||||||
|
Route[#Route+1] = WaypointTo
|
||||||
|
|
||||||
-- Now route the helicopter
|
-- Now route the helicopter
|
||||||
Helicopter:Route( Route, 1 )
|
Helicopter:Route( Route, 1 )
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user