From f78606b6391b282426a73016fff9541320d4994b Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Mon, 17 May 2010 17:56:38 +0200 Subject: Added Application-class. --- bulletpattern.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bulletpattern.cpp') 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; -- cgit v1.2.3