Get the UnitAI order data directly

The cached data wasn't always up to date. I coudn't figure out when to
update it.
This commit is contained in:
phosit 2026-04-05 12:27:55 +02:00
parent 3afdf64eee
commit 4b516b336e
No known key found for this signature in database
GPG key ID: C9430B600671C268

View file

@ -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(); },