Remove unnecessary parentheses

This commit is contained in:
Gustas
2023-02-19 17:01:36 +02:00
committed by Pavel Penev
parent 157d1b32dc
commit 8d0fe52dd8
48 changed files with 78 additions and 64 deletions

View File

@@ -151,7 +151,7 @@ namespace OpenRA.Mods.Common.Traits
var hpToRepair = Math.Min(Info.RepairStep, health.MaxHP - health.HP);
// Cast to long to avoid overflow when multiplying by the health
var cost = Math.Max(1, (int)(((long)hpToRepair * Info.RepairPercent * buildingValue) / (health.MaxHP * 100L)));
var cost = Math.Max(1, (int)((long)hpToRepair * Info.RepairPercent * buildingValue / (health.MaxHP * 100L)));
// TakeCash will return false if the player can't pay, and will stop him from contributing this Tick
var activePlayers = Repairers.Count(player => player.PlayerActor.Trait<PlayerResources>().TakeCash(cost, true));