summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index d0ba6dc..fa66979 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -401,11 +401,11 @@ int G_GetBuildPoints( const vec3_t pos, team_t team )
switch(team) {
case TEAM_ALIENS:
if ( !G_Overmind( ) ) return 0;
- value = level.alienBuildPoints;
+ value = level.alienBuildPoints - level.alienDeletedBuildPoints;
break;
case TEAM_HUMANS:
if ( !G_Reactor( ) ) return 0;
- value = level.humanBuildPoints;
+ value = level.humanBuildPoints - level.humanDeletedBuildPoints;
break;
default:
return 0;
@@ -3306,6 +3306,28 @@ void G_QueueBuildPoints( gentity_t *self )
gentity_t *powerEntity;
int queuePoints;
+ // if using build point deletion mode then delete BP permanently
+ // instead of queuing it
+ if( g_buildPointDeletion.integer )
+ {
+ int points = BG_Buildable( self->s.modelindex )->buildPoints;
+
+ switch( self->buildableTeam )
+ {
+ case TEAM_ALIENS:
+ level.alienDeletedBuildPoints += points;
+ level.alienNoBPFlash = qtrue;
+ break;
+
+ case TEAM_HUMANS:
+ level.humanDeletedBuildPoints += points;
+ level.humanNoBPFlash = qtrue;
+ break;
+ }
+
+ return;
+ }
+
queuePoints = G_QueueValue( self );
if( !queuePoints )