mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Safemode - Fix safemode being broken after respawning (#10260)
* Fix safemode being broken when respawning * Update addons/safemode/XEH_postInit.sqf Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Update XEH_postInit.sqf --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
da73cf979d
commit
a894fc78c3
@ -27,3 +27,19 @@ if (!hasInterface) exitWith {};
|
|||||||
// Player HUD
|
// Player HUD
|
||||||
!_weaponSafe call FUNC(setSafeModeVisual);
|
!_weaponSafe call FUNC(setSafeModeVisual);
|
||||||
}] call CBA_fnc_addPlayerEventHandler;
|
}] call CBA_fnc_addPlayerEventHandler;
|
||||||
|
|
||||||
|
// Variables are transferred from corpse to new body and EH above triggers on respawn, which desyncs safeties
|
||||||
|
// Therefore, clear variables and remove mouse button input blocking upon respawn
|
||||||
|
[QUOTE(ADDON), "Respawn", {
|
||||||
|
params ["_unit"];
|
||||||
|
|
||||||
|
_unit setVariable [QGVAR(safedWeapons), nil];
|
||||||
|
|
||||||
|
private _ehID = _unit getVariable QGVAR(actionID);
|
||||||
|
|
||||||
|
if (isNil "_ehID") exitWith {};
|
||||||
|
|
||||||
|
[_unit, "DefaultAction", _ehID] call EFUNC(common,removeActionEventHandler);
|
||||||
|
|
||||||
|
_unit setVariable [QGVAR(actionID), nil];
|
||||||
|
}] call EFUNC(common,addPlayerEH);
|
||||||
|
Loading…
Reference in New Issue
Block a user