Change pSeat references to pSeatLocal where applicable.

Remove obsolete and redundant code in ReceiveEntity.
This commit is contained in:
Marco Cawthorne 2021-03-31 13:43:59 +02:00
parent 472bab91fa
commit cd687f48d8
8 changed files with 7 additions and 30 deletions

View File

@ -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;

View File

@ -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
);

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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
}

View File

@ -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