Tweak icecrusher draw layers to avoid objects (such as coins) from appearing inside...
authorLMH <lmh.0013@gmail.com>
Sat, 15 Nov 2014 23:45:46 +0000 (13:45 -1000)
committerLMH <lmh.0013@gmail.com>
Sat, 15 Nov 2014 23:45:46 +0000 (13:45 -1000)
Also removed excess debug line.

src/object/icecrusher.cpp
src/object/player.cpp

index 55129ce..1e94d65 100644 (file)
@@ -238,14 +238,14 @@ IceCrusher::draw(DrawingContext& context)
 {
   context.push_target();
   context.set_target(DrawingContext::NORMAL);
-  sprite->draw(context, get_pos(), layer);
+  sprite->draw(context, get_pos(), layer+2);
   if(!(state == CRUSHING) && sprite->has_action("whites"))
   {
     // draw icecrusher's eyes slightly behind
-    lefteye->draw(context, get_pos()+eye_position(false), layer-1);
-    righteye->draw(context, get_pos()+eye_position(true), layer-1);
+    lefteye->draw(context, get_pos()+eye_position(false), layer+1);
+    righteye->draw(context, get_pos()+eye_position(true), layer+1);
     // draw the whites of icecrusher's eyes even further behind
-    whites->draw(context, get_pos(), layer-2);
+    whites->draw(context, get_pos(), layer);
   }
   context.pop_target();
 }
index a6aeed7..1f4f65a 100644 (file)
@@ -733,7 +733,6 @@ Player::handle_vertical_input()
       if (glide_time > 0 && !ability_timer.started())
         ability_timer.start(glide_time);
       else if (ability_timer.started()) {
-        log_debug << ability_timer.get_timeleft() << std::endl;
         // glide stops after some duration or if buttjump is initiated
         if ((ability_timer.get_timeleft() <= 0.05f) || controller->hold(Controller::DOWN)) {
           glide_time = 0;