aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-08 09:08:40 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-08 09:08:40 +0100
commitc01074a0cfdca0be4a6890d252b1b9aef87d597e (patch)
tree5746d5cbefff55e9f6f70468ffcaf8474aa50bae
parent93aa94921e027e05d7cb9908305af225c64b1ff2 (diff)
coin fix
-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()