mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-27 14:08:39 +01:00
Send gameserver lobby callback even when the one set is invalid.
This commit is contained in:
parent
7350397f9d
commit
a3c606c74d
2 changed files with 3 additions and 1 deletions
|
@ -40,6 +40,7 @@ message Lobby {
|
||||||
uint64 id = 1;
|
uint64 id = 1;
|
||||||
uint32 ip = 2;
|
uint32 ip = 2;
|
||||||
uint32 port = 3;
|
uint32 port = 3;
|
||||||
|
uint32 num_update = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gameserver gameserver = 5;
|
Gameserver gameserver = 5;
|
||||||
|
|
|
@ -993,6 +993,7 @@ void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 un
|
||||||
lobby->mutable_gameserver()->set_id(steamIDGameServer.ConvertToUint64());
|
lobby->mutable_gameserver()->set_id(steamIDGameServer.ConvertToUint64());
|
||||||
lobby->mutable_gameserver()->set_ip(unGameServerIP);
|
lobby->mutable_gameserver()->set_ip(unGameServerIP);
|
||||||
lobby->mutable_gameserver()->set_port(unGameServerPort);
|
lobby->mutable_gameserver()->set_port(unGameServerPort);
|
||||||
|
lobby->mutable_gameserver()->set_num_update(lobby->gameserver().num_update() + 1);
|
||||||
|
|
||||||
send_gameservercreated_cb(lobby->room_id(), lobby->gameserver().id(), lobby->gameserver().ip(), lobby->gameserver().port());
|
send_gameservercreated_cb(lobby->room_id(), lobby->gameserver().id(), lobby->gameserver().ip(), lobby->gameserver().port());
|
||||||
trigger_lobby_dataupdate(steamIDLobby, steamIDLobby, true);
|
trigger_lobby_dataupdate(steamIDLobby, steamIDLobby, true);
|
||||||
|
@ -1385,7 +1386,7 @@ void Callback(Common_Message *msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((joined) || (we_are_in_lobby && !protobuf_message_equal(lobby->gameserver(), msg->lobby().gameserver()))) && (CSteamID((uint64)msg->lobby().gameserver().id()).IsValid() || msg->lobby().gameserver().ip())) {
|
if ((joined && msg->lobby().gameserver().num_update()) || (we_are_in_lobby && (lobby->gameserver().num_update() != msg->lobby().gameserver().num_update()))) {
|
||||||
send_gameservercreated_cb(lobby->room_id(), msg->lobby().gameserver().id(), msg->lobby().gameserver().ip(), msg->lobby().gameserver().port());
|
send_gameservercreated_cb(lobby->room_id(), msg->lobby().gameserver().id(), msg->lobby().gameserver().ip(), msg->lobby().gameserver().port());
|
||||||
trigger_lobby_dataupdate((uint64)lobby->room_id(), (uint64)lobby->room_id(), true);
|
trigger_lobby_dataupdate((uint64)lobby->room_id(), (uint64)lobby->room_id(), true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue