summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_public.h3
-rw-r--r--src/game/g_buildable.c10
2 files changed, 12 insertions, 1 deletions
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 0ea1ac63..038dd86a 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -451,9 +451,10 @@ typedef enum
BIT_NUM_TEAMS
} buildableTeam_t;
-#define B_HEALTH_BITS 12
+#define B_HEALTH_BITS 11
#define B_HEALTH_MASK ((1<<B_HEALTH_BITS)-1)
+#define B_REMOVED_TOGGLEBIT 0x00000800
#define B_MARKED_TOGGLEBIT 0x00001000
#define B_SPAWNED_TOGGLEBIT 0x00002000
#define B_POWERED_TOGGLEBIT 0x00004000
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 9aa6c9a7..22a37455 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -2434,6 +2434,7 @@ void G_BuildableThink( gentity_t *ent, int msec )
int bHealth = BG_FindHealthForBuildable( ent->s.modelindex );
int bRegen = BG_FindRegenRateForBuildable( ent->s.modelindex );
int bTime = BG_FindBuildTimeForBuildable( ent->s.modelindex );
+ int i;
//pack health, power and dcc
@@ -2461,6 +2462,15 @@ void G_BuildableThink( gentity_t *ent, int msec )
if( ent->deconstruct )
ent->s.generic1 |= B_MARKED_TOGGLEBIT;
+ for( i = 0; i < level.numBuildablesForRemoval; i++ )
+ {
+ if( ent->s.number == level.markedBuildables[ i ]->s.number )
+ {
+ ent->s.generic1 |= B_REMOVED_TOGGLEBIT;
+ break;
+ }
+ }
+
ent->time1000 += msec;
if( ent->time1000 >= 1000 )