Commits

Torr_Samaho committed 09ce837

Fixed: A map reset in Domination (possible with the new ACS command ResetMap in combination with the GAMEMODE lump) didn't reset ownership of the control points.

  • Participants
  • Parent commits 9d297e9

Comments (0)

Files changed (3)

File src/g_game.cpp

 	if ( GAMEMODE_GetFlags( GAMEMODE_GetCurrentMode( )) & GMF_MAPRESET_RESETS_MAPTIME )
 		level.time = 0;
 
+	// [BB] Reset special stuff for the current gamemode, like control point ownership in Domination.
+	GAMEMODE_ResetSpecalGamemodeStates();
+
 	// [BB] We are going to reset the map now, so any request for a reset is fulfilled.
 	g_bResetMap = false;
 

File src/gamemode.cpp

 
 #include "cooperative.h"
 #include "deathmatch.h"
+#include "domination.h"
 #include "doomstat.h"
 #include "d_event.h"
 #include "gamemode.h"
 
 //*****************************************************************************
 //
+void GAMEMODE_ResetSpecalGamemodeStates ( void )
+{
+	// [BB] If playing Domination reset ownership, even the clients can do this.
+	if ( domination )
+		DOMINATION_Reset();
+}
+
+//*****************************************************************************
+//
 void GAMEMODE_DisplayStandardMessage( const char *pszMessage, const bool bInformClients )
 {
 	if ( NETWORK_GetState( ) != NETSTATE_SERVER )

File src/gamemode.h

 unsigned int	GAMEMODE_GetMaxLives( void );
 void		GAMEMODE_AdjustActorSpawnFlags ( AActor *pActor );
 void		GAMEMODE_SpawnSpecialGamemodeThings ( void );
+void		GAMEMODE_ResetSpecalGamemodeStates ( void );
 
 // [BB] This function doesn't really belong here. Find a better place for it.
 void		GAMEMODE_DisplayStandardMessage( const char *pszMessage, const bool bInformClients = false );