feat(ground-ai)!: disable stock tankBot globally when AI script loads
Replace per-bot mid-battle movement handback to stock AI with a clean binary startup gate: - Locate Unit::setBehaviorTree (ground_ai_set_beh_tree: .37 0x4e89b0, .58 0x4e8f60) in patches/native/local_mp_ground_ai.jsonc and hook it in native/wto-net/src/local_mp_ground_ai.c. - Announce readiness from [init] in wto_ai_runtime.das via wtoGroundAiScriptReady once the ground AI scripts finish compiling cleanly with custom movement enabled. When announced, hook_set_beh_tree suppresses attaching "tankBot" to LocalMP bot tanks and keeps their MoveSystem.inactive pinned to 1 for the life of the vehicle, ending all tug-of-war (external_inactive_reset) with stock AI. - If scripts fail to compile, are missing, or mode is "stock" / "fire", ownMovement stays 0 and stock tankBot runs untouched. - Remove per-bot handback, timeout release, and the now-obsolete navigation.returnToStockOnFailure config plumbing; on genuine script failure a bot halts in place and logs DRIVE_FAIL instead of silently switching to stock. Also initialize newly spawned bot ticks to run on frame 0 to eliminate spawn-frame invalid_drive_cmd noise. Verified MSVC build of wto_ws.dll (0 warnings in project C sources), root and launcher type checks, native module resolution on both 2.61.0.37 and 2.61.0.58 (0 failures), isolated 2.61.0.58 startup confirming 12/12 LocalMP modules installed, wto_ai_runtime.das loaded in 213 ms (0 compile errors), and "ground AI script ready (ownMovement=1; stock tankBot disabled)" in wto_ws.log. BREAKING CHANGE: removes navigation.returnToStockOnFailure from tuning/ground-ai.jsonc; stock tankBot is now controlled strictly by whether the custom ground AI script loaded with custom movement enabled.
This commit is contained in:
1 parent
ac35c25851
commit
85532cd930
13 files changed
+105
-124
No files matched your search
@@ -56,12 +56,23 @@
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "48 b8 69 6e 61 63 74 69 76 65 48 89 44 24 30 c6 44 24 38 00 c6 44 24 67 0f 48 89 44 24 50 c6 44 24 58 00 48 8b 8b a8 01 00 00 e8 ?? ?? ?? ?? 48 89 84 24 a0 00 00 00 4c 89 74 24 20 48 8d 54 24 50 4c 8d 44 24 30 48 89 d9 41 b9 ?? ?? ?? ?? e8 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"pattern": "48 b8 69 6e 61 63 74 69 76 65 48 89 44 24 30 c6 44 24 38 00 c6 44 24 67 0f 48 89 44 24 50 c6 44 24 58 00 48 8b 8b a8 01 00 00 e8 ?? ?? ?? ?? 48 89 84 24 a0 00 00 00 4c 89 74 24 20 48 8d 54 24 50 4c 8d 44 24 30 48 89 d9 41 b9 ?? ?? ?? ?? e8 ?? ?? ?? ??"
|
||||
,"captures": {
|
||||
"inactive": { "offset": 75, "type": "u32" }
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
// Unit::setBehaviorTree (vtable +0x1f0 and direct calls from BotSystem attaching "tankBot").
|
||||
// 2.61.0.37: 0x4e89b0. 2.61.0.58: 0x4e8f60.
|
||||
"ground_ai_set_beh_tree": {
|
||||
"variants": [{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 56 56 57 53 48 83 ec 48 8b 81 ?? ?? ?? ?? a9 00 01 00 00 75 1a 48 8b 81 ?? ?? ?? ?? 48 85 c0 74 2e f6 80 ?? ?? ?? ?? 80 75 25 e9 ?? ?? ?? ??"
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user