From 8703e9bed50254db89f241801256ad77eea5b999 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Thu, 3 Jan 2002 02:18:17 +0000 Subject: Fix stupid bug in stage buildable check --- src/game/g_cmds.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 6c9e457c..9d307a09 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2155,16 +2155,19 @@ void Cmd_Build_f( gentity_t *ent ) weapon_t weapon; float dist; vec3_t origin; + pTeam_t team; trap_Argv( 1, s, sizeof( s ) ); buildable = BG_FindBuildNumForName( s ); + team = ent->client->ps.stats[ STAT_PTEAM ]; if( buildable != BA_NONE && - ( 1 << ent->client->ps.weapon ) & BG_FindBuildWeaponForBuildable( buildable ) && + ( ( 1 << ent->client->ps.weapon ) & BG_FindBuildWeaponForBuildable( buildable ) ) && !( ent->client->ps.stats[ STAT_STATE ] & SS_INFESTING ) && !( ent->client->ps.stats[ STAT_STATE ] & SS_HOVELING ) && - BG_FindStagesForBuildable( buildable, g_humanStage.integer ) ) + ( ( team == PTE_ALIENS && BG_FindStagesForBuildable( buildable, g_alienStage.integer ) ) || + ( team == PTE_HUMANS && BG_FindStagesForBuildable( buildable, g_humanStage.integer ) ) ) ) { dist = BG_FindBuildDistForClass( ent->client->ps.stats[ STAT_PCLASS ] ); -- cgit