diff options
author | Tim Angus <tim@ngus.net> | 2002-06-21 23:07:48 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2002-06-21 23:07:48 +0000 |
commit | 9c84a1fc74a03edec430290a8da5d20b06a7d027 (patch) | |
tree | 802c06846d54357b1262a7dd58be0579f6aea78a /src/game/g_missile.c | |
parent | 23a3cf67841b44ddfbdc482af08abc2142f66033 (diff) |
Weapon additions???
Diffstat (limited to 'src/game/g_missile.c')
-rw-r--r-- | src/game/g_missile.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 942697eb..bbbf07cd 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -362,6 +362,50 @@ gentity_t *fire_pulseRifle( gentity_t *self, vec3_t start, vec3_t dir ) /* ================= +fire_luciferCanon + +================= +*/ +gentity_t *fire_luciferCanon( gentity_t *self, vec3_t start, vec3_t dir, int damage ) +{ + gentity_t *bolt; + int localDamage = (int)( ceil( ( (float)damage / + (float)LC_TOTAL_CHARGE ) * 100.0f ) ); + + VectorNormalize( dir ); + + bolt = G_Spawn( ); + bolt->classname = "lcanon"; + 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_LUCIFER_CANON; + bolt->r.ownerNum = self->s.number; + bolt->parent = self; + bolt->damage = localDamage; + bolt->splashDamage = localDamage / 2; + bolt->splashRadius = localDamage; + bolt->s.generic1 = damage; + //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, 250, bolt->s.pos.trDelta ); + SnapVector( bolt->s.pos.trDelta ); // save net bandwidth + + VectorCopy (start, bolt->r.currentOrigin); + + return bolt; +} + +//============================================================================= +/* +================= fire_lockblob ================= */ |