[Party] Disconnect before connecting

This commit is contained in:
momo5502 2017-05-29 20:43:03 +02:00
parent c758dd7e85
commit 308b49ef0e

View File

@ -256,7 +256,15 @@ namespace Components
return; return;
} }
Party::Connect(Network::Address(params->get(1))); if(Game::CL_IsCgameInitialized())
{
Command::Execute("disconnect", false);
Command::Execute(Utils::String::VA("%s", params->join(0).data()), false);
}
else
{
Party::Connect(Network::Address(params->get(1)));
}
}); });
Command::Add("reconnect", [] (Command::Params*) Command::Add("reconnect", [] (Command::Params*)
{ {