GetEffectiveSpeed() factored out; Mobile hacked to only allow Move orders if the speed is nonzero
This commit is contained in:
@@ -168,11 +168,7 @@ namespace OpenRa.Game.Traits.Activities
|
||||
var oldFraction = moveFraction;
|
||||
var oldTotal = moveFractionTotal;
|
||||
|
||||
var actualSpeed = (int)self.traits.WithInterface<ISpeedModifier>().Aggregate(
|
||||
(float)(self.Info as MobileInfo).Speed,
|
||||
(a, t) => t.GetSpeedModifier() * a);
|
||||
|
||||
moveFraction += actualSpeed;
|
||||
moveFraction += (int)Util.GetEffectiveSpeed(self);
|
||||
UpdateCenterLocation( self, mobile );
|
||||
if( moveFraction >= moveFractionTotal )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user