# HG changeset patch
# User auratoostronk
# Date 1688583531 25200
#      Wed Jul 05 11:58:51 2023 -0700
# Node ID ef6418f63031a5aa871e2f72883fc4a15d3a4b63
# Parent  33c4c09c65988e83f75d789f7cd7f8ef539a55e1
Fixed a bug where flags in CTF could be captured after time limit was hit (Fixes issue 2070).

diff -r 33c4c09c6598 -r ef6418f63031 src/g_shared/a_flags.cpp
--- a/src/g_shared/a_flags.cpp	Sun Jun 25 15:45:08 2023 -0400
+++ b/src/g_shared/a_flags.cpp	Wed Jul 05 11:58:51 2023 -0700
@@ -437,6 +437,10 @@
 
 		if (( TEAM_GetSimpleCTFSTMode( )) && ( NETWORK_InClientMode() == false ))
 		{
+			//[NS] Do not allow scoring when time limit is hit
+			if (!GAMEMODE_IsGameInProgress())
+				return (Super::HandlePickup(pItem));
+
 			// Give his team a point.
 			TEAM_SetPointCount( Owner->player->Team, TEAM_GetPointCount( Owner->player->Team ) + 1, true );
 			PLAYER_SetPoints ( Owner->player, Owner->player->lPointCount + 1 );
