2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 01:45:19 +01:00

engine: client: remove voidptr hack from IN_EngineAppendMove, just use usercmd_t directly

This commit is contained in:
Alibek Omarov 2024-10-08 04:06:49 +03:00
parent 6ae09d2866
commit 480218412a
3 changed files with 5 additions and 5 deletions

View File

@ -76,7 +76,7 @@ static CVAR_DEFINE_AUTO( cl_upmax, "1200", FCVAR_ARCHIVE, "max allowed incoming
CVAR_DEFINE_AUTO( cl_lw, "1", FCVAR_ARCHIVE|FCVAR_USERINFO, "enable client weapon predicting" ); CVAR_DEFINE_AUTO( cl_lw, "1", FCVAR_ARCHIVE|FCVAR_USERINFO, "enable client weapon predicting" );
CVAR_DEFINE_AUTO( cl_charset, "utf-8", FCVAR_ARCHIVE, "1-byte charset to use (iconv style)" ); CVAR_DEFINE_AUTO( cl_charset, "utf-8", FCVAR_ARCHIVE, "1-byte charset to use (iconv style)" );
CVAR_DEFINE_AUTO( cl_trace_stufftext, "0", FCVAR_ARCHIVE|FCVAR_CHEAT, "enable stufftext (server-to-client console commands) tracing (good for developers)" ); CVAR_DEFINE_AUTO( cl_trace_stufftext, "0", FCVAR_ARCHIVE, "enable stufftext (server-to-client console commands) tracing (good for developers)" );
CVAR_DEFINE_AUTO( cl_trace_messages, "0", FCVAR_ARCHIVE|FCVAR_CHEAT, "enable message names tracing (good for developers)" ); CVAR_DEFINE_AUTO( cl_trace_messages, "0", FCVAR_ARCHIVE|FCVAR_CHEAT, "enable message names tracing (good for developers)" );
CVAR_DEFINE_AUTO( cl_trace_events, "0", FCVAR_ARCHIVE|FCVAR_CHEAT, "enable events tracing (good for developers)" ); CVAR_DEFINE_AUTO( cl_trace_events, "0", FCVAR_ARCHIVE|FCVAR_CHEAT, "enable events tracing (good for developers)" );
static CVAR_DEFINE_AUTO( cl_nat, "0", 0, "show servers running under NAT" ); static CVAR_DEFINE_AUTO( cl_nat, "0", 0, "show servers running under NAT" );
@ -650,7 +650,7 @@ static void CL_CreateCmd( void )
active = (( cls.signon == SIGNONS ) && !cl.paused && !cls.demoplayback ); active = (( cls.signon == SIGNONS ) && !cl.paused && !cls.demoplayback );
Platform_PreCreateMove(); Platform_PreCreateMove();
clgame.dllFuncs.CL_CreateMove( host.frametime, cmd, active ); clgame.dllFuncs.CL_CreateMove( host.frametime, cmd, active );
IN_EngineAppendMove( host.frametime, cmd, active ); IN_EngineAppendMove( host.frametime, cmd, active );
CL_PopPMStates(); CL_PopPMStates();

View File

@ -569,10 +569,9 @@ IN_EngineAppendMove
Called from cl_main.c after generating command in client Called from cl_main.c after generating command in client
================ ================
*/ */
void IN_EngineAppendMove( float frametime, void *cmd1, qboolean active ) void IN_EngineAppendMove( float frametime, usercmd_t *cmd, qboolean active )
{ {
float forward, side, pitch, yaw; float forward, side, pitch, yaw;
usercmd_t *cmd = cmd1;
if( clgame.dllFuncs.pfnLookEvent ) if( clgame.dllFuncs.pfnLookEvent )
return; return;

View File

@ -25,6 +25,7 @@ INPUT
*/ */
#include "keydefs.h" #include "keydefs.h"
#include "usercmd.h"
// //
// input.c // input.c
@ -43,7 +44,7 @@ void IN_ToggleClientMouse( int newstate, int oldstate );
uint IN_CollectInputDevices( void ); uint IN_CollectInputDevices( void );
void IN_LockInputDevices( qboolean lock ); void IN_LockInputDevices( qboolean lock );
void IN_EngineAppendMove( float frametime, void *cmd, qboolean active ); void IN_EngineAppendMove( float frametime, usercmd_t *cmd, qboolean active );
extern convar_t m_yaw; extern convar_t m_yaw;
extern convar_t m_pitch; extern convar_t m_pitch;