CLIENT: Fix out of bounds array for revive icons

This commit is contained in:
MotoLegacy 2024-12-08 21:21:18 -08:00
parent 25832d650e
commit 69e0ec87b7

View file

@ -1119,11 +1119,17 @@ noref void() CSQC_Parse_Event =
break;
case EVENT_REVIVEON:
float reviveon_player_index = readbyte() - 1; // playernum starts at one.
if (reviveoff_player_index < 0)
return;
revive_icons[reviveon_player_index].state = 1;
revive_icons[reviveon_player_index].draw = true;
break;
case EVENT_REVIVEOFF:
float reviveoff_player_index = readbyte() - 1; // playernum starts at one.
if (reviveoff_player_index < 0)
return;
revive_icons[reviveoff_player_index].state = 0;
revive_icons[reviveoff_player_index].timer = 0;
revive_icons[reviveoff_player_index].draw = false;