summaryrefslogtreecommitdiff
path: root/src/game/g_client.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-03-29 20:59:17 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-03-29 21:57:23 +0200
commit04fa335c32eca9a86bcc4912351bb5190665420d (patch)
treeb9899e4bc636265586a222e26808c83d96a610e9 /src/game/g_client.c
parentd9e9bb2d95483cbf2ca5d6cf5ac7b9f490d40204 (diff)
Getting this ready for testing
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r--src/game/g_client.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 9f6710c..9801ff9 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1915,7 +1915,20 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
// 1 in 10 chance they spawn sick
//if( rand( ) % 10 == 0 )
if( client->pers.classSelection != PCL_NONE )
+ {
+ for( i = 0; i < level.maxclients; i++ )
+ {
+ gentity_t *ent = g_entities + i;
+
+ if( ent->client && ent->health > 0 && ent->client->covidKind > COVID_NONE
+ && ent->client->covidKind < COVID_RECOVERED )
+ goto spawn_healthy;
+ }
+
+ trap_SendServerCommand( ent - g_entities, "print \"^1COVID^7: You're patient zero.\n\"" );
G_ContractCoronavirus( ent );
+ }
+spawn_healthy:
// health will count down towards max_health
ent->health = client->ps.stats[ STAT_HEALTH ] = client->ps.stats[ STAT_MAX_HEALTH ]; //* 1.25;