Player no longer slides on ice while underwater

This commit is contained in:
Rob Pearce 2008-12-25 05:34:52 +00:00
parent 3192ca6ade
commit 30ec68f70d
1 changed files with 5 additions and 5 deletions

10
rc.c
View File

@ -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;