Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/UnitMotionFlying.js
Show First 20 Lines • Show All 298 Lines • ▼ Show 20 Lines | UnitMotionFlying.prototype.IsInTargetRange = function(target, minRange, maxRange) | ||||
return this.IsInPointRange(targetPos.x, targetPos.y, minRange, maxRange); | return this.IsInPointRange(targetPos.x, targetPos.y, minRange, maxRange); | ||||
}; | }; | ||||
UnitMotionFlying.prototype.GetWalkSpeed = function() | UnitMotionFlying.prototype.GetWalkSpeed = function() | ||||
{ | { | ||||
return +this.template.MaxSpeed; | return +this.template.MaxSpeed; | ||||
}; | }; | ||||
UnitMotionFlying.prototype.SetSpeed = function() | UnitMotionFlying.prototype.SetSpeedRatio = function() | ||||
{ | { | ||||
// ignore this, the speed is always the walk speed | // ignore this, the speed is always the walk speed | ||||
}; | }; | ||||
UnitMotionFlying.prototype.GetRunSpeed = function() | UnitMotionFlying.prototype.GetRunSpeedMultiplier = function() | ||||
{ | { | ||||
return this.GetWalkSpeed(); | return 1; | ||||
bb: -`.0` | |||||
Done Inline ActionsWhy 1 ? Can't we have planes with a speedboost ? Stan: Why 1 ? Can't we have planes with a speedboost ? | |||||
Done Inline ActionsUMF handles speed completely differently, and at this point should probably be separated from unitMotion, so I'd say no to this. wraitii: UMF handles speed completely differently, and at this point should probably be separated from… | |||||
}; | }; | ||||
UnitMotionFlying.prototype.GetCurrentSpeed = function() | UnitMotionFlying.prototype.GetCurrentSpeed = function() | ||||
{ | { | ||||
return this.speed; | return this.speed; | ||||
}; | }; | ||||
UnitMotionFlying.prototype.GetSpeedRatio = function() | |||||
{ | |||||
return this.GetCurrentSpeed() / this.GetWalkSpeed(); | |||||
Not Done Inline Actionsthis.Call() bb: this.Call() | |||||
} | |||||
Not Done Inline ActionsThe function called from outside a unitmotion, inside a unitmotion, should be present in all unitmotions. Thus all the function added/removed in unitmotion should also be added/removed in unitMotionFlying. Otherwise ancient people don't know how to fly mustangs :P bb: The function called from outside a unitmotion, inside a unitmotion, should be present in all… | |||||
UnitMotionFlying.prototype.GetPassabilityClassName = function() | UnitMotionFlying.prototype.GetPassabilityClassName = function() | ||||
{ | { | ||||
return this.template.PassabilityClass; | return this.template.PassabilityClass; | ||||
}; | }; | ||||
UnitMotionFlying.prototype.GetPassabilityClass = function() | UnitMotionFlying.prototype.GetPassabilityClass = function() | ||||
{ | { | ||||
return this.passabilityClass; | return this.passabilityClass; | ||||
Show All 25 Lines |
Wildfire Games · Phabricator
-.0