From: Florian Forster Date: Thu, 4 Mar 2010 13:06:41 +0000 (+0000) Subject: Snowshot: Call ->set_action() in the constructor. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=19ca9e56f0d005d8b71860af54ad84e1ad8d703f;p=supertux.git Snowshot: Call ->set_action() in the constructor. 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 --- diff --git a/src/badguy/kamikazesnowball.cpp b/src/badguy/kamikazesnowball.cpp index 0b88f7f3d..9f67c6b33 100644 --- a/src/badguy/kamikazesnowball.cpp +++ b/src/badguy/kamikazesnowball.cpp @@ -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