mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#FLIGHTCONTROL
* Added a delay in spawning the parking guard so in MP we have time to get the heading of the Player's plane
This commit is contained in:
parent
0d1fc2fbf2
commit
c7ef270d4d
@ -4424,14 +4424,11 @@ end
|
|||||||
-- Misc Functions
|
-- Misc Functions
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
--- Add parking guard in front of a parking aircraft.
|
--- [INTERNAL] Add parking guard in front of a parking aircraft - delayed for MP.
|
||||||
-- @param #FLIGHTCONTROL self
|
-- @param #FLIGHTCONTROL self
|
||||||
-- @param Wrapper.Unit#UNIT unit The aircraft.
|
-- @param Wrapper.Unit#UNIT unit The aircraft.
|
||||||
function FLIGHTCONTROL:SpawnParkingGuard(unit)
|
function FLIGHTCONTROL:_SpawnParkingGuard(unit)
|
||||||
|
-- Position of the unit.
|
||||||
if unit and self.parkingGuard then
|
|
||||||
|
|
||||||
-- Position of the unit.
|
|
||||||
local coordinate=unit:GetCoordinate()
|
local coordinate=unit:GetCoordinate()
|
||||||
|
|
||||||
-- Parking spot.
|
-- Parking spot.
|
||||||
@ -4478,6 +4475,17 @@ function FLIGHTCONTROL:SpawnParkingGuard(unit)
|
|||||||
else
|
else
|
||||||
self:E(self.lid.."ERROR: Parking Guard already exists!")
|
self:E(self.lid.."ERROR: Parking Guard already exists!")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Add parking guard in front of a parking aircraft.
|
||||||
|
-- @param #FLIGHTCONTROL self
|
||||||
|
-- @param Wrapper.Unit#UNIT unit The aircraft.
|
||||||
|
function FLIGHTCONTROL:SpawnParkingGuard(unit)
|
||||||
|
|
||||||
|
if unit and self.parkingGuard then
|
||||||
|
|
||||||
|
-- Schedule delay so in MP we get the heading of the client's plane
|
||||||
|
self:ScheduleOnce(1,FLIGHTCONTROL._SpawnParkingGuard,self,unit)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user