diff options
author | Cody <codywaynebrown1991@gmail.com> | 2017-07-18 05:38:06 -0500 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-02-22 22:00:59 +0100 |
commit | 4e7cea5faf3470e1cd1bf71eda5ad2999e82a822 (patch) | |
tree | b67dd5ccaaba4dc36a23011f9ea0dda035241637 /src/game | |
parent | f6a4036b2beedf57f2f94b63ee0212adfc0c1e2d (diff) |
Can now evolve and be boosted
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_cmds.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index cd68354..17ec730 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -3100,7 +3100,7 @@ void Cmd_Class_f( gentity_t *ent ) vec3_t mins, maxs; int num; gentity_t *other; - + int oldBoostTime = -1; clientNum = ent->client - level.clients; trap_Argv( 1, s, sizeof( s ) ); @@ -3278,7 +3278,17 @@ void Cmd_Class_f( gentity_t *ent ) ent->client->pers.classSelection = newClass; ClientUserinfoChanged( clientNum, qfalse ); VectorCopy( infestOrigin, ent->s.pos.trBase ); + + if( ent->client->ps.stats[ STAT_STATE ] & SS_BOOSTED ) + oldBoostTime = ent->client->lastBoostedTime; + ClientSpawn( ent, ent, ent->s.pos.trBase, ent->s.apos.trBase ); + + if( oldBoostTime > 0 ) + { + ent->client->lastBoostedTime = oldBoostTime; + ent->client->ps.stats[ STAT_STATE ] |= SS_BOOSTED; + } return; } else |