Page MenuHomeFeedback Tracker

onPlayerConnected (BIS_fnc_addStackedEventHandler) stops working
Closed, ResolvedPublic


onPlayerConnected is not serialized. In a resumed multiplayer game it will stop working until another event is added via BIS_fnc_addStackedEventHandler. {F27833} {F27834}


Legacy ID
Steps To Reproduce
  1. Select Multiplayer -> "Host new session" -> LAN
  2. Select attached mission called "$_onPlayerConnected_bug.VR"
  3. Start another instance of the game and connect to your LAN game.
  4. Select a slot and wait until you can move.
  5. Switch back to the host.

It will report the connected clients ID in the chat.

  1. As host, press ESC -> "Save and quit"
  2. In the mission select screen, RESUME (not "restart"!) the same mission
  1. As client disconnect and reconnect from the LAN game. Select a slot and wait until you can move.
  2. Switch back to the host again.

This time nothing will be reported. This can be fixed by adding another (dummy) event via BIS_fnc_addStackedEventHandler. E.g.:

["dummy_OPC", "onPlayerConnected", {}] call BIS_fnc_addStackedEventHandler;

Finally, repeat the same thing with the other attached mission called "$_onPlayerConnected_bug_fixed"

This time it will report the connected clients ID, because a missionEventHandler "loaded" will add another "onPlayerConnected" event which will resolve the serialization issues.

Additional Information

This error will not happen in a restarted game, because it's a serialization issue.

Event Timeline

commy2 edited Steps To Reproduce. (Show Details)Jan 20 2016, 12:41 AM
commy2 edited Additional Information. (Show Details)
commy2 set Category to Scripting.
commy2 set Reproducibility to Always.
commy2 set Severity to None.
commy2 set Resolution to Fixed.
commy2 set Legacy ID to 2407960229.May 8 2016, 1:31 PM
commy2 edited a custom field.

Should be fixed in 1.55.134048, please test and report back

Doesn't work with todays dev branch.
The version is 1.55.134043 though, so I'll wait patiently.

Works. 👍