mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Smaller fixes
This commit is contained in:
parent
7f7999e3e5
commit
61b7b3ead6
@ -1060,7 +1060,7 @@ function FOX:onafterMissileLaunch(From, Event, To, missile)
|
||||
|
||||
-- Tracking info and init of last bomb position.
|
||||
local text=string.format("FOX: Tracking missile %s(%s) - target %s - shooter %s", missile.missileType, missile.missileName, tostring(missile.targetName), missile.shooterName)
|
||||
self:I(FOX.lid..text)
|
||||
self:T(FOX.lid..text)
|
||||
MESSAGE:New(text, 10):ToAllIf(self.Debug)
|
||||
|
||||
-- Loop over players.
|
||||
|
||||
@ -3003,7 +3003,7 @@ end
|
||||
-- local callsign = mygroup:GetCustomCallSign(true,false,nil,function(groupname,playername) return string.match(playername,"([%a]+)$") end)
|
||||
--
|
||||
function GROUP:GetCustomCallSign(ShortCallsign,Keepnumber,CallsignTranslations,CustomFunction,...)
|
||||
--self:I("GetCustomCallSign")
|
||||
self:T("GetCustomCallSign")
|
||||
|
||||
local callsign = "Ghost 1"
|
||||
if self:IsAlive() then
|
||||
@ -3016,8 +3016,12 @@ function GROUP:GetCustomCallSign(ShortCallsign,Keepnumber,CallsignTranslations,C
|
||||
local callnumbermajor = string.char(string.byte(callnumber,1)) -- 9
|
||||
local callnumberminor = string.char(string.byte(callnumber,2)) -- 1
|
||||
local personalized = false
|
||||
local playername = IsPlayer == true and self:GetPlayerName() or shortcallsign
|
||||
--local playername = IsPlayer == true and self:GetPlayerName() or shortcallsign
|
||||
local playername = shortcallsign
|
||||
|
||||
if IsPlayer then playername = self:GetPlayerName() end
|
||||
|
||||
self:T2("GetCustomCallSign outcome = "..playername)
|
||||
if CustomFunction and IsPlayer then
|
||||
local arguments = arg or {}
|
||||
local callsign = CustomFunction(groupname,playername,unpack(arguments))
|
||||
|
||||
@ -110,14 +110,17 @@ function POSITIONABLE:Destroy( GenerateEvent )
|
||||
|
||||
if GenerateEvent and GenerateEvent == true then
|
||||
if self:IsAir() then
|
||||
--self:ScheduleOnce(1,self.CreateEventCrash,self,timer.getTime(),DCSObject)
|
||||
self:CreateEventCrash( timer.getTime(), DCSObject )
|
||||
else
|
||||
--self:ScheduleOnce(1,self.CreateEventDead,self,timer.getTime(),DCSObject)
|
||||
self:CreateEventDead( timer.getTime(), DCSObject )
|
||||
end
|
||||
elseif GenerateEvent == false then
|
||||
-- Do nothing!
|
||||
else
|
||||
self:CreateEventRemoveUnit( timer.getTime(), DCSObject )
|
||||
--self:ScheduleOnce(1,self.CreateEventRemoveUnit,self,timer.getTime(),DCSObject)
|
||||
end
|
||||
|
||||
USERFLAG:New( UnitGroupName ):Set( 100 )
|
||||
@ -142,7 +145,11 @@ function POSITIONABLE:GetPosition()
|
||||
self:F2( self.PositionableName )
|
||||
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
|
||||
if self:IsInstanceOf("GROUP") then
|
||||
DCSPositionable = self:GetFirstUnitAlive():GetDCSObject()
|
||||
end
|
||||
|
||||
if DCSPositionable then
|
||||
local PositionablePosition = DCSPositionable:getPosition()
|
||||
self:T3( PositionablePosition )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user