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 20:59:17 +0200
commit6a178d9d4b3c3e56b7778a62fe0f18edfdf88071 (patch)
tree48c5b3ce2e2b7a0205beaf9e22b32a45e4a1caf9 /src/game/g_client.c
parentb3dc8f4fdb81636f87f3cb587290c33a4b58ab4f (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;