Made Menu::get_item_by_id(int id) error message sligthly more useful
[supertux.git] / src / badguy / jumpy.cpp
index ad63c49..7a6eaaa 100644 (file)
 #include "sprite/sprite.hpp"
 #include "supertux/object_factory.hpp"
 
-static const float JUMPSPEED=-600;
+static const float JUMPYSPEED=-600;
 static const float JUMPY_MID_TOLERANCE=4;
 static const float JUMPY_LOW_TOLERANCE=2;
 
 Jumpy::Jumpy(const Reader& reader) :
-  BadGuy(reader, "images/creatures/snowjumpy/snowjumpy.sprite"), 
+  BadGuy(reader, "images/creatures/snowjumpy/snowjumpy.sprite"),
   pos_groundhit(),
   groundhit_pos_set(false)
 {
   // TODO create a nice sound for this...
-  //sound_manager->preload("sounds/skid.wav");
+  //SoundManager::current()->preload("sounds/skid.wav");
 }
 
 void
@@ -55,9 +55,9 @@ Jumpy::hit(const CollisionHit& chit)
       groundhit_pos_set = true;
     }
 
-    physic.set_velocity_y((frozen || get_state() == STATE_FALLING) ? 0 : JUMPSPEED);
+    physic.set_velocity_y((frozen || get_state() == STATE_FALLING) ? 0 : JUMPYSPEED);
     // TODO create a nice sound for this...
-    //sound_manager->play("sounds/skid.wav");
+    //SoundManager::current()->play("sounds/skid.wav");
   } else if(chit.top) {
     physic.set_velocity_y(0);
   }
@@ -99,7 +99,6 @@ Jumpy::freeze()
 {
   BadGuy::freeze();
   physic.set_velocity_y(std::max(0.0f, physic.get_velocity_y()));
-  sprite->set_action(dir == LEFT ? "left-iced" : "right-iced");
 }
 
 bool
@@ -108,6 +107,4 @@ Jumpy::is_freezable() const
   return true;
 }
 
-IMPLEMENT_FACTORY(Jumpy, "jumpy");
-
 /* EOF */