Fixed player animation while on conveyorbelt (only animate if actively walking)
This commit is contained in:
parent
1bb785a9e5
commit
612ebba3a8
|
@ -86,5 +86,5 @@
|
||||||
86,laundrychute.dat,Laundry Chute
|
86,laundrychute.dat,Laundry Chute
|
||||||
87,tricky.dat,Tricky
|
87,tricky.dat,Tricky
|
||||||
88,theendsofar.dat,THE END SO FAR
|
88,theendsofar.dat,THE END SO FAR
|
||||||
89,testlevel.dat,TEST LEVEL
|
99,testlevel.dat,TEST LEVEL
|
||||||
0,intro.dat,INTRO
|
0,intro.dat,INTRO
|
||||||
|
|
1
defs.h
1
defs.h
|
@ -765,6 +765,7 @@
|
||||||
#define MV_WALK 1 // walked/climbed on purpose
|
#define MV_WALK 1 // walked/climbed on purpose
|
||||||
#define MV_ICE 3 // slid on ice
|
#define MV_ICE 3 // slid on ice
|
||||||
#define MV_FLY 4 // flying
|
#define MV_FLY 4 // flying
|
||||||
|
#define MV_CONVEY 5 // moved by conveyorbelt
|
||||||
#define MV_SWIM 64 // swum somewhere - OR this
|
#define MV_SWIM 64 // swum somewhere - OR this
|
||||||
|
|
||||||
|
|
||||||
|
|
11
rc.c
11
rc.c
|
@ -8779,7 +8779,7 @@ int movex(sprite_t *s,double amt,int onpurpose) {
|
||||||
if (!onpurpose) {
|
if (!onpurpose) {
|
||||||
if (isice(tt->id) && !isinwater(s)) {
|
if (isice(tt->id) && !isinwater(s)) {
|
||||||
s->moved = MV_ICE;
|
s->moved = MV_ICE;
|
||||||
} else {
|
} else if (!isconveyor(tt->id)) {
|
||||||
s->moved = MV_WALK;
|
s->moved = MV_WALK;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -14127,6 +14127,15 @@ int isice(int id) {
|
||||||
return B_FALSE;
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int isconveyor(int id) {
|
||||||
|
switch (id) {
|
||||||
|
case T_RIGHT:
|
||||||
|
case T_LEFT:
|
||||||
|
return B_TRUE;
|
||||||
|
}
|
||||||
|
return B_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
int savebmp(SDL_Surface *which) {
|
int savebmp(SDL_Surface *which) {
|
||||||
int rv;
|
int rv;
|
||||||
char filename[BUFLEN];
|
char filename[BUFLEN];
|
||||||
|
|
1
rc.h
1
rc.h
|
@ -135,6 +135,7 @@ int getpnum(sprite_t *s);
|
||||||
int isonplatform(double x, double y);
|
int isonplatform(double x, double y);
|
||||||
int countbabies(sprite_t *s, int babytype);
|
int countbabies(sprite_t *s, int babytype);
|
||||||
int isice(int id);
|
int isice(int id);
|
||||||
|
int isconveyor(int id);
|
||||||
int isbridge(int id);
|
int isbridge(int id);
|
||||||
int savebmp(SDL_Surface *which);
|
int savebmp(SDL_Surface *which);
|
||||||
void melttile(int tx,int ty, int howlong);
|
void melttile(int tx,int ty, int howlong);
|
||||||
|
|
|
@ -86,5 +86,5 @@
|
||||||
86,laundrychute.dat,Laundry Chute
|
86,laundrychute.dat,Laundry Chute
|
||||||
87,tricky.dat,Tricky
|
87,tricky.dat,Tricky
|
||||||
88,theendsofar.dat,THE END SO FAR
|
88,theendsofar.dat,THE END SO FAR
|
||||||
89,testlevel.dat,TEST LEVEL
|
99,testlevel.dat,TEST LEVEL
|
||||||
0,intro.dat,INTRO
|
0,intro.dat,INTRO
|
||||||
|
|
Loading…
Reference in New Issue