mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Overheating - Drop jammed states on unit respawn (#8333)
* Overheating - Added respawn handler to drop jammed state Fixes https://github.com/acemod/ACE3/issues/7651 * Description update * Update addons/overheating/functions/fnc_handleRespawn.sqf Co-authored-by: jonpas <jonpas33@gmail.com>
This commit is contained in:
parent
489fab4cb8
commit
0b7aa7f3e5
@ -16,3 +16,11 @@ class Extended_PostInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Respawn_EventHandlers {
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
respawn = QUOTE(_this call FUNC(handleRespawn));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -10,6 +10,7 @@ PREP(displayTemperature);
|
||||
PREP(firedEH);
|
||||
PREP(getWeaponData);
|
||||
PREP(handleTakeEH);
|
||||
PREP(handleRespawn);
|
||||
PREP(jamWeapon);
|
||||
PREP(loadCoolestSpareBarrel);
|
||||
PREP(overheat);
|
||||
|
26
addons/overheating/functions/fnc_handleRespawn.sqf
Normal file
26
addons/overheating/functions/fnc_handleRespawn.sqf
Normal file
@ -0,0 +1,26 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: 10Dozen
|
||||
* Handle respawn events and clears list of jammed weapons.
|
||||
* DefaultAction that blocks firing is removed by the game (remains on corpse?),
|
||||
* but variables need to be cleared manually.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Corpse <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [alive, body] call ace_overheating_fnc_handleRespawn
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_unit","_dead"];
|
||||
if !(local _unit) exitWith {};
|
||||
|
||||
// --- Reset variables related to jamming
|
||||
_unit setVariable [QGVAR(jammedWeapons), nil];
|
||||
_unit setVariable [QGVAR(JammingActionID), nil];
|
Loading…
Reference in New Issue
Block a user