Пример #1
0
CGameRules *InstallGameRules( void )
{
	SERVER_COMMAND( "exec game.cfg\n" );
	SERVER_EXECUTE( );

	if ( !gpGlobals->deathmatch )
	{
		// generic half-life
		g_teamplay = 0;
		return new CHalfLifeRules;
	}
	else
	{
		if ( teamplay.value > 0 )
		{
			// teamplay

			g_teamplay = 1;
			return new CHalfLifeTeamplay;
		}
		if ((int)gpGlobals->deathmatch == 1)
		{
			// vanilla deathmatch
			g_teamplay = 0;
			return new CHalfLifeMultiplay;
		}
		else
		{
			// vanilla deathmatch??
			g_teamplay = 0;
			return new CHalfLifeMultiplay;
		}
	}
}
Пример #2
0
CGameRules *InstallGameRules()
{
	SERVER_COMMAND("exec game.cfg\n");
	SERVER_EXECUTE();

	if (!gpGlobals->deathmatch)
		return new CHalfLifeTraining;

	return new CHalfLifeMultiplay;
}
Пример #3
0
CGameRules* InstallGameRules()
{
	SERVER_COMMAND( "exec game.cfg\n" );
	SERVER_EXECUTE();

	g_pGameRules = CreateGameRules();

	g_pGameRules->OnCreate();

	return g_pGameRules;
}
Пример #4
0
/* <ada23> ../cstrike/dlls/gamerules.cpp:157 */
NOBODY __declspec(naked) CGameRules *InstallGameRules(void)
{
	__asm
	{
		jmp pInstallGameRules
	}
#if 0
	SERVER_COMMAND("exec game.cfg\n");
	SERVER_EXECUTE();

	if (!gpGlobals->deathmatch)
	{
		return new CHalfLifeTraining;
	}

	return new CHalfLifeMultiplay;
#endif
}
Пример #5
0
CGameRules *InstallGameRules( void )
{
	SERVER_COMMAND( "exec game.cfg\n" );
	SERVER_EXECUTE( );

	if ( !gpGlobals->deathmatch )
	{
		// generic half-life
		return new CHalfLifeRules;
	}
	else
	{
		// Discwar's always in teamplay mode.
		//CVAR_SET_FLOAT( "mp_teamplay", 1 );
		//return new CHalfLifeTeamplay;
		return new CHalfLifeMultiplay;
	}
}