From 0b99277bcd230651a9c6b77d07d13b15f497b667 Mon Sep 17 00:00:00 2001 From: Ricardo Cruz Date: Mon, 10 May 2004 13:21:41 +0000 Subject: [PATCH] Well, Ingo and Tobias prefer the old shooting behavior, so here it goes. SVN-Revision: 1065 --- src/defines.h | 2 +- src/world.cpp | 6 +----- src/world.h | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/defines.h b/src/defines.h index 49c81ce91..c23ed247f 100644 --- a/src/defines.h +++ b/src/defines.h @@ -69,7 +69,7 @@ enum DyingType { #define START_LIVES 4 -#define BULLETS_TIMEOUT 500 +#define BULLETS_MAX 2 #define YM_FOR_JUMP 6.0 #define WALK_ACCELERATION_X 0.03 diff --git a/src/world.cpp b/src/world.cpp index 924d456ed..3322b9fbf 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -56,7 +56,6 @@ World::World(const std::string& filename) apply_bonuses(); scrolling_timer.init(true); - bullets_timer.init(true); } World::World(const std::string& subset, int level_nr) @@ -78,7 +77,6 @@ World::World(const std::string& subset, int level_nr) apply_bonuses(); scrolling_timer.init(true); - bullets_timer.init(true); } void @@ -543,11 +541,9 @@ World::add_upgrade(float x, float y, Direction dir, UpgradeKind kind) void World::add_bullet(float x, float y, float xm, Direction dir) { - if(bullets_timer.check()) + if(bullets.size() > MAX_BULLETS-1) return; - bullets_timer.start(BULLETS_TIMEOUT); - Bullet new_bullet; new_bullet.init(x,y,xm,dir); bullets.push_back(new_bullet); diff --git a/src/world.h b/src/world.h index 58dccfc2d..e62ce664d 100644 --- a/src/world.h +++ b/src/world.h @@ -58,7 +58,6 @@ public: std::vector floating_scores; std::vector upgrades; - Timer bullets_timer; std::vector bullets; typedef std::vector ParticleSystems; ParticleSystems particle_systems; -- 2.11.0