projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UnstableTile and WeakBlock are affected by Explosions.
[supertux.git]
/
src
/
object
/
weak_block.cpp
diff --git
a/src/object/weak_block.cpp
b/src/object/weak_block.cpp
index
eae7d0c
..
b9d10c5
100644
(file)
--- 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/weak_block.hpp"
#include "object/bullet.hpp"
+#include "object/explosion.hpp"
#include "supertux/object_factory.hpp"
#include "supertux/sector.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<Bullet*>(&other)) {
startBurning();
case STATE_NORMAL:
if (dynamic_cast<Bullet*>(&other)) {
startBurning();
- return FORCE_MOVE;
}
}
- return FORCE_MOVE;
+ if (dynamic_cast<Explosion*> (&other)) {
+ startBurning();
+ }
break;
case STATE_BURNING:
break;
case STATE_BURNING:
- return FORCE_MOVE;
- break;
-
case STATE_DISINTEGRATING:
case STATE_DISINTEGRATING:
- return FORCE_MOVE;
break;
break;
+ default:
+ log_debug << "unhandled state" << std::endl;
+ break;
}
}
- log_debug << "unhandled state" << std::endl;
return FORCE_MOVE;
}
return FORCE_MOVE;
}