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.
|
-- 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)
|
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)
|
MESSAGE:New(text, 10):ToAllIf(self.Debug)
|
||||||
|
|
||||||
-- Loop over players.
|
-- Loop over players.
|
||||||
|
|||||||
@ -3003,7 +3003,7 @@ end
|
|||||||
-- local callsign = mygroup:GetCustomCallSign(true,false,nil,function(groupname,playername) return string.match(playername,"([%a]+)$") end)
|
-- local callsign = mygroup:GetCustomCallSign(true,false,nil,function(groupname,playername) return string.match(playername,"([%a]+)$") end)
|
||||||
--
|
--
|
||||||
function GROUP:GetCustomCallSign(ShortCallsign,Keepnumber,CallsignTranslations,CustomFunction,...)
|
function GROUP:GetCustomCallSign(ShortCallsign,Keepnumber,CallsignTranslations,CustomFunction,...)
|
||||||
--self:I("GetCustomCallSign")
|
self:T("GetCustomCallSign")
|
||||||
|
|
||||||
local callsign = "Ghost 1"
|
local callsign = "Ghost 1"
|
||||||
if self:IsAlive() then
|
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 callnumbermajor = string.char(string.byte(callnumber,1)) -- 9
|
||||||
local callnumberminor = string.char(string.byte(callnumber,2)) -- 1
|
local callnumberminor = string.char(string.byte(callnumber,2)) -- 1
|
||||||
local personalized = false
|
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
|
if CustomFunction and IsPlayer then
|
||||||
local arguments = arg or {}
|
local arguments = arg or {}
|
||||||
local callsign = CustomFunction(groupname,playername,unpack(arguments))
|
local callsign = CustomFunction(groupname,playername,unpack(arguments))
|
||||||
|
|||||||
@ -110,14 +110,17 @@ function POSITIONABLE:Destroy( GenerateEvent )
|
|||||||
|
|
||||||
if GenerateEvent and GenerateEvent == true then
|
if GenerateEvent and GenerateEvent == true then
|
||||||
if self:IsAir() then
|
if self:IsAir() then
|
||||||
|
--self:ScheduleOnce(1,self.CreateEventCrash,self,timer.getTime(),DCSObject)
|
||||||
self:CreateEventCrash( timer.getTime(), DCSObject )
|
self:CreateEventCrash( timer.getTime(), DCSObject )
|
||||||
else
|
else
|
||||||
|
--self:ScheduleOnce(1,self.CreateEventDead,self,timer.getTime(),DCSObject)
|
||||||
self:CreateEventDead( timer.getTime(), DCSObject )
|
self:CreateEventDead( timer.getTime(), DCSObject )
|
||||||
end
|
end
|
||||||
elseif GenerateEvent == false then
|
elseif GenerateEvent == false then
|
||||||
-- Do nothing!
|
-- Do nothing!
|
||||||
else
|
else
|
||||||
self:CreateEventRemoveUnit( timer.getTime(), DCSObject )
|
self:CreateEventRemoveUnit( timer.getTime(), DCSObject )
|
||||||
|
--self:ScheduleOnce(1,self.CreateEventRemoveUnit,self,timer.getTime(),DCSObject)
|
||||||
end
|
end
|
||||||
|
|
||||||
USERFLAG:New( UnitGroupName ):Set( 100 )
|
USERFLAG:New( UnitGroupName ):Set( 100 )
|
||||||
@ -143,6 +146,10 @@ function POSITIONABLE:GetPosition()
|
|||||||
|
|
||||||
local DCSPositionable = self:GetDCSObject()
|
local DCSPositionable = self:GetDCSObject()
|
||||||
|
|
||||||
|
if self:IsInstanceOf("GROUP") then
|
||||||
|
DCSPositionable = self:GetFirstUnitAlive():GetDCSObject()
|
||||||
|
end
|
||||||
|
|
||||||
if DCSPositionable then
|
if DCSPositionable then
|
||||||
local PositionablePosition = DCSPositionable:getPosition()
|
local PositionablePosition = DCSPositionable:getPosition()
|
||||||
self:T3( PositionablePosition )
|
self:T3( PositionablePosition )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user