From b6002eb6fd992a148e0dd566ea1216f0936697a2 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sun, 23 Dec 2012 15:52:38 +0100 Subject: [PATCH] Removed needless function. --- source/abstract/Sprite.cpp | 12 ------------ source/abstract/Sprite.h | 1 - source/effects/Bullet.cpp | 5 ----- source/effects/Bullet.h | 1 - 4 files changed, 19 deletions(-) diff --git a/source/abstract/Sprite.cpp b/source/abstract/Sprite.cpp index 0b89c9f..f980c4d 100755 --- a/source/abstract/Sprite.cpp +++ b/source/abstract/Sprite.cpp @@ -128,18 +128,6 @@ Sprite::draw(sf::RenderTarget& target, sf::RenderStates states) const { target.draw(*mShape, states); } -/** - * This method filters collisions with other sprites. Implement it if you want to - * limit collisions to/with certain objects. Default implementation always returns true. - * - * @param other The Sprite this object is about to collide with. - * @return True if the objects should collide. - */ -bool -Sprite::doesCollide(Sprite& other) { - return true; -} - /** * Called when a collision with another Sprite occured. Override this method * to manage collision events. diff --git a/source/abstract/Sprite.h b/source/abstract/Sprite.h index cd95c6f..3a7896e 100755 --- a/source/abstract/Sprite.h +++ b/source/abstract/Sprite.h @@ -65,7 +65,6 @@ public: sf::Vector2f getSize() const; virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const; - virtual bool doesCollide(Sprite& other); virtual void onCollide(Sprite& other); // Public variables. diff --git a/source/effects/Bullet.cpp b/source/effects/Bullet.cpp index b0a8cb6..6038d7e 100755 --- a/source/effects/Bullet.cpp +++ b/source/effects/Bullet.cpp @@ -52,8 +52,3 @@ Bullet::onCollide(Sprite& other) { setDelete(true); } } - -bool -Bullet::doesCollide(Sprite& other) { - return &other != &mShooter; -} diff --git a/source/effects/Bullet.h b/source/effects/Bullet.h index 66dbdda..4a77f46 100755 --- a/source/effects/Bullet.h +++ b/source/effects/Bullet.h @@ -26,7 +26,6 @@ public: const Yaml& config); void onCollide(Sprite& other); - void doesCollide(Sprite& other); // Private variables. private: