(y-offset 3)
(mirror-action "left"))
- (action (name "falling-right")
+ (action (name "falling-left")
(x-offset 2)
(y-offset 3)
- (images "shared/mriceblock-flat-right.png"))
+ (images "shared/mriceblock-flat-left.png"))
- (action (name "falling-left")
+ (action (name "falling-right")
(x-offset 2)
(y-offset 3)
- (images "shared/mriceblock-flat-left.png"))
+ (mirror-action "falling-left"))
(action (name "flat-left")
(x-offset 2)
(y-offset 8)
(images "shared/jumpy-left-up-0.png"))
(action
+ (name "right-up")
+ (x-offset 7)
+ (y-offset 8)
+ (mirror-action "left-up"))
+ (action
(name "left-down")
(x-offset 7)
(y-offset 8)
(images "shared/jumpy-left-down-0.png"))
(action
+ (name "right-down")
+ (x-offset 7)
+ (y-offset 8)
+ (mirror-action "left-down"))
+ (action
(name "left-middle")
(x-offset 7)
(y-offset 8)
(images "shared/jumpy-left-middle-0.png"))
(action
+ (name "right-middle")
+ (x-offset 7)
+ (y-offset 8)
+ (mirror-action "left-middle"))
+ (action
(name "left-iced")
(x-offset 7)
(y-offset 8)
- (images "shared/jumpy-iced-left-up-0.png")))
+ (images "shared/jumpy-iced-left-up-0.png"))
+ (action
+ (name "right-iced")
+ (x-offset 7)
+ (y-offset 8)
+ (mirror-action "left-iced")))
(sprite (name "mrbomb")
(action
(sprite (name "flyingsnowball")
(action
- (name "normal")
+ (name "left")
(x-offset 4)
(y-offset 3)
(images "shared/flyingsnowball-left-0.png"
"shared/flyingsnowball-left-1.png"))
+ (action
+ (name "right")
+ (x-offset 4)
+ (y-offset 3)
+ (mirror-action "left"))
(action
- (name "squished")
+ (name "squished-left")
+ (x-offset 4)
+ (y-offset -12)
+ (images "shared/flyingsnowball-squished-left.png"))
+ (action
+ (name "squished-right")
(x-offset 4)
(y-offset -12)
- (images "shared/flyingsnowball-squished-left.png")))
+ (mirror-action "squished-left")))
(sprite (name "spiky")
(action
} else if (kind == BAD_MRICEBLOCK) {
physic.set_velocity(dirsign * BADGUY_WALK_SPEED, 0);
} else if(kind == BAD_JUMPY) {
- set_action("left-up", "left-up");
+ set_action("left-up", "right-up");
} else if(kind == BAD_BOMB) {
set_action("ticking-left", "ticking-right");
// hack so that the bomb doesn't hurt until it expldes...
set_action("normal", "normal");
physic.enable_gravity(true);
} else if(kind == BAD_FLYINGSNOWBALL) {
- set_action("normal", "normal");
physic.enable_gravity(false);
} else if(kind == BAD_SPIKY) {
physic.set_velocity(dirsign * BADGUY_WALK_SPEED, 0);
{
if(frozen_timer.check())
{
- set_action("left-iced", "left-iced");
+ set_action("left-iced", "right-iced");
return;
}
// XXX: These tests *should* use location from ground, not velocity
if (fabsf(vy) > 5.6f)
- set_action("left-down", "left-down");
+ set_action("left-down", "right-down");
else if (fabsf(vy) > 5.3f)
- set_action("left-middle", "left-middle");
+ set_action("left-middle", "right-middle");
else
- set_action("left-up", "left-up");
+ set_action("left-up", "right-up");
Player& tux = *Sector::current()->player;
if(dying == DYING_NOT || dying == DYING_SQUISHED)
collision_swept_object_map(&old_base, &base);
+ // set direction based on tux
+ if(Sector::current()->player->base.x > base.x)
+ dir = RIGHT;
+ else
+ dir = LEFT;
+
// Handle dying timer:
if (dying == DYING_SQUISHED && !timer.check())
remove_me();
action_left = left;
action_right = right;
-std::cerr << "set_action(" << left << ", " << right << ") of " << badguykind_to_string(kind) << std::endl;
-
#if 0
if (1)
{
return;
} else if(kind == BAD_FLYINGSNOWBALL) {
squish_me(player);
- set_action("squished", "squished");
+ set_action("squished-left", "squished-right");
return;
} else if(kind == BAD_SNOWBALL) {
squish_me(player);
{
badguy->timer.start(0);
badguy->mode = BOMB_TICKING;
+ badguy->dir = dir;
}
remove_me();