Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/UnitAI.js
Show First 20 Lines • Show All 3,376 Lines • ▼ Show 20 Lines | else | ||||
this.Stop(false); | this.Stop(false); | ||||
} | } | ||||
this.workOrders = []; | this.workOrders = []; | ||||
let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader); | let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader); | ||||
if (cmpTrader) | if (cmpTrader) | ||||
cmpTrader.StopTrading(); | cmpTrader.StopTrading(); | ||||
this.SetStance(this.template.DefaultStance); | |||||
if (this.IsTurret()) | if (this.IsTurret()) | ||||
this.SetTurretStance(); | this.SetTurretStance(); | ||||
else | |||||
this.SetStance(this.template.DefaultStance); | |||||
temple: I don't understand this. The previous way it effectively reset the default stance of turret… | |||||
mimoAuthorUnsubmitted Not Done Inline ActionsI was too fast, and will remove that change mimo: I was too fast, and will remove that change | |||||
} | } | ||||
}; | }; | ||||
UnitAI.prototype.OnDestroy = function() | UnitAI.prototype.OnDestroy = function() | ||||
{ | { | ||||
// Switch to an empty state to let states execute their leave handlers. | // Switch to an empty state to let states execute their leave handlers. | ||||
this.UnitFsm.SwitchToNextState(this, ""); | this.UnitFsm.SwitchToNextState(this, ""); | ||||
▲ Show 20 Lines • Show All 2,562 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
I don't understand this. The previous way it effectively reset the default stance of turret units, so when they ungarrisoned they weren't in whatever stance the previous owner had them in. Here you're setting the turret stance of units already in turret stance, which means they'll be in standground when they ungarrison instead of the default aggressive.