summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2001-04-01 03:26:55 +0000
committerTim Angus <tim@ngus.net>2001-04-01 03:26:55 +0000
commit014043dcd74651283e1f2c1b2f8ac00f61676e4a (patch)
tree50485e4b0cea8d1fecf1c75d127ac2c7981b7917 /src/game
parent8984c48f6db7d5705af9cdf7eeeb2ffce6ca1a21 (diff)
Fixed some stupid bugs
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_buildable.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index f73a0b5e..7d8e6343 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -686,20 +686,36 @@ itemBuildError_t itemFits( gentity_t *ent, buildable_t buildable, int distance )
!(
!Q_stricmp( closestPower->classname, "team_human_repeater" ) &&
( minDistance <= REPEATER_BASESIZE ) &&
+ ( buildable == BA_H_SPAWN ) &&
+ closestPower->powered
+ ) &&
+ !(
+ !Q_stricmp( closestPower->classname, "team_human_repeater" ) &&
+ ( minDistance <= REPEATER_BASESIZE ) &&
closestPower->active &&
closestPower->powered
)
)
{
- if( buildable != BA_H_REACTOR )
+ if( buildable != BA_H_REACTOR && buildable != BA_H_REPEATER )
reason = IBE_REPEATER;
if( buildable == BA_H_SPAWN )
reason = IBE_RPLWARN;
- else if( buildable == BA_H_REPEATER )
- reason = IBE_RPTWARN;
}
+ if( buildable == BA_H_REPEATER )
+ {
+ for ( i = 1, tempent = g_entities + i; i < level.num_entities; i++, tempent++ )
+ {
+ if( !Q_stricmp( tempent->classname, "team_human_reactor" ) )
+ break;
+ }
+
+ if( i >= level.num_entities )
+ reason = IBE_RPTWARN;
+ }
+
if( BG_FindUniqueTestForBuildable( buildable ) )
{
for ( i = 1, tempent = g_entities + i; i < level.num_entities; i++, tempent++ )