From 0a3801f68242da33230b3f8baba01ddaf8607b4d Mon Sep 17 00:00:00 2001 From: Nikolay Borodin Date: Sun, 27 Oct 2024 13:09:20 +0200 Subject: [PATCH] Added define for shield steps --- src/droid.cpp | 2 +- src/droiddef.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/droid.cpp b/src/droid.cpp index e17c439af01..953f33f48cf 100644 --- a/src/droid.cpp +++ b/src/droid.cpp @@ -966,7 +966,7 @@ void droidUpdateShields(DROID *psDroid) { } else { if (gameTime - psDroid->shieldInterruptRegenTime >= droidCalculateShieldInterruptRegenTime(psDroid)) { if (gameTime - psDroid->shieldRegenTime >= droidCalculateShieldRegenTime(psDroid)) { - for (uint32_t i = 0; i < 4; i++) { + for (uint32_t i = 0; i < DROID_SHIELD_POINTS_STEP; i++) { if (psDroid->shieldPoints < droidGetMaxShieldPoints(psDroid)) { psDroid->shieldPoints += 1; } diff --git a/src/droiddef.h b/src/droiddef.h index 9050f84c020..4fe4f27ba8f 100644 --- a/src/droiddef.h +++ b/src/droiddef.h @@ -57,6 +57,7 @@ #define DROID_SHIELD_REGEN_TIME_DEC 2 #define DROID_INITIAL_SHIELD_INTERRUPT_REGEN_TIME 2000 #define DROID_SHIELD_INTERRUPT_REGEN_TIME_DEC 100 +#define DROID_SHIELD_POINTS_STEP 4 typedef std::vector OrderList;