Browse Source

Fix client event angles (#290)

fix-cwd-path
Roman Chistokhodov 2 years ago committed by GitHub
parent
commit
d3dba792b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cl_dll/com_weapons.cpp
  2. 1
      cl_dll/com_weapons.h
  3. 2
      cl_dll/view.cpp

2
cl_dll/com_weapons.cpp

@ -137,7 +137,7 @@ void HUD_PlaybackEvent( int flags, const edict_t *pInvoker, unsigned short event
// Weapon prediction events are assumed to occur at the player's origin // Weapon prediction events are assumed to occur at the player's origin
org = g_finalstate->playerstate.origin; org = g_finalstate->playerstate.origin;
ang = v_angles; ang = v_client_aimangles;
gEngfuncs.pfnPlaybackEvent( flags, pInvoker, eventindex, delay, org, ang, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2 ); gEngfuncs.pfnPlaybackEvent( flags, pInvoker, eventindex, delay, org, ang, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2 );
} }

1
cl_dll/com_weapons.h

@ -39,6 +39,7 @@ extern cvar_t *cl_lw;
extern int g_runfuncs; extern int g_runfuncs;
extern vec3_t v_angles; extern vec3_t v_angles;
extern vec3_t v_client_aimangles;
extern float g_lastFOV; extern float g_lastFOV;
extern struct local_state_s *g_finalstate; extern struct local_state_s *g_finalstate;
#endif #endif

2
cl_dll/view.cpp

@ -88,6 +88,7 @@ float v_cameraFocusAngle = 35.0f;
int v_cameraMode = CAM_MODE_FOCUS; int v_cameraMode = CAM_MODE_FOCUS;
qboolean v_resetCamera = 1; qboolean v_resetCamera = 1;
vec3_t v_client_aimangles;
vec3_t g_ev_punchangle; vec3_t g_ev_punchangle;
cvar_t *scr_ofsx; cvar_t *scr_ofsx;
@ -724,6 +725,7 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams )
// Store off v_angles before munging for third person // Store off v_angles before munging for third person
v_angles = pparams->viewangles; v_angles = pparams->viewangles;
v_client_aimangles = pparams->cl_viewangles;
v_lastAngles = pparams->viewangles; v_lastAngles = pparams->viewangles;
//v_cl_angles = pparams->cl_viewangles; // keep old user mouse angles ! //v_cl_angles = pparams->cl_viewangles; // keep old user mouse angles !
if( CL_IsThirdPerson() ) if( CL_IsThirdPerson() )

Loading…
Cancel
Save