core/PlayerManager.cpp
changeset 3961 0dc477c29792
parent 3944 86d78f0e7a1c
child 4135 081e6f102091
     1.1 --- a/core/PlayerManager.cpp	Mon Jul 29 10:03:18 2013 -0400
     1.2 +++ b/core/PlayerManager.cpp	Sun Jul 21 11:53:56 2013 -0400
     1.3 @@ -266,7 +266,7 @@
     1.4  #endif
     1.5  {
     1.6  	static ConVar *tv_enable = icvar->FindVar("tv_enable");
     1.7 -#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
     1.8 +#if SOURCE_ENGINE == SE_TF2
     1.9  	static ConVar *replay_enable = icvar->FindVar("replay_enable");
    1.10  #endif
    1.11  
    1.12 @@ -276,7 +276,7 @@
    1.13  	ICommandLine *commandLine = g_HL2.GetValveCommandLine();
    1.14  	m_bIsSourceTVActive = (tv_enable && tv_enable->GetBool() && (!commandLine || commandLine->FindParm("-nohltv") == 0));
    1.15  	m_bIsReplayActive = false;
    1.16 -#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
    1.17 +#if SOURCE_ENGINE == SE_TF2
    1.18  	m_bIsReplayActive = (replay_enable && replay_enable->GetBool());
    1.19  #endif
    1.20  	m_PlayersSinceActive = 0;
    1.21 @@ -634,17 +634,14 @@
    1.22  		int newCount = m_PlayersSinceActive + 1;
    1.23  
    1.24  		int userId = GetPlayerUserId(pEntity);
    1.25 -#if (SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_LEFT4DEAD2)
    1.26 +#if (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2)
    1.27  		static ConVar *tv_name = icvar->FindVar("tv_name");
    1.28  #endif
    1.29 -#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
    1.30 +#if SOURCE_ENGINE == SE_TF2
    1.31  		static ConVar *replay_name = icvar->FindVar("replay_name");
    1.32  #endif
    1.33 -#if SOURCE_ENGINE == SE_LEFT4DEAD2
    1.34 -		static bool bIsNuclearDawn = (strcmp(g_SourceMod.GetGameFolderName(), "nucleardawn") == 0);
    1.35 -#endif
    1.36  
    1.37 -#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
    1.38 +#if SOURCE_ENGINE == SE_TF2
    1.39  		if (m_bIsReplayActive && newCount == 1
    1.40  			&& (m_ReplayUserId == userId
    1.41  				|| (replay_name && strcmp(playername, replay_name->GetString()) == 0) || (replay_name && replay_name->GetString()[0] == 0 && strcmp(playername, "unnamed") == 0)
    1.42 @@ -662,15 +659,8 @@
    1.43  			&& (m_SourceTVUserId == userId
    1.44  #if SOURCE_ENGINE == SE_CSGO
    1.45  				|| strcmp(playername, "GOTV") == 0
    1.46 -#elif (SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_LEFT4DEAD2)
    1.47 -#if SOURCE_ENGINE == SE_LEFT4DEAD2
    1.48 -				|| (bIsNuclearDawn && ( true
    1.49 -#endif // SE_LEFT4DEAD2
    1.50 +#elif (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_NUCLEARDAWN)
    1.51  				|| (tv_name && strcmp(playername, tv_name->GetString()) == 0) || (tv_name && tv_name->GetString()[0] == 0 && strcmp(playername, "unnamed") == 0)
    1.52 -#if SOURCE_ENGINE == SE_LEFT4DEAD2
    1.53 -					))
    1.54 -				|| (!bIsNuclearDawn && strcmp(playername, "SourceTV") == 0)
    1.55 -#endif // SE_LEFT4DEAD2
    1.56  #else
    1.57  				|| strcmp(playername, "SourceTV") == 0
    1.58  #endif