Attempts to fix crashes in level transition
This commit is contained in:
parent
94cdda9e3c
commit
93f05fd5c7
9
rc.c
9
rc.c
|
@ -2911,6 +2911,7 @@ if (s->id == P_PUFF) printf("PUFF WITH DOOMCOUNT!\n");
|
||||||
player->climbing = B_FALSE;
|
player->climbing = B_FALSE;
|
||||||
player->netting = B_FALSE;
|
player->netting = B_FALSE;
|
||||||
player->slamming = B_FALSE;
|
player->slamming = B_FALSE;
|
||||||
|
player->jumping = B_FALSE;
|
||||||
|
|
||||||
// keep turning towards exit (2 degrees at a time)
|
// keep turning towards exit (2 degrees at a time)
|
||||||
s->angle += (PCTURN * (M_PI/180));
|
s->angle += (PCTURN * (M_PI/180));
|
||||||
|
@ -3221,6 +3222,10 @@ void drawlevel(void) {
|
||||||
// redo image
|
// redo image
|
||||||
cloud->img =rotozoomSurfaceXY(imageset[P_PINKCLOUD].img[F_WALK1],0,1,1,0);
|
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
|
// create buffer for player background
|
||||||
playerbg = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
playerbg = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
||||||
|
@ -3321,6 +3326,7 @@ void drawlevel(void) {
|
||||||
SDL_BlitSurface(temps, &area, screen, &dst);
|
SDL_BlitSurface(temps, &area, screen, &dst);
|
||||||
|
|
||||||
// remember area behind player
|
// remember area behind player
|
||||||
|
player->img = imageset[player->id].img[F_SHOOT];
|
||||||
grabbehind(player, playerbg);
|
grabbehind(player, playerbg);
|
||||||
grabbehind(cloud, cloudbg);
|
grabbehind(cloud, cloudbg);
|
||||||
|
|
||||||
|
@ -3384,6 +3390,7 @@ void drawlevel(void) {
|
||||||
SDL_BlitSurface(temps, &area, screen, &dst);
|
SDL_BlitSurface(temps, &area, screen, &dst);
|
||||||
|
|
||||||
// remember area behind player
|
// remember area behind player
|
||||||
|
player->img = imageset[player->id].img[F_SHOOT];
|
||||||
grabbehind(player, playerbg);
|
grabbehind(player, playerbg);
|
||||||
grabbehind(cloud, cloudbg);
|
grabbehind(cloud, cloudbg);
|
||||||
|
|
||||||
|
@ -3447,6 +3454,7 @@ void drawlevel(void) {
|
||||||
SDL_BlitSurface(temps, &area, screen, &dst);
|
SDL_BlitSurface(temps, &area, screen, &dst);
|
||||||
|
|
||||||
// remember area behind player
|
// remember area behind player
|
||||||
|
player->img = imageset[player->id].img[F_SHOOT];
|
||||||
grabbehind(player, playerbg);
|
grabbehind(player, playerbg);
|
||||||
grabbehind(cloud, cloudbg);
|
grabbehind(cloud, cloudbg);
|
||||||
|
|
||||||
|
@ -3512,6 +3520,7 @@ void drawlevel(void) {
|
||||||
// remember area behind player
|
// remember area behind player
|
||||||
|
|
||||||
|
|
||||||
|
player->img = imageset[player->id].img[F_SHOOT];
|
||||||
grabbehind(player, playerbg);
|
grabbehind(player, playerbg);
|
||||||
grabbehind(cloud, cloudbg);
|
grabbehind(cloud, cloudbg);
|
||||||
|
|
||||||
|
|
4
shared.c
4
shared.c
|
@ -1682,7 +1682,9 @@ void drawsprite(sprite_t *s) {
|
||||||
}
|
}
|
||||||
/* make red if required */
|
/* make red if required */
|
||||||
if (s->angry && s->id != P_BLACKCLOUD) {
|
if (s->angry && s->id != P_BLACKCLOUD) {
|
||||||
frame += (MAXFRAMES*2);
|
if (s != player) {
|
||||||
|
frame += (MAXFRAMES*2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->id == P_MOVINGCARD) {
|
if (s->id == P_MOVINGCARD) {
|
||||||
|
|
Loading…
Reference in New Issue