From 0cfc3bbfe7da1c26a6dc0646d5973e3a65878d2f Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Sun, 23 May 2010 19:11:12 +0000 Subject: * (bug 4638) Fix behavior of structure power when moving the reactor into repeaters' BP zones causes it to be providing more than its max power (Rezyn) --- src/game/g_buildable.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 5579be34..5bf063dc 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -267,14 +267,8 @@ qboolean G_FindPower( gentity_t *self, qboolean searchUnspawned ) } } - // If there were no power items nearby give up - if( closestPower ) - { - self->parentNode = closestPower; - return qtrue; - } - else - return qfalse; + self->parentNode = closestPower; + return self->parentNode != NULL; } /* @@ -1757,6 +1751,7 @@ void HRepeater_Think( gentity_t *self ) { // if the repeater is inside of another power zone then disappear G_Damage( self, NULL, NULL, NULL, NULL, self->health, 0, MOD_SUICIDE ); + return; } self->powered = reactor; -- cgit