From bc35cc89abe6a0e57d2977cde9b77ab7674067b0 Mon Sep 17 00:00:00 2001 From: N0VAN0M4LY <224130499+N0VAN0M4LY@users.noreply.github.com> Date: Fri, 4 Dec 2026 15:20:14 +0800 Subject: [PATCH] fix(ground-ai): only run custom AI in multiplayer battles --- game-ai/ground/wto_ai_runtime.das | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/game-ai/ground/wto_ai_runtime.das b/game-ai/ground/wto_ai_runtime.das index 775e92b..1171e8a 100644 --- a/game-ai/ground/wto_ai_runtime.das +++ b/game-ai/ground/wto_ai_runtime.das @@ -48,8 +48,12 @@ var private g_last_zone_ver : int = -1 var private g_fire_budget : int = 0 var private g_next_diag_at : float = 0.0 +// Custom ground AI must only run inside a real multiplayer battle. Single-player test +// drives also dispatch tag=server ECS, but their target vehicles must never be taken over. def private wto_any_layer_active() : bool - return WTO_AI_ENABLED && (WTO_AI_LAYER_MACRO || WTO_AI_LAYER_TACTICS || WTO_AI_LAYER_NAVIGATION || WTO_AI_LAYER_FIRE_CONTROL) + if !WTO_AI_ENABLED || !get_app().isMultiplayerGame + return false + return WTO_AI_LAYER_MACRO || WTO_AI_LAYER_TACTICS || WTO_AI_LAYER_NAVIGATION || WTO_AI_LAYER_FIRE_CONTROL [init] def wto_ai_script_init()