Open ana-rchy opened 1 year ago
This is expected behavior in 4.0 where the OfflineMultiplayerPeer
is active by default (#68689).
You can revert to the old behavior by explicitly setting multiplyaer.multiplayer_peer = null
.
I'm reopening the issue following the discussion in #75121.
While I'm not particularly fond of either proposed solutions, I do acknowledge the confusion generated by the API, and that we need a clearer path to detect online/offline state.
i got embarassed because i realized my fix that mentioned this was probably useless so i abandoned it but now its useful again wtf
Godot version
4.0.stable
System information
linux 6.2.6-arch1-1-vfio
Issue description
get_connection_status()
is intended to returnCONNECTION_DISCONNECTED
if theres no connection with any peer/server made, but becausemultiplayer.multiplayer_peer
contains a value (that returns<OfflineMultiplayerPeer#-[client id]>
when printed), im assuming the engine is still expecting a return value ofnull
like in godot 3.xSteps to reproduce
print(multiplayer.multiplayer_peer.get_connection_status())
on any node any time theres no connection made withMultiplayerAPI
or just run minimal reproduction project
Minimal reproduction project
connection status minimal reproduction.zip