Fix crash when Love Heart somehow can't find the 3D floor that was hit.

This commit is contained in:
Mari the Deer 2021-05-26 09:18:26 +02:00
commit 910c38f2b9
2 changed files with 7 additions and 4 deletions

View file

@ -257,8 +257,11 @@ Class LoveHeart : Actor
Hit3DFloor = ff;
break;
}
if ( Hit3DFloor.flags&F3DFloor.FF_UPPERTEXTURE ) HitTexture = HitLine.sidedef[LineSide].GetTexture(0);
else if ( Hit3DFloor.flags&F3DFloor.FF_LOWERTEXTURE ) HitTexture = HitLine.sidedef[LineSide].GetTexture(2);
if ( Hit3DFloor )
{
if ( Hit3DFloor.flags&F3DFloor.FF_UPPERTEXTURE ) HitTexture = HitLine.sidedef[LineSide].GetTexture(0);
else if ( Hit3DFloor.flags&F3DFloor.FF_LOWERTEXTURE ) HitTexture = HitLine.sidedef[LineSide].GetTexture(2);
}
}
else HitTexture = HitLine.sidedef[LineSide].GetTexture(LinePart);
}