Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/garrisonManager.js
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | for (let j = 0; j < list.length; ++j) | ||||
list.splice(j--, 1); | list.splice(j--, 1); | ||||
else if (holder.garrisoned().indexOf(list[j]) !== -1) // unit is garrisoned | else if (holder.garrisoned().indexOf(list[j]) !== -1) // unit is garrisoned | ||||
{ | { | ||||
this.leaveGarrison(ent); | this.leaveGarrison(ent); | ||||
list.splice(j--, 1); | list.splice(j--, 1); | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
if (ent.unitAIOrderData().some(order => order.target && order.target == id)) | if (ent.unitAIOrderData().some(order => order.target && order.target == id))//? | ||||
Freagarach: To me this seems like we're ordered to go garrisoning, but haven't arrived yet? | |||||
continue; | continue; | ||||
if (ent.getMetadata(PlayerID, "garrisonHolder") == id) | if (ent.getMetadata(PlayerID, "garrisonHolder") == id) | ||||
{ | { | ||||
// The garrison order must have failed | // The garrison order must have failed | ||||
this.leaveGarrison(ent); | this.leaveGarrison(ent); | ||||
list.splice(j--, 1); | list.splice(j--, 1); | ||||
} | } | ||||
else | else | ||||
▲ Show 20 Lines • Show All 271 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
To me this seems like we're ordered to go garrisoning, but haven't arrived yet?