diff options
author | Tony J. White <tjw@tjw.org> | 2006-10-09 15:09:31 +0000 |
---|---|---|
committer | Tony J. White <tjw@tjw.org> | 2006-10-09 15:09:31 +0000 |
commit | a3b376bb1d4ef69436e2a28d76de62289db9c6d8 (patch) | |
tree | f026c2752dec51b969ed436c89021dbd9c9f6048 /src | |
parent | e6febd833c2e99780d0a18bed33b116bf6d032f2 (diff) |
* (bug 2845) when overmind is killed under certain circumstances, buildings
could remain active and new buildings could be built. (Christophe Cavalaria)
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_buildable.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index b9859258..443d8c2c 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2331,7 +2331,7 @@ void G_BuildableThink( gentity_t *ent, int msec ) //pack health, power and dcc //toggle spawned flag for buildables - if( !ent->spawned ) + if( !ent->spawned && ent->health > 0 ) { if( ent->buildTime + bTime < level.time ) ent->spawned = qtrue; @@ -2357,7 +2357,7 @@ void G_BuildableThink( gentity_t *ent, int msec ) { ent->time1000 -= 1000; - if( !ent->spawned ) + if( !ent->spawned && ent->health > 0 ) ent->health += (int)( ceil( (float)bHealth / (float)( bTime * 0.001 ) ) ); else if( ent->biteam == BIT_ALIENS && ent->health > 0 && ent->health < bHealth && bRegen && ( ent->lastDamageTime + ALIEN_REGEN_DAMAGE_TIME ) < level.time ) @@ -2496,12 +2496,13 @@ itemBuildError_t G_itemFits( gentity_t *ent, buildable_t buildable, int distance contents & CONTENTS_NOALIENBUILD || contents & CONTENTS_NOBUILD ) reason = IBE_PERMISSION; - //look for a hivemind + //look for an Overmind 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_A_OVERMIND && tempent->spawned ) + if( tempent->s.modelindex == BA_A_OVERMIND && tempent->spawned && + tempent->health > 0 ) break; } |