From 4b516b336eabcc57892939eb9f16101b95aedc32 Mon Sep 17 00:00:00 2001 From: phosit Date: Sun, 5 Apr 2026 12:27:55 +0200 Subject: [PATCH] Get the UnitAI order data directly The cached data wasn't always up to date. I coudn't figure out when to update it. --- binaries/data/mods/public/simulation/ai/common-api/entity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binaries/data/mods/public/simulation/ai/common-api/entity.js b/binaries/data/mods/public/simulation/ai/common-api/entity.js index e3186ee272..6b8a5c47d1 100644 --- a/binaries/data/mods/public/simulation/ai/common-api/entity.js +++ b/binaries/data/mods/public/simulation/ai/common-api/entity.js @@ -649,7 +649,7 @@ export const Entity = Class({ "getStance": function() { return this._entity.stance; }, "unitAIState": function() { return this._entity.unitAIState; }, - "unitAIOrderData": function() { return this._entity.unitAIOrderData; }, + "unitAIOrderData": function() { return SimEngine.QueryInterface(this.id(), Sim.IID_UnitAI).GetOrders(); }, "hitpoints": function() { return this._entity.hitpoints; }, "isHurt": function() { return this.hitpoints() < this.maxHitpoints(); },