Skip to content

Commit 5376368

Browse files
committed
Fix camera direction not matching up with head direction for first person death
1 parent 5749b5d commit 5376368

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/xrGame/ActorCameras.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ void CActor::cam_Update(float dt, float fFOV)
367367
if (!g_Alive()) //first person death cam
368368
{
369369
point = m_firstPersonCameraXform.c;
370-
dangle = m_firstPersonCameraXform.k;
371370
}
372371
else
373372
{
@@ -379,6 +378,10 @@ void CActor::cam_Update(float dt, float fFOV)
379378
}
380379

381380
C->Update(point, dangle);
381+
382+
if (psActorFlags.test(AF_FIRST_PERSON_BODY) && eacFirstEye == cam_active && !g_Alive()) // manually update position for first person death because it gets overridden in `Update`
383+
C->vDirection.set(m_firstPersonCameraXform.k);
384+
382385
C->f_fov = fFOV;
383386

384387
if (eacFirstEye != cam_active)

0 commit comments

Comments
 (0)