Make GC EXP enable shim inert and dedupe dispatch

This commit is contained in:
2026-05-21 02:32:12 -04:00
parent b9c9b877d2
commit 1849d9d13d
5 changed files with 17 additions and 2484 deletions
+3
View File
@@ -19,6 +19,7 @@
#include "QuestScript.hh"
#include "TeamIndex.hh"
#include "Text.hh"
#include <string>
extern const uint64_t CLIENT_CONFIG_MAGIC;
@@ -147,6 +148,8 @@ public:
// Basic state
uint64_t enabled_flags = DEFAULT_FLAGS; // Client::Flag enum
std::string last_psopeeps_gc_exp_key;
void* last_psopeeps_gc_exp_lobby = nullptr;
uint32_t specific_version = 0;
uint8_t override_section_id = 0xFF; // FF = no override
uint8_t override_lobby_event = 0xFF; // FF = no override
+8
View File
@@ -3710,9 +3710,17 @@ static asio::awaitable<void> dispatch_gc_v3_exp_patch(shared_ptr<Client> c) {
key += "x_";
key += episode_str;
void* lobby_token = l.get();
if ((c->last_psopeeps_gc_exp_lobby == lobby_token) &&
(c->last_psopeeps_gc_exp_key == key)) {
co_return;
}
try {
auto fn = server_state->client_functions->get(key, c->specific_version);
co_await send_function_call(c, fn);
c->last_psopeeps_gc_exp_lobby = lobby_token;
c->last_psopeeps_gc_exp_key = key;
} catch (const out_of_range&) {
c->log.warning_f("GC V3 EXP dispatcher could not find client function {}", key);
}