diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2009-10-21 23:45:17 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:59 +0000 |
commit | 3c9a869327aecda255ffc48ba7a7f4bcf6b4544e (patch) | |
tree | 9cecd8c989ebb22cb90e0f6f477ec3f68bbf2c61 /src/game/g_buildable.c | |
parent | 4644c1e65a337db1a94208162465908e1e56a0d6 (diff) |
* Prevent buying energy ammo from a repeater while the reactor is dead (thanks Hibby)
* Prevent building a repeater while the reactor is dead but not exploded yet (thanks Byron Johnson)
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index eb251ca0..ee3a02a2 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -1937,7 +1937,7 @@ void HRepeater_Think( gentity_t *self ) if( ent->s.eType != ET_BUILDABLE ) continue; - if( ent->s.modelindex == BA_H_REACTOR && ent->spawned ) + if( ent->s.modelindex == BA_H_REACTOR && ent->spawned && ent->health > 0 ) reactor = qtrue; } } @@ -3422,7 +3422,7 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance //check that there is a parent reactor when building a repeater if( buildable == BA_H_REPEATER ) { - tempent = G_FindBuildable( BA_H_REACTOR ); + tempent = G_Reactor( ); if( tempent == NULL ) // No reactor reason = IBE_RPTNOREAC; |