mirror of
https://github.com/ciribob/DCS-CTLD.git
synced 2026-08-18 05:05:51 +00:00
fixes
This commit is contained in:
@@ -1969,7 +1969,7 @@ end
|
|||||||
-- ***************************************************************
|
-- ***************************************************************
|
||||||
-- Repack vehicules crates functions
|
-- Repack vehicules crates functions
|
||||||
-- ***************************************************************
|
-- ***************************************************************
|
||||||
ctld.repackRequestStack = {} -- table to store the repack request
|
ctld.repackRequestsStack = {} -- table to store the repack request
|
||||||
|
|
||||||
function ctld.getUnitsInRepackRadius(_PlayerTransportUnitName, _radius)
|
function ctld.getUnitsInRepackRadius(_PlayerTransportUnitName, _radius)
|
||||||
if _radius == nil then
|
if _radius == nil then
|
||||||
@@ -2031,25 +2031,15 @@ function ctld.isRepackableUnit(_unitId)
|
|||||||
end
|
end
|
||||||
-- ***************************************************************
|
-- ***************************************************************
|
||||||
function ctld.repackVehicleRequest(_params) -- update rrs table 'repackRequestsStack' with the request
|
function ctld.repackVehicleRequest(_params) -- update rrs table 'repackRequestsStack' with the request
|
||||||
local repackableUnit = _params[1]
|
--[[
|
||||||
|
local repackableUnit = _params[1]
|
||||||
local PlayerTransportUnitName = _params[2]
|
local PlayerTransportUnitName = _params[2]
|
||||||
local PlayerTransportUnit = Unit.getByName(PlayerTransportUnitName)
|
local PlayerTransportUnit = Unit.getByName(PlayerTransportUnitName)
|
||||||
local TransportUnit = ctld.getTransportUnit(PlayerTransportUnitName)
|
local TransportUnit = ctld.getTransportUnit(PlayerTransportUnitName)
|
||||||
local spawnRefPoint = PlayerTransportUnit:getPoint()
|
local spawnRefPoint = PlayerTransportUnit:getPoint()
|
||||||
local refCountry = PlayerTransportUnit:getCountry()
|
local refCountry = PlayerTransportUnit:getCountry()
|
||||||
|
]]--
|
||||||
ctld.repackRequestsStack[#ctld.repackRequestsStack+1] = _params
|
ctld.repackRequestsStack[#ctld.repackRequestsStack+1] = _params
|
||||||
|
|
||||||
--[[
|
|
||||||
if repackableUnit then
|
|
||||||
local _point = {x = spawnRefPoint.x+5, z = spawnRefPoint.z}
|
|
||||||
local _unitId = ctld.getNextUnitId()
|
|
||||||
local _name = string.format("%s #%i", repackableUnit.desc, _unitId)
|
|
||||||
ctld.spawnCrateStatic(PlayerTransportUnit:getCountry(), _unitId, _point, _name, repackableUnit.weight, PlayerTransportUnit:getCoalition(), mist.getHeading(PlayerTransportUnit, true))
|
|
||||||
ctld.addStaticLogisticUnit({x = spawnRefPoint.x+5, z = spawnRefPoint.z+10}, refCountry) -- create a temporary logistic unit to be able to repack the vehicle
|
|
||||||
return
|
|
||||||
end ]]--
|
|
||||||
|
|
||||||
end
|
end
|
||||||
-- ***************************************************************
|
-- ***************************************************************
|
||||||
function ctld.repackVehicle(_params,t) -- scan rrs table 'repackRequestsStack' to process each request
|
function ctld.repackVehicle(_params,t) -- scan rrs table 'repackRequestsStack' to process each request
|
||||||
|
|||||||
Reference in New Issue
Block a user