don't send Ep3 lobby banners again after ending a proxy session
This commit is contained in:
@@ -185,6 +185,7 @@ The following Episode 3 features work well:
|
||||
* Participating in card auctions. (The auction contents must be configured in config.json.)
|
||||
|
||||
The following Episode 3 features are implemented, but are only partially tested:
|
||||
* Decorations in lobbies. Currently only images are supported; the game also supports loading custom 3D models in lobbies, but newserv does not implement this (yet).
|
||||
* Spectator teams. There is a known issue that prevents viewing battles unless you're in the spectator team when the battle begins, and spectating clients sometimes crash for an unknown reason.
|
||||
* Battle replays also sometimes cause the client to crash during the replay. Using the $playrec command is therefore not recommended.
|
||||
|
||||
|
||||
+4
-1
@@ -106,8 +106,11 @@ struct Client {
|
||||
// Client has received newserv's Episode 3 card definitions, so don't send
|
||||
// them again
|
||||
HAS_EP3_CARD_DEFS = 0x00004000,
|
||||
// Client has received newserv's Episode 3 media updates, so don't send them
|
||||
// again
|
||||
HAS_EP3_MEDIA_UPDATES = 0x00800000,
|
||||
|
||||
UNUSED_FLAG_BITS = 0xFF800000,
|
||||
UNUSED_FLAG_BITS = 0xFF010000,
|
||||
};
|
||||
|
||||
uint64_t id;
|
||||
|
||||
+20
-8
@@ -2479,15 +2479,27 @@ static void on_61_98(shared_ptr<ServerState> s, shared_ptr<Client> c,
|
||||
// update and the current tournament entry depend on this flag, we have
|
||||
// to delay sending them until now, instead of sending them during the
|
||||
// login sequence.
|
||||
if ((c->flags & Client::Flag::IS_EPISODE_3) && !(c->flags & Client::Flag::HAS_EP3_CARD_DEFS)) {
|
||||
send_ep3_card_list_update(s, c);
|
||||
for (const auto& banner : s->ep3_lobby_banners) {
|
||||
send_ep3_media_update(c, banner.type, banner.which, banner.data);
|
||||
if (c->flags & Client::Flag::IS_EPISODE_3) {
|
||||
bool flags_changed = false;
|
||||
if (!(c->flags & Client::Flag::HAS_EP3_CARD_DEFS)) {
|
||||
send_ep3_card_list_update(s, c);
|
||||
auto team = c->ep3_tournament_team.lock();
|
||||
auto tourn = team ? team->tournament.lock() : nullptr;
|
||||
if (!(c->flags & Client::Flag::IS_EP3_TRIAL_EDITION)) {
|
||||
send_ep3_confirm_tournament_entry(s, c, tourn);
|
||||
}
|
||||
c->flags |= Client::Flag::HAS_EP3_CARD_DEFS;
|
||||
flags_changed = true;
|
||||
}
|
||||
auto team = c->ep3_tournament_team.lock();
|
||||
auto tourn = team ? team->tournament.lock() : nullptr;
|
||||
if (!(c->flags & Client::Flag::IS_EP3_TRIAL_EDITION)) {
|
||||
send_ep3_confirm_tournament_entry(s, c, tourn);
|
||||
if (!(c->flags & Client::Flag::HAS_EP3_MEDIA_UPDATES)) {
|
||||
for (const auto& banner : s->ep3_lobby_banners) {
|
||||
send_ep3_media_update(c, banner.type, banner.which, banner.data);
|
||||
c->flags |= Client::Flag::HAS_EP3_MEDIA_UPDATES;
|
||||
flags_changed = true;
|
||||
}
|
||||
}
|
||||
if (flags_changed) {
|
||||
send_update_client_config(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2190,9 +2190,6 @@ void send_ep3_card_list_update(shared_ptr<ServerState> s, shared_ptr<Client> c)
|
||||
w.write(data);
|
||||
|
||||
send_command(c, 0xB8, 0x00, w.str());
|
||||
|
||||
c->flags |= Client::Flag::HAS_EP3_CARD_DEFS;
|
||||
send_update_client_config(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2532,10 +2532,6 @@ I 2784 2023-09-05 22:29:00 - [Commands] Sending to C-3 (version=GC command=B8 fl
|
||||
6EB0 | 3A 30 70 FD E8 3A 2E FF 00 D7 F8 FF E3 02 BD C6 | :0p :.
|
||||
6EC0 | FF 50 FF 0B CA 5D A3 F8 F4 1F 2A A0 43 F0 E6 FC | P ] * C
|
||||
6ED0 | F0 8C 0A 08 FF 0B 00 00 |
|
||||
I 2784 2023-09-05 22:29:00 - [Commands] Sending to C-3 (version=GC command=04 flag=00)
|
||||
0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 39 98 AC 82 | , 9
|
||||
0010 | 0E 89 2A 49 0A 43 02 00 30 45 53 33 00 00 00 00 | *I 0ES3
|
||||
0020 | 00 00 FF FF FF FF FF FF FF FF FF FF |
|
||||
I 2784 2023-09-05 22:29:00 - [Commands] Sending to C-3 (version=GC command=CC flag=00)
|
||||
0000 | CC 00 0C 05 00 00 00 00 00 00 00 00 00 00 00 00 |
|
||||
0010 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
|
||||
@@ -2618,6 +2614,10 @@ I 2784 2023-09-05 22:29:00 - [Commands] Sending to C-3 (version=GC command=CC fl
|
||||
04E0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
|
||||
04F0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
|
||||
0500 | 00 00 00 00 00 00 00 00 00 00 00 00 |
|
||||
I 2784 2023-09-05 22:29:00 - [Commands] Sending to C-3 (version=GC command=04 flag=00)
|
||||
0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 39 98 AC 82 | , 9
|
||||
0010 | 0E 89 2A 49 0A 43 02 00 30 45 53 33 00 00 00 00 | *I 0ES3
|
||||
0020 | 00 00 FF FF FF FF FF FF FF FF FF FF |
|
||||
I 2784 2023-09-05 22:29:00 - [Commands] Received from C-3 (Tali) (version=GC command=99 flag=00)
|
||||
0000 | 99 00 04 00 |
|
||||
I 2784 2023-09-05 22:29:00 - [Commands] Received from C-3 (Tali) (version=GC command=B8 flag=00)
|
||||
|
||||
Reference in New Issue
Block a user