-Apply door fix to hatch as well (evil code duplication here...)
authorMatthias Braun <matze@braunis.de>
Fri, 1 Apr 2005 12:23:09 +0000 (12:23 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 1 Apr 2005 12:23:09 +0000 (12:23 +0000)
-fix worldmap scrolling bug from last commit
-fix stalactites being drawn when not activated

SVN-Revision: 2312

data/images/supertux.strf
src/badguy/stalactite.cpp
src/trigger/hatch.cpp
src/worldmap.cpp

index eb0fae5..c421b58 100644 (file)
 
   (sprite (name "hatch")
        (action
-          (name "default")
+          (name "normal")
           (x-offset 0)
           (y-offset 0)
           (images "shared/hatch-1.png"))
index 788683b..1a0b367 100644 (file)
@@ -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 {
index 6019642..fa8b55f 100644 (file)
@@ -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);
   }
 }
index 58dc152..b49ecaa 100644 (file)
@@ -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();