Skip to content

Commit

Permalink
Snowshot: Call ->set_action() in the constructor.
Browse files Browse the repository at this point in the history
Otherwise the bounding box will be initialized to "collision-left" which is
only 15 pixels wide. This will be corrected by ->initialize() eventually, but
by then it's too late for the "Cannon" code.

SVN-Revision: 6541
  • Loading branch information
Florian Forster committed Mar 4, 2010
1 parent 409f171 commit 19ca9e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/badguy/kamikazesnowball.cpp
Expand Up @@ -33,12 +33,14 @@ KamikazeSnowball::KamikazeSnowball(const Reader& reader) :
BadGuy(reader, "images/creatures/snowball/kamikaze-snowball.sprite")
{
sound_manager->preload(SPLAT_SOUND);
set_action (dir == LEFT ? "left" : "right", /* loops = */ -1);
}

KamikazeSnowball::KamikazeSnowball(const Vector& pos, Direction d)
: BadGuy(pos, d, "images/creatures/snowball/kamikaze-snowball.sprite")
{
sound_manager->preload(SPLAT_SOUND);
set_action (dir == LEFT ? "left" : "right", /* loops = */ -1);
}

void
Expand Down

0 comments on commit 19ca9e5

Please sign in to comment.