summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-11-27 00:00:16 +0000
committerTim Angus <tim@ngus.net>2005-11-27 00:00:16 +0000
commit046697c4b9369c02e730f1e16617e09876619864 (patch)
tree738d39079d13eb84b4d932f2a032e61cae570dbd /src/game/g_buildable.c
parent3460e8bf9381c61e1bef98b78d320a8bd52b7f5f (diff)
* Fixed death by poison MOD s/antitox/medkit/
* Fixed Marauders momentarily disappearing when wall jumping * Fixed a potential crash bug involving the use of generic1 * Fixed being able to build multiple coincident repeaters if there is no reactor * Fixed incorrect message when invoking "buy ammo" with an energy weapon and no reactor present * Fixed invoking "reload" during a weapon reload causing an unnecessary reload * Fixed aliens having the wrong blood colour when shot with a las gun * Fixed hovel causing invisible builders
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index d83e76b7..5d014a22 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1227,6 +1227,7 @@ void AHovel_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
//prevent lerping
builder->client->ps.eFlags ^= EF_TELEPORT_BIT;
+ builder->client->ps.eFlags &= ~EF_NODRAW;
G_SetOrigin( builder, newOrigin );
VectorCopy( newOrigin, builder->client->ps.origin );
@@ -2545,7 +2546,26 @@ itemBuildError_t G_itemFits( gentity_t *ent, buildable_t buildable, int distance
}
if( i >= level.num_entities )
- reason = IBE_RPTWARN;
+ {
+ //no reactor present
+
+ //check for other nearby repeaters
+ for ( i = 1, tempent = g_entities + i; i < level.num_entities; i++, tempent++ )
+ {
+ if( tempent->s.eType != ET_BUILDABLE )
+ continue;
+
+ if( tempent->s.modelindex == BA_H_REPEATER &&
+ Distance( tempent->s.origin, entity_origin ) < REPEATER_BASESIZE )
+ {
+ reason = IBE_RPTWARN2;
+ break;
+ }
+ }
+
+ if( reason == IBE_NONE )
+ reason = IBE_RPTWARN;
+ }
else if( G_isPower( entity_origin ) )
reason = IBE_RPTWARN2;
}