summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2004-03-28 02:07:27 +0000
committerTim Angus <tim@ngus.net>2004-03-28 02:07:27 +0000
commit36ceed63fed29968e418ac4d4bd60d1c1a14bec8 (patch)
treec0b4a65ac14807e99c9e3e34ed003aff7a15f8c0 /src
parent1c686ae22446e294c796d8bebf5cc1693cbc6235 (diff)
* Fixed bug where upgraded chimera's electrical attack sometimes didn't work
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_weapons.c6
-rw-r--r--src/game/bg_public.h1
-rw-r--r--src/game/g_local.h1
-rw-r--r--src/game/g_weapon.c6
4 files changed, 7 insertions, 7 deletions
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index 87534f23..d16d2f5f 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -180,7 +180,7 @@ void CG_TeslaTrail( vec3_t start, vec3_t end, int srcENum, int destENum )
le->srcENum = srcENum;
le->destENum = destENum;
le->vOffset = 28;
- le->maxRange = BG_FindRangeForBuildable( BA_H_TESLAGEN ) * M_SQRT2;
+ le->maxRange = BG_FindRangeForBuildable( BA_H_TESLAGEN ) * M_ROOT3;
VectorCopy( start, re->origin );
VectorCopy( end, re->oldorigin );
@@ -208,9 +208,9 @@ void CG_AlienZap( vec3_t start, vec3_t end, int srcENum, int destENum )
le->srcENum = srcENum;
le->destENum = destENum;
- le->vOffset = -4;
+ le->vOffset = 6.0f;
- le->maxRange = CHIMERA_AREAZAP_RANGE;
+ le->maxRange = CHIMERA_AREAZAP_RANGE * M_ROOT3;
VectorCopy( start, re->origin );
VectorCopy( end, re->oldorigin );
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index f00ad321..6a279cf5 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -1258,6 +1258,7 @@ void ProjectPointOntoVector( vec3_t point, vec3_t vStart,
float VectorDistance( vec3_t v1, vec3_t v2 );
// done.
+#define M_ROOT3 1.732050808f
float VectorMinComponent( vec3_t v );
float VectorMaxComponent( vec3_t v );
float round( float v );
diff --git a/src/game/g_local.h b/src/game/g_local.h
index fdffbbb6..db6e64d6 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -579,7 +579,6 @@ void G_Physics( gentity_t *ent, int msec );
// g_buildable.c
//
-#define M_ROOT3 1.732050808f
#define MAX_ALIEN_BBOX 25
typedef enum
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 4b6f45d6..1aa7504c 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -921,8 +921,8 @@ void areaZapFire( gentity_t *ent )
trace_t tr;
int damage;
- VectorAdd( muzzle, range, maxs );
- VectorSubtract( muzzle, range, mins );
+ VectorAdd( ent->client->ps.origin, range, maxs );
+ VectorSubtract( ent->client->ps.origin, range, mins );
num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES );
for( i = 0; i < num; i++ )
@@ -960,7 +960,7 @@ void areaZapFire( gentity_t *ent )
// send railgun beam effect
tent = G_TempEntity( enemy->s.pos.trBase, EV_ALIENZAP );
- VectorCopy( muzzle, tent->s.origin2 );
+ VectorCopy( ent->client->ps.origin, tent->s.origin2 );
tent->s.generic1 = ent->s.number; //src
tent->s.clientNum = enemy->s.number; //dest