Remove unnecessary parentheses
This commit is contained in:
@@ -75,7 +75,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
|
||||
if (blinkPattern != null && blinkPattern.Length > 0)
|
||||
{
|
||||
var i = (self.World.WorldTick / Info.BlinkInterval) % blinkPattern.Length;
|
||||
var i = self.World.WorldTick / Info.BlinkInterval % blinkPattern.Length;
|
||||
if (blinkPattern[i] != BlinkState.On)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
var a = new Animation(self.World, rs.GetImage(self));
|
||||
a.PlayFetchIndex(info.Sequence, () =>
|
||||
playerResources.ResourceCapacity != 0 ?
|
||||
((10 * a.CurrentSequence.Length - 1) * playerResources.Resources) / (10 * playerResources.ResourceCapacity) :
|
||||
(10 * a.CurrentSequence.Length - 1) * playerResources.Resources / (10 * playerResources.ResourceCapacity) :
|
||||
0);
|
||||
|
||||
anim = new AnimationWithOffset(a, null, () => IsTraitDisabled, 1024);
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
{
|
||||
DefaultAnimation.PlayFetchIndex(NormalizeSequence(self, Info.Sequence),
|
||||
() => playerResources.ResourceCapacity != 0
|
||||
? ((info.Stages * DefaultAnimation.CurrentSequence.Length - 1) * playerResources.Resources) / (info.Stages * playerResources.ResourceCapacity)
|
||||
? (info.Stages * DefaultAnimation.CurrentSequence.Length - 1) * playerResources.Resources / (info.Stages * playerResources.ResourceCapacity)
|
||||
: 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
.Select(ma => ((IModifyableRenderable)ma).WithTint(shadowColor, ((IModifyableRenderable)ma).TintModifiers | TintModifiers.ReplaceColor)
|
||||
.WithAlpha(shadowAlpha)
|
||||
.OffsetBy(info.Offset - new WVec(0, 0, height))
|
||||
.WithZOffset(ma.ZOffset + (height + info.ZOffset))
|
||||
.WithZOffset(ma.ZOffset + height + info.ZOffset)
|
||||
.AsDecoration());
|
||||
|
||||
return shadowSprites.Concat(r);
|
||||
|
||||
Reference in New Issue
Block a user