X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fobject%2Fweak_block.cpp;h=b9d10c525fc13cfa31100a11cfdabb11c12df20a;hb=96f372e837461b1c01e42a6a3fc28d66a3d9380b;hp=eae7d0c4dbbdf27281ca80ac9c8f44b5bc459d69;hpb=80546521a4ad00724be17a0ce879a8876ef56c26;p=supertux.git diff --git a/src/object/weak_block.cpp b/src/object/weak_block.cpp index eae7d0c4d..b9d10c525 100644 --- a/src/object/weak_block.cpp +++ b/src/object/weak_block.cpp @@ -18,6 +18,7 @@ #include "object/weak_block.hpp" #include "object/bullet.hpp" +#include "object/explosion.hpp" #include "supertux/object_factory.hpp" #include "supertux/sector.hpp" @@ -37,22 +38,21 @@ WeakBlock::collision(GameObject& other, const CollisionHit& ) case STATE_NORMAL: if (dynamic_cast(&other)) { startBurning(); - return FORCE_MOVE; } - return FORCE_MOVE; + if (dynamic_cast (&other)) { + startBurning(); + } break; case STATE_BURNING: - return FORCE_MOVE; - break; - case STATE_DISINTEGRATING: - return FORCE_MOVE; break; + default: + log_debug << "unhandled state" << std::endl; + break; } - log_debug << "unhandled state" << std::endl; return FORCE_MOVE; }