From 3faa441fa0460d0f6056e599bd3d60c6f5a1517e Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Fri, 23 Feb 2024 18:46:38 -0800 Subject: [PATCH] Viewmodel should grab the first-person cam's position now, and use Game_Input() as that's where FreeTS overrides its input code. --- src/client/viewmodel.qc | 2 +- src/shared/player.qc | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/client/viewmodel.qc b/src/client/viewmodel.qc index d6e546e..46d5624 100644 --- a/src/client/viewmodel.qc +++ b/src/client/viewmodel.qc @@ -148,7 +148,7 @@ void Viewmodel_ApplyBob(entity gun) { player pl = (player)pSeat->m_ePlayer; - gun.origin = pSeat->m_vecPredictedOrigin + pl.view_ofs; + gun.origin = g_view.GetCameraOrigin(); gun.origin += [0,0,-1]; gun.origin += v_forward * (0.75 + autocvar_cg_viewmodelOffset[0] + pViewBob->m_flBob * (-0.68 + -0.112 * fabs(sin(pViewBob->m_flBobCycle)) ) + 0.98 * pViewBob->m_vCam[0] ); gun.origin += v_right * (autocvar_cg_viewmodelOffset[1] + (pViewBob->m_flBob * (-0.2 + 0.308 * sin(pViewBob->m_flBobCycle)) ) + 0.98 * pViewBob->m_vCam[1] ); diff --git a/src/shared/player.qc b/src/shared/player.qc index a47be82..ab40b60 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -1146,10 +1146,6 @@ player::reset(BOOL resetInventory){ }//reset - - - - // little test //var float input_timelengthSum = 0; @@ -2224,7 +2220,7 @@ player::ProcessInput(void) } } - super::ProcessInput(); + Game_Input(this); }