//
//	Name: CreateGameRule( GameModeID_enum GameMode )
//	Author: Hekar Khani
//	Description: Initializes the gamerules based on
//			selected argument and enabled gamemodes
//	Notes:
//
void CreateGameRule( GameModeID_enum GameMode )
{
	Msg("=================================================\n");
	Msg("[LF] Gamemode: ");
	switch( GameMode )
	{
//-------------------------------------------------
#ifdef MOD_SF132
	case GAMEMODE_SF132:
		CreateGameRulesObject( "CSF132GameRules" );
		Msg("Sourceforts 132");
		break;
#endif // MOD_SF132
//-------------------------------------------------
#ifdef MOD_CLASSIC
	case GAMEMODE_CLASSIC:
		CreateGameRulesObject( "CClassicGameRules" );
		Msg("CTF\n");
		break;
#endif // MOD_CLASSIC
	case GAMEMODE_DOM:
		CreateGameRulesObject( "CDomGameRules" );
		Msg("Domination\n");
		break;
//-------------------------------------------------
	default:
//-------------------------------------------------
#ifdef MOD_SF132
		// Check if the mapname is prefixed as a SF132 map and use
		// the 132 gamerules if so
		if ( Q_strstr( gpGlobals->mapname.ToCStr(), "sf132_" ) )
		{
			CreateGameRulesObject( "CSF132GameRules" );
			SDKGameRules()->SetSourcefortsMap( true );
			Msg("Sourceforts 132\n");
		}
		else
#endif // MOD_SF132
//-------------------------------------------------
#ifdef MOD_CLASSIC
		{
			// The Classic gamerules work with 194 
			// and CTF based 195 maps
			CreateGameRulesObject( "CClassicGameRules" );
			SDKGameRules()->SetSourcefortsMap( true );
			Msg("Sourceforts 194\n");
		}
#endif // MOD_CLASSIC
//-------------------------------------------------
		// This "break" is here in case MOD_SF132
		// is enabled and MOD_CLASSIC is disabled
		break;
	}
	Msg("=================================================\n");

	Assert( g_pGameRules );
	g_pGameRules->Init();
}
//=========================================================
// Inicia e instala las reglas del juego.
//=========================================================
void InstallGameRules()
{
    // Modo Coop
    if ( gpGlobals->coop )
        CreateGameRulesObject("CSCPCoopGameRules");

    // Modo Historia
    else
        CreateGameRulesObject("CSCPGameRules");
}
Exemplo n.º 3
0
//=========================================================
// instantiate the proper game rules object
//=========================================================
void InstallGameRules()
{
#ifdef HL2_EPISODIC
	if ( gamerules_survival.GetBool() )
	{
		// Survival mode
		CreateGameRulesObject( "CHalfLife2Survival" );
	}
	else
#endif
	{
		// generic half-life
		CreateGameRulesObject( "CHalfLife2" );
	}
}
Exemplo n.º 4
0
//=========================================================
// instantiate the proper game rules object
//=========================================================
void InstallGameRules()
{
	InitializeMenus();

	// teamplay
	CreateGameRulesObject( "CTeamFortress" );
}
//=========================================================
// instantiate the proper game rules object
//=========================================================
void InstallGameRules()
{
    if ( !gpGlobals->deathmatch )
    {
        CreateGameRulesObject( "CPortalGameRules" );
        return;
    }
    else
    {
        if ( teamplay.GetInt() > 0 )
        {
            // teamplay
            CreateGameRulesObject( "CTeamplayRules" );
        }
        else
        {
            // vanilla deathmatch
            CreateGameRulesObject( "CMultiplayRules" );
        }
    }
}
Exemplo n.º 6
0
//=========================================================
// instantiate the proper game rules object
//=========================================================
void InstallGameRules()
{
	// vanilla deathmatch
	CreateGameRulesObject( "CHL2MPRules" );
}
Exemplo n.º 7
0
//=========================================================
// instantiate the proper game rules object
//=========================================================
void InstallGameRules()
{
	CreateGameRulesObject( "CSDKGameRules" );
}
Exemplo n.º 8
0
//=========================================================
// instantiate the proper game rules object
//=========================================================
void InstallGameRules()
{
    CreateGameRulesObject("CMomentum");
}