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));
} else {
// cheat
want1up = B_TRUE;
want1up = B_FALSE;
want2up = B_TRUE;
}
@ -1655,6 +1655,9 @@ void checklevelend(void) {
int mcount;
if (inintro()) return;
// can't win until monsters have appeared
if (levelcomplete == LV_INIT) return;
if (!levelcomplete) {
mcount = 0;
@ -2312,7 +2315,9 @@ int movesprite(sprite_t *s) {
}
}
} else if (s->jumping) {
movex(s, s->jumpdir*getspeed(s));
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;
}
}