When running some tests I noticed that the YojimboClient would sometimes sets its state to CLIENT_STATE_CONNECTED before the server would execute the OnServerClientConnected callback. Looking at the current logic the YojimboClient sets the state to CLIENT_STATE_CONNECTED when the netcode state is NETCODE_CLIENT_STATE_SENDING_CONNECTION_RESPONSE rather than when it is NETCODE_CLIENT_STATE_CONNECTED.
When running some tests I noticed that the
YojimboClient
would sometimes sets its state toCLIENT_STATE_CONNECTED
before the server would execute theOnServerClientConnected
callback. Looking at the current logic theYojimboClient
sets the state toCLIENT_STATE_CONNECTED
when the netcode state isNETCODE_CLIENT_STATE_SENDING_CONNECTION_RESPONSE
rather than when it isNETCODE_CLIENT_STATE_CONNECTED
.This PR fixes that.