From 3c9a869327aecda255ffc48ba7a7f4bcf6b4544e Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Wed, 21 Oct 2009 23:45:17 +0000 Subject: * 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) --- src/game/g_buildable.c | 4 ++-- 1 file 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; -- cgit