game.cpp: fix issue where tilt angle was not being reset to 0 at times when it should have been disabled

git-svn-id: https://svn.eduke32.com/eduke32@7732 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
pogokeen 2019-06-25 18:35:01 +00:00 committed by Christoph Oelckers
parent ceceb63b5e
commit 2c85a0a53c

View file

@ -757,6 +757,8 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
CAMERA(q16ang) = fix16_from_int(actor[ud.camerasprite].tempang CAMERA(q16ang) = fix16_from_int(actor[ud.camerasprite].tempang
+ mulscale16(((pSprite->ang + 1024 - actor[ud.camerasprite].tempang) & 2047) - 1024, smoothRatio)); + mulscale16(((pSprite->ang + 1024 - actor[ud.camerasprite].tempang) & 2047) - 1024, smoothRatio));
renderSetRollAngle(0);
int const noDraw = VM_OnEventWithReturn(EVENT_DISPLAYROOMSCAMERA, ud.camerasprite, playerNum, 0); int const noDraw = VM_OnEventWithReturn(EVENT_DISPLAYROOMSCAMERA, ud.camerasprite, playerNum, 0);
if (noDraw != 1) // event return values other than 0 and 1 are reserved if (noDraw != 1) // event return values other than 0 and 1 are reserved
@ -892,17 +894,24 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
renderSetAspect(mulscale16(oviewingrange, vRange >> 1), yxaspect); renderSetAspect(mulscale16(oviewingrange, vRange >> 1), yxaspect);
} }
} }
else if (videoGetRenderMode() >= REND_POLYMOST && (ud.screen_tilting else if (videoGetRenderMode() >= REND_POLYMOST)
{
if (ud.screen_tilting
#ifdef SPLITSCREEN_MOD_HACKS #ifdef SPLITSCREEN_MOD_HACKS
&& !g_fakeMultiMode && !g_fakeMultiMode
#endif #endif
)) )
{ {
#ifdef USE_OPENGL #ifdef USE_OPENGL
renderSetRollAngle(pPlayer->orotscrnang + mulscale16(((pPlayer->rotscrnang - pPlayer->orotscrnang + 1024)&2047)-1024, smoothRatio)); renderSetRollAngle(pPlayer->orotscrnang + mulscale16(((pPlayer->rotscrnang - pPlayer->orotscrnang + 1024)&2047)-1024, smoothRatio));
#endif #endif
pPlayer->orotscrnang = pPlayer->rotscrnang; pPlayer->orotscrnang = pPlayer->rotscrnang;
} }
else
{
renderSetRollAngle(0);
}
}
if (pPlayer->newowner < 0) if (pPlayer->newowner < 0)
{ {