This commit is contained in:
Applevangelist 2023-11-08 11:09:49 +01:00
parent 7f650913d9
commit d5a9f776f7
3 changed files with 16 additions and 6 deletions

View File

@ -329,7 +329,7 @@ FLIGHTCONTROL.FlightStatus={
--- FlightControl class version. --- FlightControl class version.
-- @field #string version -- @field #string version
FLIGHTCONTROL.version="0.7.4" FLIGHTCONTROL.version="0.7.5"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list -- TODO list
@ -4441,11 +4441,21 @@ function FLIGHTCONTROL:SpawnParkingGuard(unit)
-- Length of the unit + 3 meters. -- Length of the unit + 3 meters.
local size, x, y, z=unit:GetObjectSize() 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. -- 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. -- 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. -- Let him face the aircraft.
local lookat=heading-180 local lookat=heading-180

View File

@ -1773,7 +1773,7 @@ function AIRBASE:_CheckParkingLists(TerminalID)
end end
--- Helper function to check for the correct terminal type including "artificial" ones. --- Helper function to check for the correct terminal type including "artificial" ones.
-- @param #number Term_Type Termial type from getParking routine. -- @param #number Term_Type Terminal type from getParking routine.
-- @param #AIRBASE.TerminalType termtype Terminal type from AIRBASE.TerminalType enumerator. -- @param #AIRBASE.TerminalType termtype Terminal type from AIRBASE.TerminalType enumerator.
-- @return #boolean True if terminal types match. -- @return #boolean True if terminal types match.
function AIRBASE._CheckTerminalType(Term_Type, termtype) function AIRBASE._CheckTerminalType(Term_Type, termtype)

View File

@ -5,7 +5,7 @@
-- === -- ===
-- --
-- ### Author: **Applevangelist** -- ### Author: **Applevangelist**
-- # Last Update June 2023 -- # Last Update Oct 2023
-- --
-- === -- ===
-- --
@ -43,7 +43,7 @@ do
-- @field #NET -- @field #NET
NET = { NET = {
ClassName = "NET", ClassName = "NET",
Version = "0.1.2", Version = "0.1.3",
BlockTime = 600, BlockTime = 600,
BlockedPilots = {}, BlockedPilots = {},
BlockedUCIDs = {}, BlockedUCIDs = {},