summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2002-01-03 02:18:17 +0000
committerTim Angus <tim@ngus.net>2002-01-03 02:18:17 +0000
commit8703e9bed50254db89f241801256ad77eea5b999 (patch)
tree37dec6bcbe2ca615b8b15e893aa8b59ad3624cc0 /src
parentf7a4ba355696c61033af3da80fbba6ef72e4900b (diff)
Fix stupid bug in stage buildable check
Diffstat (limited to 'src')
-rw-r--r--src/game/g_cmds.c7
1 files changed, 5 insertions, 2 deletions
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 ] );