diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2020-03-29 21:40:00 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2020-03-29 21:58:05 +0200 |
commit | c708d91dbfd691b965e1d5fb06cf6f95e3673000 (patch) | |
tree | a0d8080e4be67bfb4605322c81f4993365636218 /src/game/g_active.c | |
parent | 5636a964d35ab2af5bb6f2f289f72478b41788fb (diff) |
Hide debug info (g_covidDebug)
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r-- | src/game/g_active.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index baba182..820b8f3 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -584,8 +584,9 @@ void G_ContractCoronavirus( gentity_t *ent ) else ent->client->covidKind = COVID_MODERATE; - trap_SendServerCommand( (int)( ent - g_entities ), - va("print \"^1COVID: ^7You contracted COVID of kind ^1%d^7.\n\"", ent->client->covidKind ) ); + if( g_covidDebug.integer ) + trap_SendServerCommand( (int)( ent - g_entities ), + va("print \"^1COVID^7: ^7You contracted COVID of kind ^1%d^7.\n\"", ent->client->covidKind ) ); } @@ -660,12 +661,14 @@ void G_Coronavirus( gentity_t *ent ) chance *= g_covidInfectionFactor.value; - trap_SendServerCommand( (int)( ent - g_entities ), va( "print \"^1COVID:^7 Chance to infect %s^7 is ^1%f^7\n\"", - target->client->pers.netname, chance ) ); + if( g_covidDebug.integer ) + trap_SendServerCommand( (int)( ent - g_entities ), va( "print \"^1COVID^7: Chance to infect %s^7 is ^1%f^7\n\"", + target->client->pers.netname, chance ) ); if( random( ) < chance ) { - trap_SendServerCommand( (int)( ent - g_entities ), va( "print \"^1COVID:^7 You spread the virus.\n\"" ) ); + if( g_covidDebug.integer ) + trap_SendServerCommand( (int)( ent - g_entities ), va( "print \"^1COVID^7: You spread the virus.\n\"" ) ); G_ContractCoronavirus( target ); } } @@ -711,8 +714,9 @@ void G_Coronavirus( gentity_t *ent ) G_Damage( ent, NULL, NULL, NULL, NULL, damage, DAMAGE_NO_PROTECTION, MOD_CORONAVIRUS ); } - trap_SendServerCommand( (int)( ent - g_entities ), va( "print \"^1COVID^7: Kind=^1%d^7, progress=^1%f^7, severity=^1%f^7.\n\"", - client->covidKind, client->covidProgress, client->covidSeverity) ); + if( g_covidDebug.integer ) + trap_SendServerCommand( (int)( ent - g_entities ), va( "print \"^1COVID^7: Kind=^1%d^7, progress=^1%f^7, severity=^1%f^7.\n\"", + client->covidKind, client->covidProgress, client->covidSeverity) ); } /* |