Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Only damage print in scrim mode
Browse files Browse the repository at this point in the history
  • Loading branch information
marqdevx committed Apr 17, 2024
1 parent dad96fd commit 4966c4e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ extern bool g_bEnableCoach;

int g_DamageDone[MAXPLAYERS+1][MAXPLAYERS+1];
int g_DamageDoneHits[MAXPLAYERS+1][MAXPLAYERS+1];
bool damagePrint_shown = false;

bool g_bEnableDamagePrint = true;
FAKE_BOOL_CVAR(cs2scrim_damage_print, "Whether to enable chat Damage Print", g_bEnableDamagePrint, true, false)
Expand Down Expand Up @@ -188,7 +189,7 @@ GAME_EVENT_F(round_prestart)

GAME_EVENT_F(round_start)
{
if(g_bEnableDamagePrint){
if (g_bEnableDamagePrint && damagePrint_shown){
for (int i = 1; i <= gpGlobals->maxClients; i++) {
for (int j = 1; j <= gpGlobals->maxClients; j++) {
g_DamageDone[i][j] = 0;
Expand Down Expand Up @@ -342,7 +343,7 @@ GAME_EVENT_F(grenade_thrown){
}

GAME_EVENT_F(round_end){
if(!g_bEnableDamagePrint)
if(!g_bEnableDamagePrint || practiceMode)
return;

for (int i = 1; i <= gpGlobals->maxClients; i++) {
Expand All @@ -353,4 +354,6 @@ GAME_EVENT_F(round_end){

PrintDamageInfo(i);
}

damagePrint_shown = true;
}

0 comments on commit 4966c4e

Please sign in to comment.