X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fbullet.cpp;h=f260f5eabf3cb559ef66fe78c1debec23d231e9f;hb=e8a1d89d3d0f4824d3d906ca67149afec0a75e4b;hp=bceed3ccb446afca9ef38ace83541c237d5bb903;hpb=d46c78c842ab4090a3f46e560c891234167f124b;p=supertux.git diff --git a/src/object/bullet.cpp b/src/object/bullet.cpp index bceed3ccb..f260f5eab 100644 --- a/src/object/bullet.cpp +++ b/src/object/bullet.cpp @@ -2,7 +2,6 @@ #include #include "bullet.h" -#include "defines.h" #include "resources.h" #include "camera.h" #include "sector.h" @@ -53,9 +52,9 @@ Bullet::action(float elapsed_time) float scroll_y = Sector::current()->camera->get_translation().y; if (get_pos().x < scroll_x || - get_pos().x > scroll_x + screen->w || + get_pos().x > scroll_x + SCREEN_WIDTH || // get_pos().y < scroll_y || - get_pos().y > scroll_y + screen->h || + get_pos().y > scroll_y + SCREEN_HEIGHT || life_count <= 0) { remove_me(); return; @@ -94,7 +93,6 @@ Bullet::collision(GameObject& other, const CollisionHit& hit) return FORCE_MOVE; } - // TODO kill badguys return FORCE_MOVE; }