fix(ground-ai): only run custom AI in multiplayer battles
This commit is contained in:
1 parent
8c7d4a44a4
commit
bc35cc89ab
1 file changed
+5
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user