- Duke: Fix nullptr check for Duke and RR that was causing a crash in a glitched spot in RR's E1L1.

This commit is contained in:
Mitchell Richters 2022-01-04 14:00:18 +11:00
parent b683c31ef7
commit 783dd98641
2 changed files with 2 additions and 2 deletions

View file

@ -2851,7 +2851,7 @@ void processinput_d(int snum)
pact->spr.xvel = clamp(ksqrt((p->pos.X - p->bobpos.X) * (p->pos.X - p->bobpos.X) + (p->pos.Y - p->bobpos.Y) * (p->pos.Y - p->bobpos.Y)), 0, 512);
if (p->on_ground) p->bobcounter += p->GetActor()->spr.xvel >> 1;
p->backuppos(ud.clipping == 0 && (p->cursector->floorpicnum == MIRROR || !p->insector()));
p->backuppos(ud.clipping == 0 && ((p->insector() && p->cursector->floorpicnum == MIRROR) || !p->insector()));
// Shrinking code

View file

@ -3566,7 +3566,7 @@ void processinput_r(int snum)
pact->spr.xvel = clamp(ksqrt((p->pos.X - p->bobpos.X) * (p->pos.X - p->bobpos.X) + (p->pos.Y - p->bobpos.Y) * (p->pos.Y - p->bobpos.Y)), 0, 512);
if (p->on_ground) p->bobcounter += p->GetActor()->spr.xvel >> 1;
p->backuppos(ud.clipping == 0 && (p->cursector->floorpicnum == MIRROR || !p->insector()));
p->backuppos(ud.clipping == 0 && ((p->insector() && p->cursector->floorpicnum == MIRROR) || !p->insector()));
// Shrinking code