summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/g_client.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 9801ff9..58ad321 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1738,7 +1738,8 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
int maxAmmo, maxClips;
weapon_t weapon;
adminRangeBoosts_t savedRanges;
-
+ int savedKind;
+ float savedProgress, savedSeverity;
index = ent - g_entities;
client = ent->client;
@@ -1815,6 +1816,9 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
saved = client->pers;
savedSess = client->sess;
savedPing = client->ps.ping;
+ savedKind = client->covidKind;
+ savedProgress = client->covidProgress;
+ savedSeverity = client->covidSeverity;
for( i = 0; i < MAX_PERSISTANT; i++ )
persistant[ i ] = client->ps.persistant[ i ];
@@ -1907,14 +1911,13 @@ 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 )
+ if( ent == spawn )
+ {
+ client->covidKind = savedKind;
+ client->covidProgress = savedProgress;
+ client->covidSeverity = savedSeverity;
+ }
+ else if( client->pers.classSelection != PCL_NONE )
{
for( i = 0; i < level.maxclients; i++ )
{
@@ -1924,7 +1927,7 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
&& ent->client->covidKind < COVID_RECOVERED )
goto spawn_healthy;
}
-
+
trap_SendServerCommand( ent - g_entities, "print \"^1COVID^7: You're patient zero.\n\"" );
G_ContractCoronavirus( ent );
}