Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wersal454 committed Oct 27, 2024
1 parent 3e7bf1c commit 724512b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion A3A/addons/core/functions/init/fn_initServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,14 @@ call A3A_fnc_createPetros;
//HandleDisconnect doesn't get 'owner' param, so we can't use it to handle headless client disconnects.
addMissionEventHandler ["HandleDisconnect",{_this call A3A_fnc_onPlayerDisconnect;false}];
//PlayerDisconnected doesn't get access to the unit, so we shouldn't use it to handle saving.
addMissionEventHandler ["PlayerDisconnected",{_this call A3A_fnc_onHeadlessClientDisconnect;false}];
addMissionEventHandler ["PlayerDisconnected",{
// Remove player from arsenal in case they disconnected while in it
private _temp = server getVariable ["jna_playersInArsenal",[]];
_temp = _temp - [param [4]];
server setVariable ["jna_playersInArsenal",_temp,true];
_this call A3A_fnc_onHeadlessClientDisconnect;
false;
}];

addMissionEventHandler ["BuildingChanged", {
params ["_oldBuilding", "_newBuilding", "_isRuin"];
Expand Down

0 comments on commit 724512b

Please sign in to comment.