mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-17 13:53:57 -07:00
This is the same commit as 2abd9cead2 / D1418, fixing noted issues.
This addresses two related issues:
- Units visibly garrisoned on gates keep the gate open.
- Units visibly garrisoned on entities keep their pathfinding blocker
flags.
De-activate the obstruction of visibly-garrisoned entities, fixing the
2nd issue.
Keep a list of entities that cannot move and thus should not count
towards gate-opening logic.
Packing logic is kept separate: it is more related to entities having
'alternate forms' with different capabilities than being currently
incapable of moving.
Based on work by temple
Fixes #2679.
Fixes #5151.
Differential Revision: https://code.wildfiregames.com/D2775
This was SVN commit r23731.
47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
Engine.RegisterInterface("UnitAI");
|
|
|
|
/**
|
|
* Message of the form { "idle": boolean }
|
|
* sent from UnitAI whenever the unit's idle status changes.
|
|
*/
|
|
Engine.RegisterMessageType("UnitIdleChanged");
|
|
|
|
/**
|
|
* Message of the form { "ableToMove": boolean }
|
|
* sent from UnitAI whenever the unit's ability to move changes.
|
|
*/
|
|
Engine.RegisterMessageType("UnitAbleToMoveChanged");
|
|
|
|
|
|
/**
|
|
* Message of the form { "to": string }
|
|
* where "to" value is a UnitAI stance,
|
|
* sent from UnitAI whenever the unit's stance changes.
|
|
*/
|
|
Engine.RegisterMessageType("UnitStanceChanged");
|
|
|
|
/**
|
|
* Message of the form { "to": string }
|
|
* where "to" value is a UnitAI state,
|
|
* sent from UnitAI whenever the unit changes state.
|
|
*/
|
|
Engine.RegisterMessageType("UnitAIStateChanged");
|
|
|
|
/**
|
|
* Message of the form { "to": number[] }
|
|
* where "to" value is an array of data orders given by GetOrderData,
|
|
* sent from UnitAI whenever the unit order data changes.
|
|
*/
|
|
Engine.RegisterMessageType("UnitAIOrderDataChanged");
|
|
|
|
/**
|
|
* Message of the form { "entity": number }
|
|
* sent from UnitAI whenever a pickup is requested.
|
|
*/
|
|
Engine.RegisterMessageType("PickupRequested");
|
|
|
|
/**
|
|
* Message of the form { "entity": number }
|
|
* sent from UnitAI whenever a pickup is aborted.
|
|
*/
|
|
Engine.RegisterMessageType("PickupCanceled");
|