mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-24 14:46:19 +02:00
Throwdowns: a plugin refusing its card no longer blocks every later flag, and joins say what they did
A plugin that calls flag.leave() on `open` (Tag and Infected outside a session) sent the game an exit from a setup that never opened. The game never took it, and every later flag's setup waited behind it. A registration left before its setup was asked for now just ends, from flag.leave() and from the waiting card's Leave alike (leave_unopened). The join card says which flag it read and how it was branded, or which buttons it has when it has no Enroll; its branding errors were swallowed. Joining another player's plugin flag says whether its plugin heard join, or why the player was taken out of its queue. A navigation that waits on the game's says so every 3 s, and a setup that does not open in 15 s says so.
This commit is contained in:
1 parent
a598ce602b
commit
77542e4db9
4 files changed
+73
-8
No files matched your search
@@ -202,6 +202,7 @@ struct State {
|
||||
MapBranding map_branding;
|
||||
std::atomic<std::uint32_t> join_mmid{};
|
||||
std::map<Handle,JoinCard> join_cards;
|
||||
std::string join_report; // join_card_report's last line
|
||||
MatchPanel match_panel;
|
||||
std::atomic<bool> match_panel_open{};
|
||||
std::mutex panel_input_mutex;
|
||||
@@ -2232,6 +2233,13 @@ void observe_native_custom_join_details(std::uintptr_t vm) noexcept {
|
||||
try {
|
||||
const auto mmid=menu_data::native_join_mmid(vm,[](Address at,void* out,std::size_t count){return memory::peek_bytes(at,out,count);});
|
||||
if(mmid)state().join_mmid.store(*mmid,std::memory_order_release);
|
||||
// Said when it changes: a card whose MMID cannot be read is never branded.
|
||||
static std::atomic<std::uint64_t> last{~0ULL};
|
||||
const std::uint64_t value=mmid?*mmid:1ULL<<32;
|
||||
if(last.exchange(value)!=value) {
|
||||
if(mmid)logging::log(logging::Level::info,logging::Channel::ui,"Join card: the game filled the details of MMID {:#x}.",*mmid);
|
||||
else logging::log(logging::Level::info,logging::Channel::ui,"Join card: the game filled a throwdown's details; its MMID could not be read.");
|
||||
}
|
||||
} catch(...) {}
|
||||
}
|
||||
void observe_native_flag_interaction(std::uintptr_t vm) noexcept {
|
||||
|
||||
Reference in new issue
Block a user