From 30ec68f70de401c3d56173a141c5a1a927329132 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Thu, 25 Dec 2008 05:34:52 +0000 Subject: [PATCH] Player no longer slides on ice while underwater --- rc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rc.c b/rc.c index e5a0016..c69f8a8 100644 --- a/rc.c +++ b/rc.c @@ -1526,7 +1526,7 @@ void jump(sprite_t *s, int dir) { s->jumpdir++; } else if ((tt->id == T_LEFT) && (s->jumpdir < 0)) { s->jumpdir--; - } else if (isice(tt->id)) { + } else if (isice(tt->id) && !isinwater(s)) { s->jumpdir = s->xs / getspeed(s); //if (s->jumpdir > getspeed(s)) s->jumpdir -= getspeed(s); //if (s->jumpdir < -getspeed(s)) s->jumpdir += getspeed(s); @@ -5493,7 +5493,7 @@ void dotileeffects(sprite_t *s) { } finished = B_TRUE; } else if (isice(tt->id)) { - if (isplayer(s)) { + if (isplayer(s) && !isinwater(s)) { if (globpowerup != PW_CLOCK) { if (!s->moved) { if (s->xs != 0) { @@ -7913,7 +7913,7 @@ int movex(sprite_t *s,double amt,int onpurpose) { } /* get new position */ - if (isplayer(s) && isice(tt->id) && onpurpose) { + if (isplayer(s) && isice(tt->id) && !isinwater(s) && onpurpose ) { double newxs; // change speed newxs = s->xs + (s->dir*ICEACCEL); @@ -7949,7 +7949,7 @@ int movex(sprite_t *s,double amt,int onpurpose) { } if (domove) { - if (isplayer(s) && isice(tt->id) && onpurpose) { + if (isplayer(s) && isice(tt->id) && !isinwater(s) && onpurpose) { // change speed s->xs += (s->dir*ICEACCEL); // don't get too fast! @@ -7962,7 +7962,7 @@ int movex(sprite_t *s,double amt,int onpurpose) { s->x += amt; s->xs = amt; if (!onpurpose) { - if (isice(tt->id)) { + if (isice(tt->id) && !isinwater(s)) { s->moved = MV_ICE; } else { s->moved = MV_WALK;