aboutsummaryrefslogtreecommitdiff
path: root/game/coins/CoinScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/coins/CoinScript.cpp')
-rw-r--r--game/coins/CoinScript.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/game/coins/CoinScript.cpp b/game/coins/CoinScript.cpp
index 3a2b5b0..54ef760 100644
--- a/game/coins/CoinScript.cpp
+++ b/game/coins/CoinScript.cpp
@@ -13,6 +13,7 @@ using namespace std;
bool CoinScript::on_collision(const CollisionEvent & collisionData) {
if (collisionData.info.other.metadata.tag != "coin") return false;
+ if(!this->get_components_by_name<Sprite>(collisionData.info.other.metadata.name).front().get().active) return false;
this->get_components_by_name<Sprite>(collisionData.info.other.metadata.name)
.front()
.get()