Fixed king rat bugs
This commit is contained in:
parent
61836dfa97
commit
764b6bfdec
13
rc.c
13
rc.c
|
@ -366,7 +366,7 @@ int main (int argc, char **argv) {
|
|||
srand(time(NULL));
|
||||
} else {
|
||||
// cheat
|
||||
want1up = B_TRUE;
|
||||
want1up = B_FALSE;
|
||||
want2up = B_TRUE;
|
||||
}
|
||||
|
||||
|
@ -1656,6 +1656,9 @@ void checklevelend(void) {
|
|||
|
||||
if (inintro()) return;
|
||||
|
||||
// can't win until monsters have appeared
|
||||
if (levelcomplete == LV_INIT) return;
|
||||
|
||||
if (!levelcomplete) {
|
||||
mcount = 0;
|
||||
/* any monsters left? */
|
||||
|
@ -2312,7 +2315,9 @@ int movesprite(sprite_t *s) {
|
|||
}
|
||||
}
|
||||
} else if (s->jumping) {
|
||||
if (s->id != P_KINGRAT) {
|
||||
movex(s, s->jumpdir*getspeed(s));
|
||||
}
|
||||
return B_FALSE;
|
||||
}
|
||||
|
||||
|
@ -3080,13 +3085,13 @@ printf("jumping: %0.2f\n",s->jumpdir);
|
|||
canseeplayer = B_FALSE;
|
||||
}
|
||||
}
|
||||
if ((canseeplayer == B_FALSE) && (player2)) {
|
||||
if ((canseeplayer == B_TRUE) && (player2)) {
|
||||
ydis = abs(s->y - player2->y);
|
||||
if (ydis > 2) {
|
||||
canseeplayer = B_FALSE;
|
||||
} else if ((s->dir < 0) && (player->x > s->x)) {
|
||||
} else if ((s->dir < 0) && (player2->x > s->x)) {
|
||||
canseeplayer = B_FALSE;
|
||||
} else if ((s->dir > 0) && (player->x < s->x)) {
|
||||
} else if ((s->dir > 0) && (player2->x < s->x)) {
|
||||
canseeplayer = B_FALSE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue