Replaced Ref and RefCounter with std::shared_ptr<>
[supertux.git] / src / badguy / igel.cpp
index 1fc48c0..457b22d 100644 (file)
@@ -79,7 +79,7 @@ Igel::active_update(float elapsed_time)
   // check if we see a fire bullet
   Sector* sector = Sector::current();
   for (Sector::GameObjects::iterator i = sector->gameobjects.begin(); i != sector->gameobjects.end(); ++i) {
-    Bullet* bullet = dynamic_cast<Bullet*>(*i);
+    Bullet* bullet = dynamic_cast<Bullet*>(i->get());
     if (!bullet) continue;
     if (bullet->get_type() != FIRE_BONUS) continue;
     if (can_see(*bullet)) wants_to_flee = true;