summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-10-03 12:52:36 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:17 +0000
commit5a39a8c9ca0434cfb17f33a7ff4aef1c00585a48 (patch)
tree89d4e3657c72e3832779eae5dfa7a82d67456cab /src/game
parent0470e7d28aa35d0d277179ea60c31360b838ec89 (diff)
Queue buildpoints in main zone and unpowered buildables
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_buildable.c13
-rw-r--r--src/game/g_main.c4
2 files changed, 13 insertions, 4 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index dd81c992..40654f00 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -2520,7 +2520,6 @@ void G_QueueBuildPoints( gentity_t *self )
{
switch( powerEntity->s.modelindex )
{
- default:
case BA_H_REACTOR:
if( !level.humanBuildPointQueue )
level.humanNextQueueTime = level.time + g_humanBuildQueueTime.integer;
@@ -2540,9 +2539,19 @@ void G_QueueBuildPoints( gentity_t *self )
BG_Buildable( self->s.modelindex )->buildPoints;
}
break;
+
+ default:
+ break;
}
}
- break;
+ else
+ {
+ if( !level.humanBuildPointQueue )
+ level.humanNextQueueTime = level.time + g_humanBuildQueueTime.integer;
+
+ level.humanBuildPointQueue +=
+ BG_Buildable( self->s.modelindex )->buildPoints;
+ }
}
}
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 16a4093d..7b1ff789 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -1142,8 +1142,8 @@ void G_CalculateBuildPoints( void )
}
}
- level.humanBuildPoints = g_humanBuildPoints.integer;
- level.alienBuildPoints = g_alienBuildPoints.integer;
+ level.humanBuildPoints = g_humanBuildPoints.integer - level.humanBuildPointQueue;
+ level.alienBuildPoints = g_alienBuildPoints.integer - level.humanBuildPointQueue;
level.reactorPresent = qfalse;
level.overmindPresent = qfalse;