Added support for Dark Messiah engine and game. (no bug, r=me).
authorScott Ehlert <ds@alliedmods.net>
Wed Feb 18 01:38:23 2009 -0600 (2009-02-18)
changeset 637b66489d8aedc
parent 636 1ec92bdb4a04
child 639 5b691c4b0849
Added support for Dark Messiah engine and game. (no bug, r=me).

The development of this feature would not be possible without the support of the following people from the game's community:
Dylan Riggs, Carl Pettengill, Ed Moreland, and Christian.
core/ISmmPluginExt.h
core/metamod.cpp
core/metamod_console.cpp
core/metamod_provider.h
core/metamod_util.cpp
core/metamod_util.h
core/msvc9/mm_core.sln
core/msvc9/mm_core.vcproj
core/provider/console.cpp
core/provider/console.h
core/provider/provider_ep2.cpp
core/provider/vsp_listener.cpp
core/provider/vsp_listener.h
core/vsp_bridge.cpp
loader/gamedll.cpp
loader/loader.cpp
loader/loader.h
loader/serverplugin.cpp
sample_mm/engine_wrappers.h
sample_mm/msvc8/sample_mm.sln
sample_mm/msvc8/sample_mm.vcproj
sample_mm/msvc9/sample_mm.sln
sample_mm/msvc9/sample_mm.vcproj
sample_mm/sample_mm.cpp
sample_mm/sample_mm.h
stub_mm/msvc8/stub_mm.sln
stub_mm/msvc8/stub_mm.vcproj
stub_mm/msvc9/stub_mm.sln
stub_mm/msvc9/stub_mm.vcproj
support/buildbot/startbuild.pl
support/changelog.txt
     1.1 --- a/core/ISmmPluginExt.h	Mon Feb 16 18:13:31 2009 -0500
     1.2 +++ b/core/ISmmPluginExt.h	Wed Feb 18 01:38:23 2009 -0600
     1.3 @@ -42,6 +42,7 @@
     1.4  #define SOURCE_ENGINE_EPISODEONE		2				/**< Episode 1 Source Engine (second major SDK) */
     1.5  #define SOURCE_ENGINE_ORANGEBOX			3				/**< Orange Box Source Engine (third major SDK) */
     1.6  #define SOURCE_ENGINE_LEFT4DEAD			4				/**< Left 4 Dead */
     1.7 +#define SOURCE_ENGINE_DARKMESSIAH		5				/**< Dark Messiah Multiplayer (based on original engine) */
     1.8  
     1.9  #define METAMOD_PLAPI_VERSION			14				/**< Version of this header file */
    1.10  #define METAMOD_PLAPI_NAME				"ISmmPlugin"	/**< Name of the plugin interface */
     2.1 --- a/core/metamod.cpp	Mon Feb 16 18:13:31 2009 -0500
     2.2 +++ b/core/metamod.cpp	Wed Feb 18 01:38:23 2009 -0600
     2.3 @@ -194,13 +194,22 @@
     2.4  	metamod_path.assign(mm_path);
     2.5  
     2.6  	/* Get value of -game from command line, defaulting to hl2 as engine seems to do */
     2.7 -	const char *game_dir = provider->GetCommandLineValue("-game", "hl2");
     2.8 +	const char *game_dir = provider->GetCommandLineValue("-game");
     2.9  
    2.10 -	/* Get absolute path */
    2.11 -	abspath(game_path, game_dir);
    2.12 +	if (game_dir)
    2.13 +	{
    2.14 +		/* Get absolute path */
    2.15 +		abspath(game_path, game_dir);
    2.16 +	}
    2.17 +	else
    2.18 +	{
    2.19 +		/* Get absolute path for current directory */
    2.20 +		abspath(game_path, ".");
    2.21 +	}
    2.22 +
    2.23  	mod_path.assign(game_path);
    2.24  
    2.25 -	engine_build = provider->DetermineSourceEngine(game_dir);;
    2.26 +	engine_build = provider->DetermineSourceEngine(game_dir);
    2.27  
    2.28  	return true;
    2.29  }
     3.1 --- a/core/metamod_console.cpp	Mon Feb 16 18:13:31 2009 -0500
     3.2 +++ b/core/metamod_console.cpp	Wed Feb 18 01:38:23 2009 -0600
     3.3 @@ -113,10 +113,12 @@
     3.4  			}
     3.5  #endif
     3.6  
     3.7 -#if SOURCE_ENGINE == SE_ORANGEBOX
     3.8 +#if SOURCE_ENGINE == SE_LEFT4DEAD
     3.9 +			CONMSG("  Engine: Left 4 Dead (2008)\n");
    3.10 +#elif SOURCE_ENGINE == SE_ORANGEBOX
    3.11  			CONMSG("  Engine: Episode 2 (Orange Box, 2007)\n");
    3.12  #else
    3.13 -			CONMSG("  Engine: Left 4 Dead (2008)\n");
    3.14 +			CONMSG("  Engine: Dark Messiah (2006)\n");
    3.15  #endif
    3.16  
    3.17  			// Display user messages
     4.1 --- a/core/metamod_provider.h	Mon Feb 16 18:13:31 2009 -0500
     4.2 +++ b/core/metamod_provider.h	Wed Feb 18 01:38:23 2009 -0600
     4.3 @@ -115,7 +115,7 @@
     4.4  		 * @param val				Default string to return if none found.
     4.5  		 * @return					Parameter value.
     4.6  		 */
     4.7 -		virtual const char *GetCommandLineValue(const char *key, const char *defval) =0;
     4.8 +		virtual const char *GetCommandLineValue(const char *key, const char *defval=NULL) =0;
     4.9  
    4.10  		/**
    4.11  		 * @brief Prints a string to the remote server console. 
     5.1 --- a/core/metamod_util.cpp	Mon Feb 16 18:13:31 2009 -0500
     5.2 +++ b/core/metamod_util.cpp	Wed Feb 18 01:38:23 2009 -0600
     5.3 @@ -341,3 +341,19 @@
     5.4  
     5.5  	return true;
     5.6  }
     5.7 +
     5.8 +bool UTIL_VerifySignature(const void *addr, const char *sig, size_t len)
     5.9 +{
    5.10 +	unsigned char *addr1 = (unsigned char *) addr;
    5.11 +	unsigned char *addr2 = (unsigned char *) sig;
    5.12 +
    5.13 +	for (size_t i = 0; i < len; i++)
    5.14 +	{
    5.15 +		if (addr2[i] == '*')
    5.16 +			continue;
    5.17 +		if (addr1[i] != addr2[i])
    5.18 +			return false;
    5.19 +	}
    5.20 +
    5.21 +	return true;
    5.22 +}
     6.1 --- a/core/metamod_util.h	Mon Feb 16 18:13:31 2009 -0500
     6.2 +++ b/core/metamod_util.h	Wed Feb 18 01:38:23 2009 -0600
     6.3 @@ -85,5 +85,15 @@
     6.4  				   const char *relTo,
     6.5  				   const char *relFrom);
     6.6  
     6.7 +/**
     6.8 + * @brief Compares memory address against a signature.
     6.9 + *
    6.10 + * @param addr			Memory address to check.
    6.11 + * @param sig			Signature used to check against memory address. Accept 0x2A as wildcard.
    6.12 + * @param len			Length of signature.
    6.13 + * @return				True if signature was verified, false otherwise.
    6.14 + */
    6.15 +bool UTIL_VerifySignature(const void *addr, const char *sig, size_t len);
    6.16 +
    6.17  #endif //_INCLUDE_UTIL_H
    6.18  
     7.1 --- a/core/msvc9/mm_core.sln	Mon Feb 16 18:13:31 2009 -0500
     7.2 +++ b/core/msvc9/mm_core.sln	Wed Feb 18 01:38:23 2009 -0600
     7.3 @@ -5,16 +5,22 @@
     7.4  EndProject
     7.5  Global
     7.6  	GlobalSection(SolutionConfigurationPlatforms) = preSolution
     7.7 +		Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
     7.8  		Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32
     7.9  		Debug - Orange Box|Win32 = Debug - Orange Box|Win32
    7.10 +		Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32
    7.11  		Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32
    7.12  		Release - Orange Box|Win32 = Release - Orange Box|Win32
    7.13  	EndGlobalSection
    7.14  	GlobalSection(ProjectConfigurationPlatforms) = postSolution
    7.15 +		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32
    7.16 +		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
    7.17  		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
    7.18  		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
    7.19  		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
    7.20  		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
    7.21 +		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32
    7.22 +		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
    7.23  		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
    7.24  		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
    7.25  		{F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
     8.1 --- a/core/msvc9/mm_core.vcproj	Mon Feb 16 18:13:31 2009 -0500
     8.2 +++ b/core/msvc9/mm_core.vcproj	Wed Feb 18 01:38:23 2009 -0600
     8.3 @@ -40,9 +40,10 @@
     8.4  			/>
     8.5  			<Tool
     8.6  				Name="VCCLCompilerTool"
     8.7 +				AdditionalOptions="/D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
     8.8  				Optimization="0"
     8.9  				AdditionalIncludeDirectories="..;..\..\loader;..\sourcehook;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
    8.10 -				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOURCEMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SE_ORANGEBOX=3;SE_LEFT4DEAD=4;SOURCE_ENGINE=3"
    8.11 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOURCEMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCE_ENGINE=3"
    8.12  				MinimalRebuild="true"
    8.13  				BasicRuntimeChecks="3"
    8.14  				RuntimeLibrary="1"
    8.15 @@ -123,11 +124,12 @@
    8.16  			/>
    8.17  			<Tool
    8.18  				Name="VCCLCompilerTool"
    8.19 +				AdditionalOptions="/D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    8.20  				Optimization="3"
    8.21  				FavorSizeOrSpeed="1"
    8.22  				OmitFramePointers="true"
    8.23  				AdditionalIncludeDirectories="..;..\..\loader;..\sourcehook;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
    8.24 -				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOURCEMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SE_ORANGEBOX=3;SE_LEFT4DEAD=4;SOURCE_ENGINE=3"
    8.25 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOURCEMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCE_ENGINE=3"
    8.26  				StringPooling="true"
    8.27  				ExceptionHandling="1"
    8.28  				RuntimeLibrary="0"
    8.29 @@ -209,9 +211,10 @@
    8.30  			/>
    8.31  			<Tool
    8.32  				Name="VCCLCompilerTool"
    8.33 +				AdditionalOptions="/D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    8.34  				Optimization="0"
    8.35  				AdditionalIncludeDirectories="..;..\..\loader;..\sourcehook;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
    8.36 -				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOURCEMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SE_ORANGEBOX=3;SE_LEFT4DEAD=4;SOURCE_ENGINE=4"
    8.37 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOURCEMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCE_ENGINE=4"
    8.38  				MinimalRebuild="true"
    8.39  				BasicRuntimeChecks="3"
    8.40  				RuntimeLibrary="1"
    8.41 @@ -292,11 +295,12 @@
    8.42  			/>
    8.43  			<Tool
    8.44  				Name="VCCLCompilerTool"
    8.45 +				AdditionalOptions="/D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    8.46  				Optimization="3"
    8.47  				FavorSizeOrSpeed="1"
    8.48  				OmitFramePointers="true"
    8.49  				AdditionalIncludeDirectories="..;..\..\loader;..\sourcehook;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
    8.50 -				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOURCEMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SE_ORANGEBOX=3;SE_LEFT4DEAD=4;SOURCE_ENGINE=4"
    8.51 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOURCEMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCE_ENGINE=4"
    8.52  				StringPooling="true"
    8.53  				ExceptionHandling="1"
    8.54  				RuntimeLibrary="0"
    8.55 @@ -354,6 +358,177 @@
    8.56  				Name="VCPostBuildEventTool"
    8.57  			/>
    8.58  		</Configuration>
    8.59 +		<Configuration
    8.60 +			Name="Debug - Dark Messiah|Win32"
    8.61 +			OutputDirectory="$(ConfigurationName)"
    8.62 +			IntermediateDirectory="$(ConfigurationName)"
    8.63 +			ConfigurationType="2"
    8.64 +			CharacterSet="2"
    8.65 +			>
    8.66 +			<Tool
    8.67 +				Name="VCPreBuildEventTool"
    8.68 +			/>
    8.69 +			<Tool
    8.70 +				Name="VCCustomBuildTool"
    8.71 +			/>
    8.72 +			<Tool
    8.73 +				Name="VCXMLDataGeneratorTool"
    8.74 +			/>
    8.75 +			<Tool
    8.76 +				Name="VCWebServiceProxyGeneratorTool"
    8.77 +			/>
    8.78 +			<Tool
    8.79 +				Name="VCMIDLTool"
    8.80 +			/>
    8.81 +			<Tool
    8.82 +				Name="VCCLCompilerTool"
    8.83 +				AdditionalOptions="/D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    8.84 +				Optimization="0"
    8.85 +				AdditionalIncludeDirectories="..;..\..\loader;..\sourcehook;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(HL2SDK-DARKM)\public\vstdlib&quot;"
    8.86 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOURCEMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCE_ENGINE=2"
    8.87 +				MinimalRebuild="true"
    8.88 +				BasicRuntimeChecks="3"
    8.89 +				RuntimeLibrary="1"
    8.90 +				RuntimeTypeInfo="false"
    8.91 +				UsePrecompiledHeader="0"
    8.92 +				WarningLevel="3"
    8.93 +				Detect64BitPortabilityProblems="false"
    8.94 +				DebugInformationFormat="4"
    8.95 +			/>
    8.96 +			<Tool
    8.97 +				Name="VCManagedResourceCompilerTool"
    8.98 +			/>
    8.99 +			<Tool
   8.100 +				Name="VCResourceCompilerTool"
   8.101 +				PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
   8.102 +			/>
   8.103 +			<Tool
   8.104 +				Name="VCPreLinkEventTool"
   8.105 +			/>
   8.106 +			<Tool
   8.107 +				Name="VCLinkerTool"
   8.108 +				AdditionalDependencies="&quot;$(HL2SDK-DARKM)\lib\public\tier0.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\tier1.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\vstdlib.lib&quot;"
   8.109 +				OutputFile="$(OutDir)/metamod.2.darkm.dll"
   8.110 +				LinkIncremental="2"
   8.111 +				IgnoreDefaultLibraryNames="libc.lib;libcd.lib;libcmt.lib"
   8.112 +				GenerateDebugInformation="true"
   8.113 +				ProgramDatabaseFile="$(OutDir)/sourcemm.pdb"
   8.114 +				SubSystem="2"
   8.115 +				EnableCOMDATFolding="1"
   8.116 +				RandomizedBaseAddress="1"
   8.117 +				DataExecutionPrevention="0"
   8.118 +				ImportLibrary="$(OutDir)/sourcemm.lib"
   8.119 +				TargetMachine="1"
   8.120 +			/>
   8.121 +			<Tool
   8.122 +				Name="VCALinkTool"
   8.123 +			/>
   8.124 +			<Tool
   8.125 +				Name="VCManifestTool"
   8.126 +			/>
   8.127 +			<Tool
   8.128 +				Name="VCXDCMakeTool"
   8.129 +			/>
   8.130 +			<Tool
   8.131 +				Name="VCBscMakeTool"
   8.132 +			/>
   8.133 +			<Tool
   8.134 +				Name="VCFxCopTool"
   8.135 +			/>
   8.136 +			<Tool
   8.137 +				Name="VCAppVerifierTool"
   8.138 +			/>
   8.139 +			<Tool
   8.140 +				Name="VCPostBuildEventTool"
   8.141 +			/>
   8.142 +		</Configuration>
   8.143 +		<Configuration
   8.144 +			Name="Release - Dark Messiah|Win32"
   8.145 +			OutputDirectory="$(ConfigurationName)"
   8.146 +			IntermediateDirectory="$(ConfigurationName)"
   8.147 +			ConfigurationType="2"
   8.148 +			CharacterSet="2"
   8.149 +			>
   8.150 +			<Tool
   8.151 +				Name="VCPreBuildEventTool"
   8.152 +			/>
   8.153 +			<Tool
   8.154 +				Name="VCCustomBuildTool"
   8.155 +			/>
   8.156 +			<Tool
   8.157 +				Name="VCXMLDataGeneratorTool"
   8.158 +			/>
   8.159 +			<Tool
   8.160 +				Name="VCWebServiceProxyGeneratorTool"
   8.161 +			/>
   8.162 +			<Tool
   8.163 +				Name="VCMIDLTool"
   8.164 +			/>
   8.165 +			<Tool
   8.166 +				Name="VCCLCompilerTool"
   8.167 +				AdditionalOptions="/D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   8.168 +				Optimization="3"
   8.169 +				FavorSizeOrSpeed="1"
   8.170 +				OmitFramePointers="true"
   8.171 +				AdditionalIncludeDirectories="..;..\..\loader;..\sourcehook;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(HL2SDK-DARKM)\public\vstdlib&quot;"
   8.172 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOURCEMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCE_ENGINE=2"
   8.173 +				StringPooling="true"
   8.174 +				ExceptionHandling="1"
   8.175 +				RuntimeLibrary="0"
   8.176 +				BufferSecurityCheck="false"
   8.177 +				RuntimeTypeInfo="false"
   8.178 +				UsePrecompiledHeader="0"
   8.179 +				WarningLevel="3"
   8.180 +				Detect64BitPortabilityProblems="false"
   8.181 +				DebugInformationFormat="3"
   8.182 +			/>
   8.183 +			<Tool
   8.184 +				Name="VCManagedResourceCompilerTool"
   8.185 +			/>
   8.186 +			<Tool
   8.187 +				Name="VCResourceCompilerTool"
   8.188 +				PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
   8.189 +			/>
   8.190 +			<Tool
   8.191 +				Name="VCPreLinkEventTool"
   8.192 +			/>
   8.193 +			<Tool
   8.194 +				Name="VCLinkerTool"
   8.195 +				AdditionalDependencies="&quot;$(HL2SDK-DARKM)\lib\public\tier0.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\tier1.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\vstdlib.lib&quot;"
   8.196 +				OutputFile="$(OutDir)/metamod.2.darkm.dll"
   8.197 +				LinkIncremental="1"
   8.198 +				IgnoreDefaultLibraryNames="libc.lib;libcd.lib;libcmtd.lib"
   8.199 +				GenerateDebugInformation="true"
   8.200 +				SubSystem="2"
   8.201 +				OptimizeReferences="2"
   8.202 +				EnableCOMDATFolding="2"
   8.203 +				RandomizedBaseAddress="1"
   8.204 +				DataExecutionPrevention="0"
   8.205 +				ImportLibrary="$(OutDir)/sourcemm.lib"
   8.206 +				TargetMachine="1"
   8.207 +			/>
   8.208 +			<Tool
   8.209 +				Name="VCALinkTool"
   8.210 +			/>
   8.211 +			<Tool
   8.212 +				Name="VCManifestTool"
   8.213 +			/>
   8.214 +			<Tool
   8.215 +				Name="VCXDCMakeTool"
   8.216 +			/>
   8.217 +			<Tool
   8.218 +				Name="VCBscMakeTool"
   8.219 +			/>
   8.220 +			<Tool
   8.221 +				Name="VCFxCopTool"
   8.222 +			/>
   8.223 +			<Tool
   8.224 +				Name="VCAppVerifierTool"
   8.225 +			/>
   8.226 +			<Tool
   8.227 +				Name="VCPostBuildEventTool"
   8.228 +			/>
   8.229 +		</Configuration>
   8.230  	</Configurations>
   8.231  	<References>
   8.232  	</References>
     9.1 --- a/core/provider/console.cpp	Mon Feb 16 18:13:31 2009 -0500
     9.2 +++ b/core/provider/console.cpp	Wed Feb 18 01:38:23 2009 -0600
     9.3 @@ -27,13 +27,20 @@
     9.4  
     9.5  #include "console.h"
     9.6  #include "provider_ep2.h"
     9.7 +#include "metamod_util.h"
     9.8  
     9.9  using namespace SourceHook;
    9.10  
    9.11  SMConVarAccessor g_SMConVarAccessor;
    9.12  
    9.13 +#if SOURCE_ENGINE >= SE_ORANGEBOX
    9.14 +#else
    9.15 +#define RegisterConCommand RegisterConCommandBase
    9.16 +#endif
    9.17 +
    9.18  bool SMConVarAccessor::RegisterConCommandBase(ConCommandBase *pCommand)
    9.19  {
    9.20 +	m_RegisteredCommands.push_back(pCommand);
    9.21  	pCommand->SetNext(NULL);
    9.22  	icvar->RegisterConCommand(pCommand);
    9.23  
    9.24 @@ -48,8 +55,128 @@
    9.25  	return true;
    9.26  }
    9.27  
    9.28 +void SMConVarAccessor::RemoveMetamodCommands()
    9.29 +{
    9.30 +	List<ConCommandBase *>::iterator iter;
    9.31 +
    9.32 +	for (iter = m_RegisteredCommands.begin(); iter != m_RegisteredCommands.end(); iter++)
    9.33 +	{
    9.34 +		Unregister(*iter);
    9.35 +	}
    9.36 +}
    9.37 +
    9.38 +#if SOURCE_ENGINE == SE_DARKMESSIAH
    9.39 +/* Signature for ICvar::GetCommands() in vstdlib for Win32 and Linux.
    9.40 + *
    9.41 + * 20226EE0 A1 50 5C 5A 20   mov         eax,dword ptr ds:[205A5C50h] <-- What we want
    9.42 + * 20226EE5 C3               ret              
    9.43 + */
    9.44 +#define CMDLIST_SIG "\xA1\x2A\x2A\x2A\x2A\xC3"
    9.45 +#define CMDLIST_SIGLEN 6
    9.46 +
    9.47 +/* Linux symbol name of ConCommandBase list in vstdlib */
    9.48 +#define CMDLIST_SYMBOL "_ZN14ConCommandBase18s_pConCommandBasesE"
    9.49 +
    9.50 +/* This function retrieves the address of the var that holds the top of the ConCommandBase list.
    9.51 + * Having this allows us to change the beginning of this list with ease.
    9.52 + *
    9.53 + * This craziness eliminates the need for the eternal command/cvar used previously which
    9.54 + * could have caused a crash as a result of registering commands/cvars more than once.
    9.55 + */
    9.56 +bool SMConVarAccessor::InitConCommandBaseList()
    9.57 +{
    9.58 +	char *vfunc = (char *)SH_GET_ORIG_VFNPTR_ENTRY(icvar, &ICvar::GetCommands);
    9.59 +
    9.60 +	if (*vfunc == '\xE9')
    9.61 +	{
    9.62 +		/* Get address from displacement...
    9.63 +		*
    9.64 +		* Add 5 because it's relative to next instruction:
    9.65 +		* Opcode <1 byte> + 32-bit displacement <4 bytes> 
    9.66 +		*/
    9.67 +		vfunc += *reinterpret_cast<int *>(vfunc + 1) + 5;
    9.68 +	}
    9.69 +
    9.70 +	if (!vfunc)
    9.71 +	{
    9.72 +		return false;
    9.73 +	}
    9.74 +
    9.75 +#ifdef OS_WIN32
    9.76 +	if (UTIL_VerifySignature(vfunc, CMDLIST_SIG, CMDLIST_SIGLEN))
    9.77 +	{
    9.78 +		/* Skip past 0xA1 and get addr of ConCommandBase list var */
    9.79 +		m_TopConCommandBase = *reinterpret_cast<ConCommandBase ***>(vfunc + 1);
    9.80 +		return true;
    9.81 +	}
    9.82 +#elif defined OS_LINUX
    9.83 +	/* Try dlsym first */
    9.84 +	char path[PATH_SIZE];
    9.85 +	if (GetFileOfAddress((void *)icvar, path, sizeof(path)))
    9.86 +	{
    9.87 +		void *handle = dlopen(path, RTLD_NOW);
    9.88 +		if (handle)
    9.89 +		{
    9.90 +			m_TopConCommandBase = reinterpret_cast<ConCommandBase **>(dlsym(handle, CMDLIST_SYMBOL));
    9.91 +			dlclose(handle);
    9.92 +			return true;
    9.93 +		}
    9.94 +	}
    9.95 +
    9.96 +	/* If dlsym failed, then verify signature of function */
    9.97 +	if (!m_TopConCommandBase && UTIL_VerifySignature(vfunc, CMDLIST_SIG, CMDLIST_SIGLEN))
    9.98 +	{
    9.99 +		/* Skip past 0xA1 and get addr of ConCommandBase list var */
   9.100 +		m_TopConCommandBase = *reinterpret_cast<ConCommandBase ***>(vfunc + 1);
   9.101 +		return true;
   9.102 +	}
   9.103 +#endif
   9.104 +
   9.105 +	return false;
   9.106 +}
   9.107 +#endif
   9.108 +
   9.109  void SMConVarAccessor::Unregister(ConCommandBase *pCommand)
   9.110  {
   9.111 +#if SOURCE_ENGINE >= SE_ORANGEBOX
   9.112  	icvar->UnregisterConCommand(pCommand);
   9.113 +#else
   9.114 +	ConCommandBase *pCur = NULL;
   9.115 +	ConCommandBase *pPrev = NULL;
   9.116 +
   9.117 +	if (!pCommand)
   9.118 +	{
   9.119 +		return;
   9.120 +	}
   9.121 +
   9.122 +	pCur = icvar->GetCommands();
   9.123 +
   9.124 +	if (!m_TopConCommandBase || !pCur)
   9.125 +	{
   9.126 +		return;
   9.127 +	}
   9.128 +
   9.129 +	if (pCur == pCommand)
   9.130 +	{
   9.131 +		*m_TopConCommandBase = const_cast<ConCommandBase *>(pCommand->GetNext());
   9.132 +		pCommand->SetNext(NULL);
   9.133 +		return;
   9.134 +	}
   9.135 +	
   9.136 +	pPrev = pCur;
   9.137 +	pCur = const_cast<ConCommandBase *>(pCur->GetNext());
   9.138 +
   9.139 +	while (pCur)
   9.140 +	{
   9.141 +		if (pCur == pCommand)
   9.142 +		{
   9.143 +			pPrev->SetNext(const_cast<ConCommandBase *>(pCommand->GetNext()));
   9.144 +			pCommand->SetNext(NULL);
   9.145 +		}
   9.146 +
   9.147 +		pPrev = pCur;
   9.148 +		pCur = const_cast<ConCommandBase *>(pCur->GetNext());
   9.149 +	}
   9.150 +#endif
   9.151  }
   9.152  
    10.1 --- a/core/provider/console.h	Mon Feb 16 18:13:31 2009 -0500
    10.2 +++ b/core/provider/console.h	Wed Feb 18 01:38:23 2009 -0600
    10.3 @@ -33,8 +33,8 @@
    10.4  #undef _DEBUG
    10.5  #endif
    10.6  #include <interface.h>
    10.7 +#include "convar.h"
    10.8  #include <eiface.h>
    10.9 -#include "convar.h"
   10.10  #include <sh_list.h>
   10.11  #if defined DEBUG2
   10.12  #undef DEBUG2
   10.13 @@ -47,6 +47,14 @@
   10.14  	bool RegisterConCommandBase(ConCommandBase *pCommand);
   10.15  	bool Register(ConCommandBase *pCommand);
   10.16  	void Unregister(ConCommandBase *pCommand);
   10.17 +	void RemoveMetamodCommands();
   10.18 +#if SOURCE_ENGINE == SE_DARKMESSIAH
   10.19 +	bool InitConCommandBaseList();
   10.20 +private:
   10.21 +	ConCommandBase **m_TopConCommandBase;
   10.22 +#endif
   10.23 +private:
   10.24 +	SourceHook::List<ConCommandBase *> m_RegisteredCommands;
   10.25  };
   10.26  
   10.27  extern SMConVarAccessor g_SMConVarAccessor;
    11.1 --- a/core/provider/provider_ep2.cpp	Mon Feb 16 18:13:31 2009 -0500
    11.2 +++ b/core/provider/provider_ep2.cpp	Wed Feb 18 01:38:23 2009 -0600
    11.3 @@ -56,13 +56,23 @@
    11.4  	int size;
    11.5  	String name;
    11.6  };
    11.7 +
    11.8  /* Imports */
    11.9 +#if SOURCE_ENGINE == SE_DARKMESSIAH
   11.10  #undef CommandLine
   11.11  DLL_IMPORT ICommandLine *CommandLine();
   11.12 +#endif
   11.13 +
   11.14  /* Functions */
   11.15  bool CacheUserMessages();
   11.16 +#if SOURCE_ENGINE >= SE_ORANGEBOX
   11.17  void ClientCommand(edict_t *pEdict, const CCommand &args);
   11.18  void LocalCommand_Meta(const CCommand &args);
   11.19 +#else
   11.20 +void ClientCommand(edict_t *pEdict);
   11.21 +void LocalCommand_Meta();
   11.22 +#endif
   11.23 +
   11.24  void _ServerCommand();
   11.25  /* Variables */
   11.26  static bool usermsgs_extracted = false;
   11.27 @@ -79,7 +89,11 @@
   11.28  IMetamodSourceProvider *provider = &g_Ep1Provider;
   11.29  ConCommand meta_local_cmd("meta", LocalCommand_Meta, "Metamod:Source control options");
   11.30  
   11.31 +#if SOURCE_ENGINE >= SE_ORANGEBOX
   11.32  SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *, const CCommand &);
   11.33 +#else
   11.34 +SH_DECL_HOOK1_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *);
   11.35 +#endif
   11.36  
   11.37  bool AssumeUserMessages()
   11.38  {
   11.39 @@ -99,7 +113,11 @@
   11.40  
   11.41  void BaseProvider::ConsolePrint(const char *str)
   11.42  {
   11.43 +#if SOURCE_ENGINE >= SE_ORANGEBOX
   11.44  	ConMsg("%s", str);
   11.45 +#else
   11.46 +	Msg("%s", str);
   11.47 +#endif
   11.48  }
   11.49  
   11.50  void BaseProvider::Notify_DLLInit_Pre(CreateInterfaceFn engineFactory, 
   11.51 @@ -111,13 +129,17 @@
   11.52  		DisplayError("Could not find IVEngineServer! Metamod cannot load.");
   11.53  		return;
   11.54  	}
   11.55 +#if SOURCE_ENGINE >= SE_ORANGEBOX
   11.56  	icvar = (ICvar *)((engineFactory)(CVAR_INTERFACE_VERSION, NULL));
   11.57 +#else
   11.58 +	icvar = (ICvar *)((engineFactory)(VENGINE_CVAR_INTERFACE_VERSION, NULL));
   11.59 +#endif
   11.60  	if (!icvar)
   11.61  	{
   11.62  		DisplayError("Could not find ICvar! Metamod cannot load.");
   11.63  		return;
   11.64  	}
   11.65 -	g_pCVar = icvar;
   11.66 +
   11.67  
   11.68  	if ((gameclients = (IServerGameClients *)(serverFactory("ServerGameClients003", NULL)))
   11.69  		== NULL)
   11.70 @@ -132,14 +154,26 @@
   11.71  		return;
   11.72  	}
   11.73  
   11.74 -	RegisterConCommandBase(&meta_local_cmd);
   11.75 -	conbases_unreg.push_back(&meta_local_cmd);
   11.76 +#if SOURCE_ENGINE >= SE_ORANGEBOX
   11.77 +	g_pCVar = icvar;
   11.78 +#endif
   11.79 +
   11.80 +	g_SMConVarAccessor.RegisterConCommandBase(&meta_local_cmd);
   11.81  
   11.82  	if ((usermsgs_extracted = CacheUserMessages()) == false)
   11.83  	{
   11.84  		usermsgs_extracted = AssumeUserMessages();
   11.85  	}
   11.86  
   11.87 +#if SOURCE_ENGINE == SE_DARKMESSIAH
   11.88 +	if (!g_SMConVarAccessor.InitConCommandBaseList())
   11.89 +	{
   11.90 +		/* This is very unlikely considering it's old engine */
   11.91 +		mm_LogMessage("[META] Warning: Failed to find ConCommandBase list!");
   11.92 +		mm_LogMessage("[META] Warning: ConVars and ConCommands cannot be unregistered properly! Please file a bug report.");
   11.93 +	}
   11.94 +#endif
   11.95 +
   11.96  	if (gameclients)
   11.97  	{
   11.98  		SH_ADD_HOOK_STATICFUNC(IServerGameClients, ClientCommand, gameclients, ClientCommand, false);
   11.99 @@ -148,14 +182,14 @@
  11.100  
  11.101  void BaseProvider::Notify_DLLShutdown_Pre()
  11.102  {
  11.103 -	List<ConCommandBase *>::iterator iter;
  11.104 +	g_SMConVarAccessor.RemoveMetamodCommands();
  11.105  
  11.106 -	for (iter = conbases_unreg.begin();
  11.107 -		 iter != conbases_unreg.end();
  11.108 -		 iter++)
  11.109 +#if SOURCE_ENGINE == SE_DARKMESSIAH
  11.110 +	if (g_Metamod.IsLoadedAsGameDLL())
  11.111  	{
  11.112 -		UnregisterConCommandBase((*iter));
  11.113 +		icvar->UnlinkVariables(FCVAR_GAMEDLL);
  11.114  	}
  11.115 +#endif
  11.116  }
  11.117  
  11.118  bool BaseProvider::IsRemotePrintingAvailable()
  11.119 @@ -204,7 +238,7 @@
  11.120  {
  11.121  	if (key[0] == '-' || key[0] == '+')
  11.122  	{
  11.123 -		return CommandLine_Tier0()->ParmValue(key, defval);
  11.124 +		return CommandLine()->ParmValue(key, defval);
  11.125  	}
  11.126  	else if (icvar)
  11.127  	{
  11.128 @@ -354,8 +388,10 @@
  11.129  {
  11.130  #if SOURCE_ENGINE == SE_LEFT4DEAD
  11.131  	return SOURCE_ENGINE_LEFT4DEAD;
  11.132 +#elif SOURCE_ENGINE == SE_ORANGEBOX
  11.133 +	return SOURCE_ENGINE_ORANGEBOX;
  11.134  #else
  11.135 -	return SOURCE_ENGINE_ORANGEBOX;
  11.136 +	return SOURCE_ENGINE_DARKMESSIAH;
  11.137  #endif
  11.138  }
  11.139  
  11.140 @@ -376,8 +412,7 @@
  11.141  
  11.142  	ConVar *pVar = new ConVar(name, defval, newflags, help);
  11.143  
  11.144 -	RegisterConCommandBase(pVar);
  11.145 -	conbases_unreg.push_back(pVar);
  11.146 +	g_SMConVarAccessor.RegisterConCommandBase(pVar);
  11.147  
  11.148  	return pVar;
  11.149  }
  11.150 @@ -433,6 +468,7 @@
  11.151  	return true;
  11.152  }
  11.153  
  11.154 +#if SOURCE_ENGINE >= SE_ORANGEBOX
  11.155  class GlobCommand : public IMetamodSourceCommandInfo
  11.156  {
  11.157  public:
  11.158 @@ -457,17 +493,48 @@
  11.159  private:
  11.160  	const CCommand *m_cmd;
  11.161  };
  11.162 +#else
  11.163 +class GlobCommand : public IMetamodSourceCommandInfo
  11.164 +{
  11.165 +public:
  11.166 +	unsigned int GetArgCount()
  11.167 +	{
  11.168 +		return engine->Cmd_Argc() - 1;
  11.169 +	}
  11.170  
  11.171 +	const char *GetArg(unsigned int num)
  11.172 +	{
  11.173 +		return engine->Cmd_Argv(num);
  11.174 +	}
  11.175 +
  11.176 +	const char *GetArgString()
  11.177 +	{
  11.178 +		return engine->Cmd_Args();
  11.179 +	}
  11.180 +};
  11.181 +#endif
  11.182 +
  11.183 +#if SOURCE_ENGINE >= SE_ORANGEBOX
  11.184  void LocalCommand_Meta(const CCommand &args)
  11.185  {
  11.186  	GlobCommand cmd(&args);
  11.187 +#else
  11.188 +void LocalCommand_Meta()
  11.189 +{
  11.190 +	GlobCommand cmd;
  11.191 +#endif
  11.192  	Command_Meta(&cmd);
  11.193  }
  11.194  
  11.195 +#if SOURCE_ENGINE >= SE_ORANGEBOX
  11.196  void ClientCommand(edict_t *pEdict, const CCommand &_cmd)
  11.197  {
  11.198  	GlobCommand cmd(&_cmd);
  11.199 -
  11.200 +#else
  11.201 +void ClientCommand(edict_t *pEdict)
  11.202 +{
  11.203 +	GlobCommand cmd;
  11.204 +#endif
  11.205  	if (strcmp(cmd.GetArg(0), "meta") == 0)
  11.206  	{
  11.207  		Command_ClientMeta(pEdict, &cmd);
  11.208 @@ -477,26 +544,6 @@
  11.209  	RETURN_META(MRES_IGNORED);
  11.210  }
  11.211  
  11.212 -bool vcmp(const void *_addr1, const void *_addr2, size_t len)
  11.213 -{
  11.214 -	unsigned char *addr1 = (unsigned char *)_addr1;
  11.215 -	unsigned char *addr2 = (unsigned char *)_addr2;
  11.216 -
  11.217 -	for (size_t i=0; i<len; i++)
  11.218 -	{
  11.219 -		if (addr2[i] == '*')
  11.220 -		{
  11.221 -			continue;
  11.222 -		}
  11.223 -		if (addr1[i] != addr2[i])
  11.224 -		{
  11.225 -			return false;
  11.226 -		}
  11.227 -	}
  11.228 -
  11.229 -	return true;
  11.230 -}
  11.231 -
  11.232  //////////////////////////////////////////////////////////////////////
  11.233  // EVEN MORE HACKS HERE! YOU HAVE BEEN WARNED!                      //
  11.234  // Signatures necessary in finding the pointer to the CUtlDict that //
  11.235 @@ -510,7 +557,7 @@
  11.236  	#define MSGCLASS_SIG		"\x8B\x0D\x2A\x2A\x2A\x2A\x56"
  11.237  	#define MSGCLASS_OFFS		2
  11.238  
  11.239 -	/* Dystopia Wimdows hack */
  11.240 +	/* Dystopia Windows hack */
  11.241  	#define MSGCLASS2_SIGLEN	16
  11.242  	#define MSGCLASS2_SIG		"\x56\x8B\x74\x24\x2A\x85\xF6\x7C\x2A\x3B\x35\x2A\x2A\x2A\x2A\x7D"
  11.243  	#define MSGCLASS2_OFFS		11
  11.244 @@ -539,9 +586,11 @@
  11.245  
  11.246  typedef CUtlDict<UserMessage *, int> UserMsgDict;
  11.247  
  11.248 -/* This is the ugliest function in all of SourceMM */
  11.249 +/* This is the ugliest function in all of MM:S */
  11.250  bool CacheUserMessages()
  11.251  {
  11.252 +	UserMsgDict *dict = NULL;
  11.253 +
  11.254  	/* Get address of original GetUserMessageInfo() */
  11.255  	char *vfunc = (char *)SH_GET_ORIG_VFNPTR_ENTRY(server, &IServerGameDLL::GetUserMessageInfo);
  11.256  
  11.257 @@ -558,9 +607,7 @@
  11.258  		vfunc += *reinterpret_cast<int *>(vfunc + 1) + 5;
  11.259  	}
  11.260  
  11.261 -	CUtlDict<UserMessage *, int> *dict = NULL;
  11.262 -
  11.263 -	if (vcmp(vfunc, MSGCLASS_SIG, MSGCLASS_SIGLEN))
  11.264 +	if (UTIL_VerifySignature(vfunc, MSGCLASS_SIG, MSGCLASS_SIGLEN))
  11.265  	{
  11.266  		/* Get address of CUserMessages instance */
  11.267  		char **userMsgClass = *reinterpret_cast<char ***>(vfunc + MSGCLASS_OFFS);
  11.268 @@ -568,7 +615,7 @@
  11.269  		/* Get address of CUserMessages::m_UserMessages */
  11.270  		dict = reinterpret_cast<UserMsgDict *>(*userMsgClass);
  11.271  	} 
  11.272 -	else if (vcmp(vfunc, MSGCLASS2_SIG, MSGCLASS2_SIGLEN)) 
  11.273 +	else if (UTIL_VerifySignature(vfunc, MSGCLASS2_SIG, MSGCLASS2_SIGLEN)) 
  11.274  	{
  11.275  	#ifdef OS_WIN32
  11.276  		/* If we get here, the code is possibly inlined like in Dystopia */
  11.277 @@ -587,7 +634,7 @@
  11.278  	#endif
  11.279  	#ifdef OS_WIN32
  11.280  	} 
  11.281 -	else if (vcmp(vfunc, MSGCLASS3_SIG, MSGCLASS3_SIGLEN)) 
  11.282 +	else if (UTIL_VerifySignature(vfunc, MSGCLASS3_SIG, MSGCLASS3_SIGLEN)) 
  11.283  	{
  11.284  		/* Get address of CUserMessages instance */
  11.285  		char **userMsgClass = *reinterpret_cast<char ***>(vfunc + MSGCLASS3_OFFS);
    12.1 --- a/core/provider/vsp_listener.cpp	Mon Feb 16 18:13:31 2009 -0500
    12.2 +++ b/core/provider/vsp_listener.cpp	Wed Feb 18 01:38:23 2009 -0600
    12.3 @@ -48,7 +48,11 @@
    12.4  {
    12.5  }
    12.6  
    12.7 +#if SOURCE_ENGINE >= SE_ORANGEBOX
    12.8  PLUGIN_RESULT VSPListener::ClientCommand(edict_t *pEntity, const CCommand &cmd)
    12.9 +#else
   12.10 +PLUGIN_RESULT VSPListener::ClientCommand(edict_t *pEntity)
   12.11 +#endif
   12.12  {
   12.13  	return PLUGIN_CONTINUE;
   12.14  }
   12.15 @@ -134,6 +138,7 @@
   12.16  	return true;
   12.17  }
   12.18  
   12.19 +#if SOURCE_ENGINE != SE_DARKMESSIAH
   12.20  void VSPListener::OnQueryCvarValueFinished(QueryCvarCookie_t iCookie,
   12.21  										   edict_t *pPlayerEntity,
   12.22  										   EQueryCvarValueStatus eStatus,
   12.23 @@ -141,4 +146,5 @@
   12.24  										   const char *pCvarValue)
   12.25  {
   12.26  }
   12.27 +#endif
   12.28  
    13.1 --- a/core/provider/vsp_listener.h	Mon Feb 16 18:13:31 2009 -0500
    13.2 +++ b/core/provider/vsp_listener.h	Wed Feb 18 01:38:23 2009 -0600
    13.3 @@ -38,6 +38,8 @@
    13.4  #define _DEBUG
    13.5  #endif
    13.6  
    13.7 +
    13.8 +
    13.9  class VSPListener : public IServerPluginCallbacks
   13.10  {
   13.11  public:
   13.12 @@ -58,9 +60,15 @@
   13.13  	virtual void SetCommandClient(int index);
   13.14  	virtual void ClientSettingsChanged(edict_t *pEdict);
   13.15  	virtual PLUGIN_RESULT ClientConnect(bool *bAllowConnect, edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
   13.16 +#if SOURCE_ENGINE >= SE_ORANGEBOX
   13.17  	virtual PLUGIN_RESULT ClientCommand(edict_t *pEntity, const CCommand &cmd);
   13.18 +#else
   13.19 +	virtual PLUGIN_RESULT ClientCommand(edict_t *pEntity);
   13.20 +#endif
   13.21  	virtual PLUGIN_RESULT NetworkIDValidated(const char *pszUserName, const char *pszNetworkID);
   13.22 +#if SOURCE_ENGINE != SE_DARKMESSIAH
   13.23  	virtual void OnQueryCvarValueFinished( QueryCvarCookie_t iCookie, edict_t *pPlayerEntity, EQueryCvarValueStatus eStatus, const char *pCvarName, const char *pCvarValue );
   13.24 +#endif
   13.25  public:
   13.26  	bool IsLoaded();
   13.27  	void SetLoadable(bool loadable);
    14.1 --- a/core/vsp_bridge.cpp	Mon Feb 16 18:13:31 2009 -0500
    14.2 +++ b/core/vsp_bridge.cpp	Wed Feb 18 01:38:23 2009 -0600
    14.3 @@ -34,17 +34,29 @@
    14.4  #include <loader_bridge.h>
    14.5  #include "provider/provider_ep2.h"
    14.6  
    14.7 +#if SOURCE_ENGINE >= SE_ORANGEBOX
    14.8  SH_DECL_HOOK1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
    14.9 +#else
   14.10 +SH_DECL_HOOK0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
   14.11 +#endif
   14.12  
   14.13  ConCommand *g_plugin_unload = NULL;
   14.14  bool g_bIsTryingToUnload;
   14.15  
   14.16 +#if SOURCE_ENGINE >= SE_ORANGEBOX
   14.17  void InterceptPluginUnloads(const CCommand &args)
   14.18 +#else
   14.19 +void InterceptPluginUnloads()
   14.20 +#endif
   14.21  {
   14.22  	g_bIsTryingToUnload = true;
   14.23  }
   14.24  
   14.25 +#if SOURCE_ENGINE >= SE_ORANGEBOX
   14.26  void InterceptPluginUnloads_Post(const CCommand &args)
   14.27 +#else
   14.28 +void InterceptPluginUnloads_Post()
   14.29 +#endif
   14.30  {
   14.31  	g_bIsTryingToUnload = false;
   14.32  }
   14.33 @@ -69,7 +81,7 @@
   14.34  		pGlobals = playerInfoManager->GetGlobalVars();
   14.35  
   14.36  		char gamedll_iface[] = "ServerGameDLL000";
   14.37 -		for (unsigned int i = 5; i <= 50; i++)
   14.38 +		for (unsigned int i = 3; i <= 50; i++)
   14.39  		{
   14.40  			gamedll_iface[15] = '0' + i;
   14.41  			if ((server = (IServerGameDLL *)info->gsFactory(gamedll_iface, NULL)) != NULL)
   14.42 @@ -107,7 +119,20 @@
   14.43  		g_Metamod.NotifyVSPListening(info->vsp_callbacks, info->vsp_version);
   14.44  		mm_StartupMetamod(true);
   14.45  		
   14.46 +#if SOURCE_ENGINE >= SE_ORANGEBOX
   14.47  		g_plugin_unload = icvar->FindCommand("plugin_unload");
   14.48 +#else
   14.49 +		const ConCommandBase *pBase = icvar->GetCommands();
   14.50 +		while (pBase != NULL)
   14.51 +		{
   14.52 +			if (pBase->IsCommand() && strcmp(pBase->GetName(), "plugin_unload") == 0)
   14.53 +			{
   14.54 +				g_plugin_unload = (ConCommand *)pBase;
   14.55 +				break;
   14.56 +			}
   14.57 +			pBase = pBase->GetNext();
   14.58 +		}
   14.59 +#endif
   14.60  
   14.61  		if (g_plugin_unload != NULL)
   14.62  		{
    15.1 --- a/loader/gamedll.cpp	Mon Feb 16 18:13:31 2009 -0500
    15.2 +++ b/loader/gamedll.cpp	Wed Feb 18 01:38:23 2009 -0600
    15.3 @@ -36,17 +36,14 @@
    15.4  #include <sh_memory.h>
    15.5  #include "utility.h"
    15.6  #include "gamedll.h"
    15.7 -#include "valve_commandline.h"
    15.8 -
    15.9 -#undef GetCommandLine
   15.10  
   15.11  class IServerGameDLL;
   15.12 -typedef ICommandLine *(*GetCommandLine)();
   15.13  
   15.14  #define MAX_GAMEDLL_PATHS	10
   15.15  
   15.16  IGameDllBridge* gamedll_bridge = NULL;
   15.17  static int game_info_detected = 0;
   15.18 +static const char *game_name = NULL;
   15.19  static char gamedll_paths[MAX_GAMEDLL_PATHS][PLATFORM_MAX_PATH];
   15.20  static void *gamedll_libs[MAX_GAMEDLL_PATHS];
   15.21  static unsigned int gamedll_path_count = 0;
   15.22 @@ -57,24 +54,15 @@
   15.23  static int isgd_shutdown_index = -1;
   15.24  
   15.25  #if defined _WIN32
   15.26 -#define TIER0_NAME			"bin\\tier0.dll"
   15.27 -#define VSTDLIB_NAME		"bin\\vstdlib.dll"
   15.28  #define SERVER_NAME			"server.dll"
   15.29  #elif defined __linux__
   15.30 -#define TIER0_NAME			"bin/tier0_i486.so"
   15.31 -#define VSTDLIB_NAME		"bin/vstdlib_i486.so"
   15.32  #define SERVER_NAME			"server_i486.so"
   15.33  #endif
   15.34  
   15.35  static bool
   15.36  mm_DetectGameInformation()
   15.37  {
   15.38 -	void *lib;
   15.39 -	char error[255];
   15.40 -	GetCommandLine valve_cmdline;
   15.41  	char mm_path[PLATFORM_MAX_PATH];
   15.42 -	char lib_path[PLATFORM_MAX_PATH];
   15.43 -	char game_name[PLATFORM_MAX_PATH];
   15.44  	char game_path[PLATFORM_MAX_PATH];
   15.45  
   15.46  	if (game_info_detected)
   15.47 @@ -82,43 +70,8 @@
   15.48  
   15.49  	game_info_detected = -1;
   15.50  
   15.51 -	if (!mm_ResolvePath(TIER0_NAME, lib_path, sizeof(lib_path)))
   15.52 -	{
   15.53 -		mm_LogFatal("Could not find path for: " TIER0_NAME);
   15.54 -		return false;
   15.55 -	}
   15.56 -
   15.57 -	if ((lib = mm_LoadLibrary(lib_path, error, sizeof(error))) == NULL)
   15.58 -	{
   15.59 -		mm_LogFatal("Could not load %s: %s", lib_path, error);
   15.60 -		return false;
   15.61 -	}
   15.62 -
   15.63 -	valve_cmdline = (GetCommandLine)mm_GetLibAddress(lib, "CommandLine_Tier0");
   15.64 -	if (valve_cmdline == NULL)
   15.65 +	if ((game_name = mm_GetGameName()) == NULL)
   15.66  	{
   15.67 -		/* We probably have a Ship engine. */
   15.68 -		mm_UnloadLibrary(lib);
   15.69 -		if (!mm_ResolvePath(VSTDLIB_NAME, lib_path, sizeof(lib_path)))
   15.70 -		{
   15.71 -			mm_LogFatal("Could not find path for: " VSTDLIB_NAME);
   15.72 -			return false;
   15.73 -		}
   15.74 -
   15.75 -		if ((lib = mm_LoadLibrary(lib_path, error, sizeof(error))) == NULL)
   15.76 -		{
   15.77 -			mm_LogFatal("Could not load %s: %s", lib_path, error);
   15.78 -			return false;
   15.79 -		}
   15.80 -
   15.81 -		valve_cmdline = (GetCommandLine)mm_GetLibAddress(lib, "CommandLine");
   15.82 -	}
   15.83 -
   15.84 -	mm_UnloadLibrary(lib);
   15.85 -
   15.86 -	if (valve_cmdline == NULL)
   15.87 -	{
   15.88 -		mm_LogFatal("Could not locate any command line functionality");
   15.89  		return false;
   15.90  	}
   15.91  
   15.92 @@ -128,10 +81,6 @@
   15.93  		return false;
   15.94  	}
   15.95  
   15.96 -	mm_Format(game_name,
   15.97 -			  sizeof(game_name),
   15.98 -			  "%s",
   15.99 -			  valve_cmdline()->ParmValue("-game", "hl2"));
  15.100  	if (!mm_ResolvePath(game_name, game_path, sizeof(game_path)))
  15.101  	{
  15.102  		mm_LogFatal("Could not resolve path: %s", game_name);
  15.103 @@ -261,7 +210,7 @@
  15.104  						 QueryValveInterface fileSystemFactory, 
  15.105  						 void *pGlobals)
  15.106  	{
  15.107 -		MetamodBackend backend = mm_DetermineBackend(engineFactory);
  15.108 +		MetamodBackend backend = mm_DetermineBackend(engineFactory, game_name);
  15.109  
  15.110  		char error[255];
  15.111  		if (backend == MMBackend_UNKNOWN)
    16.1 --- a/loader/loader.cpp	Mon Feb 16 18:13:31 2009 -0500
    16.2 +++ b/loader/loader.cpp	Wed Feb 18 01:38:23 2009 -0600
    16.3 @@ -35,6 +35,11 @@
    16.4  #include "serverplugin.h"
    16.5  #include "gamedll.h"
    16.6  #include "utility.h"
    16.7 +#include "valve_commandline.h"
    16.8 +
    16.9 +#undef GetCommandLine
   16.10 +
   16.11 +typedef ICommandLine *(*GetCommandLine)();
   16.12  
   16.13  static HMODULE mm_library = NULL;
   16.14  static char mm_fatal_logfile[PLATFORM_MAX_PATH] = "metamod-fatal.log";
   16.15 @@ -64,11 +69,12 @@
   16.16  	fclose(fp);	
   16.17  }
   16.18  
   16.19 -static const char *backend_names[3] =
   16.20 +static const char *backend_names[] =
   16.21  {
   16.22  	"1.ep1",
   16.23  	"2.ep2",
   16.24 -	"2.l4d"
   16.25 +	"2.l4d",
   16.26 +	"2.darkm"
   16.27  };
   16.28  
   16.29  #if defined _WIN32
   16.30 @@ -163,8 +169,76 @@
   16.31  	return mm_GetLibAddress(mm_library, name);
   16.32  }
   16.33  
   16.34 +#if defined _WIN32
   16.35 +#define TIER0_NAME			"bin\\tier0.dll"
   16.36 +#define VSTDLIB_NAME		"bin\\vstdlib.dll"
   16.37 +#elif defined __linux__
   16.38 +#define TIER0_NAME			"bin/tier0_i486.so"
   16.39 +#define VSTDLIB_NAME		"bin/vstdlib_i486.so"
   16.40 +#endif
   16.41 +
   16.42 +const char *
   16.43 +mm_GetGameName()
   16.44 +{
   16.45 +	void *lib;
   16.46 +	char error[255];
   16.47 +	GetCommandLine valve_cmdline;
   16.48 +	char lib_path[PLATFORM_MAX_PATH];
   16.49 +	const char *game_name;
   16.50 +
   16.51 +	if (!mm_ResolvePath(TIER0_NAME, lib_path, sizeof(lib_path)))
   16.52 +	{
   16.53 +		mm_LogFatal("Could not find path for: " TIER0_NAME);
   16.54 +		return NULL;
   16.55 +	}
   16.56 +
   16.57 +	if ((lib = mm_LoadLibrary(lib_path, error, sizeof(error))) == NULL)
   16.58 +	{
   16.59 +		mm_LogFatal("Could not load %s: %s", lib_path, error);
   16.60 +		return NULL;
   16.61 +	}
   16.62 +
   16.63 +	valve_cmdline = (GetCommandLine)mm_GetLibAddress(lib, "CommandLine_Tier0");
   16.64 +	if (valve_cmdline == NULL)
   16.65 +	{
   16.66 +		/* We probably have a Ship engine. */
   16.67 +		mm_UnloadLibrary(lib);
   16.68 +		if (!mm_ResolvePath(VSTDLIB_NAME, lib_path, sizeof(lib_path)))
   16.69 +		{
   16.70 +			mm_LogFatal("Could not find path for: " VSTDLIB_NAME);
   16.71 +			return NULL;
   16.72 +		}
   16.73 +
   16.74 +		if ((lib = mm_LoadLibrary(lib_path, error, sizeof(error))) == NULL)
   16.75 +		{
   16.76 +			mm_LogFatal("Could not load %s: %s", lib_path, error);
   16.77 +			return NULL;
   16.78 +		}
   16.79 +
   16.80 +		valve_cmdline = (GetCommandLine)mm_GetLibAddress(lib, "CommandLine");
   16.81 +	}
   16.82 +
   16.83 +	mm_UnloadLibrary(lib);
   16.84 +
   16.85 +	if (valve_cmdline == NULL)
   16.86 +	{
   16.87 +		mm_LogFatal("Could not locate any command line functionality");
   16.88 +		return NULL;
   16.89 +	}
   16.90 +
   16.91 +	game_name = valve_cmdline()->ParmValue("-game");
   16.92 +
   16.93 +	/* This probably means that the game directory is actually the current directory */
   16.94 +	if (!game_name)
   16.95 +	{
   16.96 +		game_name = ".";
   16.97 +	}
   16.98 +
   16.99 +	return game_name;
  16.100 +}
  16.101 +
  16.102  MetamodBackend
  16.103 -mm_DetermineBackend(QueryValveInterface engineFactory)
  16.104 +mm_DetermineBackend(QueryValveInterface engineFactory, const char *game_name)
  16.105  {
  16.106  	/* Check for L4D */
  16.107  	if (engineFactory("VEngineServer022", NULL) != NULL &&
  16.108 @@ -180,11 +254,16 @@
  16.109  		{
  16.110  			return MMBackend_Episode2;
  16.111  		}
  16.112 -		/* Check for EP1 */
  16.113 +		/* Check for Episode One/Old Engine */
  16.114  		else if (engineFactory("VModelInfoServer001", NULL) != NULL &&
  16.115  				 (engineFactory("VEngineCvar003", NULL) != NULL ||
  16.116  				  engineFactory("VEngineCvar002", NULL) != NULL))
  16.117  		{
  16.118 +			/* Check for Dark Messiah which has a weird directory structure */
  16.119 +			if (strcmp(game_name, ".") == 0)
  16.120 +			{
  16.121 +				return MMBackend_DarkMessiah;
  16.122 +			}
  16.123  			return MMBackend_Episode1;
  16.124  		}
  16.125  	}
    17.1 --- a/loader/loader.h	Mon Feb 16 18:13:31 2009 -0500
    17.2 +++ b/loader/loader.h	Wed Feb 18 01:38:23 2009 -0600
    17.3 @@ -64,6 +64,7 @@
    17.4  	MMBackend_Episode1 = 0,
    17.5  	MMBackend_Episode2,
    17.6  	MMBackend_Left4Dead,
    17.7 +	MMBackend_DarkMessiah,
    17.8  	MMBackend_UNKNOWN
    17.9  };
   17.10  
   17.11 @@ -79,8 +80,11 @@
   17.12  extern void
   17.13  mm_LogFatal(const char *message, ...);
   17.14  
   17.15 +extern const char *
   17.16 +mm_GetGameName();
   17.17 +
   17.18  extern MetamodBackend
   17.19 -mm_DetermineBackend(QueryValveInterface qvi);
   17.20 +mm_DetermineBackend(QueryValveInterface qvi, const char *game_name);
   17.21  
   17.22  #endif /* _INCLUDE_METAMOD_SOURCE_LOADER_H_ */
   17.23  
    18.1 --- a/loader/serverplugin.cpp	Mon Feb 16 18:13:31 2009 -0500
    18.2 +++ b/loader/serverplugin.cpp	Wed Feb 18 01:38:23 2009 -0600
    18.3 @@ -77,6 +77,7 @@
    18.4   */
    18.5  class ServerPlugin
    18.6  {
    18.7 +	const char *game_name;
    18.8  	unsigned int vsp_version;
    18.9  	bool load_allowed;
   18.10  public:
   18.11 @@ -91,14 +92,19 @@
   18.12  
   18.13  		load_allowed = false;
   18.14  
   18.15 -		MetamodBackend backend = mm_DetermineBackend(engineFactory);
   18.16 +		if ((game_name = mm_GetGameName()) == NULL)
   18.17 +		{
   18.18 +			return false;
   18.19 +		}
   18.20 +
   18.21 +		MetamodBackend backend = mm_DetermineBackend(engineFactory, game_name);
   18.22  
   18.23  		if (backend == MMBackend_UNKNOWN)
   18.24  		{
   18.25  			mm_LogFatal("Could not detect engine version");
   18.26  			return false;
   18.27  		}
   18.28 -		else if (backend >= MMBackend_Episode2)
   18.29 +		else if (backend == MMBackend_Episode2 || backend == MMBackend_Left4Dead)
   18.30  		{
   18.31  			/* We need to insert the right type of call into this vtable */
   18.32  			void **vtable_src;
    19.1 --- a/sample_mm/engine_wrappers.h	Mon Feb 16 18:13:31 2009 -0500
    19.2 +++ b/sample_mm/engine_wrappers.h	Wed Feb 18 01:38:23 2009 -0600
    19.3 @@ -22,10 +22,9 @@
    19.4  extern IVEngineServer *engine;
    19.5  extern CGlobalVars *gpGlobals;
    19.6  
    19.7 -/**
    19.8 - * For non-OrangeBox builds, we have to make wrappers.
    19.9 - */
   19.10 -#if SOURCE_ENGINE == SE_EPISODEONE
   19.11 +#if SOURCE_ENGINE == SE_EPISODEONE && defined METAMOD_PLAPI_VERSION
   19.12 +#error "Metamod:Source 1.6 API is not supported on the old engine."
   19.13 +#endif
   19.14  
   19.15  /**
   19.16   * MM:S 1.4.x needs older API calls.
   19.17 @@ -35,12 +34,15 @@
   19.18  #define GetServerFactory serverFactory
   19.19  #define MM_Format snprintf
   19.20  #define	GetCGlobals	pGlobals
   19.21 +#define ENGINE_CALL(func) SH_CALL(m_EngineCC, func)
   19.22  #else
   19.23 -#error "Metamod:Source 1.6 is not supported on the old engine."
   19.24 +#define ENGINE_CALL(func) SH_CALL(engine, func)
   19.25 +#define MM_Format g_SMAPI->Format
   19.26  #endif
   19.27  
   19.28 +#if SOURCE_ENGINE <= SE_DARKMESSIAH
   19.29  /**
   19.30 - * Wrap the CCommand class so our code looks the same for both engines.
   19.31 + * Wrap the CCommand class so our code looks the same on all engines.
   19.32   */
   19.33  class CCommand
   19.34  {
   19.35 @@ -60,14 +62,7 @@
   19.36  	}
   19.37  };
   19.38  
   19.39 -#define CVAR_INTERFACE_VERSION				VENGINE_CVAR_INTERFACE_VERSION
   19.40 -#define ENGINE_CALL(func)					SH_CALL(m_EngineCC, func)
   19.41 -
   19.42 -#elif SOURCE_ENGINE >= SE_ORANGEBOX
   19.43 -
   19.44 -#define ENGINE_CALL(func)					SH_CALL(engine, func)
   19.45 -#define MM_Format							g_SMAPI->Format
   19.46 -
   19.47 +#define CVAR_INTERFACE_VERSION VENGINE_CVAR_INTERFACE_VERSION
   19.48  #endif
   19.49  
   19.50  /**
    20.1 --- a/sample_mm/msvc8/sample_mm.sln	Mon Feb 16 18:13:31 2009 -0500
    20.2 +++ b/sample_mm/msvc8/sample_mm.sln	Wed Feb 18 01:38:23 2009 -0600
    20.3 @@ -5,20 +5,26 @@
    20.4  EndProject
    20.5  Global
    20.6  	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    20.7 +		Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
    20.8  		Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32
    20.9  		Debug - Orange Box|Win32 = Debug - Orange Box|Win32
   20.10  		Debug - Original|Win32 = Debug - Original|Win32
   20.11 +		Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32
   20.12  		Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32
   20.13  		Release - Orange Box|Win32 = Release - Orange Box|Win32
   20.14  		Release - Original|Win32 = Release - Original|Win32
   20.15  	EndGlobalSection
   20.16  	GlobalSection(ProjectConfigurationPlatforms) = postSolution
   20.17 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32
   20.18 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
   20.19  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
   20.20  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
   20.21  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
   20.22  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
   20.23  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.ActiveCfg = Debug - Original|Win32
   20.24  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.Build.0 = Debug - Original|Win32
   20.25 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32
   20.26 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
   20.27  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
   20.28  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
   20.29  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
   20.30 @@ -27,6 +33,6 @@
   20.31  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.Build.0 = Release - Original|Win32
   20.32  	EndGlobalSection
   20.33  	GlobalSection(SolutionProperties) = preSolution
   20.34 -		HideSolutionNodde = FALSE
   20.35 +		HideSolutionNode = FALSE
   20.36  	EndGlobalSection
   20.37  EndGlobal
    21.1 --- a/sample_mm/msvc8/sample_mm.vcproj	Mon Feb 16 18:13:31 2009 -0500
    21.2 +++ b/sample_mm/msvc8/sample_mm.vcproj	Wed Feb 18 01:38:23 2009 -0600
    21.3 @@ -39,10 +39,10 @@
    21.4  			/>
    21.5  			<Tool
    21.6  				Name="VCCLCompilerTool"
    21.7 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    21.8 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    21.9  				Optimization="0"
   21.10  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(HL2SDK)\public\vstdlib&quot;"
   21.11 -				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=2"
   21.12 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=1"
   21.13  				MinimalRebuild="true"
   21.14  				BasicRuntimeChecks="3"
   21.15  				RuntimeLibrary="1"
   21.16 @@ -120,8 +120,168 @@
   21.17  			/>
   21.18  			<Tool
   21.19  				Name="VCCLCompilerTool"
   21.20 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   21.21 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   21.22  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(HL2SDK)\public\vstdlib&quot;"
   21.23 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=1"
   21.24 +				RuntimeLibrary="0"
   21.25 +				UsePrecompiledHeader="0"
   21.26 +				WarningLevel="3"
   21.27 +				Detect64BitPortabilityProblems="false"
   21.28 +				DebugInformationFormat="3"
   21.29 +			/>
   21.30 +			<Tool
   21.31 +				Name="VCManagedResourceCompilerTool"
   21.32 +			/>
   21.33 +			<Tool
   21.34 +				Name="VCResourceCompilerTool"
   21.35 +			/>
   21.36 +			<Tool
   21.37 +				Name="VCPreLinkEventTool"
   21.38 +			/>
   21.39 +			<Tool
   21.40 +				Name="VCLinkerTool"
   21.41 +				AdditionalDependencies="&quot;$(HL2SDK)\lib\public\tier0.lib&quot; &quot;$(HL2SDK)\lib\public\tier1.lib&quot; &quot;$(HL2SDK)\lib\public\vstdlib.lib&quot;"
   21.42 +				OutputFile="$(OutDir)\sample_mm.dll"
   21.43 +				LinkIncremental="1"
   21.44 +				IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
   21.45 +				GenerateDebugInformation="true"
   21.46 +				SubSystem="2"
   21.47 +				OptimizeReferences="2"
   21.48 +				EnableCOMDATFolding="2"
   21.49 +				TargetMachine="1"
   21.50 +			/>
   21.51 +			<Tool
   21.52 +				Name="VCALinkTool"
   21.53 +			/>
   21.54 +			<Tool
   21.55 +				Name="VCManifestTool"
   21.56 +			/>
   21.57 +			<Tool
   21.58 +				Name="VCXDCMakeTool"
   21.59 +			/>
   21.60 +			<Tool
   21.61 +				Name="VCBscMakeTool"
   21.62 +			/>
   21.63 +			<Tool
   21.64 +				Name="VCFxCopTool"
   21.65 +			/>
   21.66 +			<Tool
   21.67 +				Name="VCAppVerifierTool"
   21.68 +			/>
   21.69 +			<Tool
   21.70 +				Name="VCWebDeploymentTool"
   21.71 +			/>
   21.72 +			<Tool
   21.73 +				Name="VCPostBuildEventTool"
   21.74 +			/>
   21.75 +		</Configuration>
   21.76 +		<Configuration
   21.77 +			Name="Debug - Dark Messiah|Win32"
   21.78 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
   21.79 +			IntermediateDirectory="$(ConfigurationName)"
   21.80 +			ConfigurationType="2"
   21.81 +			CharacterSet="2"
   21.82 +			>
   21.83 +			<Tool
   21.84 +				Name="VCPreBuildEventTool"
   21.85 +			/>
   21.86 +			<Tool
   21.87 +				Name="VCCustomBuildTool"
   21.88 +			/>
   21.89 +			<Tool
   21.90 +				Name="VCXMLDataGeneratorTool"
   21.91 +			/>
   21.92 +			<Tool
   21.93 +				Name="VCWebServiceProxyGeneratorTool"
   21.94 +			/>
   21.95 +			<Tool
   21.96 +				Name="VCMIDLTool"
   21.97 +			/>
   21.98 +			<Tool
   21.99 +				Name="VCCLCompilerTool"
  21.100 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  21.101 +				Optimization="0"
  21.102 +				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(HL2SDK-DARKM)\public\vstdlib&quot;"
  21.103 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=2"
  21.104 +				MinimalRebuild="true"
  21.105 +				BasicRuntimeChecks="3"
  21.106 +				RuntimeLibrary="1"
  21.107 +				UsePrecompiledHeader="0"
  21.108 +				WarningLevel="3"
  21.109 +				Detect64BitPortabilityProblems="false"
  21.110 +				DebugInformationFormat="4"
  21.111 +			/>
  21.112 +			<Tool
  21.113 +				Name="VCManagedResourceCompilerTool"
  21.114 +			/>
  21.115 +			<Tool
  21.116 +				Name="VCResourceCompilerTool"
  21.117 +			/>
  21.118 +			<Tool
  21.119 +				Name="VCPreLinkEventTool"
  21.120 +			/>
  21.121 +			<Tool
  21.122 +				Name="VCLinkerTool"
  21.123 +				AdditionalDependencies="&quot;$(HL2SDK-DARKM)\lib\public\tier0.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\tier1.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\vstdlib.lib&quot;"
  21.124 +				OutputFile="$(OutDir)\sample_mm.dll"
  21.125 +				LinkIncremental="2"
  21.126 +				IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
  21.127 +				GenerateDebugInformation="true"
  21.128 +				SubSystem="2"
  21.129 +				TargetMachine="1"
  21.130 +			/>
  21.131 +			<Tool
  21.132 +				Name="VCALinkTool"
  21.133 +			/>
  21.134 +			<Tool
  21.135 +				Name="VCManifestTool"
  21.136 +			/>
  21.137 +			<Tool
  21.138 +				Name="VCXDCMakeTool"
  21.139 +			/>
  21.140 +			<Tool
  21.141 +				Name="VCBscMakeTool"
  21.142 +			/>
  21.143 +			<Tool
  21.144 +				Name="VCFxCopTool"
  21.145 +			/>
  21.146 +			<Tool
  21.147 +				Name="VCAppVerifierTool"
  21.148 +			/>
  21.149 +			<Tool
  21.150 +				Name="VCWebDeploymentTool"
  21.151 +			/>
  21.152 +			<Tool
  21.153 +				Name="VCPostBuildEventTool"
  21.154 +			/>
  21.155 +		</Configuration>
  21.156 +		<Configuration
  21.157 +			Name="Release - Dark Messiah|Win32"
  21.158 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
  21.159 +			IntermediateDirectory="$(ConfigurationName)"
  21.160 +			ConfigurationType="2"
  21.161 +			CharacterSet="2"
  21.162 +			WholeProgramOptimization="1"
  21.163 +			>
  21.164 +			<Tool
  21.165 +				Name="VCPreBuildEventTool"
  21.166 +			/>
  21.167 +			<Tool
  21.168 +				Name="VCCustomBuildTool"
  21.169 +			/>
  21.170 +			<Tool
  21.171 +				Name="VCXMLDataGeneratorTool"
  21.172 +			/>
  21.173 +			<Tool
  21.174 +				Name="VCWebServiceProxyGeneratorTool"
  21.175 +			/>
  21.176 +			<Tool
  21.177 +				Name="VCMIDLTool"
  21.178 +			/>
  21.179 +			<Tool
  21.180 +				Name="VCCLCompilerTool"
  21.181 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  21.182 +				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(HL2SDK-DARKM)\public\vstdlib&quot;"
  21.183  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=2"
  21.184  				RuntimeLibrary="0"
  21.185  				UsePrecompiledHeader="0"
  21.186 @@ -140,7 +300,7 @@
  21.187  			/>
  21.188  			<Tool
  21.189  				Name="VCLinkerTool"
  21.190 -				AdditionalDependencies="&quot;$(HL2SDK)\lib\public\tier0.lib&quot; &quot;$(HL2SDK)\lib\public\tier1.lib&quot; &quot;$(HL2SDK)\lib\public\vstdlib.lib&quot;"
  21.191 +				AdditionalDependencies="&quot;$(HL2SDK-DARKM)\lib\public\tier0.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\tier1.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\vstdlib.lib&quot;"
  21.192  				OutputFile="$(OutDir)\sample_mm.dll"
  21.193  				LinkIncremental="1"
  21.194  				IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
  21.195 @@ -199,7 +359,7 @@
  21.196  			/>
  21.197  			<Tool
  21.198  				Name="VCCLCompilerTool"
  21.199 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  21.200 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  21.201  				Optimization="0"
  21.202  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
  21.203  				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=3"
  21.204 @@ -280,7 +440,7 @@
  21.205  			/>
  21.206  			<Tool
  21.207  				Name="VCCLCompilerTool"
  21.208 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  21.209 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  21.210  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
  21.211  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=3"
  21.212  				RuntimeLibrary="0"
  21.213 @@ -359,7 +519,7 @@
  21.214  			/>
  21.215  			<Tool
  21.216  				Name="VCCLCompilerTool"
  21.217 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  21.218 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  21.219  				Optimization="0"
  21.220  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
  21.221  				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=4"
  21.222 @@ -440,7 +600,7 @@
  21.223  			/>
  21.224  			<Tool
  21.225  				Name="VCCLCompilerTool"
  21.226 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  21.227 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  21.228  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
  21.229  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=4"
  21.230  				RuntimeLibrary="0"
    22.1 --- a/sample_mm/msvc9/sample_mm.sln	Mon Feb 16 18:13:31 2009 -0500
    22.2 +++ b/sample_mm/msvc9/sample_mm.sln	Wed Feb 18 01:38:23 2009 -0600
    22.3 @@ -5,20 +5,26 @@
    22.4  EndProject
    22.5  Global
    22.6  	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    22.7 +		Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
    22.8  		Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32
    22.9  		Debug - Orange Box|Win32 = Debug - Orange Box|Win32
   22.10  		Debug - Original|Win32 = Debug - Original|Win32
   22.11 +		Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32
   22.12  		Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32
   22.13  		Release - Orange Box|Win32 = Release - Orange Box|Win32
   22.14  		Release - Original|Win32 = Release - Original|Win32
   22.15  	EndGlobalSection
   22.16  	GlobalSection(ProjectConfigurationPlatforms) = postSolution
   22.17 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32
   22.18 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
   22.19  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
   22.20  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
   22.21  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
   22.22  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
   22.23  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.ActiveCfg = Debug - Original|Win32
   22.24  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.Build.0 = Debug - Original|Win32
   22.25 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32
   22.26 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
   22.27  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
   22.28  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
   22.29  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
    23.1 --- a/sample_mm/msvc9/sample_mm.vcproj	Mon Feb 16 18:13:31 2009 -0500
    23.2 +++ b/sample_mm/msvc9/sample_mm.vcproj	Wed Feb 18 01:38:23 2009 -0600
    23.3 @@ -40,10 +40,10 @@
    23.4  			/>
    23.5  			<Tool
    23.6  				Name="VCCLCompilerTool"
    23.7 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    23.8 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    23.9  				Optimization="0"
   23.10  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(HL2SDK)\public\vstdlib&quot;"
   23.11 -				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=2"
   23.12 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=1"
   23.13  				MinimalRebuild="true"
   23.14  				BasicRuntimeChecks="3"
   23.15  				RuntimeLibrary="1"
   23.16 @@ -120,8 +120,166 @@
   23.17  			/>
   23.18  			<Tool
   23.19  				Name="VCCLCompilerTool"
   23.20 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   23.21 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   23.22  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(HL2SDK)\public\vstdlib&quot;"
   23.23 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=1"
   23.24 +				RuntimeLibrary="0"
   23.25 +				UsePrecompiledHeader="0"
   23.26 +				WarningLevel="3"
   23.27 +				Detect64BitPortabilityProblems="false"
   23.28 +				DebugInformationFormat="3"
   23.29 +			/>
   23.30 +			<Tool
   23.31 +				Name="VCManagedResourceCompilerTool"
   23.32 +			/>
   23.33 +			<Tool
   23.34 +				Name="VCResourceCompilerTool"
   23.35 +			/>
   23.36 +			<Tool
   23.37 +				Name="VCPreLinkEventTool"
   23.38 +			/>
   23.39 +			<Tool
   23.40 +				Name="VCLinkerTool"
   23.41 +				AdditionalDependencies="&quot;$(HL2SDK)\lib\public\tier0.lib&quot; &quot;$(HL2SDK)\lib\public\tier1.lib&quot; &quot;$(HL2SDK)\lib\public\vstdlib.lib&quot;"
   23.42 +				OutputFile="$(OutDir)\sample_mm.dll"
   23.43 +				LinkIncremental="1"
   23.44 +				IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
   23.45 +				GenerateDebugInformation="true"
   23.46 +				SubSystem="2"
   23.47 +				OptimizeReferences="2"
   23.48 +				EnableCOMDATFolding="2"
   23.49 +				RandomizedBaseAddress="1"
   23.50 +				DataExecutionPrevention="0"
   23.51 +				TargetMachine="1"
   23.52 +			/>
   23.53 +			<Tool
   23.54 +				Name="VCALinkTool"
   23.55 +			/>
   23.56 +			<Tool
   23.57 +				Name="VCManifestTool"
   23.58 +			/>
   23.59 +			<Tool
   23.60 +				Name="VCXDCMakeTool"
   23.61 +			/>
   23.62 +			<Tool
   23.63 +				Name="VCBscMakeTool"
   23.64 +			/>
   23.65 +			<Tool
   23.66 +				Name="VCFxCopTool"
   23.67 +			/>
   23.68 +			<Tool
   23.69 +				Name="VCAppVerifierTool"
   23.70 +			/>
   23.71 +			<Tool
   23.72 +				Name="VCPostBuildEventTool"
   23.73 +			/>
   23.74 +		</Configuration>
   23.75 +		<Configuration
   23.76 +			Name="Debug - Dark Messiah|Win32"
   23.77 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
   23.78 +			IntermediateDirectory="$(ConfigurationName)"
   23.79 +			ConfigurationType="2"
   23.80 +			CharacterSet="2"
   23.81 +			>
   23.82 +			<Tool
   23.83 +				Name="VCPreBuildEventTool"
   23.84 +			/>
   23.85 +			<Tool
   23.86 +				Name="VCCustomBuildTool"
   23.87 +			/>
   23.88 +			<Tool
   23.89 +				Name="VCXMLDataGeneratorTool"
   23.90 +			/>
   23.91 +			<Tool
   23.92 +				Name="VCWebServiceProxyGeneratorTool"
   23.93 +			/>
   23.94 +			<Tool
   23.95 +				Name="VCMIDLTool"
   23.96 +			/>
   23.97 +			<Tool
   23.98 +				Name="VCCLCompilerTool"
   23.99 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  23.100 +				Optimization="0"
  23.101 +				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(HL2SDK-DARKM)\public\vstdlib&quot;"
  23.102 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=2"
  23.103 +				MinimalRebuild="true"
  23.104 +				BasicRuntimeChecks="3"
  23.105 +				RuntimeLibrary="1"
  23.106 +				UsePrecompiledHeader="0"
  23.107 +				WarningLevel="3"
  23.108 +				Detect64BitPortabilityProblems="false"
  23.109 +				DebugInformationFormat="4"
  23.110 +			/>
  23.111 +			<Tool
  23.112 +				Name="VCManagedResourceCompilerTool"
  23.113 +			/>
  23.114 +			<Tool
  23.115 +				Name="VCResourceCompilerTool"
  23.116 +			/>
  23.117 +			<Tool
  23.118 +				Name="VCPreLinkEventTool"
  23.119 +			/>
  23.120 +			<Tool
  23.121 +				Name="VCLinkerTool"
  23.122 +				AdditionalDependencies="&quot;$(HL2SDK-DARKM)\lib\public\tier0.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\tier1.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\vstdlib.lib&quot;"
  23.123 +				OutputFile="$(OutDir)\sample_mm.dll"
  23.124 +				LinkIncremental="2"
  23.125 +				IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
  23.126 +				GenerateDebugInformation="true"
  23.127 +				SubSystem="2"
  23.128 +				RandomizedBaseAddress="1"
  23.129 +				DataExecutionPrevention="0"
  23.130 +				TargetMachine="1"
  23.131 +			/>
  23.132 +			<Tool
  23.133 +				Name="VCALinkTool"
  23.134 +			/>
  23.135 +			<Tool
  23.136 +				Name="VCManifestTool"
  23.137 +			/>
  23.138 +			<Tool
  23.139 +				Name="VCXDCMakeTool"
  23.140 +			/>
  23.141 +			<Tool
  23.142 +				Name="VCBscMakeTool"
  23.143 +			/>
  23.144 +			<Tool
  23.145 +				Name="VCFxCopTool"
  23.146 +			/>
  23.147 +			<Tool
  23.148 +				Name="VCAppVerifierTool"
  23.149 +			/>
  23.150 +			<Tool
  23.151 +				Name="VCPostBuildEventTool"
  23.152 +			/>
  23.153 +		</Configuration>
  23.154 +		<Configuration
  23.155 +			Name="Release - Dark Messiah|Win32"
  23.156 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
  23.157 +			IntermediateDirectory="$(ConfigurationName)"
  23.158 +			ConfigurationType="2"
  23.159 +			CharacterSet="2"
  23.160 +			WholeProgramOptimization="1"
  23.161 +			>
  23.162 +			<Tool
  23.163 +				Name="VCPreBuildEventTool"
  23.164 +			/>
  23.165 +			<Tool
  23.166 +				Name="VCCustomBuildTool"
  23.167 +			/>
  23.168 +			<Tool
  23.169 +				Name="VCXMLDataGeneratorTool"
  23.170 +			/>
  23.171 +			<Tool
  23.172 +				Name="VCWebServiceProxyGeneratorTool"
  23.173 +			/>
  23.174 +			<Tool
  23.175 +				Name="VCMIDLTool"
  23.176 +			/>
  23.177 +			<Tool
  23.178 +				Name="VCCLCompilerTool"
  23.179 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  23.180 +				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(HL2SDK-DARKM)\public\vstdlib&quot;"
  23.181  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=2"
  23.182  				RuntimeLibrary="0"
  23.183  				UsePrecompiledHeader="0"
  23.184 @@ -140,7 +298,7 @@
  23.185  			/>
  23.186  			<Tool
  23.187  				Name="VCLinkerTool"
  23.188 -				AdditionalDependencies="&quot;$(HL2SDK)\lib\public\tier0.lib&quot; &quot;$(HL2SDK)\lib\public\tier1.lib&quot; &quot;$(HL2SDK)\lib\public\vstdlib.lib&quot;"
  23.189 +				AdditionalDependencies="&quot;$(HL2SDK-DARKM)\lib\public\tier0.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\tier1.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\vstdlib.lib&quot;"
  23.190  				OutputFile="$(OutDir)\sample_mm.dll"
  23.191  				LinkIncremental="1"
  23.192  				IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
  23.193 @@ -198,7 +356,7 @@
  23.194  			/>
  23.195  			<Tool
  23.196  				Name="VCCLCompilerTool"
  23.197 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  23.198 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  23.199  				Optimization="0"
  23.200  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
  23.201  				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=3"
  23.202 @@ -278,7 +436,7 @@
  23.203  			/>
  23.204  			<Tool
  23.205  				Name="VCCLCompilerTool"
  23.206 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  23.207 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  23.208  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
  23.209  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=3"
  23.210  				RuntimeLibrary="0"
  23.211 @@ -356,7 +514,7 @@
  23.212  			/>
  23.213  			<Tool
  23.214  				Name="VCCLCompilerTool"
  23.215 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  23.216 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  23.217  				Optimization="0"
  23.218  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
  23.219  				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=4"
  23.220 @@ -436,7 +594,7 @@
  23.221  			/>
  23.222  			<Tool
  23.223  				Name="VCCLCompilerTool"
  23.224 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  23.225 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  23.226  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
  23.227  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=4"
  23.228  				RuntimeLibrary="0"
    24.1 --- a/sample_mm/sample_mm.cpp	Mon Feb 16 18:13:31 2009 -0500
    24.2 +++ b/sample_mm/sample_mm.cpp	Wed Feb 18 01:38:23 2009 -0600
    24.3 @@ -100,7 +100,7 @@
    24.4  	SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientConnect, gameclients, this, &SamplePlugin::Hook_ClientConnect, false);
    24.5  	SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientCommand, gameclients, this, &SamplePlugin::Hook_ClientCommand, false);
    24.6  
    24.7 -#if SOURCE_ENGINE == SE_EPISODEONE
    24.8 +#if !defined METAMOD_PLAPI_VERSION
    24.9  	m_EngineCC = SH_GET_CALLCLASS(engine);
   24.10  #endif
   24.11  
   24.12 @@ -130,7 +130,7 @@
   24.13  	SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, gameclients, this, &SamplePlugin::Hook_ClientConnect, false);
   24.14  	SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientCommand, gameclients, this, &SamplePlugin::Hook_ClientCommand, false);
   24.15  
   24.16 -#if SOURCE_ENGINE == SE_EPISODEONE
   24.17 +#if !defined METAMOD_PLAPI_VERSION
   24.18  	SH_RELEASE_CALLCLASS(m_EngineCC);
   24.19  #endif
   24.20  
   24.21 @@ -165,7 +165,7 @@
   24.22  void SamplePlugin::Hook_ClientCommand(edict_t *pEntity)
   24.23  #endif
   24.24  {
   24.25 -#if SOURCE_ENGINE == SE_EPISODEONE
   24.26 +#if SOURCE_ENGINE <= SE_DARKMESSIAH
   24.27  	CCommand args;
   24.28  #endif
   24.29  
    25.1 --- a/sample_mm/sample_mm.h	Mon Feb 16 18:13:31 2009 -0500
    25.2 +++ b/sample_mm/sample_mm.h	Wed Feb 18 01:38:23 2009 -0600
    25.3 @@ -72,7 +72,7 @@
    25.4  	const char *GetDate();
    25.5  	const char *GetLogTag();
    25.6  private:
    25.7 -#if SOURCE_ENGINE == SE_EPISODEONE
    25.8 +#if !defined METAMOD_PLAPI_VERSION
    25.9  	SourceHook::CallClass<IVEngineServer> *m_EngineCC;
   25.10  #endif
   25.11  };
    26.1 --- a/stub_mm/msvc8/stub_mm.sln	Mon Feb 16 18:13:31 2009 -0500
    26.2 +++ b/stub_mm/msvc8/stub_mm.sln	Wed Feb 18 01:38:23 2009 -0600
    26.3 @@ -5,20 +5,26 @@
    26.4  EndProject
    26.5  Global
    26.6  	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    26.7 +		Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
    26.8  		Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32
    26.9  		Debug - Orange Box|Win32 = Debug - Orange Box|Win32
   26.10  		Debug - Original|Win32 = Debug - Original|Win32
   26.11 +		Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32
   26.12  		Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32
   26.13  		Release - Orange Box|Win32 = Release - Orange Box|Win32
   26.14  		Release - Original|Win32 = Release - Original|Win32
   26.15  	EndGlobalSection
   26.16  	GlobalSection(ProjectConfigurationPlatforms) = postSolution
   26.17 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32
   26.18 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
   26.19  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
   26.20  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
   26.21  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
   26.22  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
   26.23  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.ActiveCfg = Debug - Original|Win32
   26.24  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.Build.0 = Debug - Original|Win32
   26.25 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32
   26.26 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
   26.27  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
   26.28  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
   26.29  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
   26.30 @@ -27,6 +33,6 @@
   26.31  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.Build.0 = Release - Original|Win32
   26.32  	EndGlobalSection
   26.33  	GlobalSection(SolutionProperties) = preSolution
   26.34 -		HideSolutionNode =  FALSE
   26.35 +		HideSolutionNode = FALSE
   26.36  	EndGlobalSection
   26.37  EndGlobal
    27.1 --- a/stub_mm/msvc8/stub_mm.vcproj	Mon Feb 16 18:13:31 2009 -0500
    27.2 +++ b/stub_mm/msvc8/stub_mm.vcproj	Wed Feb 18 01:38:23 2009 -0600
    27.3 @@ -39,7 +39,7 @@
    27.4  			/>
    27.5  			<Tool
    27.6  				Name="VCCLCompilerTool"
    27.7 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    27.8 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    27.9  				Optimization="0"
   27.10  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(HL2SDK)\public\vstdlib&quot;"
   27.11  				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=2"
   27.12 @@ -120,7 +120,7 @@
   27.13  			/>
   27.14  			<Tool
   27.15  				Name="VCCLCompilerTool"
   27.16 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   27.17 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   27.18  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(HL2SDK)\public\vstdlib&quot;"
   27.19  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=2"
   27.20  				RuntimeLibrary="0"
   27.21 @@ -176,6 +176,166 @@
   27.22  			/>
   27.23  		</Configuration>
   27.24  		<Configuration
   27.25 +			Name="Debug - Dark Messiah|Win32"
   27.26 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
   27.27 +			IntermediateDirectory="$(ConfigurationName)"
   27.28 +			ConfigurationType="2"
   27.29 +			CharacterSet="2"
   27.30 +			>
   27.31 +			<Tool
   27.32 +				Name="VCPreBuildEventTool"
   27.33 +			/>
   27.34 +			<Tool
   27.35 +				Name="VCCustomBuildTool"
   27.36 +			/>
   27.37 +			<Tool
   27.38 +				Name="VCXMLDataGeneratorTool"
   27.39 +			/>
   27.40 +			<Tool
   27.41 +				Name="VCWebServiceProxyGeneratorTool"
   27.42 +			/>
   27.43 +			<Tool
   27.44 +				Name="VCMIDLTool"
   27.45 +			/>
   27.46 +			<Tool
   27.47 +				Name="VCCLCompilerTool"
   27.48 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   27.49 +				Optimization="0"
   27.50 +				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(HL2SDK-DARKM)\public\vstdlib&quot;"
   27.51 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=3"
   27.52 +				MinimalRebuild="true"
   27.53 +				BasicRuntimeChecks="3"
   27.54 +				RuntimeLibrary="1"
   27.55 +				UsePrecompiledHeader="0"
   27.56 +				WarningLevel="3"
   27.57 +				Detect64BitPortabilityProblems="false"
   27.58 +				DebugInformationFormat="4"
   27.59 +			/>
   27.60 +			<Tool
   27.61 +				Name="VCManagedResourceCompilerTool"
   27.62 +			/>
   27.63 +			<Tool
   27.64 +				Name="VCResourceCompilerTool"
   27.65 +			/>
   27.66 +			<Tool
   27.67 +				Name="VCPreLinkEventTool"
   27.68 +			/>
   27.69 +			<Tool
   27.70 +				Name="VCLinkerTool"
   27.71 +				AdditionalDependencies="&quot;$(HL2SDK-DARKM)\lib\public\tier0.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\tier1.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\vstdlib.lib&quot;"
   27.72 +				OutputFile="$(OutDir)\stub_mm.dll"
   27.73 +				LinkIncremental="2"
   27.74 +				IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
   27.75 +				GenerateDebugInformation="true"
   27.76 +				SubSystem="2"
   27.77 +				TargetMachine="1"
   27.78 +			/>
   27.79 +			<Tool
   27.80 +				Name="VCALinkTool"
   27.81 +			/>
   27.82 +			<Tool
   27.83 +				Name="VCManifestTool"
   27.84 +			/>
   27.85 +			<Tool
   27.86 +				Name="VCXDCMakeTool"
   27.87 +			/>
   27.88 +			<Tool
   27.89 +				Name="VCBscMakeTool"
   27.90 +			/>
   27.91 +			<Tool
   27.92 +				Name="VCFxCopTool"
   27.93 +			/>
   27.94 +			<Tool
   27.95 +				Name="VCAppVerifierTool"
   27.96 +			/>
   27.97 +			<Tool
   27.98 +				Name="VCWebDeploymentTool"
   27.99 +			/>
  27.100 +			<Tool
  27.101 +				Name="VCPostBuildEventTool"
  27.102 +			/>
  27.103 +		</Configuration>
  27.104 +		<Configuration
  27.105 +			Name="Release - Dark Messiah|Win32"
  27.106 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
  27.107 +			IntermediateDirectory="$(ConfigurationName)"
  27.108 +			ConfigurationType="2"
  27.109 +			CharacterSet="2"
  27.110 +			WholeProgramOptimization="1"
  27.111 +			>
  27.112 +			<Tool
  27.113 +				Name="VCPreBuildEventTool"
  27.114 +			/>
  27.115 +			<Tool
  27.116 +				Name="VCCustomBuildTool"
  27.117 +			/>
  27.118 +			<Tool
  27.119 +				Name="VCXMLDataGeneratorTool"
  27.120 +			/>
  27.121 +			<Tool
  27.122 +				Name="VCWebServiceProxyGeneratorTool"
  27.123 +			/>
  27.124 +			<Tool
  27.125 +				Name="VCMIDLTool"
  27.126 +			/>
  27.127 +			<Tool
  27.128 +				Name="VCCLCompilerTool"
  27.129 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  27.130 +				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(HL2SDK-DARKM)\public\vstdlib&quot;"
  27.131 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=3"
  27.132 +				RuntimeLibrary="0"
  27.133 +				UsePrecompiledHeader="0"
  27.134 +				WarningLevel="3"
  27.135 +				Detect64BitPortabilityProblems="false"
  27.136 +				DebugInformationFormat="3"
  27.137 +			/>
  27.138 +			<Tool
  27.139 +				Name="VCManagedResourceCompilerTool"
  27.140 +			/>
  27.141 +			<Tool
  27.142 +				Name="VCResourceCompilerTool"
  27.143 +			/>
  27.144 +			<Tool
  27.145 +				Name="VCPreLinkEventTool"
  27.146 +			/>
  27.147 +			<Tool
  27.148 +				Name="VCLinkerTool"
  27.149 +				AdditionalDependencies="&quot;$(HL2SDK-DARKM)\lib\public\tier0.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\tier1.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\vstdlib.lib&quot;"
  27.150 +				OutputFile="$(OutDir)\stub_mm.dll"
  27.151 +				LinkIncremental="1"
  27.152 +				IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
  27.153 +				GenerateDebugInformation="true"
  27.154 +				SubSystem="2"
  27.155 +				OptimizeReferences="2"
  27.156 +				EnableCOMDATFolding="2"
  27.157 +				TargetMachine="1"
  27.158 +			/>
  27.159 +			<Tool
  27.160 +				Name="VCALinkTool"
  27.161 +			/>
  27.162 +			<Tool
  27.163 +				Name="VCManifestTool"
  27.164 +			/>
  27.165 +			<Tool
  27.166 +				Name="VCXDCMakeTool"
  27.167 +			/>
  27.168 +			<Tool
  27.169 +				Name="VCBscMakeTool"
  27.170 +			/>
  27.171 +			<Tool
  27.172 +				Name="VCFxCopTool"
  27.173 +			/>
  27.174 +			<Tool
  27.175 +				Name="VCAppVerifierTool"
  27.176 +			/>
  27.177 +			<Tool
  27.178 +				Name="VCWebDeploymentTool"
  27.179 +			/>
  27.180 +			<Tool
  27.181 +				Name="VCPostBuildEventTool"
  27.182 +			/>
  27.183 +		</Configuration>
  27.184 +		<Configuration
  27.185  			Name="Debug - Orange Box|Win32"
  27.186  			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
  27.187  			IntermediateDirectory="$(ConfigurationName)"
  27.188 @@ -199,7 +359,7 @@
  27.189  			/>
  27.190  			<Tool
  27.191  				Name="VCCLCompilerTool"
  27.192 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  27.193 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  27.194  				Optimization="0"
  27.195  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
  27.196  				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=3"
  27.197 @@ -280,7 +440,7 @@
  27.198  			/>
  27.199  			<Tool
  27.200  				Name="VCCLCompilerTool"
  27.201 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  27.202 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  27.203  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
  27.204  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=3"
  27.205  				RuntimeLibrary="0"
  27.206 @@ -359,7 +519,7 @@
  27.207  			/>
  27.208  			<Tool
  27.209  				Name="VCCLCompilerTool"
  27.210 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  27.211 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  27.212  				Optimization="0"
  27.213  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
  27.214  				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=4"
  27.215 @@ -440,7 +600,7 @@
  27.216  			/>
  27.217  			<Tool
  27.218  				Name="VCCLCompilerTool"
  27.219 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  27.220 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  27.221  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
  27.222  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=4"
  27.223  				RuntimeLibrary="0"
    28.1 --- a/stub_mm/msvc9/stub_mm.sln	Mon Feb 16 18:13:31 2009 -0500
    28.2 +++ b/stub_mm/msvc9/stub_mm.sln	Wed Feb 18 01:38:23 2009 -0600
    28.3 @@ -5,20 +5,26 @@
    28.4  EndProject
    28.5  Global
    28.6  	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    28.7 +		Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
    28.8  		Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32
    28.9  		Debug - Orange Box|Win32 = Debug - Orange Box|Win32
   28.10  		Debug - Original|Win32 = Debug - Original|Win32
   28.11 +		Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32
   28.12  		Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32
   28.13  		Release - Orange Box|Win32 = Release - Orange Box|Win32
   28.14  		Release - Original|Win32 = Release - Original|Win32
   28.15  	EndGlobalSection
   28.16  	GlobalSection(ProjectConfigurationPlatforms) = postSolution
   28.17 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32
   28.18 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
   28.19  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
   28.20  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
   28.21  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
   28.22  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
   28.23  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.ActiveCfg = Debug - Original|Win32
   28.24  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.Build.0 = Debug - Original|Win32
   28.25 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32
   28.26 +		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
   28.27  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
   28.28  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
   28.29  		{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
    29.1 --- a/stub_mm/msvc9/stub_mm.vcproj	Mon Feb 16 18:13:31 2009 -0500
    29.2 +++ b/stub_mm/msvc9/stub_mm.vcproj	Wed Feb 18 01:38:23 2009 -0600
    29.3 @@ -40,7 +40,7 @@
    29.4  			/>
    29.5  			<Tool
    29.6  				Name="VCCLCompilerTool"
    29.7 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    29.8 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
    29.9  				Optimization="0"
   29.10  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(HL2SDK)\public\vstdlib&quot;"
   29.11  				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=2"
   29.12 @@ -120,7 +120,7 @@
   29.13  			/>
   29.14  			<Tool
   29.15  				Name="VCCLCompilerTool"
   29.16 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   29.17 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   29.18  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(HL2SDK)\public\vstdlib&quot;"
   29.19  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=2"
   29.20  				RuntimeLibrary="0"
   29.21 @@ -175,6 +175,164 @@
   29.22  			/>
   29.23  		</Configuration>
   29.24  		<Configuration
   29.25 +			Name="Debug - Dark Messiah|Win32"
   29.26 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
   29.27 +			IntermediateDirectory="$(ConfigurationName)"
   29.28 +			ConfigurationType="2"
   29.29 +			CharacterSet="2"
   29.30 +			>
   29.31 +			<Tool
   29.32 +				Name="VCPreBuildEventTool"
   29.33 +			/>
   29.34 +			<Tool
   29.35 +				Name="VCCustomBuildTool"
   29.36 +			/>
   29.37 +			<Tool
   29.38 +				Name="VCXMLDataGeneratorTool"
   29.39 +			/>
   29.40 +			<Tool
   29.41 +				Name="VCWebServiceProxyGeneratorTool"
   29.42 +			/>
   29.43 +			<Tool
   29.44 +				Name="VCMIDLTool"
   29.45 +			/>
   29.46 +			<Tool
   29.47 +				Name="VCCLCompilerTool"
   29.48 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
   29.49 +				Optimization="0"
   29.50 +				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(HL2SDK-DARKM)\public\vstdlib&quot;"
   29.51 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=3"
   29.52 +				MinimalRebuild="true"
   29.53 +				BasicRuntimeChecks="3"
   29.54 +				RuntimeLibrary="1"
   29.55 +				UsePrecompiledHeader="0"
   29.56 +				WarningLevel="3"
   29.57 +				Detect64BitPortabilityProblems="false"
   29.58 +				DebugInformationFormat="4"
   29.59 +			/>
   29.60 +			<Tool
   29.61 +				Name="VCManagedResourceCompilerTool"
   29.62 +			/>
   29.63 +			<Tool
   29.64 +				Name="VCResourceCompilerTool"
   29.65 +			/>
   29.66 +			<Tool
   29.67 +				Name="VCPreLinkEventTool"
   29.68 +			/>
   29.69 +			<Tool
   29.70 +				Name="VCLinkerTool"
   29.71 +				AdditionalDependencies="&quot;$(HL2SDK-DARKM)\lib\public\tier0.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\tier1.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\vstdlib.lib&quot;"
   29.72 +				OutputFile="$(OutDir)\stub_mm.dll"
   29.73 +				LinkIncremental="2"
   29.74 +				IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
   29.75 +				GenerateDebugInformation="true"
   29.76 +				SubSystem="2"
   29.77 +				RandomizedBaseAddress="1"
   29.78 +				DataExecutionPrevention="0"
   29.79 +				TargetMachine="1"
   29.80 +			/>
   29.81 +			<Tool
   29.82 +				Name="VCALinkTool"
   29.83 +			/>
   29.84 +			<Tool
   29.85 +				Name="VCManifestTool"
   29.86 +			/>
   29.87 +			<Tool
   29.88 +				Name="VCXDCMakeTool"
   29.89 +			/>
   29.90 +			<Tool
   29.91 +				Name="VCBscMakeTool"
   29.92 +			/>
   29.93 +			<Tool
   29.94 +				Name="VCFxCopTool"
   29.95 +			/>
   29.96 +			<Tool
   29.97 +				Name="VCAppVerifierTool"
   29.98 +			/>
   29.99 +			<Tool
  29.100 +				Name="VCPostBuildEventTool"
  29.101 +			/>
  29.102 +		</Configuration>
  29.103 +		<Configuration
  29.104 +			Name="Release - Dark Messiah|Win32"
  29.105 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
  29.106 +			IntermediateDirectory="$(ConfigurationName)"
  29.107 +			ConfigurationType="2"
  29.108 +			CharacterSet="2"
  29.109 +			WholeProgramOptimization="1"
  29.110 +			>
  29.111 +			<Tool
  29.112 +				Name="VCPreBuildEventTool"
  29.113 +			/>
  29.114 +			<Tool
  29.115 +				Name="VCCustomBuildTool"
  29.116 +			/>
  29.117 +			<Tool
  29.118 +				Name="VCXMLDataGeneratorTool"
  29.119 +			/>
  29.120 +			<Tool
  29.121 +				Name="VCWebServiceProxyGeneratorTool"
  29.122 +			/>
  29.123 +			<Tool
  29.124 +				Name="VCMIDLTool"
  29.125 +			/>
  29.126 +			<Tool
  29.127 +				Name="VCCLCompilerTool"
  29.128 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  29.129 +				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(HL2SDK-DARKM)\public\vstdlib&quot;"
  29.130 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=3"
  29.131 +				RuntimeLibrary="0"
  29.132 +				UsePrecompiledHeader="0"
  29.133 +				WarningLevel="3"
  29.134 +				Detect64BitPortabilityProblems="false"
  29.135 +				DebugInformationFormat="3"
  29.136 +			/>
  29.137 +			<Tool
  29.138 +				Name="VCManagedResourceCompilerTool"
  29.139 +			/>
  29.140 +			<Tool
  29.141 +				Name="VCResourceCompilerTool"
  29.142 +			/>
  29.143 +			<Tool
  29.144 +				Name="VCPreLinkEventTool"
  29.145 +			/>
  29.146 +			<Tool
  29.147 +				Name="VCLinkerTool"
  29.148 +				AdditionalDependencies="&quot;$(HL2SDK-DARKM)\lib\public\tier0.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\tier1.lib&quot; &quot;$(HL2SDK-DARKM)\lib\public\vstdlib.lib&quot;"
  29.149 +				OutputFile="$(OutDir)\stub_mm.dll"
  29.150 +				LinkIncremental="1"
  29.151 +				IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
  29.152 +				GenerateDebugInformation="true"
  29.153 +				SubSystem="2"
  29.154 +				OptimizeReferences="2"
  29.155 +				EnableCOMDATFolding="2"
  29.156 +				RandomizedBaseAddress="1"
  29.157 +				DataExecutionPrevention="0"
  29.158 +				TargetMachine="1"
  29.159 +			/>
  29.160 +			<Tool
  29.161 +				Name="VCALinkTool"
  29.162 +			/>
  29.163 +			<Tool
  29.164 +				Name="VCManifestTool"
  29.165 +			/>
  29.166 +			<Tool
  29.167 +				Name="VCXDCMakeTool"
  29.168 +			/>
  29.169 +			<Tool
  29.170 +				Name="VCBscMakeTool"
  29.171 +			/>
  29.172 +			<Tool
  29.173 +				Name="VCFxCopTool"
  29.174 +			/>
  29.175 +			<Tool
  29.176 +				Name="VCAppVerifierTool"
  29.177 +			/>
  29.178 +			<Tool
  29.179 +				Name="VCPostBuildEventTool"
  29.180 +			/>
  29.181 +		</Configuration>
  29.182 +		<Configuration
  29.183  			Name="Debug - Orange Box|Win32"
  29.184  			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
  29.185  			IntermediateDirectory="$(ConfigurationName)"
  29.186 @@ -198,7 +356,7 @@
  29.187  			/>
  29.188  			<Tool
  29.189  				Name="VCCLCompilerTool"
  29.190 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  29.191 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  29.192  				Optimization="0"
  29.193  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
  29.194  				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=3"
  29.195 @@ -278,7 +436,7 @@
  29.196  			/>
  29.197  			<Tool
  29.198  				Name="VCCLCompilerTool"
  29.199 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  29.200 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  29.201  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
  29.202  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=3"
  29.203  				RuntimeLibrary="0"
  29.204 @@ -356,7 +514,7 @@
  29.205  			/>
  29.206  			<Tool
  29.207  				Name="VCCLCompilerTool"
  29.208 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  29.209 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  29.210  				Optimization="0"
  29.211  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
  29.212  				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=4"
  29.213 @@ -436,7 +594,7 @@
  29.214  			/>
  29.215  			<Tool
  29.216  				Name="VCCLCompilerTool"
  29.217 -				AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  29.218 +				AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
  29.219  				AdditionalIncludeDirectories="&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
  29.220  				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=4"
  29.221  				RuntimeLibrary="0"
    30.1 --- a/support/buildbot/startbuild.pl	Mon Feb 16 18:13:31 2009 -0500
    30.2 +++ b/support/buildbot/startbuild.pl	Wed Feb 18 01:38:23 2009 -0600
    30.3 @@ -12,11 +12,12 @@
    30.4  chdir('..');
    30.5  chdir('..');
    30.6  
    30.7 -#	   Folder			.vcproj				Engine			Binary				Suffix type
    30.8 -Build('loader', 		'mm_loader', 		'', 			'server', 			'full');
    30.9 -Build('core-legacy',	'mm_core-legacy', 	'', 			'metamod.1.ep1', 	'');
   30.10 -Build('core', 			'mm_core', 			'OrangeBox', 	'metamod.2.ep2', 	'');
   30.11 -Build('core', 			'mm_core', 			'Left4Dead', 	'metamod.2.l4d', 	'');
   30.12 +#	   Folder			.vcproj				Engine			Binary				Suffix type		Platform
   30.13 +Build('loader', 		'mm_loader', 		'', 			'server', 			'full',			'both');
   30.14 +Build('core-legacy',	'mm_core-legacy', 	'', 			'metamod.1.ep1', 	'',				'both');
   30.15 +Build('core', 			'mm_core', 			'OrangeBox', 	'metamod.2.ep2', 	'',				'both');
   30.16 +Build('core', 			'mm_core', 			'Left4Dead', 	'metamod.2.l4d', 	'',				'both');
   30.17 +Build('core',			'mm_core',			'DarkMessiah',	'metamod.2.darkm',	'',				'windows');
   30.18  
   30.19  #Structure our output folder
   30.20  mkdir('OUTPUT');
   30.21 @@ -44,9 +45,9 @@
   30.22  
   30.23  sub Build
   30.24  {
   30.25 -	my ($srcdir, $vcproj, $objdir, $binary, $suffix) = (@_);
   30.26 +	my ($srcdir, $vcproj, $objdir, $binary, $suffix, $platform) = (@_);
   30.27  
   30.28 -	if ($^O eq "linux")
   30.29 +	if ($^O eq "linux" && $platform ne "windows")
   30.30  	{
   30.31  		if ($suffix eq 'full')
   30.32  		{
   30.33 @@ -58,7 +59,7 @@
   30.34  		}
   30.35  		BuildLinux($srcdir, $objdir, $binary);
   30.36  	}
   30.37 -	else
   30.38 +	elsif ($platform ne "linux")
   30.39  	{
   30.40  		$binary .= '.dll';
   30.41  		BuildWindows($srcdir, $vcproj, $objdir, $binary);
   30.42 @@ -82,6 +83,10 @@
   30.43  	{
   30.44  		$param = "Release - Left 4 Dead";
   30.45  	}
   30.46 +	elsif ($build eq "DarkMessiah")
   30.47 +	{
   30.48 +		$param = "Release - Dark Messiah";
   30.49 +	}
   30.50  
   30.51  	print "Clean building $srcdir...\n";
   30.52  	$vcbuilder = $ENV{'VC9BUILDER'};
    31.1 --- a/support/changelog.txt	Mon Feb 16 18:13:31 2009 -0500
    31.2 +++ b/support/changelog.txt	Wed Feb 18 01:38:23 2009 -0600
    31.3 @@ -1,8 +1,16 @@
    31.4 +2009/?/? 1.7.1:
    31.5 + - Added support for the Source engine version that runs Dark Messiah. The
    31.6 +   development of this feature would not be possible without the support of the
    31.7 +   following people from the game's community: Dylan Riggs, Carl Pettengill, Ed
    31.8 +   Moreland, and Christian. 
    31.9 + - Fixed a bug where plugin aliases defined in VDF files were not working on the
   31.10 +   Orange Box and Left 4 Dead engines.
   31.11 +
   31.12  2008/11/26 1.7.0:
   31.13   - Metamod:Source now uses a unified package that will run on all supported 
   31.14     Source engines.  This means you do not have to download a version based on
   31.15     which Source engine or game you use.
   31.16 - - Added support for the Source Engine version that runs Left 4 Dead.
   31.17 + - Added support for the Source engine version that runs Left 4 Dead.
   31.18   - The 'meta refresh' command now handles plugins loaded from VDF files.
   31.19   - Fixed amb1952: Crash when the first plugin listed in metaplugins.ini had an 
   31.20     alias and was not on the first line of the file.