onPlayerConnected is not serialized. In a resumed multiplayer game it will stop working until another event is added via BIS_fnc_addStackedEventHandler. {F27833} {F27834}
Description
Description
Details
Details
- Legacy ID
- 2407960229
- Severity
- None
- Resolution
- Fixed
- Reproducibility
- Always
- Category
- Scripting
Steps To Reproduce
- Select Multiplayer -> "Host new session" -> LAN
- Select attached mission called "$_onPlayerConnected_bug.VR"
- Start another instance of the game and connect to your LAN game.
- Select a slot and wait until you can move.
- Switch back to the host.
It will report the connected clients ID in the chat.
- As host, press ESC -> "Save and quit"
- In the mission select screen, RESUME (not "restart"!) the same mission
- As client disconnect and reconnect from the LAN game. Select a slot and wait until you can move.
- 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
Comment Actions
Doesn't work with todays dev branch.
The version is 1.55.134043 though, so I'll wait patiently.