mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
SW: Ensure the player's rendering angle is in sync with a rotating
sector. This re-introduces the angle interpolation in drawscreen while sector object interpolation is in use. A side-effect of this is that looking up/down is now less smooth while controlling a sector object (e.g., a turret).
This commit is contained in:
parent
0c4deb9298
commit
4c73c11255
2 changed files with 7 additions and 2 deletions
|
@ -2019,6 +2019,11 @@ drawscreen(PLAYERp pp)
|
|||
tq16ang = camerapp->oq16ang + mulscale16(NORM_Q16ANGLE(camerapp->q16ang + fix16_from_int(1024) - camerapp->oq16ang) - fix16_from_int(1024), smoothratio);
|
||||
tq16horiz = camerapp->oq16horiz + mulscale16(camerapp->q16horiz - camerapp->oq16horiz, smoothratio);
|
||||
}
|
||||
else if (InterpolateSectObj)
|
||||
{
|
||||
tq16ang = camerapp->oq16ang + mulscale16(((pp->camq16ang + fix16_from_int(1024) - camerapp->oq16ang) & 0x7FFFFFF) - fix16_from_int(1024), smoothratio);
|
||||
tq16horiz = camerapp->oq16horiz + mulscale16(pp->camq16horiz - camerapp->oq16horiz, smoothratio);
|
||||
}
|
||||
else
|
||||
{
|
||||
tq16ang = pp->camq16ang;
|
||||
|
|
|
@ -1544,7 +1544,7 @@ DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16angvel)
|
|||
|
||||
if (!PedanticMode && (pq16ang == &pp->q16ang))
|
||||
{
|
||||
*pq16ang = pp->input.q16ang;
|
||||
pp->q16ang = pp->oq16ang = pp->input.q16ang;
|
||||
sprite[pp->PlayerSprite].ang = fix16_to_int(*pq16ang);
|
||||
if (!Prediction)
|
||||
{
|
||||
|
@ -1913,7 +1913,7 @@ DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16aimvel)
|
|||
|
||||
if (!PedanticMode && (pq16horiz == &pp->q16horiz))
|
||||
{
|
||||
*pq16horiz = pp->input.q16horiz;
|
||||
pp->q16horiz = pp->oq16horiz = pp->input.q16horiz;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue