From 620a4b48942ed314b8a19c55a5ea16fcb134d4ba Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 31 Dec 2023 06:35:38 +0300 Subject: [PATCH] engine: client: wrong check order, fix previous commit --- engine/client/cl_pmove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/client/cl_pmove.c b/engine/client/cl_pmove.c index 913195f1..c5be4d32 100644 --- a/engine/client/cl_pmove.c +++ b/engine/client/cl_pmove.c @@ -832,9 +832,9 @@ static void CL_SetupPMove( playermove_t *pmove, const local_state_t *from, const // but we need to properly run prediction and avoid potential memory // corruption // either debug this, or remove when old protocol will be dropped!!! - if( cls.legacymode ) + if( pmove->player_index < 0 ) { - if( pmove->player_index < 0 ) + if( cls.legacymode ) { pmove->player_index = bound( 0, cl.playernum, cl.maxclients - 1 ); }