mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
remove debug and add sanity checks
This commit is contained in:
parent
de51a61180
commit
c550d5dab6
@ -20,10 +20,13 @@ if (!isNull _projectile) exitWith {};
|
||||
//remove frameEH
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
|
||||
if ([_unit] call EFUNC(common,isPlayer)) exitWith {}; //Just in case a player took control
|
||||
if (!alive _unit) exitWith {}; //No point doing this for dead
|
||||
|
||||
//If AI still has tube, throw it on ground
|
||||
if (secondaryWeapon _unit == _tube) then {
|
||||
_logic = createVehicle ["GroundWeaponHolder", position _unit, [], 0, "CAN_COLLIDE"];
|
||||
_logic addWeaponCargoGlobal [_tube, 1]; // @todo secondary weapon items
|
||||
|
||||
_unit removeWeapon _tube;
|
||||
_unit removeWeaponGlobal _tube;
|
||||
};
|
||||
|
@ -33,6 +33,6 @@ _unit selectWeapon _tube;
|
||||
|
||||
// AI
|
||||
if !([_unit] call EFUNC(common,isPlayer)) then {
|
||||
//waits until _projectile is null, so random 0-2 seconds after that
|
||||
//waits until _projectile is null, so random 0-2 tickTime seconds after that
|
||||
[FUNC(aiDropWeaponCallback), 2, [_unit, _tube, _projectile]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
@ -17,8 +17,6 @@ private ["_unit", "_launcher", "_config"];
|
||||
_unit = _this select 0;
|
||||
_launcher = secondaryWeapon _unit;
|
||||
|
||||
systemChat format ["Take %1 - %2", _unit, _launcher];
|
||||
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
_config = configFile >> "CfgWeapons" >> _launcher;
|
||||
|
Loading…
Reference in New Issue
Block a user