From: Christoph Sommer Date: Mon, 10 Jul 2006 20:56:42 +0000 (+0000) Subject: Stumpy no longer moonwalks while dizzy / X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ba9bdc73e3b80adcb6d9228cec62d1b7c44f8653;p=supertux.git Stumpy no longer moonwalks while dizzy / Mr.Tree's particle effects are a bit more subtle SVN-Revision: 3983 --- diff --git a/data/images/creatures/mr_tree/dizzy-0.png b/data/images/creatures/mr_tree/dizzy-0.png new file mode 100644 index 000000000..6b8971536 Binary files /dev/null and b/data/images/creatures/mr_tree/dizzy-0.png differ diff --git a/data/images/creatures/mr_tree/dizzy-1.png b/data/images/creatures/mr_tree/dizzy-1.png new file mode 100644 index 000000000..68a07681c Binary files /dev/null and b/data/images/creatures/mr_tree/dizzy-1.png differ diff --git a/data/images/creatures/mr_tree/dizzy-2.png b/data/images/creatures/mr_tree/dizzy-2.png new file mode 100644 index 000000000..834f8e876 Binary files /dev/null and b/data/images/creatures/mr_tree/dizzy-2.png differ diff --git a/data/images/creatures/mr_tree/stumpy.sprite b/data/images/creatures/mr_tree/stumpy.sprite index fa56260a2..ca58445da 100644 --- a/data/images/creatures/mr_tree/stumpy.sprite +++ b/data/images/creatures/mr_tree/stumpy.sprite @@ -17,6 +17,20 @@ (mirror-action "left") ) (action + (hitbox 20 23 42 62) + (name "dizzy-left") + (images + "dizzy-0.png" + "dizzy-1.png" + "dizzy-2.png" + ) + ) + (action + (hitbox 20 23 42 62) + (name "dizzy-right") + (mirror-action "dizzy-left") + ) + (action (hitbox 20 23 42 42) (name "squished-left") (images diff --git a/data/images/creatures/mr_tree/stumpy.xcf b/data/images/creatures/mr_tree/stumpy.xcf index aca92e54e..fc6b8fef7 100644 Binary files a/data/images/creatures/mr_tree/stumpy.xcf and b/data/images/creatures/mr_tree/stumpy.xcf differ diff --git a/data/images/objects/particles/bark.sprite b/data/images/objects/particles/bark.sprite index ace0f46a6..e9ffd0dc1 100644 --- a/data/images/objects/particles/bark.sprite +++ b/data/images/objects/particles/bark.sprite @@ -1,7 +1,7 @@ (supertux-sprite (action (name "default") -(fps 4.0) + (fps 1.0) (images "bark-0.png" ) diff --git a/data/images/objects/particles/leaf.sprite b/data/images/objects/particles/leaf.sprite index 82336c336..b9d0eaaae 100644 --- a/data/images/objects/particles/leaf.sprite +++ b/data/images/objects/particles/leaf.sprite @@ -1,7 +1,7 @@ (supertux-sprite (action (name "default") -(fps 4.0) + (fps 1.0) (images "leaf-0.png" ) diff --git a/src/badguy/mrtree.cpp b/src/badguy/mrtree.cpp index 565cf7090..7b8763f25 100644 --- a/src/badguy/mrtree.cpp +++ b/src/badguy/mrtree.cpp @@ -66,8 +66,8 @@ MrTree::collision_squished(Player& player) // spawn some particles // TODO: provide convenience function in MovingSprite or MovingObject? - for (int i = 0; i < 25; i++) { - Vector ppos = bbox.get_middle(); + for (int px = (int)stumpy->get_bbox().p1.x; px < (int)stumpy->get_bbox().p2.x; px+=10) { + Vector ppos = Vector(px, stumpy->get_bbox().p1.y-5); float angle = systemRandom.randf(-M_PI_2, M_PI_2); float velocity = systemRandom.randf(45, 90); float vx = sin(angle)*velocity; diff --git a/src/badguy/stumpy.cpp b/src/badguy/stumpy.cpp index 4f0fd53c1..342879fd8 100644 --- a/src/badguy/stumpy.cpp +++ b/src/badguy/stumpy.cpp @@ -59,7 +59,8 @@ Stumpy::activate() { switch (mystate) { case STATE_INVINCIBLE: - WalkingBadguy::activate(); + sprite->set_action(dir == LEFT ? "dizzy-left" : "dizzy-right"); + bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height()); physic.set_velocity_x(0); break; case STATE_NORMAL: