Fixed king rat bugs

This commit is contained in:
Rob Pearce 2008-11-21 05:47:24 +00:00
parent 61836dfa97
commit 764b6bfdec
1 changed files with 10 additions and 5 deletions

15
rc.c
View File

@ -366,7 +366,7 @@ int main (int argc, char **argv) {
srand(time(NULL)); srand(time(NULL));
} else { } else {
// cheat // cheat
want1up = B_TRUE; want1up = B_FALSE;
want2up = B_TRUE; want2up = B_TRUE;
} }
@ -1656,6 +1656,9 @@ void checklevelend(void) {
if (inintro()) return; if (inintro()) return;
// can't win until monsters have appeared
if (levelcomplete == LV_INIT) return;
if (!levelcomplete) { if (!levelcomplete) {
mcount = 0; mcount = 0;
/* any monsters left? */ /* any monsters left? */
@ -2312,7 +2315,9 @@ int movesprite(sprite_t *s) {
} }
} }
} else if (s->jumping) { } else if (s->jumping) {
movex(s, s->jumpdir*getspeed(s)); if (s->id != P_KINGRAT) {
movex(s, s->jumpdir*getspeed(s));
}
return B_FALSE; return B_FALSE;
} }
@ -3080,13 +3085,13 @@ printf("jumping: %0.2f\n",s->jumpdir);
canseeplayer = B_FALSE; canseeplayer = B_FALSE;
} }
} }
if ((canseeplayer == B_FALSE) && (player2)) { if ((canseeplayer == B_TRUE) && (player2)) {
ydis = abs(s->y - player2->y); ydis = abs(s->y - player2->y);
if (ydis > 2) { if (ydis > 2) {
canseeplayer = B_FALSE; canseeplayer = B_FALSE;
} else if ((s->dir < 0) && (player->x > s->x)) { } else if ((s->dir < 0) && (player2->x > s->x)) {
canseeplayer = B_FALSE; canseeplayer = B_FALSE;
} else if ((s->dir > 0) && (player->x < s->x)) { } else if ((s->dir > 0) && (player2->x < s->x)) {
canseeplayer = B_FALSE; canseeplayer = B_FALSE;
} }
} }