- Blood: Make delirium rotscrnang smoother with use of more precision.

This commit is contained in:
Mitchell Richters 2021-07-18 18:13:37 +10:00
parent c62e5db2bc
commit b4af9e87c1

View file

@ -618,16 +618,16 @@ void viewDrawScreen(bool sceneonly)
binangle rotscrnang; binangle rotscrnang;
SetupView(cX, cY, cZ, cA, cH, nSectnum, zDelta, shakeX, shakeY, rotscrnang); SetupView(cX, cY, cZ, cA, cH, nSectnum, zDelta, shakeX, shakeY, rotscrnang);
int tilt = interpolatedangle(gScreenTiltO, gScreenTilt, gInterpolate); binangle tilt = interpolatedangle(buildang(gScreenTiltO), buildang(gScreenTilt), gInterpolate);
uint8_t v14 = 0; uint8_t v14 = 0;
uint8_t v10 = 0; uint8_t v10 = 0;
bool bDelirium = powerupCheck(gView, kPwUpDeliriumShroom) > 0; bool bDelirium = powerupCheck(gView, kPwUpDeliriumShroom) > 0;
static bool bDeliriumOld = false; static bool bDeliriumOld = false;
//int tiltcs, tiltdim; //int tiltcs, tiltdim;
uint8_t otherview = powerupCheck(gView, kPwUpCrystalBall) > 0; uint8_t otherview = powerupCheck(gView, kPwUpCrystalBall) > 0;
if (tilt || bDelirium) if (tilt.asbam() || bDelirium)
{ {
rotscrnang = buildang(tilt); rotscrnang = tilt;
} }
else if (otherview && gNetPlayers > 1) else if (otherview && gNetPlayers > 1)
{ {
@ -689,7 +689,7 @@ void viewDrawScreen(bool sceneonly)
} }
cH = q16horiz(ClipRange(cH.asq16(), gi->playerHorizMin(), gi->playerHorizMax())); cH = q16horiz(ClipRange(cH.asq16(), gi->playerHorizMin(), gi->playerHorizMax()));
if ((tilt || bDelirium) && !sceneonly) if ((tilt.asbam() || bDelirium) && !sceneonly)
{ {
if (gDeliriumBlur) if (gDeliriumBlur)
{ {