summaryrefslogtreecommitdiff
path: root/src/cgame/cg_weapons.c
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/cgame/cg_weapons.c
parentc37938cbbd38597caeda1f05f7b36b0c03f2c27e (diff)
Fancy teslagen effects
Diffstat (limited to 'src/cgame/cg_weapons.c')
-rw-r--r--src/cgame/cg_weapons.c40
1 files changed, 7 insertions, 33 deletions
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index 0c24001a..8909285b 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -283,43 +283,11 @@ void CG_RailTrail( vec3_t start, vec3_t end )
CG_TeslaTrail
==========================
*/
-void CG_TeslaTrail( vec3_t start, vec3_t end )
+void CG_TeslaTrail( vec3_t start, vec3_t end, int srcENum, int destENum )
{
localEntity_t *le;
refEntity_t *re;
-
-/* start[ 2 ] += 12; //nudge up a bit so the bolt comes from the sphere
-
- //add a bunch of bolt segments
- le = CG_AllocLocalEntity();
- re = &le->refEntity;
-
- le->leType = LE_FADE_RGB;
- le->startTime = cg.time;
- le->endTime = cg.time + cg_teslaTrailTime.value;
- le->lifeRate = 1.0 / ( le->endTime - le->startTime );
-
- re->shaderTime = cg.time / 1000.0f;
- re->reType = RT_RAIL_CORE;
- re->customShader = cgs.media.lightningShader;
-
- VectorCopy( start, re->origin );
- VectorCopy( end, re->oldorigin );
-
- re->shaderRGBA[0] = 255;
- re->shaderRGBA[1] = 255;
- re->shaderRGBA[2] = 255;
- re->shaderRGBA[3] = 255;
-
- le->color[0] = 1.0f;
- le->color[1] = 1.0f;
- le->color[2] = 1.0f;
- le->color[3] = 1.0f;
-
- AxisClear( re->axis );*/
- start[ 2 ] += 12; //nudge up a bit so the bolt comes from the sphere
-
//add a bunch of bolt segments
le = CG_AllocLocalEntity();
re = &le->refEntity;
@@ -328,6 +296,12 @@ void CG_TeslaTrail( vec3_t start, vec3_t end )
le->startTime = cg.time;
le->endTime = cg.time + cg_teslaTrailTime.value;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
+ re->customShader = cgs.media.lightningShader;
+
+ le->srcENum = srcENum;
+ le->destENum = destENum;
+ le->vOffset = 28;
+ le->maxRange = BG_FindRangeForBuildable( BA_H_DEF3 );
VectorCopy( start, re->origin );
VectorCopy( end, re->oldorigin );