Skip to content

Commit

Permalink
CLIENT: Fix out of bounds array for revive icons
Browse files Browse the repository at this point in the history
  • Loading branch information
MotoLegacy committed Dec 9, 2024
1 parent 25832d6 commit 69e0ec8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/client/main.qc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 69e0ec8

Please sign in to comment.