From 93f05fd5c7eb93f9e0bfc61f43122aeafd52630d Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Mon, 27 Oct 2008 05:36:25 +0000 Subject: [PATCH] Attempts to fix crashes in level transition --- rc.c | 9 +++++++++ shared.c | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rc.c b/rc.c index 228176a..834f8f4 100644 --- a/rc.c +++ b/rc.c @@ -2911,6 +2911,7 @@ if (s->id == P_PUFF) printf("PUFF WITH DOOMCOUNT!\n"); player->climbing = B_FALSE; player->netting = B_FALSE; player->slamming = B_FALSE; + player->jumping = B_FALSE; // keep turning towards exit (2 degrees at a time) s->angle += (PCTURN * (M_PI/180)); @@ -3220,6 +3221,10 @@ void drawlevel(void) { setdefaults(cloud); // redo image cloud->img =rotozoomSurfaceXY(imageset[P_PINKCLOUD].img[F_WALK1],0,1,1,0); + + // set player image + player->img = imageset[player->id].img[F_SHOOT]; + // create buffer for player background @@ -3321,6 +3326,7 @@ void drawlevel(void) { SDL_BlitSurface(temps, &area, screen, &dst); // remember area behind player + player->img = imageset[player->id].img[F_SHOOT]; grabbehind(player, playerbg); grabbehind(cloud, cloudbg); @@ -3384,6 +3390,7 @@ void drawlevel(void) { SDL_BlitSurface(temps, &area, screen, &dst); // remember area behind player + player->img = imageset[player->id].img[F_SHOOT]; grabbehind(player, playerbg); grabbehind(cloud, cloudbg); @@ -3447,6 +3454,7 @@ void drawlevel(void) { SDL_BlitSurface(temps, &area, screen, &dst); // remember area behind player + player->img = imageset[player->id].img[F_SHOOT]; grabbehind(player, playerbg); grabbehind(cloud, cloudbg); @@ -3512,6 +3520,7 @@ void drawlevel(void) { // remember area behind player + player->img = imageset[player->id].img[F_SHOOT]; grabbehind(player, playerbg); grabbehind(cloud, cloudbg); diff --git a/shared.c b/shared.c index 507021f..bf07f90 100644 --- a/shared.c +++ b/shared.c @@ -1682,7 +1682,9 @@ void drawsprite(sprite_t *s) { } /* make red if required */ if (s->angry && s->id != P_BLACKCLOUD) { - frame += (MAXFRAMES*2); + if (s != player) { + frame += (MAXFRAMES*2); + } } if (s->id == P_MOVINGCARD) {