From: Wolfgang Becker Date: Sun, 17 Sep 2006 20:37:13 +0000 (+0000) Subject: Magicblock timeout does not count if offscreen. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=df0550c02366ae190426938737a3adc9eda3f6a6;p=supertux.git Magicblock timeout does not count if offscreen. Show lantern's color. SVN-Revision: 4242 --- diff --git a/src/object/lantern.cpp b/src/object/lantern.cpp index 7295c610f..e877a72d2 100644 --- a/src/object/lantern.cpp +++ b/src/object/lantern.cpp @@ -49,6 +49,7 @@ Lantern::updateColor(){ sprite->set_action("off"); } else { sprite->set_action("normal"); + sprite->set_color(lightcolor); } } diff --git a/src/object/magicblock.cpp b/src/object/magicblock.cpp index 352bf9894..f424c67e4 100644 --- a/src/object/magicblock.cpp +++ b/src/object/magicblock.cpp @@ -73,6 +73,7 @@ MagicBlock::update(float elapsed_time) float screen_bottom = screen_top + SCREEN_HEIGHT; if((get_bbox().p1.x > screen_right ) || ( get_bbox().p1.y > screen_bottom) || ( get_bbox().p2.x < screen_left) || ( get_bbox().p2.y < screen_top)) { + switch_delay = SWITCH_DELAY; return; }