Skip to content

Commit

Permalink
* FIX: [xrGame] Update firstPersonBodyXform in shedule_Update to fix …
Browse files Browse the repository at this point in the history
…low framerate desync
  • Loading branch information
yohjimane committed Jun 10, 2024
1 parent e657dfb commit 6b2c46e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/xrGame/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,7 @@ void CActor::shedule_Update(u32 DT)
//------------------------------------------------
{
g_cl_CheckControls(mstate_wishful, NET_SavedAccel, NET_Jump, dt);
m_firstPersonBodyXform = XFORM();
{
/*
if (mstate_real & mcJump)
Expand Down Expand Up @@ -1642,7 +1643,6 @@ void CActor::RenderFirstPersonBody(u32 context_id, IRenderable* root)
}

IKinematics* kinematics = m_firstPersonBody->dcast_PKinematics();
m_firstPersonBodyXform = XFORM();

// Add body to render
GEnv.Render->add_Visual(context_id, root, m_firstPersonBody, m_firstPersonBodyXform);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class CActor : public CEntityAlive,
xr_unordered_map<u16, bool> m_firstPersonBodyBonesToIgnoreAnims;
u32 m_timeOfDeath{};
u32 m_fpDeathCamOfffsetTime{};
Fmatrix m_firstPersonBodyXform{};
Fmatrix m_firstPersonBodyXform{Fidentity};
Fmatrix m_firstPersonCameraXform{};

Lock render_lock{};
Expand Down

0 comments on commit 6b2c46e

Please sign in to comment.