projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed MrTree. He uses activate() to change direction which is now working again.
[supertux.git]
/
src
/
badguy
/
rocketexplosion.cpp
diff --git
a/src/badguy/rocketexplosion.cpp
b/src/badguy/rocketexplosion.cpp
index
ded99d3
..
dcc6120
100644
(file)
--- a/
src/badguy/rocketexplosion.cpp
+++ b/
src/badguy/rocketexplosion.cpp
@@
-1,7
+1,7
@@
// $Id$
// $Id$
-//
+//
// SuperTux
// SuperTux
-// Copyright (C) 200
5
Matthias Braun <matze@braunis.de>
+// Copyright (C) 200
6
Matthias Braun <matze@braunis.de>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@
-12,32
+12,29
@@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <config.h>
#include <config.h>
-#include "rocketexplosion.h"
+#include "rocketexplosion.h
pp
"
static const float EXPLOSIONTIME = 1;
RocketExplosion::RocketExplosion(const Vector& pos, Direction dir)
static const float EXPLOSIONTIME = 1;
RocketExplosion::RocketExplosion(const Vector& pos, Direction dir)
+ : BadGuy(pos, "images/creatures/mr_rocket/explosion.sprite")
{
{
- start_position = pos;
- bbox.set_pos(pos);
- bbox.set_size(31.8, 31.8);
- sprite = sprite_manager->create("rocketexplosion");
this->dir = dir;
this->dir = dir;
+ countMe = false;
explode();
}
void
RocketExplosion::write(lisp::Writer& )
{
explode();
}
void
RocketExplosion::write(lisp::Writer& )
{
- //
bomb
s are only temporarily so don't write them out...
+ //
rocket explosion
s are only temporarily so don't write them out...
}
HitResponse
}
HitResponse
@@
-52,7
+49,7
@@
RocketExplosion::collision_solid(GameObject& , const CollisionHit& hit)
HitResponse
RocketExplosion::collision_player(Player& player, const CollisionHit& )
{
HitResponse
RocketExplosion::collision_player(Player& player, const CollisionHit& )
{
- player.kill(
Player::SHRINK
);
+ player.kill(
false
);
return ABORT_MOVE;
}
return ABORT_MOVE;
}
@@
-75,14
+72,12
@@
void
RocketExplosion::explode()
{
sprite->set_action(dir == LEFT ? "explosion-left" : "explosion-right");
RocketExplosion::explode()
{
sprite->set_action(dir == LEFT ? "explosion-left" : "explosion-right");
- sound_manager->play_sound("explode", get_pos(),
- Sector::current()->player->get_pos());
+ sound_manager->play("sounds/explosion.wav", get_pos());
timer.start(EXPLOSIONTIME, true);
}
void
RocketExplosion::kill_fall()
{
timer.start(EXPLOSIONTIME, true);
}
void
RocketExplosion::kill_fall()
{
- explode();
}
}