summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_active.c2
-rw-r--r--src/game/g_cmds.c2
-rw-r--r--src/game/g_main.c12
3 files changed, 13 insertions, 3 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 697800f6..fa18c30c 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -462,7 +462,7 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
client->ps.speed = client->pers.flySpeed;
client->ps.stats[ STAT_STAMINA ] = 0;
client->ps.stats[ STAT_MISC ] = 0;
- client->ps.stats[ STAT_BUILDABLE ] = 0;
+ client->ps.stats[ STAT_BUILDABLE ] = BA_NONE;
client->ps.stats[ STAT_CLASS ] = PCL_NONE;
client->ps.weapon = WP_NONE;
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 06363c7a..449dc8d7 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -2365,7 +2365,7 @@ void Cmd_Build_f( gentity_t *ent )
dynMenu_t err;
dist = BG_Class( ent->client->ps.stats[ STAT_CLASS ] )->buildDist;
- ent->client->ps.stats[ STAT_BUILDABLE ] = 0;
+ ent->client->ps.stats[ STAT_BUILDABLE ] = BA_NONE;
//these are the errors displayed when the builder first selects something to use
switch( G_CanBuild( ent, buildable, dist, origin ) )
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 765dfce4..e28effd4 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -1145,14 +1145,24 @@ void G_CalculateBuildPoints( void )
{
G_LogPrintf( "Beginning Sudden Death\n" );
trap_SendServerCommand( -1, "cp \"Sudden Death!\"" );
+ trap_SendServerCommand( -1, "print \"Beginning Sudden Death.\n\"" );
level.suddenDeathWarning = TW_PASSED;
G_ClearDeconMarks( );
+
+ // Clear blueprints, or else structs that cost 0 BP can still be built after SD
+ for( i = 0; i < level.maxclients; i++ )
+ {
+ if( g_entities[ i ].client->ps.stats[ STAT_BUILDABLE ] != BA_NONE )
+ g_entities[ i ].client->ps.stats[ STAT_BUILDABLE ] = BA_NONE;
+ }
}
else if( G_TimeTilSuddenDeath( ) <= SUDDENDEATHWARNING &&
level.suddenDeathWarning < TW_IMMINENT )
{
trap_SendServerCommand( -1, va( "cp \"Sudden Death in %d seconds!\"",
- (int)(G_TimeTilSuddenDeath() / 1000 ) ) );
+ (int)( G_TimeTilSuddenDeath( ) / 1000 ) ) );
+ trap_SendServerCommand( -1, va( "print \"Sudden Death will begin in %d seconds.\n\"",
+ (int)( G_TimeTilSuddenDeath( ) / 1000 ) ) );
level.suddenDeathWarning = TW_IMMINENT;
}