mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#FLIGHTCONTROL
* Fix for shelters, puts the guy out front and not on top.
This commit is contained in:
parent
eed6119193
commit
b4058ecab2
@ -329,7 +329,7 @@ FLIGHTCONTROL.FlightStatus={
|
||||
|
||||
--- FlightControl class version.
|
||||
-- @field #string version
|
||||
FLIGHTCONTROL.version="0.7.4"
|
||||
FLIGHTCONTROL.version="0.7.5"
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- TODO list
|
||||
@ -4441,11 +4441,21 @@ function FLIGHTCONTROL:SpawnParkingGuard(unit)
|
||||
-- Length of the unit + 3 meters.
|
||||
local size, x, y, z=unit:GetObjectSize()
|
||||
|
||||
local xdiff = 3
|
||||
--Fix for hangars, puts the guy out front and not on top.
|
||||
if AIRBASE._CheckTerminalType(spot.TerminalType, AIRBASE.TerminalType.Shelter) then
|
||||
xdiff = 27-(x*0.5)
|
||||
end
|
||||
|
||||
if (AIRBASE._CheckTerminalType(spot.TerminalType, AIRBASE.TerminalType.OpenMed) or AIRBASE._CheckTerminalType(spot.TerminalType, AIRBASE.TerminalType.Shelter)) and self.airbasename == AIRBASE.Sinai.Ramon_Airbase then
|
||||
xdiff = 12
|
||||
end
|
||||
|
||||
-- Debug message.
|
||||
self:T2(self.lid..string.format("Parking guard for %s: heading=%d, distance x=%.1f m", unit:GetName(), heading, x))
|
||||
self:T2(self.lid..string.format("Parking guard for %s: heading=%d, length x=%.1f m, xdiff=%.1f m", unit:GetName(), heading, x, xdiff))
|
||||
|
||||
-- Coordinate for the guard.
|
||||
local Coordinate=coordinate:Translate(0.75*x+3, heading)
|
||||
local Coordinate=coordinate:Translate(x*0.5+xdiff, heading)
|
||||
|
||||
-- Let him face the aircraft.
|
||||
local lookat=heading-180
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user