From 640e9d68b7196f648293cf22c7f046326ca2d3d6 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 20 Jan 2023 14:39:24 +0100 Subject: [PATCH] Fix not all ammo pools getting rearmed during RearmTick --- OpenRA.Mods.Common/Traits/Rearmable.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Rearmable.cs b/OpenRA.Mods.Common/Traits/Rearmable.cs index fb4c67f9ca..97ec51ddc8 100644 --- a/OpenRA.Mods.Common/Traits/Rearmable.cs +++ b/OpenRA.Mods.Common/Traits/Rearmable.cs @@ -56,6 +56,7 @@ namespace OpenRA.Mods.Common.Traits public bool RearmTick(Actor self) { + var rearmComplete = true; foreach (var ammoPool in RearmableAmmoPools) { if (!ammoPool.HasFullAmmo) @@ -69,11 +70,11 @@ namespace OpenRA.Mods.Common.Traits ammoPool.GiveAmmo(self, ammoPool.Info.ReloadCount); } - return false; + rearmComplete = false; } } - return true; + return rearmComplete; } } }