BIS_fnc_initRespawn adds HandleDisconnect event handler always returning true, resulting in broken missions with disabledAI=1
Feedback, NormalPublic

Description

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.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Multiplayer
Steps To Reproduce
  1. Create a blank mission on any island with 2 player units
  2. Add description.ext with disabledAI=1;
  3. Run in multiplayer with two players as host and client, have client leave to lobby, host should observe client unit remaining in game
Additional Information

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.
SaMatra created this task.Mar 17 2017, 10:39 AM

thanks, tracking internally

Here is addon with temporary fix that you need to include in -serverMod= of your server (or -mod= for non-dedi server)
fixdisconnect.pbo

razazel claimed this task.Mar 21 2017, 5:17 PM
razazel changed the task status from "New" to "Reviewed".

To fix :

addMissionEventHandler ["HandleDisconnect",

{
    _unit = _this select 0;
    deleteVehicle _unit;
}];
razazel changed the task status from "Reviewed" to "Feedback".Mar 30 2017, 3:05 PM

Hello,

this issue should be now fixed with the latest hotfix. Can you confirm?

SaMatra removed a subscriber: SaMatra.Mar 31 2017, 12:47 AM
Nemesi added a subscriber: Nemesi.Mar 31 2017, 5:29 PM

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.

Add Comment