From: florianf Date: Thu, 4 Mar 2010 13:06:41 +0000 (+0000) Subject: Snowshot: Call ->set_action() in the constructor. X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=d31fd5c5e70e1fb04dbe5f139d4944b046ccadb1;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. git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6541 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- 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