BIS_fnc_initRespawn (a3\functions_f\Respawn\fn_initRespawn.sqf) adds HandleDisconnect event handler on postInit which always returns true since last called function (BIS_fnc_logFormat) returns true. This breaks any mission with disabledAI resulting in player units remaining in game and breaking mission logic.
Description
Details
- Severity
- Major
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 7
- Category
- Multiplayer
- Create a blank mission on any island with 2 player units
- Add description.ext with disabledAI=1;
- Run in multiplayer with two players as host and client, have client leave to lobby, host should observe client unit remaining in game
Proposed solution:
- Do not add HandleDisconnect event handler unless BI respawn templates\screens are actually used in the mission (do missionConfigFile check?)
- HandleDisconnect should return nil since it is not used to actually handle disconnecting player unit.
Event Timeline
Here is addon with temporary fix that you need to include in -serverMod= of your server (or -mod= for non-dedi server)
To fix :
addMissionEventHandler ["HandleDisconnect",
{ _unit = _this select 0; deleteVehicle _unit; }];
What I can tell is that there are still problems with this issue. The static AI substituting the player when disconnects are not longer present, but without SaMatra's fix there are problems when a player dismount a vehicle, disconnects or dies in the vehicle. I described what I found in a comment here: https://feedback.bistudio.com/T123940 Since the problems in disconnecting from vehicles (dismounting, dying in a vehicle) are fixed by SaMatra's addon it is possible that the issue described here is not completely repaired by the hotfix.
Can be considered fixed, even though command returns false instead of nil, HandleDisconnect events added after it have priority over BIS_fnc_initRespawn.