From d31fd5c5e70e1fb04dbe5f139d4944b046ccadb1 Mon Sep 17 00:00:00 2001 From: florianf Date: Thu, 4 Mar 2010 13:06:41 +0000 Subject: [PATCH] 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 --- src/badguy/kamikazesnowball.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.11.0