Commits

Torr_Samaho committed 254a7c2

Added new MAPINFO flag "islobby". If a duel is made on a map with this flag, the countdown and the map reset are skipped, e.g. useful for a map selection map like AlexMan's duel16.

SVN r2005 (trunk)

Comments (0)

Files changed (5)

docs/Skulltag Version History.txt

 		- Fixed: If you tried to reconnect to a nonexistent server, you wouldn't get 3 retries.
 +	- The authentication mechanism for non-map related lumps now gives detailed warnings on which auto-loaded files contain which protected lumps. [Torr Samaho]
 +	- Added new CVAR sv_suddendeath (default true). If set to false, CTF or Skulltag games don't go into sudden death mode when the time limit is hit and no team has more points than all other teams. Instead the game is considered to be a draw. [Torr Samaho]
++	- Added new MAPINFO flag "islobby". If a duel is made on a map with this flag, the countdown and the map reset are skipped, e.g. useful for a map selection map like AlexMan's duel16. [Torr Samaho, SuperGod]
 -	- Fixed: The code to check the maximum allowed effective skin sprite width/height didn't work with UDMX under Linux. [Torr Samaho]
 -	- Fixed: For the purpose of sv_smartaim, players of different teams were considered to be friends in non-deathmatch based team game modes, e.g. CTF. [Torr Samaho, SuperGod]
 -	- Fixed: A client possibly crashed when the server instructed it to spawn blood of an actor the client doesn't know. [Torr Samaho]
 		// Two players are here now, begin the countdown!
 		if ( DUEL_CountActiveDuelers( ) == 2 )
 		{
-			if ( sv_duelcountdowntime > 0 )
+			// [BB] Skip countdown and map reset if the map is supposed to be a lobby.
+			if ( level.flags & LEVEL_ISLOBBY )
+				DUEL_SetState( DS_INDUEL );
+			else if ( sv_duelcountdowntime > 0 )
 				DUEL_StartCountdown(( sv_duelcountdowntime * TICRATE ) - 1 );
 			else
 				DUEL_StartCountdown(( 10 * TICRATE ) - 1 );
 	"allowrespawn",
 	"teamdamage",
 	"nobotnodes",	// [BC] Allow the prevention of spawning bot nodes (helpful for very large maps).
+	"islobby",	// [BB]
 	// new [GZDoom]
 	"fogdensity",
 	"outsidefogdensity",
 	{ MITYPE_SETFLAG,	LEVEL_ALLOWRESPAWN, 0 },
 	{ MITYPE_FLOAT,		lioffset(teamdamage), 0 },
 	{ MITYPE_SETFLAG,	LEVEL_NOBOTNODES, 0 },	// [BC]
+	{ MITYPE_SETFLAG,	LEVEL_ISLOBBY, 0 },	// [BB]
 	// new [GZDoom]
 	{ MITYPE_INT,		lioffset(fogdensity), 0 },
 	{ MITYPE_INT,		lioffset(outsidefogdensity), 0 },
 
 #define LEVEL_ALLOWRESPAWN			UCONST64(0x4000000000000)
 #define	LEVEL_NOBOTNODES			UCONST64(0x8000000000000)	// [BC] Level does not use bot nodes.
+// [BB] Ceartain game modes are supposed to behave differently on
+// the map. For example in duel mode the countdown and the map reset are skipped.
+#define	LEVEL_ISLOBBY			UCONST64(0x10000000000000)
 
 
 

src/joinqueue.cpp

 			// Begin the duel countdown.
 			if ( duel )
 			{
-				if ( sv_duelcountdowntime > 0 )
+				// [BB] Skip countdown and map reset if the map is supposed to be a lobby.
+				if ( level.flags & LEVEL_ISLOBBY )
+					DUEL_SetState( DS_INDUEL );
+				else if ( sv_duelcountdowntime > 0 )
 					DUEL_StartCountdown(( sv_duelcountdowntime * TICRATE ) - 1 );
 				else
 					DUEL_StartCountdown(( 10 * TICRATE ) - 1 );