Refined "Air-arrow" to indicate y-position as well and merged it into 0.3.0
authorChristoph Sommer <mail@christoph-sommer.de>
Wed, 1 Nov 2006 03:30:33 +0000 (03:30 +0000)
committerChristoph Sommer <mail@christoph-sommer.de>
Wed, 1 Nov 2006 03:30:33 +0000 (03:30 +0000)
SVN-Revision: 4430

src/object/player.cpp

index de9d24c..6e9ee7c 100644 (file)
@@ -808,6 +808,7 @@ Player::draw(DrawingContext& context)
   if (Sector::current() && Sector::current()->camera && (get_bbox().p2.y + 16 < Sector::current()->camera->get_translation().y)) {
     float px = get_pos().x + (get_bbox().p2.x - get_bbox().p1.x - airarrow.get()->get_width()) / 2;
     float py = Sector::current()->camera->get_translation().y;
+    py += std::min(((py - (get_bbox().p2.y + 16)) / 4), 16.0f);
     context.draw_surface(airarrow.get(), Vector(px, py), LAYER_HUD - 1);
   }