From e4f3dd5160569a9fd9f7ac554eb4071460468558 Mon Sep 17 00:00:00 2001 From: LMH Date: Mon, 9 Sep 2013 14:36:16 -1000 Subject: [PATCH] WeakBlocks draw in front of other objects allowing them to hide objects --- src/object/weak_block.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/object/weak_block.cpp b/src/object/weak_block.cpp index 693930ccc..f5c23fdd3 100644 --- a/src/object/weak_block.cpp +++ b/src/object/weak_block.cpp @@ -144,15 +144,15 @@ WeakBlock::update(float ) void WeakBlock::draw(DrawingContext& context) { - //Draw the Sprite. - sprite->draw(context, get_pos(), LAYER_OBJECTS); + //Draw the Sprite just in front of other objects + sprite->draw(context, get_pos(), LAYER_OBJECTS + 10); //Draw the light if burning and dark if(linked && (state != STATE_NORMAL)){ context.get_light( get_bbox().get_middle(), &light ); if (light.red + light.green + light.blue < 3.0){ context.push_target(); context.set_target(DrawingContext::LIGHTMAP); - sprite->draw(context, get_pos(), LAYER_OBJECTS); + sprite->draw(context, get_pos(), LAYER_OBJECTS + 10); lightsprite->draw(context, get_bbox().get_middle(), 0); context.pop_target(); } -- 2.11.0