mirror of
https://github.com/ciribob/DCS-CSAR.git
synced 2025-10-29 16:56:07 +00:00
Fix for Group ID
Group ID error fix
This commit is contained in:
13
CSAR.lua
13
CSAR.lua
@@ -1,6 +1,6 @@
|
|||||||
-- CSAR Script for DCS Ciribob 2015
|
-- CSAR Script for DCS Ciribob 2015
|
||||||
-- Version 1.5 - 03/10/2015
|
-- Version 1.6 - 09/10/2015
|
||||||
-- DCS 1.5 Compatible - Needs Mist 4.0.55 or higher!
|
-- DCS 1.6 Compatible - Needs Mist 4.0.55 or higher!
|
||||||
|
|
||||||
csar = {}
|
csar = {}
|
||||||
|
|
||||||
@@ -214,12 +214,9 @@ function csar.eventHandler:onEvent(_event)
|
|||||||
timer.scheduleFunction(csar.checkDisabledAircraftStatus, _unit:getName(), timer.getTime() + 1)
|
timer.scheduleFunction(csar.checkDisabledAircraftStatus, _unit:getName(), timer.getTime() + 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--fix for :getGroup not working in 1.5
|
|
||||||
local _originalGroupName = mist.DBs.unitsById[tonumber(_unit:getID())].groupName
|
|
||||||
|
|
||||||
--store the old group under the new group name
|
--store the old group under the new group name
|
||||||
csar.woundedGroups[_spawnedGroup:getName()] = { originalGroup = _originalGroupName, side = _spawnedGroup:getCoalition(), originalUnit = _unit:getName(), frequency= _freq, desc = _text }
|
csar.woundedGroups[_spawnedGroup:getName()] = { side = _spawnedGroup:getCoalition(), originalUnit = _unit:getName(), frequency= _freq, desc = _text }
|
||||||
|
|
||||||
csar.initSARForPilot(_spawnedGroup,_freq)
|
csar.initSARForPilot(_spawnedGroup,_freq)
|
||||||
|
|
||||||
@@ -558,7 +555,7 @@ function csar.pickupUnit(_heliUnit,_pilotName,_woundedGroup,_woundedGroupName)
|
|||||||
|
|
||||||
csar.inTransitGroups[_heliName][_woundedGroupName] =
|
csar.inTransitGroups[_heliName][_woundedGroupName] =
|
||||||
{
|
{
|
||||||
originalGroup = csar.woundedGroups[_woundedGroupName].originalGroup,
|
|
||||||
originalUnit = csar.woundedGroups[_woundedGroupName].originalUnit,
|
originalUnit = csar.woundedGroups[_woundedGroupName].originalUnit,
|
||||||
woundedGroup = _woundedGroupName,
|
woundedGroup = _woundedGroupName,
|
||||||
side = _heliUnit:getCoalition(),
|
side = _heliUnit:getCoalition(),
|
||||||
|
|||||||
BIN
csar-test.miz
BIN
csar-test.miz
Binary file not shown.
Reference in New Issue
Block a user