Add synthetic LAN event injection PoC + Soak Test disable fix
Hooks MapTrack::HandleEvent to fabricate a RaceEvent+CashReward+fake Actor and insert it via the engine's own AddEvent, making a synthetic "LAN: <lobby>" card appear on an already-loaded street entirely at runtime (no game_cache/OBB/native_lib changes). Also hooks the per-frame MapScreen tick to neutralize a QA-only "Soak Test" feature whose index-based scan of a parallel, unsynced list was the root cause of a delayed crash on injected entries. Verified live on Galaxy A9 (2018): zero crashes across all reachable pins, and a 10-minute soak test with zero crashes after the Soak Test fix, confirmed against a genuinely responsive post-test map screen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <iomanip>
|
||||
#include "util/armhook.h"
|
||||
#include "util/armhooks.h"
|
||||
#include "lan_event_injection.h"
|
||||
|
||||
void* libapp_base = NULL;
|
||||
|
||||
@@ -176,6 +177,12 @@ static bool InstallBuildTrackScenePathHook() {
|
||||
// baseline/"before" comparison) - true installs the track-substitution hook.
|
||||
// Just edit this and rebuild, no need to touch anything else.
|
||||
static constexpr bool kEnableTrackSubstitutionHook = true;
|
||||
static constexpr bool kEnableLanEventInjectionHook = true;
|
||||
// See ANALYSIS.md §6ff/§6gg: prevents a QA-only "Soak Test" auto-race feature
|
||||
// from eventually crashing the process on entries our injection adds to the
|
||||
// prefab cache. Independent of kEnableLanEventInjectionHook so it can be kept
|
||||
// on even if injection itself is toggled off for testing.
|
||||
static constexpr bool kEnableSoakTestDisableHook = true;
|
||||
|
||||
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
|
||||
@@ -183,6 +190,12 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
if (kEnableTrackSubstitutionHook) {
|
||||
InstallBuildTrackScenePathHook();
|
||||
}
|
||||
if (kEnableLanEventInjectionHook) {
|
||||
InstallMapTrackHandleEventHook();
|
||||
}
|
||||
if (kEnableSoakTestDisableHook) {
|
||||
InstallSoakTestDisableHook();
|
||||
}
|
||||
}
|
||||
|
||||
return JNI_VERSION_1_6;
|
||||
|
||||
Reference in New Issue
Block a user