From ad4062969b47cb2215373ffde7aee20905feb6f6 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 7 Jun 2021 02:22:08 +0300 Subject: [PATCH] engine: client: fix warnings in cl_pmove --- engine/client/cl_pmove.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/engine/client/cl_pmove.c b/engine/client/cl_pmove.c index 3203a9ca..897a717b 100644 --- a/engine/client/cl_pmove.c +++ b/engine/client/cl_pmove.c @@ -1082,13 +1082,14 @@ Runs prediction code for user cmd void CL_RunUsercmd( local_state_t *from, local_state_t *to, usercmd_t *u, qboolean runfuncs, double *time, unsigned int random_seed ) { usercmd_t cmd; - local_state_t temp; - usercmd_t split; - - memset( &temp, 0, sizeof( temp )); if( u->msec > 50 ) { + local_state_t temp; + usercmd_t split; + + memset( &temp, 0, sizeof( temp )); + split = *u; split.msec /= 2; CL_RunUsercmd( from, &temp, &split, runfuncs, time, random_seed ); @@ -1155,12 +1156,12 @@ Sets cl.predicted.origin and cl.predicted.angles */ void CL_PredictMovement( qboolean repredicting ) { - runcmd_t *to_cmd, *from_cmd; + runcmd_t *to_cmd = NULL, *from_cmd; local_state_t *from = NULL, *to = NULL; - int current_command; - int current_command_mod; + uint current_command; + uint current_command_mod; frame_t *frame = NULL; - int i, stoppoint; + uint i, stoppoint; qboolean runfuncs; double f = 1.0; cl_entity_t *ent;