diff options
| author | IronClawTrem <louie.nutman@gmail.com> | 2019-08-09 04:07:42 +0100 | 
|---|---|---|
| committer | IronClawTrem <louie.nutman@gmail.com> | 2019-08-09 04:07:42 +0100 | 
| commit | 65d0511475f9a739d2a8e24e9d0fa044c3e1a1f8 (patch) | |
| tree | 7bf8cf3ff62db50832af287a953c09c48e1d016c | |
| parent | 3b711167fd0846f3411d94339bc30eddc1e1e995 (diff) | |
preserve velocity when evolving
| -rw-r--r-- | src/game/g_cmds.c | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 6722fad..39ac73f 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2704,6 +2704,7 @@ void Cmd_Class_f( gentity_t *ent )    int       num;    gentity_t *other;    qboolean  humanNear = qfalse; +  vec3_t    oldVel;    int       oldBoostTime = -1;    clientNum = ent->client - level.clients; @@ -2892,9 +2893,11 @@ void Cmd_Class_f( gentity_t *ent )            ent->client->pers.classSelection = newClass;            ClientUserinfoChanged( clientNum, qfalse );            VectorCopy( infestOrigin, ent->s.pos.trBase ); +          VectorCopy( ent->client->ps.velocity, oldVel );            if( ent->client->ps.stats[ STAT_STATE ] & SS_BOOSTED )              oldBoostTime = ent->client->lastBoostedTime;            ClientSpawn( ent, ent, ent->s.pos.trBase, ent->s.apos.trBase ); +          VectorCopy( oldVel, ent->client->ps.velocity );            if( oldBoostTime > 0 )            {              ent->client->lastBoostedTime = oldBoostTime;  | 
