From: Christoph Sommer Date: Wed, 1 Nov 2006 03:30:33 +0000 (+0000) Subject: Refined "Air-arrow" to indicate y-position as well and merged it into 0.3.0 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a086ef6e51a01bd17496ca88950ee70861d632f1;p=supertux.git Refined "Air-arrow" to indicate y-position as well and merged it into 0.3.0 SVN-Revision: 4430 --- diff --git a/src/object/player.cpp b/src/object/player.cpp index de9d24cc5..6e9ee7c70 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -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); }