X-Git-Url: https://git.octo.it/?p=supertux.git;a=blobdiff_plain;f=src%2Fobject%2Fcandle.cpp;h=0f93126377dc826122866f107856a425942e9b65;hp=ec0ff01dd03e5f5da7b91ad216956af798ed315f;hb=96b4e53a6448ab88c1897d6552a8ac09cc2fbeae;hpb=a17870519c2b8511fd4b7fcc8f2a03c66a71cb95 diff --git a/src/object/candle.cpp b/src/object/candle.cpp index ec0ff01dd..0f9312637 100644 --- a/src/object/candle.cpp +++ b/src/object/candle.cpp @@ -31,12 +31,26 @@ Candle::Candle(const Reader& lisp) candle_light_1(SpriteManager::current()->create("images/objects/candle/candle-light-1.sprite")), candle_light_2(SpriteManager::current()->create("images/objects/candle/candle-light-2.sprite")) { - lisp.get("name", name); - lisp.get("burning", burning); - lisp.get("flicker", flicker); + + if(!lisp.get("name", name)) + { + log_warning << "Couldn't get \"name\" property for candle." << std::endl; + } + if(!lisp.get("burning", burning)) + { + log_warning << "Couldn't get \"burning\" property for candle." << std::endl; + } + if(!lisp.get("flicker", flicker)) + { + log_warning << "Couldn't get \"flicker\" property for candle." << std::endl; + } //get color from lisp std::vector vColor; - lisp.get("color", vColor); + if(lisp.get("color", vColor)) + { + log_warning << "Couldn't get \"color\" property for candle." << std::endl; + } + //change the light color if defined if (vColor.size() >= 3) { lightcolor = Color(vColor);