Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/UnitAI.js
Show First 20 Lines • Show All 3,134 Lines • ▼ Show 20 Lines | "IDLE": { | ||||
this.SetNextState("FEEDING"); | this.SetNextState("FEEDING"); | ||||
return true; | return true; | ||||
}, | }, | ||||
}, | }, | ||||
"ROAMING": { | "ROAMING": { | ||||
"enter": function() { | "enter": function() { | ||||
// Walk in a random direction | // Walk in a random direction | ||||
this.SelectAnimation("walk", false, this.GetWalkSpeed()); | this.SelectAnimation("move"); | ||||
elexis: This should be split from the diff, because it is entirely independent of the proposed feature. | |||||
Not Done Inline ActionsWill be made irrelevant by D13, which delegates that to VisualActor entirely. But agreed. wraitii: Will be made irrelevant by D13, which delegates that to VisualActor entirely. But agreed. | |||||
this.SetFacePointAfterMove(false); | this.SetFacePointAfterMove(false); | ||||
this.MoveRandomly(+this.template.RoamDistance); | this.MoveRandomly(+this.template.RoamDistance); | ||||
// Set a random timer to switch to feeding state | // Set a random timer to switch to feeding state | ||||
this.StartTimer(randIntInclusive(+this.template.RoamTimeMin, +this.template.RoamTimeMax)); | this.StartTimer(randIntInclusive(+this.template.RoamTimeMin, +this.template.RoamTimeMax)); | ||||
}, | }, | ||||
"leave": function() { | "leave": function() { | ||||
this.StopTimer(); | this.StopTimer(); | ||||
▲ Show 20 Lines • Show All 2,853 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
This should be split from the diff, because it is entirely independent of the proposed feature.
It can be committed individually accepted by me with the reasoning that WalkSpeed is never read from in this case.