Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
Show First 20 Lines • Show All 4,941 Lines • ▼ Show 20 Lines | UnitAI.prototype.RespondToTargetedEntities = function(ents) | ||||
if (this.GetStance().respondStandGround) | if (this.GetStance().respondStandGround) | ||||
return this.AttackVisibleEntity(ents); | return this.AttackVisibleEntity(ents); | ||||
if (this.GetStance().respondHoldGround) | if (this.GetStance().respondHoldGround) | ||||
return this.AttackEntityInZone(ents); | return this.AttackEntityInZone(ents); | ||||
if (this.GetStance().respondFlee) | if (this.GetStance().respondFlee) | ||||
{ | { | ||||
if (this.order && this.order.type == "Flee") | |||||
this.orderQueue.shift(); | |||||
this.PushOrderFront("Flee", { "target": ents[0], "force": false }); | this.PushOrderFront("Flee", { "target": ents[0], "force": false }); | ||||
return true; | return true; | ||||
} | } | ||||
return false; | return false; | ||||
}; | }; | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 1,422 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator