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
62547b9
..
9495abc
100644
(file)
--- a/
src/badguy/bomb.cpp
+++ b/
src/badguy/bomb.cpp
@@
-18,7
+18,7
@@
Bomb::Bomb(const Vector& pos, Direction dir)
}
void
}
void
-Bomb::write(
Lisp
Writer& )
+Bomb::write(
lisp::
Writer& )
{
// bombs are only temporarily so don't write them out...
}
{
// bombs are only temporarily so don't write them out...
}
@@
-41,6
+41,14
@@
Bomb::collision_player(Player& player, const CollisionHit& )
return ABORT_MOVE;
}
return ABORT_MOVE;
}
+HitResponse
+Bomb::collision_badguy(BadGuy& badguy, const CollisionHit& )
+{
+ if(state == 1)
+ badguy.kill_fall();
+ return ABORT_MOVE;
+}
+
void
Bomb::active_action(float )
{
void
Bomb::active_action(float )
{
@@
-49,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;
@@
-64,3
+74,4
@@
void
Bomb::kill_fall()
{
}
Bomb::kill_fall()
{
}
+