summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2002-06-24 16:29:10 +0000
committerTim Angus <tim@ngus.net>2002-06-24 16:29:10 +0000
commitb3975d50421dcfe1c56aae165d2ac3329c02fc06 (patch)
tree240ab0554e306f4e41b47372ed1e218be53aec70 /src/game
parentc37938cbbd38597caeda1f05f7b36b0c03f2c27e (diff)
Fancy teslagen effects
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_weapon.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index a9021350..85acdf64 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -381,8 +381,12 @@ void teslaFire( gentity_t *ent )
tent = G_TempEntity( tr.endpos, EV_TESLATRAIL );
VectorCopy( muzzle, tent->s.origin2 );
+
+ tent->s.generic1 = ent->s.number; //src
+ tent->s.clientNum = traceEnt->s.number; //dest
+
// move origin a bit to come closer to the drawn gun muzzle
- VectorMA( tent->s.origin2, 16, up, tent->s.origin2 );
+ VectorMA( tent->s.origin2, 28, up, tent->s.origin2 );
// no explosion at end if SURF_NOIMPACT, but still make the trail
if( tr.surfaceFlags & SURF_NOIMPACT )
@@ -770,6 +774,9 @@ void areaZapFire( gentity_t *ent )
tent = G_TempEntity( enemy->s.pos.trBase, EV_TESLATRAIL );
VectorCopy( muzzle, tent->s.origin2 );
+
+ tent->s.generic1 = ent->s.number; //src
+ tent->s.clientNum = enemy->s.number; //dest
}
}
@@ -808,6 +815,9 @@ void directZapFire( gentity_t *ent )
VectorCopy( muzzle, tent->s.origin2 );
+ tent->s.generic1 = ent->s.number; //src
+ tent->s.clientNum = -1; //dest
+
// no explosion at end if SURF_NOIMPACT, but still make the trail
if( tr.surfaceFlags & SURF_NOIMPACT )
tent->s.eventParm = 255; // don't make the explosion at the end