Skip to content

Commit

Permalink
Fix non-local / chasecam player rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
vs-shirokii committed Jun 16, 2024
1 parent 30b3ae1 commit 5811e1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rendering/hwrenderer/scene/hw_sprites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ void HWSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
// from HWDrawInfo::PreparePlayerSprites
!( (players[consoleplayer].cheats & CF_CHASECAM) ||
(r_deathcamera && di->Viewpoint.camera && di->Viewpoint.camera->health <= 0) );
const bool isnonlocalplayer = !isfirstpersonviewer && actor->player;

auto rttype = rtstate.push_type(
isfirstpersonviewer ? RtPrim::FirstPersonViewer :
Expand Down Expand Up @@ -324,7 +325,7 @@ void HWSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
? actor->InterpolatedAngles(di->Viewpoint.TicFrac)
: actor->Angles;
auto rtrot = rtstate.push_apply_spriterotation(
isfirstpersonviewer ? 0 : float(rtangles.Pitch.Radians()),
isfirstpersonviewer || isnonlocalplayer ? 0 : float( rtangles.Pitch.Radians() ),
float(rtangles.Yaw.Radians()));
#endif

Expand Down

0 comments on commit 5811e1c

Please sign in to comment.