repair cost is always at least 1 per tick
This commit is contained in:
@@ -74,7 +74,7 @@ namespace OpenRA.Mods.RA.Buildings
|
||||
var buildingValue = self.GetSellValue();
|
||||
|
||||
var hpToRepair = Math.Min(Info.RepairStep, Health.MaxHP - Health.HP);
|
||||
var cost = (hpToRepair * Info.RepairPercent * buildingValue) / (Health.MaxHP * 100);
|
||||
var cost = Math.Max(1, (hpToRepair * Info.RepairPercent * buildingValue) / (Health.MaxHP * 100));
|
||||
if (!Repairer.PlayerActor.Trait<PlayerResources>().TakeCash(cost))
|
||||
{
|
||||
remainingTicks = 1;
|
||||
|
||||
Reference in New Issue
Block a user