Skip to content

Commit

Permalink
Added define for shield steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Monsterovich committed Oct 27, 2024
1 parent f582705 commit 0a3801f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/droid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions src/droiddef.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<DROID_ORDER_DATA> OrderList;

Expand Down

0 comments on commit 0a3801f

Please sign in to comment.