diff options
author | Tim Angus <tim@ngus.net> | 2002-06-25 02:43:12 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2002-06-25 02:43:12 +0000 |
commit | 5a9bee68cd17b2b725528a7604ff7ebc18796225 (patch) | |
tree | e315aae9ad1a803dd18c7d3ca87f366a480e6aac /src/cgame/cg_weapons.c | |
parent | 6c1109ac122cf9a9da1c0f1f15af2a618a189541 (diff) |
Zap now seperate from Tesla
Diffstat (limited to 'src/cgame/cg_weapons.c')
-rw-r--r-- | src/cgame/cg_weapons.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 8909285b..cc5e745b 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -309,6 +309,35 @@ void CG_TeslaTrail( vec3_t start, vec3_t end, int srcENum, int destENum ) /* ========================== +CG_AlienZap +========================== +*/ +void CG_AlienZap( vec3_t start, vec3_t end, int srcENum, int destENum ) +{ + localEntity_t *le; + refEntity_t *re; + + //add a bunch of bolt segments + le = CG_AllocLocalEntity(); + re = &le->refEntity; + + le->leType = LE_LIGHTNING_BOLT; + le->startTime = cg.time; + le->endTime = cg.time + cg_alienZapTime.value; + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + re->customShader = cgs.media.lightningShader; + + le->srcENum = srcENum; + le->destENum = destENum; + le->vOffset = -4; + le->maxRange = BG_FindRangeForBuildable( BA_H_DEF3 ); + + VectorCopy( start, re->origin ); + VectorCopy( end, re->oldorigin ); +} + +/* +========================== CG_RocketTrail ========================== */ |