projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
create lisp code on the fly (still no enemies showing up in editor, no idea why....
[supertux.git]
/
src
/
badguy
/
bomb.cpp
diff --git
a/src/badguy/bomb.cpp
b/src/badguy/bomb.cpp
index
c7445a2
..
9495abc
100644
(file)
--- a/
src/badguy/bomb.cpp
+++ b/
src/badguy/bomb.cpp
@@
-44,7
+44,8
@@
Bomb::collision_player(Player& player, const CollisionHit& )
HitResponse
Bomb::collision_badguy(BadGuy& badguy, const CollisionHit& )
{
HitResponse
Bomb::collision_badguy(BadGuy& badguy, const CollisionHit& )
{
- badguy.kill_fall();
+ if(state == 1)
+ badguy.kill_fall();
return ABORT_MOVE;
}
return ABORT_MOVE;
}
@@
-56,6
+57,8
@@
Bomb::active_action(float )
if(timer.check()) {
state = 1;
sprite->set_action("explosion");
if(timer.check()) {
state = 1;
sprite->set_action("explosion");
+ SoundManager::get()->play_sound(IDToSound(SND_EXPLODE), get_pos(),
+ Sector::current()->player->get_pos());
timer.start(EXPLOSIONTIME);
}
break;
timer.start(EXPLOSIONTIME);
}
break;
@@
-71,3
+74,4
@@
void
Bomb::kill_fall()
{
}
Bomb::kill_fall()
{
}
+