remove debug and add sanity checks

This commit is contained in:
PabstMirror 2015-01-13 19:38:00 -06:00
parent de51a61180
commit c550d5dab6
3 changed files with 5 additions and 4 deletions

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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;