mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add sanity checks, fix explosives checks
This commit is contained in:
parent
ef95e278f9
commit
52007fab6a
@ -18,11 +18,6 @@
|
||||
|
||||
params ["_unit", "_key"];
|
||||
|
||||
if (_key != 1) exitWith {};
|
||||
|
||||
if (_unit == ACE_player &&
|
||||
{([_unit, objNull, ["isNotSwimming"]] call EFUNC(common,canInteractWith))} &&
|
||||
{(_magClassname in (magazines _unit))}
|
||||
) exitWith {};
|
||||
if (_key != 1 || {!GVAR(pfeh_running)}) exitWith {};
|
||||
|
||||
GVAR(placeAction) = PLACE_CANCEL;
|
||||
|
@ -141,6 +141,13 @@ GVAR(TweakedAngle) = 0;
|
||||
//Don't allow placing in a bad position:
|
||||
if (_badPosition && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};
|
||||
|
||||
if (_unit != ACE_player ||
|
||||
{!([_unit, objNull, ["isNotSwimming"]] call EFUNC(common,canInteractWith))} ||
|
||||
{!(_magClassname in (magazines _unit))}
|
||||
) then {
|
||||
GVAR(placeAction) = PLACE_CANCEL;
|
||||
};
|
||||
|
||||
if (GVAR(placeAction) != PLACE_WAITING) then {
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
GVAR(pfeh_running) = false;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_unit", "_key"];
|
||||
|
||||
if (_key != 1) exitWith {};
|
||||
if (_key != 1 || {GVAR(deployPFH) == -1}) exitWith {};
|
||||
|
||||
// enable running again
|
||||
[_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set);
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
params ["_unit", "_key"];
|
||||
|
||||
if (_key != 1) exitWith {};
|
||||
if (_key != 1 || {isNull GVAR(ladder)}) exitWith {};
|
||||
|
||||
// enable running again
|
||||
[_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set);
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_unit", "_key"];
|
||||
|
||||
if (_key != 1) exitWith {};
|
||||
if (_key != 1 || {GVAR(digPFH) == -1}) exitWith {};
|
||||
|
||||
// enable running again
|
||||
[_unit, "forceWalk", "ACE_Trenches", false] call EFUNC(common,statusEffect_set);
|
||||
|
Loading…
Reference in New Issue
Block a user