summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_weapon.c33
-rw-r--r--src/game/tremulous.h1
2 files changed, 23 insertions, 11 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index e02dd21..bc1491b 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -1015,7 +1015,7 @@ void poisonCloud( gentity_t *ent )
vec3_t range = { LEVEL1_PCLOUD_RANGE, LEVEL1_PCLOUD_RANGE, LEVEL1_PCLOUD_RANGE };
vec3_t mins, maxs;
int i, num;
- gentity_t *humanPlayer;
+ gentity_t *targ;
trace_t tr;
VectorAdd( ent->client->ps.origin, range, maxs );
@@ -1025,30 +1025,41 @@ void poisonCloud( gentity_t *ent )
num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES );
for( i = 0; i < num; i++ )
{
- humanPlayer = &g_entities[ entityList[ i ] ];
+ targ = &g_entities[ entityList[ i ] ];
- if( humanPlayer->client && humanPlayer->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
+ if( targ->client && targ->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
{
- if( BG_InventoryContainsUpgrade( UP_HELMET, humanPlayer->client->ps.stats ) )
+ if( BG_InventoryContainsUpgrade( UP_HELMET, targ->client->ps.stats ) )
continue;
- if( BG_InventoryContainsUpgrade( UP_BATTLESUIT, humanPlayer->client->ps.stats ) )
+ if( BG_InventoryContainsUpgrade( UP_BATTLESUIT, targ->client->ps.stats ) )
continue;
- trap_Trace( &tr, muzzle, NULL, NULL, humanPlayer->s.origin, humanPlayer->s.number, MASK_SOLID );
+ trap_Trace( &tr, muzzle, NULL, NULL, targ->s.origin, targ->s.number, MASK_SOLID );
//can't see target from here
if( tr.fraction < 1.0f )
continue;
- if( !( humanPlayer->client->ps.stats[ STAT_STATE ] & SS_POISONCLOUDED ) )
+ if( !( targ->client->ps.stats[ STAT_STATE ] & SS_POISONCLOUDED ) )
{
- humanPlayer->client->ps.stats[ STAT_STATE ] |= SS_POISONCLOUDED;
- humanPlayer->client->lastPoisonCloudedTime = level.time;
- humanPlayer->client->lastPoisonCloudedClient = ent;
- trap_SendServerCommand( humanPlayer->client->ps.clientNum, "poisoncloud" );
+ targ->client->ps.stats[ STAT_STATE ] |= SS_POISONCLOUDED;
+ targ->client->lastPoisonCloudedTime = level.time;
+ targ->client->lastPoisonCloudedClient = ent;
+ trap_SendServerCommand( targ->client->ps.clientNum, "poisoncloud" );
}
}
+
+ if( targ->client && targ->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
+ {
+ trap_Trace( &tr, muzzle, NULL, NULL, targ->s.origin, targ->s.number, MASK_SOLID );
+
+ if( tr.fraction < 1.0f )
+ continue;
+
+ targ->client->ps.stats[ STAT_STATE ] |= SS_BOOSTED;
+ targ->client->lastBoostedTime = MAX( targ->client->lastBoostedTime, level.time - BOOST_TIME + LEVEL1_PCLOUD_BOOST_TIME );
+ }
}
G_UnlaggedOff( );
}
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 239bb46..e1fd836 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -69,6 +69,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define LEVEL1_PCLOUD_RANGE 200.0f
#define LEVEL1_PCLOUD_REPEAT 2000
#define LEVEL1_PCLOUD_TIME 10000
+#define LEVEL1_PCLOUD_BOOST_TIME 5000
#define LEVEL2_CLAW_DMG ADM(40)
#define LEVEL2_CLAW_RANGE 96.0f