Fix: crash to desktop when attempting to join a company while not joined (yet)

(cherry picked from commit 0f25eaa271)

# Conflicts:
#	src/console_cmds.cpp
This commit is contained in:
Rubidium
2024-03-22 19:50:27 +01:00
committed by Jonathan G Rennison
parent d21369b258
commit a12f166815
2 changed files with 8 additions and 1 deletions

View File

@@ -812,6 +812,7 @@ public:
void OnConnect(SOCKET s) override
{
_networking = true;
_network_own_client_id = ClientID{};
new ClientNetworkGameSocketHandler(s, this->connection_string);
IConsoleCmdExec("exec scripts/on_client.scr 0");
NetworkClient_Connected();