diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2020-03-29 20:59:17 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2020-03-29 21:57:23 +0200 |
commit | 04fa335c32eca9a86bcc4912351bb5190665420d (patch) | |
tree | b9899e4bc636265586a222e26808c83d96a610e9 /src/game/g_client.c | |
parent | d9e9bb2d95483cbf2ca5d6cf5ac7b9f490d40204 (diff) |
Getting this ready for testing
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r-- | src/game/g_client.c | 13 |
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; |