Skip to content

Commit

Permalink
Update TowerCombatTask.java
Browse files Browse the repository at this point in the history
updated to return without editing firerate if division by zero is attempted.
  • Loading branch information
The-AhmadAA authored Sep 8, 2023
1 parent bd6a871 commit 0afcd0c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private void changeFireRateInterval(int perMinute) {
float oldFireSpeed = 1/fireRateInterval;
float newFireSpeed = oldFireSpeed + perMinute/60f;
if (newFireSpeed == 0) {
fireRateInterval = 0;
return;
} else {
fireRateInterval = 1 / newFireSpeed;
}
Expand Down

0 comments on commit 0afcd0c

Please sign in to comment.