From 5811e1cc78525f8932f38e9fffb1a0c45998bd63 Mon Sep 17 00:00:00 2001 From: "V. Shirokii" Date: Sun, 16 Jun 2024 10:06:52 +0100 Subject: [PATCH] Fix non-local / chasecam player rotation --- src/rendering/hwrenderer/scene/hw_sprites.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rendering/hwrenderer/scene/hw_sprites.cpp b/src/rendering/hwrenderer/scene/hw_sprites.cpp index 429c01f9f..cd47949b0 100644 --- a/src/rendering/hwrenderer/scene/hw_sprites.cpp +++ b/src/rendering/hwrenderer/scene/hw_sprites.cpp @@ -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 : @@ -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