diff options
Diffstat (limited to 'src/game/g_missile.c')
-rw-r--r-- | src/game/g_missile.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 8b2aba73..24c70390 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -378,6 +378,46 @@ gentity_t *fire_plasma( gentity_t *self, vec3_t start, vec3_t dir ) return bolt; } +/* +================= +fire_plasma + +================= +*/ +gentity_t *fire_pulseRifle( gentity_t *self, vec3_t start, vec3_t dir ) +{ + gentity_t *bolt; + + VectorNormalize (dir); + + bolt = G_Spawn(); + bolt->classname = "pulse"; + bolt->nextthink = level.time + 10000; + bolt->think = G_ExplodeMissile; + bolt->s.eType = ET_MISSILE; + bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; + bolt->s.weapon = WP_PULSE_RIFLE; + bolt->r.ownerNum = self->s.number; + bolt->parent = self; + bolt->damage = 20; + bolt->splashDamage = 0; + bolt->splashRadius = 0; + //bolt->methodOfDeath = MOD_FLAMER; + //bolt->splashMethodOfDeath = MOD_FLAMER_SPLASH; + bolt->clipmask = MASK_SHOT; + bolt->target_ent = NULL; + + 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 ); + VectorScale( dir, 1500, bolt->s.pos.trDelta ); + SnapVector( bolt->s.pos.trDelta ); // save net bandwidth + + VectorCopy (start, bolt->r.currentOrigin); + + return bolt; +} + //============================================================================= /* |