Attempts to fix crashes in level transition

This commit is contained in:
Rob Pearce 2008-10-27 05:36:25 +00:00
parent 94cdda9e3c
commit 93f05fd5c7
2 changed files with 12 additions and 1 deletions

9
rc.c
View File

@ -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));
@ -3221,6 +3222,10 @@ void drawlevel(void) {
// 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
playerbg = SDL_CreateRGBSurface(SDL_SWSURFACE,
@ -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);

View File

@ -1682,8 +1682,10 @@ void drawsprite(sprite_t *s) {
}
/* make red if required */
if (s->angry && s->id != P_BLACKCLOUD) {
if (s != player) {
frame += (MAXFRAMES*2);
}
}
if (s->id == P_MOVINGCARD) {
// image comes from timer1