mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Wrapped BIS and CBA function calls in CALLSTACK.
Converted startTimer to CBA's perFrameEventHandler.
This commit is contained in:
parent
43bac209d9
commit
6d8708618a
@ -18,7 +18,7 @@
|
||||
*/
|
||||
#include "\z\ace\explosives\script_component.hpp"
|
||||
if (GVAR(pfeh_running)) then {
|
||||
[QGVAR(Placement),"OnEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
||||
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
||||
GVAR(pfeh_running) = false;
|
||||
};
|
||||
private ["_mag", "_setup", "_player"];
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
#include "\z\ace\explosives\script_component.hpp"
|
||||
if (GVAR(pfeh_running)) then {
|
||||
[QGVAR(Placement),"OnEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
||||
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
||||
GVAR(pfeh_running) = false;
|
||||
};
|
||||
if (!isNull (GVAR(Setup))) then {
|
||||
|
@ -23,6 +23,6 @@ private "_ex";
|
||||
_ex=_this select 0;
|
||||
_ex setDir (_this select 1);
|
||||
if ((_this select 2) != 0) then {
|
||||
[_ex, _this select 2, 0] call BIS_fnc_setPitchBank;
|
||||
[_ex, _this select 2, 0] call CALLSTACK(BIS_fnc_setPitchBank);
|
||||
};
|
||||
//_ex setVectorUp (surfaceNormal _pos);
|
||||
|
@ -58,7 +58,7 @@ GVAR(TweakedAngle) = 180;
|
||||
if (ACE_Modifier == 0) then {
|
||||
GVAR(Setup) setDir (GVAR(TweakedAngle) + getDir _player);
|
||||
};
|
||||
}] call BIS_fnc_addStackedEventHandler;
|
||||
}] call CALLSTACK(BIS_fnc_addStackedEventHandler);
|
||||
[localize "STR_ACE_Explosives_PlaceAction", localize "STR_ACE_Explosives_CancelAction",
|
||||
localize "STR_ACE_Explosives_ScrollAction"] call EFUNC(Interaction,showMouseHint);
|
||||
_unit setVariable [QGVAR(Place), [_unit, "DefaultAction",
|
||||
|
@ -18,13 +18,10 @@
|
||||
[_explosive, 10] call ACE_Explosives_fnc_startTimer;
|
||||
*/
|
||||
#include "\z\ace\explosives\script_component.hpp"
|
||||
_this spawn { // TODO: use scheduled delay execution
|
||||
private ["_explosive", "_timer"];
|
||||
[{
|
||||
private ["_explosive"];
|
||||
_explosive = _this select 0;
|
||||
_timer = _this select 1;
|
||||
|
||||
sleep _timer;
|
||||
if (!isNull _explosive) then {
|
||||
[_explosive, -1, [_explosive, 0], true] call FUNC(detonateExplosive);
|
||||
};
|
||||
};
|
||||
},_this select 1, _this] call CALLSTACK(CBA_fnc_addPerFrameHandler);
|
||||
|
Loading…
Reference in New Issue
Block a user