From 7595c7cd7d70fb6dde7f731c4d27de17d5ea1ddd Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Fri, 2 Sep 2005 03:01:02 +0000 Subject: * Added width to zap trace * Hopefully fixed the "Ready" issues --- src/game/g_main.c | 4 +++- src/game/g_weapon.c | 9 +++++++-- src/game/tremulous.h | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/game/g_main.c b/src/game/g_main.c index ecb56723..4cde34b7 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -521,6 +521,8 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) trap_LocateGameData( level.gentities, level.num_entities, sizeof( gentity_t ), &level.clients[ 0 ].ps, sizeof( level.clients[ 0 ] ) ); + trap_SetConfigstring( CS_INTERMISSION, "0" ); + // parse the key/value pairs and spawn gentities G_SpawnEntitiesFromString( ); @@ -1564,7 +1566,7 @@ void CheckIntermissionExit( void ) if( cl->pers.connected != CON_CONNECTED ) continue; - if( cl->sess.sessionTeam == TEAM_SPECTATOR ) + if( cl->ps.stats[ STAT_PTEAM ] == PTE_NONE ) continue; if( g_entities[ cl->ps.clientNum ].r.svFlags & SVF_BOT ) diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 997d0f7a..ed1b67cb 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -1195,6 +1195,10 @@ void areaZapFire( gentity_t *ent ) trace_t tr; vec3_t end; gentity_t *traceEnt; + vec3_t mins, maxs; + + VectorSet( mins, -LEVEL2_AREAZAP_WIDTH, -LEVEL2_AREAZAP_WIDTH, -LEVEL2_AREAZAP_WIDTH ); + VectorSet( maxs, LEVEL2_AREAZAP_WIDTH, LEVEL2_AREAZAP_WIDTH, LEVEL2_AREAZAP_WIDTH ); // set aiming directions AngleVectors( ent->client->ps.viewangles, forward, right, up ); @@ -1203,7 +1207,8 @@ void areaZapFire( gentity_t *ent ) VectorMA( muzzle, LEVEL2_AREAZAP_RANGE, forward, end ); - trap_Trace( &tr, muzzle, NULL, NULL, end, ent->s.number, MASK_SHOT ); + trap_Trace( &tr, muzzle, mins, maxs, end, ent->s.number, MASK_SHOT ); + if( tr.surfaceFlags & SURF_NOIMPACT ) return; @@ -1259,7 +1264,7 @@ qboolean CheckPounceAttack( gentity_t *ent ) VectorMA( muzzle, LEVEL3_POUNCE_RANGE, forward, end ); - trap_Trace( &tr, muzzle, NULL, NULL, end, ent->s.number, MASK_SHOT ); + trap_Trace( &tr, muzzle, mins, maxs, end, ent->s.number, MASK_SHOT ); //miss if( tr.fraction >= 1.0 ) diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 1d994313..e1f30ed9 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -63,6 +63,7 @@ #define LEVEL2_CLAW_U_REPEAT 400 #define LEVEL2_AREAZAP_DMG ADM(80) #define LEVEL2_AREAZAP_RANGE 200.0f +#define LEVEL2_AREAZAP_WIDTH 15.0f #define LEVEL2_AREAZAP_REPEAT 3000 #define LEVEL2_AREAZAP_TIME 1000 #define LEVEL2_AREAZAP_MAX_TARGETS 3 -- cgit