diff options
Diffstat (limited to 'game')
-rw-r--r-- | game/coins/CoinScript.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/game/coins/CoinScript.cpp b/game/coins/CoinScript.cpp index 54ef760..90150b6 100644 --- a/game/coins/CoinScript.cpp +++ b/game/coins/CoinScript.cpp @@ -13,7 +13,11 @@ 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; + 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() |