summaryrefslogtreecommitdiff
path: root/src/game/g_client.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-03-29 19:59:19 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-03-29 20:07:29 +0200
commitcad9e7c0e6bb22a945273ab6a39601db86d7db20 (patch)
tree947c5dc828da424df1de90a71ae845599f7de92b /src/game/g_client.c
parent0e6b1bc4a15f598d5eab507cbbe0f11410d5df1f (diff)
Implement coronavirus
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r--src/game/g_client.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index d204831..9f6710c 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1907,6 +1907,16 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
ent->client->ps.stats[ STAT_STATE ] = 0;
VectorSet( ent->client->ps.grapplePoint, 0.0f, 0.0f, 1.0f );
+ client->covidKind = COVID_NONE;
+ client->covidProgress = 0.0f;
+ client->covidSeverity = 0.0f;
+ client->covidDamage = 0.0f;
+
+ // 1 in 10 chance they spawn sick
+ //if( rand( ) % 10 == 0 )
+ if( client->pers.classSelection != PCL_NONE )
+ G_ContractCoronavirus( ent );
+
// health will count down towards max_health
ent->health = client->ps.stats[ STAT_HEALTH ] = client->ps.stats[ STAT_MAX_HEALTH ]; //* 1.25;