Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/UnitAI.js
Show First 20 Lines • Show All 3,398 Lines • ▼ Show 20 Lines | UnitAI.prototype.Init = function() | ||||
this.formationAnimationVariant = undefined; | this.formationAnimationVariant = undefined; | ||||
this.SetStance(this.template.DefaultStance); | this.SetStance(this.template.DefaultStance); | ||||
}; | }; | ||||
UnitAI.prototype.IsTurret = function() | UnitAI.prototype.IsTurret = function() | ||||
{ | { | ||||
if (!this.IsGarrisoned()) | let cmpPosition = Engine.QueryInterface(this.entity, IID_Position); | ||||
return false; | |||||
var cmpPosition = Engine.QueryInterface(this.entity, IID_Position); | |||||
return cmpPosition && cmpPosition.GetTurretParent() != INVALID_ENTITY; | return cmpPosition && cmpPosition.GetTurretParent() != INVALID_ENTITY; | ||||
}; | }; | ||||
UnitAI.prototype.IsFormationController = function() | UnitAI.prototype.IsFormationController = function() | ||||
{ | { | ||||
return (this.template.FormationController == "true"); | return (this.template.FormationController == "true"); | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 3,020 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator