mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
respawn handler
This commit is contained in:
parent
19523f028a
commit
abdf9599bf
@ -9,6 +9,7 @@ class Extended_PreInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
@ -21,11 +22,18 @@ class Extended_Killed_EventHandlers {
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Respawn_EventHandlers {
|
||||
class CAManBase {
|
||||
GVAR(respawnHandler) = QUOTE(_this call FUNC(onRespawn));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Take_EventHandlers {
|
||||
class CAManBase {
|
||||
GVAR(takeHandler) = QUOTE(call FUNC(onInventoryChanged));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Put_EventHandlers {
|
||||
class CAManBase {
|
||||
GVAR(takeHandler) = QUOTE([ARR_3(_this select 1, _this select 0, _this select 2)] call FUNC(onInventoryChanged));
|
||||
|
@ -24,6 +24,7 @@ PREP(getPlacedExplosives);
|
||||
PREP(getSpeedDialExplosive);
|
||||
PREP(module);
|
||||
PREP(onIncapacitated);
|
||||
PREP(onRespawn);
|
||||
PREP(onInventoryChanged);
|
||||
PREP(openTimerUI);
|
||||
PREP(placeExplosive);
|
||||
|
30
addons/explosives/functions/fnc_onRespawn.sqf
Normal file
30
addons/explosives/functions/fnc_onRespawn.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Whigital
|
||||
* Clears cached variable containing placeable explosives.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Corspe <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params [
|
||||
"_unit",
|
||||
"_corpse"
|
||||
];
|
||||
|
||||
TRACE_2("params",_unit,_corpse);
|
||||
|
||||
if (_unit == player) then {
|
||||
[
|
||||
{ACE_player == player},
|
||||
{[ACE_player, QGVAR(explosiveActions)] call EFUNC(common,eraseCache);}
|
||||
] call CBA_fnc_waitUntilAndExecute;
|
||||
};
|
Loading…
Reference in New Issue
Block a user