From cd687f48d8bc2a73517f902b65fc397a43fbff96 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Wed, 31 Mar 2021 13:43:59 +0200 Subject: [PATCH] Change pSeat references to pSeatLocal where applicable. Remove obsolete and redundant code in ReceiveEntity. --- src/shared/player.qc | 23 ----------------------- src/shared/w_displacer.qc | 2 +- src/shared/w_eagle.qc | 2 +- src/shared/w_m249.qc | 2 +- src/shared/w_penguin.qc | 2 +- src/shared/w_shockrifle.qc | 2 +- src/shared/w_sniperrifle.qc | 2 +- src/shared/w_sporelauncher.qc | 2 +- 8 files changed, 7 insertions(+), 30 deletions(-) diff --git a/src/shared/player.qc b/src/shared/player.qc index 742edce..5776006 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -185,29 +185,6 @@ void player::ReceiveEntity(float new) { float fl; - if (new == FALSE) { - /* Go through all the physics code between the last received frame - * and the newest frame and keep the changes this time around instead - * of rolling back, because we'll apply the new server-verified values - * right after anyway. */ - /* FIXME: splitscreen */ - if (entnum == player_localentnum) { - /* FIXME: splitscreen */ - pSeat = &g_seats[0]; - - for (int i = sequence+1; i <= servercommandframe; i++) { - /* ...maybe the input state is too old? */ - if (!getinputstate(i)) { - break; - } - input_sequence = i; - PMove_Run(); - } - - /* any differences in things that are read below are now - * officially from prediction misses. */ - } - } /* seed for our prediction table */ sequence = servercommandframe; diff --git a/src/shared/w_displacer.qc b/src/shared/w_displacer.qc index 66225c2..e47d9b9 100644 --- a/src/shared/w_displacer.qc +++ b/src/shared/w_displacer.qc @@ -303,7 +303,7 @@ w_displacer_hud(void) [0,96/128], // was [24/256,72/128]... which makes 0 sense [24/256, 24/128], g_hud_color, - pSeat->m_flAmmo2Alpha, + pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE ); diff --git a/src/shared/w_eagle.qc b/src/shared/w_eagle.qc index 861b74b..2be4939 100644 --- a/src/shared/w_eagle.qc +++ b/src/shared/w_eagle.qc @@ -328,7 +328,7 @@ w_eagle_crosshair(void) [24/256,72/128], [24/256, 24/128], g_hud_color, - pSeat->m_flAmmo2Alpha, + pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE ); #endif diff --git a/src/shared/w_m249.qc b/src/shared/w_m249.qc index c4c4832..0fd3daf 100644 --- a/src/shared/w_m249.qc +++ b/src/shared/w_m249.qc @@ -267,7 +267,7 @@ w_m249_crosshair(void) [24/128,72/128], [24/256, 24/128], g_hud_color, - pSeat->m_flAmmo2Alpha, + pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE ); #endif diff --git a/src/shared/w_penguin.qc b/src/shared/w_penguin.qc index e6a6096..f4e1304 100644 --- a/src/shared/w_penguin.qc +++ b/src/shared/w_penguin.qc @@ -313,7 +313,7 @@ w_penguin_hud(void) #ifdef CLIENT HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], "sprites/640hud7.spr_0.tga", [144/256,72/128], [24/256, 24/128], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], "sprites/640hud7.spr_0.tga", [144/256,72/128], [24/256, 24/128], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_shockrifle.qc b/src/shared/w_shockrifle.qc index 3869777..72ddd56 100644 --- a/src/shared/w_shockrifle.qc +++ b/src/shared/w_shockrifle.qc @@ -233,7 +233,7 @@ w_shockrifle_crosshair(void) [224/256,48/128], [24/256, 24/128], g_hud_color, - pSeat->m_flAmmo2Alpha, + pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE ); #endif diff --git a/src/shared/w_sniperrifle.qc b/src/shared/w_sniperrifle.qc index 6c9bf2d..2c8bab8 100644 --- a/src/shared/w_sniperrifle.qc +++ b/src/shared/w_sniperrifle.qc @@ -263,7 +263,7 @@ w_sniperrifle_crosshair(void) HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], "sprites/640hud7.spr_0.tga", [24/256,72/128], [24/256, 24/128], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], "sprites/640hud7.spr_0.tga", [24/256,72/128], [24/256, 24/128], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_sporelauncher.qc b/src/shared/w_sporelauncher.qc index ad9acc9..09841fd 100644 --- a/src/shared/w_sporelauncher.qc +++ b/src/shared/w_sporelauncher.qc @@ -406,7 +406,7 @@ w_sporelauncher_crosshair(void) [200/256,48/128], [24/256, 24/128], g_hud_color, - pSeat->m_flAmmo2Alpha, + pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE ); #endif