Skip to content

Commit

Permalink
Enclose private variable
Browse files Browse the repository at this point in the history
  • Loading branch information
theace0296 committed Sep 23, 2021
1 parent 0430bf3 commit 89dc9b6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions RandFramework/Client/init/fn_main.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,12 @@ waitUntil { TRGM_VAR_bAndSoItBegins && TRGM_VAR_CustomObjectsSet };

[player] spawn TRGM_GLOBAL_fnc_setLoadout;

private _isAceRespawnWithGear = false;
if (call TRGM_GLOBAL_fnc_isCbaLoaded) then {
if (call TRGM_GLOBAL_fnc_isCbaLoaded && call TRGM_GLOBAL_fnc_isAceLoaded) then {
// check for ACE respawn with gear setting
_isAceRespawnWithGear = "ace_respawn_savePreDeathGear" call CBA_settings_fnc_get;
};
if (!_isAceRespawnWithGear) then {
player addEventHandler ["Respawn", { [player] spawn TRGM_GLOBAL_fnc_setLoadout; }];
private _isAceRespawnWithGear = "ace_respawn_savePreDeathGear" call CBA_settings_fnc_get;
if (!(isNil "_isAceRespawnWithGear") && {!_isAceRespawnWithGear}) then {
player addEventHandler ["Respawn", { [player] spawn TRGM_GLOBAL_fnc_setLoadout; }];
};
};

[] spawn {
Expand Down

0 comments on commit 89dc9b6

Please sign in to comment.