Updated addon repository URL and improved debug output on download
[supertux.git] / src / worldmap / tux.cpp
index 561be82..365b985 100644 (file)
@@ -34,7 +34,7 @@ static const float map_message_TIME = 2.8f;
 Tux::Tux(WorldMap* worldmap_) :
   back_direction(),
   worldmap(worldmap_),
-  sprite(),
+  sprite(SpriteManager::current()->create("images/worldmap/common/tux.sprite")),
   controller(),
   input_direction(),
   direction(),
@@ -43,8 +43,6 @@ Tux::Tux(WorldMap* worldmap_) :
   moving(),
   ghost_mode()
 {
-  sprite = SpriteManager::current()->create("images/worldmap/common/tux.sprite");
-
   offset = 0;
   moving = false;
   direction = D_NONE;
@@ -70,6 +68,12 @@ Tux::draw(DrawingContext& context)
     case ICE_BONUS:
       sprite->set_action(moving ? "ice-walking" : "ice-stop");
       break;
+    case AIR_BONUS:
+      sprite->set_action(moving ? "air-walking" : "air-stop");
+      break;
+    case EARTH_BONUS:
+      sprite->set_action(moving ? "earth-walking" : "earth-stop");
+      break;
     case NO_BONUS:
       sprite->set_action(moving ? "small-walking" : "small-stop");
       break;