diff options
author | IronClawTrem <louie.nutman@gmail.com> | 2019-08-07 20:45:49 +0100 |
---|---|---|
committer | IronClawTrem <louie.nutman@gmail.com> | 2019-08-07 20:45:49 +0100 |
commit | 3b711167fd0846f3411d94339bc30eddc1e1e995 (patch) | |
tree | 47b77348a39dcc6bc33bda855b3c061077d726b8 | |
parent | a0e07d6964f539fdc4aa9550dfbec7ea137b77d4 (diff) |
preserve boost time when evolving
-rw-r--r-- | src/game/g_cmds.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index cffe9dc..6722fad 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2704,7 +2704,7 @@ void Cmd_Class_f( gentity_t *ent ) int num; gentity_t *other; qboolean humanNear = qfalse; - + int oldBoostTime = -1; clientNum = ent->client - level.clients; trap_Argv( 1, s, sizeof( s ) ); @@ -2892,7 +2892,14 @@ 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 |