summaryrefslogtreecommitdiff
path: root/bulletpattern.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bulletpattern.cpp')
-rw-r--r--bulletpattern.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/bulletpattern.cpp b/bulletpattern.cpp
index a2504f9..7d16e71 100644
--- a/bulletpattern.cpp
+++ b/bulletpattern.cpp
@@ -22,8 +22,8 @@ BulletPattern::BulletPattern() {
}
void BulletPattern::update(unsigned int time, unsigned int step) {
- if(num_bullets < 503 && num_bullets * 4 < time) {
- num_bullets += time / 4 - num_bullets;
+ while(num_bullets < 503 && num_bullets * 4 < time) {
+ num_bullets++;
}
for(int i = 0; i < num_bullets; i++) {
bullets[i*4] += bullets[i*4 + 2] * step;