Skip to content

Commit

Permalink
replace BIS_fnc_add/removeStackedEventhandler with add/removeMissionE…
Browse files Browse the repository at this point in the history
…ventHandler (#610)

Co-authored-by: DomT602 <[email protected]>
  • Loading branch information
blackfisch and DomT602 authored Mar 18, 2020
1 parent 1af0a28 commit 87d7799
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Altis_Life.Altis/core/pmenu/fn_s_onCheckedChange.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ switch (_option) do {
if (_state isEqualTo 1) then {
life_settings_revealObjects = true;
profileNamespace setVariable ["life_settings_revealObjects",true];
LIFE_ID_RevealObjects = ["LIFE_RevealObjects","onEachFrame","life_fnc_revealObjects"] call BIS_fnc_addStackedEventHandler;
LIFE_ID_RevealObjects = addMissionEventHandler ["EachFrame",{_this call life_fnc_revealObjects}];
} else {
life_settings_revealObjects = false;
profileNamespace setVariable ["life_settings_revealObjects",false];
[LIFE_ID_RevealObjects,"onEachFrame"] call BIS_fnc_removeStackedEventHandler;
removeMissionEventHandler ["EachFrame", LIFE_ID_RevealObjects];
};
};

Expand Down
5 changes: 2 additions & 3 deletions life_server/initHC.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ HC_UID = nil;
};
};

HC_DC = ["HC_Disconnected","onPlayerDisconnected",
HC_DC = addMissionEventHandler ["PlayerDisconnected",
{
if (!isNil "HC_UID" && {_uid == HC_UID}) then {
life_HC_isActive = false;
Expand All @@ -39,5 +39,4 @@ HC_DC = ["HC_Disconnected","onPlayerDisconnected",
diag_log "Ready for receiving queries on the server machine.";
};
}
] call BIS_fnc_addStackedEventHandler;

];

0 comments on commit 87d7799

Please sign in to comment.