diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_public.h | 3 | ||||
-rw-r--r-- | src/game/g_missile.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 50e6b212..438e2453 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -321,7 +321,8 @@ typedef enum { //TA: needed client side to size sprites #define FIREBALL_LIFETIME 1000.0f #define FIREBALL_SPEED 200.0f -#define FIREBALL_GAP 15 //basically as fast as possible yet regular +#define FIREBALL_GAP 15 //basically as fast as possible yet regular +#define FIREBALL_LAG 0.5f //the amount of player velocity that is added to the fireball typedef enum { diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 193c7404..942697eb 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -243,6 +243,7 @@ fire_flamer gentity_t *fire_flamer( gentity_t *self, vec3_t start, vec3_t dir ) { gentity_t *bolt; + vec3_t pvel; VectorNormalize (dir); @@ -266,7 +267,8 @@ gentity_t *fire_flamer( gentity_t *self, vec3_t start, vec3_t dir ) bolt->s.pos.trType = TR_LINEAR; bolt->s.pos.trTime = level.time - MISSILE_PRESTEP_TIME; // move a bit on the very first frame VectorCopy( start, bolt->s.pos.trBase ); - VectorMA( self->client->ps.velocity, FIREBALL_SPEED, dir, bolt->s.pos.trDelta ); + VectorScale( self->client->ps.velocity, FIREBALL_LAG, pvel ); + VectorMA( pvel, FIREBALL_SPEED, dir, bolt->s.pos.trDelta ); SnapVector( bolt->s.pos.trDelta ); // save net bandwidth VectorCopy (start, bolt->r.currentOrigin); |