- Duke/RR: Add three sector nullptr checks after receiving crash in Redneck Rampage Route 66 while noclipping.

This commit is contained in:
Mitch Richters 2021-12-07 19:44:28 +11:00
parent 85a2e3bd06
commit 6539d72663
3 changed files with 9 additions and 6 deletions

View file

@ -526,10 +526,13 @@ void moveplayers(void)
}
}
if (spri->sector()->ceilingstat & 1)
spri->shade += (spri->sector()->ceilingshade - spri->shade) >> 1;
else
spri->shade += (spri->sector()->floorshade - spri->shade) >> 1;
if (spri->sector())
{
if (spri->sector()->ceilingstat & 1)
spri->shade += (spri->sector()->ceilingshade - spri->shade) >> 1;
else
spri->shade += (spri->sector()->floorshade - spri->shade) >> 1;
}
}
}

View file

@ -2938,7 +2938,7 @@ void processinput_d(int snum)
p->angle.applyinput(sb_avel, &actions);
}
if (p->spritebridge == 0)
if (p->spritebridge == 0 && s->sector())
{
j = s->sector()->floorpicnum;

View file

@ -3651,7 +3651,7 @@ void processinput_r(int snum)
p->angle.applyinput(sb_avel, &actions);
}
if (p->spritebridge == 0)
if (p->spritebridge == 0 && s->sector())
{
int j = s->sector()->floorpicnum;
k = 0;