From: Matthias Braun Date: Fri, 1 Apr 2005 12:23:09 +0000 (+0000) Subject: -Apply door fix to hatch as well (evil code duplication here...) X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=300183d63afce3e0167a1009a79c2f11a4f4a4fd;p=supertux.git -Apply door fix to hatch as well (evil code duplication here...) -fix worldmap scrolling bug from last commit -fix stalactites being drawn when not activated SVN-Revision: 2312 --- diff --git a/data/images/supertux.strf b/data/images/supertux.strf index eb0fae59e..c421b5891 100644 --- a/data/images/supertux.strf +++ b/data/images/supertux.strf @@ -1422,7 +1422,7 @@ (sprite (name "hatch") (action - (name "default") + (name "normal") (x-offset 0) (y-offset 0) (images "shared/hatch-1.png")) diff --git a/src/badguy/stalactite.cpp b/src/badguy/stalactite.cpp index 788683ba8..1a0b36739 100644 --- a/src/badguy/stalactite.cpp +++ b/src/badguy/stalactite.cpp @@ -82,6 +82,9 @@ Stalactite::kill_fall() void Stalactite::draw(DrawingContext& context) { + if(get_state() != STATE_ACTIVE) + return; + if(state == STALACTITE_SHAKING) { sprite->draw(context, get_pos() + Vector((rand() % 6)-3, 0), LAYER_OBJECTS); } else { diff --git a/src/trigger/hatch.cpp b/src/trigger/hatch.cpp index 6019642bf..fa8b55f91 100644 --- a/src/trigger/hatch.cpp +++ b/src/trigger/hatch.cpp @@ -79,6 +79,7 @@ Hatch::action(float ) { //Check if hatch animation is complete if(sprite->check_animation()) { + sprite->set_action("normal"); GameSession::current()->respawn(target_sector, target_spawnpoint); } } diff --git a/src/worldmap.cpp b/src/worldmap.cpp index 58dc15288..b49ecaa54 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -1063,7 +1063,7 @@ WorldMap::display() if (offset.y < screen->h - height*32) offset.y = screen->h - height*32; context.push_transform(); - context.set_translation(offset); + context.set_translation(-offset); draw(context); context.pop_transform(); get_input();