From 764b6bfdec347af5f7cdca4b1db40ed93c455ca8 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Fri, 21 Nov 2008 05:47:24 +0000 Subject: [PATCH] Fixed king rat bugs --- rc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/rc.c b/rc.c index cdd799b..37fe6a0 100644 --- a/rc.c +++ b/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; } @@ -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; } }