Remove the need for SDK's. Update AMBuild scripts to AMBuild2. Fix shutdown crash. Update gamedata for testing. General code fixups.
This commit is contained in:
		
							parent
							
								
									6c0a1b3dcb
								
							
						
					
					
						commit
						0f64a45a2b
					
				
							
								
								
									
										602
									
								
								AMBuildScript
									
									
									
									
									
								
							
							
						
						
									
										602
									
								
								AMBuildScript
									
									
									
									
									
								
							| @ -1,413 +1,253 @@ | |||||||
| # vim: set ts=2 sw=2 tw=99 noet ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os | import os | ||||||
| import sys |  | ||||||
| import ambuild.command as command |  | ||||||
| from ambuild.command import SymlinkCommand |  | ||||||
| 
 | 
 | ||||||
| vboxhack = 0 | def ResolveEnvPath(env, folder): | ||||||
|  |   if env in os.environ: | ||||||
|  |     path = os.environ[env] | ||||||
|  |     if os.path.isdir(path): | ||||||
|  |       return path | ||||||
|  |     return None | ||||||
| 
 | 
 | ||||||
| class SM: |  | ||||||
| 	def __init__(self): |  | ||||||
| 		self.compiler = Cpp.Compiler() |  | ||||||
| 
 |  | ||||||
| 		#Build SDK info |  | ||||||
| 		self.sdkInfo = { } |  | ||||||
| 		#self.sdkInfo['ep1'] =   {'sdk': 'HL2SDK',          'ext': '1.ep1',   'def': '1', |  | ||||||
| 		#                         'name': 'EPISODEONE',     'platform': ['windows', 'linux']} |  | ||||||
| 								  |  | ||||||
| 		self.sdkInfo['ep2'] =   {'sdk': 'HL2SDKOB',        'ext': '2.ep2',   'def': '3', |  | ||||||
| 		                         'name': 'ORANGEBOX',      'platform': ['windows', 'linux']} |  | ||||||
| 								  |  | ||||||
| 		self.sdkInfo['css'] =   {'sdk': 'HL2SDKCSS',       'ext': '2.css',   'def': '6', |  | ||||||
| 		                         'name': 'CSS',            'platform': ['windows', 'linux', 'darwin']} |  | ||||||
| 								  |  | ||||||
| 		self.sdkInfo['hl2dm'] = {'sdk': 'HL2SDKHL2DM',     'ext': '2.hl2dm', 'def': '7', |  | ||||||
| 		                         'name': 'HL2DM',          'platform': ['windows', 'linux', 'darwin']} |  | ||||||
| 								  |  | ||||||
| 		self.sdkInfo['dods'] =  {'sdk': 'HL2SDKDODS',      'ext': '2.dods',  'def': '8', |  | ||||||
| 		                         'name': 'DODS',           'platform': ['windows', 'linux', 'darwin']} |  | ||||||
| 								  |  | ||||||
| 		self.sdkInfo['tf2'] =   {'sdk': 'HL2SDKTF2',       'ext': '2.tf2',   'def': '9', |  | ||||||
| 		                         'name': 'TF2',            'platform': ['windows', 'linux', 'darwin']} |  | ||||||
| 								  |  | ||||||
| 		self.sdkInfo['l4d'] =   {'sdk': 'HL2SDKL4D',       'ext': '2.l4d',   'def': '10', |  | ||||||
| 		                         'name': 'LEFT4DEAD',      'platform': ['windows', 'linux', 'darwin']} |  | ||||||
| 								  |  | ||||||
| 		self.sdkInfo['nd'] =    {'sdk': 'HL2SDKND',        'ext': '2.nd',    'def': '11', |  | ||||||
| 		                         'name': 'NUCLEARDAWN',    'platform': ['windows', 'linux', 'darwin']} |  | ||||||
| 								  |  | ||||||
| 		self.sdkInfo['l4d2'] =  {'sdk': 'HL2SDKL4D2',      'ext': '2.l4d2',  'def': '12', |  | ||||||
| 		                         'name': 'LEFT4DEAD2',     'platform': ['windows', 'linux', 'darwin']} |  | ||||||
| 								  |  | ||||||
| 		self.sdkInfo['swarm'] = {'sdk': 'HL2SDK-SWARM',    'ext': '2.swarm', 'def': '13', |  | ||||||
| 		                         'name': 'ALIENSWARM',     'platform': ['windows']} |  | ||||||
| 								  |  | ||||||
| 		self.sdkInfo['csgo'] =  {'sdk': 'HL2SDKCSGO',     'ext': '2.csgo',   'def': '15', |  | ||||||
| 		                         'name': 'CSGO',           'platform': ['windows', 'linux', 'darwin']} |  | ||||||
| 
 |  | ||||||
| 		if AMBuild.mode == 'config': |  | ||||||
| 			#Detect compilers |  | ||||||
| 			self.compiler.DetectAll(AMBuild) |  | ||||||
| 
 |  | ||||||
| 			#Detect variables |  | ||||||
| 			envvars = { 'MMSOURCE19':   'mmsource-1.9', |  | ||||||
| 						'HL2SDKHL2DM': 	'hl2sdk-hl2dm', |  | ||||||
| 						'HL2SDKDODS': 	'hl2sdk-dods', |  | ||||||
| 						'HL2SDKTF2': 	'hl2sdk-tf2', |  | ||||||
| 						'HL2SDKND': 	'hl2sdk-nd', |  | ||||||
| 						'HL2SDKL4D': 	'hl2sdk-l4d', |  | ||||||
| 						'HL2SDKL4D2': 	'hl2sdk-l4d2', |  | ||||||
| 						'HL2SDKCSGO': 	'hl2sdk-csgo', |  | ||||||
| 						'HL2SDKCSS':    'hl2sdk-css', |  | ||||||
| 						'SMCENTRAL':   	'sourcemod-central' |  | ||||||
| 			} |  | ||||||
| 
 |  | ||||||
| 			if AMBuild.target['platform'] != 'darwin': |  | ||||||
| 				#envvars['HL2SDK'] = 'hl2sdk' |  | ||||||
| 				envvars['HL2SDKOB'] = 'hl2sdk-ob' |  | ||||||
| 
 |  | ||||||
| 			#Dark Messiah is Windows-only |  | ||||||
| 			if AMBuild.target['platform'] == 'windows': |  | ||||||
| 				envvars['HL2SDK-SWARM'] = 'hl2sdk-swarm' |  | ||||||
| 
 |  | ||||||
| 			#Must have a path for each envvar (file a bug if you don't like this) |  | ||||||
| 			for i in envvars: |  | ||||||
| 				if i in os.environ: |  | ||||||
| 					path = os.environ[i] |  | ||||||
| 					if not os.path.isdir(path): |  | ||||||
| 						raise Exception('Path for {0} was not found: {1}'.format(i, path)) |  | ||||||
| 				else: |  | ||||||
|   head = os.getcwd() |   head = os.getcwd() | ||||||
|   oldhead = None |   oldhead = None | ||||||
|   while head != None and head != oldhead: |   while head != None and head != oldhead: | ||||||
| 						path = os.path.join(head, envvars[i]) |     path = os.path.join(head, folder) | ||||||
|     if os.path.isdir(path): |     if os.path.isdir(path): | ||||||
| 							break |       return path | ||||||
|     oldhead = head |     oldhead = head | ||||||
|     head, tail = os.path.split(head) |     head, tail = os.path.split(head) | ||||||
| 					if head == None or head == oldhead: |  | ||||||
| 						raise Exception('Could not find a valid path for {0}'.format(i)) |  | ||||||
| 				AMBuild.cache.CacheVariable(i, path) |  | ||||||
| 
 | 
 | ||||||
| 			#Set up defines |   return None | ||||||
| 			cxx = self.compiler.cxx |  | ||||||
| 			if isinstance(cxx, Cpp.CompatGCC): |  | ||||||
| 				if isinstance(cxx, Cpp.GCC): |  | ||||||
| 					self.vendor = 'gcc' |  | ||||||
| 				elif isinstance(cxx, Cpp.Clang): |  | ||||||
| 					self.vendor = 'clang' |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', 'COMPILER_GCC') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', 'POSIX') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', 'stricmp=strcasecmp') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', '_stricmp=strcasecmp') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', '_snprintf=snprintf') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', '_vsnprintf=vsnprintf') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-pipe') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-fno-strict-aliasing') |  | ||||||
| 				if (self.vendor == 'gcc' and cxx.majorVersion >= 4) or self.vendor == 'clang': |  | ||||||
| 					self.compiler.AddToListVar('CFLAGS', '-fvisibility=hidden') |  | ||||||
| 					self.compiler.AddToListVar('CXXFLAGS', '-fvisibility-inlines-hidden') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-Wall') |  | ||||||
| 				#self.compiler.AddToListVar('CFLAGS', '-Werror') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-Wno-uninitialized') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-Wno-unused') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-Wno-switch') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-Wno-invalid-offsetof') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-mfpmath=sse') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-msse') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-m32') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', '-m32') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '-static-libgcc') |  | ||||||
| 				self.compiler.AddToListVar('CXXFLAGS', '-fno-exceptions') |  | ||||||
| 				self.compiler.AddToListVar('CXXFLAGS', '-fno-rtti') |  | ||||||
| 				self.compiler.AddToListVar('CXXFLAGS', '-fno-threadsafe-statics') |  | ||||||
| 				self.compiler.AddToListVar('CXXFLAGS', '-Wno-non-virtual-dtor') |  | ||||||
| 				self.compiler.AddToListVar('CXXFLAGS', '-Wno-overloaded-virtual') |  | ||||||
| 				self.compiler.AddToListVar('CXXFLAGS', '-Wno-conversion') |  | ||||||
| 				if (self.vendor == 'gcc' and cxx.majorVersion >= 4 and cxx.minorVersion >= 7) or \ |  | ||||||
| 						(self.vendor == 'clang' and cxx.majorVersion >= 3): |  | ||||||
| 					self.compiler.AddToListVar('CXXFLAGS', '-Wno-delete-non-virtual-dtor') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', 'GNUC') |  | ||||||
| 				if self.vendor == 'gcc': |  | ||||||
| 					self.compiler.AddToListVar('CFLAGS', '-mfpmath=sse') |  | ||||||
| 			elif isinstance(cxx, Cpp.MSVC): |  | ||||||
| 				self.vendor = 'msvc' |  | ||||||
| 				if AMBuild.options.debug == '1': |  | ||||||
| 					self.compiler.AddToListVar('CFLAGS', '/MTd') |  | ||||||
| 					self.compiler.AddToListVar('POSTLINKFLAGS', '/NODEFAULTLIB:libcmt') |  | ||||||
| 				else: |  | ||||||
| 					self.compiler.AddToListVar('CFLAGS', '/MT') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', 'COMPILER_MSVC') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', 'COMPILER_MSVC32') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', '_CRT_SECURE_NO_DEPRECATE') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', '_CRT_SECURE_NO_WARNINGS') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', '_CRT_NONSTDC_NO_DEPRECATE') |  | ||||||
| 				self.compiler.AddToListVar('CXXFLAGS', '/EHsc') |  | ||||||
| 				self.compiler.AddToListVar('CXXFLAGS', '/GR-') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '/W3') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '/nologo') |  | ||||||
| 				self.compiler.AddToListVar('CFLAGS', '/Zi') |  | ||||||
| 				self.compiler.AddToListVar('CXXFLAGS', '/TP') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', '/DEBUG') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', '/MACHINE:X86') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', '/SUBSYSTEM:WINDOWS') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'kernel32.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'user32.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'gdi32.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'winspool.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'comdlg32.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'advapi32.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'shell32.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'ole32.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'oleaut32.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'uuid.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'odbc32.lib') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', 'odbccp32.lib') |  | ||||||
| 
 | 
 | ||||||
| 			#Optimization | def Normalize(path): | ||||||
| 			if AMBuild.options.opt == '1': |   return os.path.abspath(os.path.normpath(path)) | ||||||
| 				self.compiler.AddToListVar('CDEFINES', 'NDEBUG') |  | ||||||
| 				if self.vendor == 'gcc' or self.vendor == 'clang': |  | ||||||
| 					self.compiler.AddToListVar('CFLAGS', '-O3') |  | ||||||
| 				elif self.vendor == 'msvc': |  | ||||||
| 					self.compiler.AddToListVar('CFLAGS', '/Ox') |  | ||||||
| 					self.compiler.AddToListVar('POSTLINKFLAGS', '/OPT:ICF') |  | ||||||
| 					self.compiler.AddToListVar('POSTLINKFLAGS', '/OPT:REF') |  | ||||||
|    |    | ||||||
| 			#Debugging | class DHooksConfig(object): | ||||||
| 			if AMBuild.options.debug == '1': |   def __init__(self): | ||||||
| 				self.compiler.AddToListVar('CDEFINES', 'DEBUG') |     self.mms_root = None | ||||||
| 				self.compiler.AddToListVar('CDEFINES', '_DEBUG') |     self.sm_root = None | ||||||
| 				if self.vendor == 'gcc' or self.vendor == 'clang': |     self.task = None | ||||||
| 					self.compiler.AddToListVar('CFLAGS', '-g3') |  | ||||||
| 				elif self.vendor == 'msvc': |  | ||||||
| 					self.compiler.AddToListVar('CFLAGS', '/Od') |  | ||||||
| 					self.compiler.AddToListVar('CFLAGS', '/RTC1') |  | ||||||
| 	 | 	 | ||||||
| 			#Platform-specifics |   @property | ||||||
| 			if AMBuild.target['platform'] == 'linux': |   def tag(self): | ||||||
| 				self.compiler.AddToListVar('CDEFINES', '_LINUX') |     if builder.options.debug == '1': | ||||||
| 				if self.vendor == 'gcc': |       return 'Debug' | ||||||
| 					self.compiler.AddToListVar('POSTLINKFLAGS', '-static-libgcc') |     return 'Release' | ||||||
| 				if self.vendor == 'clang': | 
 | ||||||
| 					self.compiler.AddToListVar('POSTLINKFLAGS', '-lgcc_eh') |   def detectProductVersion(self): | ||||||
| 			elif AMBuild.target['platform'] == 'darwin': |     builder.AddConfigureFile('product.version') | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5') |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386']) |  | ||||||
| 				self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++') |  | ||||||
| 
 | 
 | ||||||
|     # For OS X dylib versioning |     # For OS X dylib versioning | ||||||
|     import re |     import re | ||||||
| 				productFile = open(os.path.join(AMBuild.sourceFolder, 'buildbot', 'product.version'), 'r') |     with open(os.path.join(builder.sourcePath, 'product.version'), 'r') as fp: | ||||||
| 				productContents = productFile.read() |       productContents = fp.read() | ||||||
| 				productFile.close() |  | ||||||
|     m = re.match('(\d+)\.(\d+)\.(\d+).*', productContents) |     m = re.match('(\d+)\.(\d+)\.(\d+).*', productContents) | ||||||
|     if m == None: |     if m == None: | ||||||
| 					self.version = '1.0.0' |       self.productVersion = '1.0.0' | ||||||
|     else: |     else: | ||||||
|       major, minor, release = m.groups() |       major, minor, release = m.groups() | ||||||
| 					self.version = '{0}.{1}.{2}'.format(major, minor, release) |       self.productVersion = '{0}.{1}.{2}'.format(major, minor, release) | ||||||
| 				AMBuild.cache.CacheVariable('version', self.version) |  | ||||||
| 			elif AMBuild.target['platform'] == 'windows': |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', 'WIN32') |  | ||||||
| 				self.compiler.AddToListVar('CDEFINES', '_WINDOWS') |  | ||||||
| 
 | 
 | ||||||
| 			#Finish up |   def detectSDKs(self):    | ||||||
| 			self.compiler.AddToListVar('CDEFINES', 'SOURCEMOD_BUILD') |     if builder.options.mms_path: | ||||||
| 			self.compiler.AddToListVar('CDEFINES', 'SM_GENERATED_BUILD') |       self.mms_root = builder.options.mms_path | ||||||
| 			self.compiler.AddToListVar('CINCLUDES', |  | ||||||
| 			                           os.path.join(AMBuild.outputFolder, 'includes')) |  | ||||||
| 			self.compiler.ToConfig(AMBuild, 'compiler') |  | ||||||
| 			AMBuild.cache.CacheVariable('vendor', self.vendor) |  | ||||||
| 			self.targetMap = { } |  | ||||||
| 			AMBuild.cache.CacheVariable('targetMap', self.targetMap) |  | ||||||
|     else: |     else: | ||||||
| 			self.compiler.FromConfig(AMBuild, 'compiler') |       self.mms_root = ResolveEnvPath('MMSOURCE110', 'mmsource-1.10') | ||||||
| 			self.targetMap = AMBuild.cache['targetMap'] |       if not self.mms_root: | ||||||
|  |         self.mms_root = ResolveEnvPath('MMSOURCE10', 'metamod-1.10') | ||||||
|  |       if not self.mms_root: | ||||||
|  |         self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'metamod-source') | ||||||
|  |       if not self.mms_root: | ||||||
|  |         self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'mmsource-central') | ||||||
| 
 | 
 | ||||||
| 		if AMBuild.target['platform'] == 'windows': |     if not self.mms_root or not os.path.isdir(self.mms_root): | ||||||
| 			self.compiler.AddToListVar('RCINCLUDES', os.path.join(AMBuild.sourceFolder, 'extension')) |       raise Exception('Could not find a source copy of Metamod:Source') | ||||||
|  |     self.mms_root = Normalize(self.mms_root) | ||||||
| 	 | 	 | ||||||
| 		self.mmsPath = AMBuild.cache['MMSOURCE19'] |     if builder.options.sm_path: | ||||||
| 
 |       self.sm_root = builder.options.sm_path | ||||||
| 	def DefaultCompiler(self): |  | ||||||
| 		return self.compiler.Clone() |  | ||||||
| 
 |  | ||||||
| 	def JobMatters(self, jobname): |  | ||||||
| 		file = sys._getframe().f_code.co_filename |  | ||||||
| 		if AMBuild.mode == 'config': |  | ||||||
| 			self.targetMap[jobname] = file |  | ||||||
| 			return True |  | ||||||
| 		if len(AMBuild.args) == 0: |  | ||||||
| 			return True |  | ||||||
| 		if not jobname in AMBuild.args: |  | ||||||
| 			return False |  | ||||||
| 
 |  | ||||||
| 	def DefaultExtCompiler(self, path): |  | ||||||
| 		compiler = self.DefaultCompiler() |  | ||||||
| 		compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, path)) |  | ||||||
| 		compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, path, 'sdk')) |  | ||||||
| 		compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public')) |  | ||||||
| 		compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'extensions')) |  | ||||||
| 		compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'sourcepawn')) |  | ||||||
| 		return compiler |  | ||||||
| 
 |  | ||||||
| 	def AutoVersion(self, folder, binary): |  | ||||||
| 		if AMBuild.target['platform'] == 'windows': |  | ||||||
| 			env = {'RCDEFINES': ['BINARY_NAME="' + binary.binaryFile + '"', 'SM_GENERATED_BUILD']} |  | ||||||
| 			binary.AddResourceFile(os.path.join(folder, 'version.rc' ), env) |  | ||||||
| 		elif AMBuild.target['platform'] == 'darwin' and isinstance(binary, Cpp.LibraryBuilder): |  | ||||||
| 			binary.compiler['POSTLINKFLAGS'].extend(['-compatibility_version', '1.0.0']) |  | ||||||
| 			binary.compiler['POSTLINKFLAGS'].extend(['-current_version', AMBuild.cache['version']]) |  | ||||||
|     else: |     else: | ||||||
| 			return |       #self.sm_root = ResolveEnvPath('SOURCEMOD', 'sourcemod-1.6') | ||||||
|  |       if not self.sm_root: | ||||||
|  |         self.sm_root = ResolveEnvPath('SMCENTRAL', 'sourcemod-central') | ||||||
| 
 | 
 | ||||||
| 	def PreSetupHL2Job(self, job, builder, sdk): |     if not self.sm_root or not os.path.isdir(self.sm_root): | ||||||
| 		info = self.sdkInfo[sdk] |       raise Exception('Could not find a source copy of Sourcemod') | ||||||
| 		sdkPath = AMBuild.cache[info['sdk']] |     self.sm_root = Normalize(self.sm_root) | ||||||
| 		if AMBuild.target['platform'] == 'linux': |  | ||||||
| 			if sdk == 'ep1': |  | ||||||
| 				staticLibs = os.path.join(sdkPath, 'linux_sdk') |  | ||||||
| 			else: |  | ||||||
| 				staticLibs = os.path.join(sdkPath, 'lib', 'linux') |  | ||||||
| 			workFolder = os.path.join(AMBuild.outputFolder, job.workFolder) |  | ||||||
| 			if sdk in ['tf2', 'css', 'l4d2', 'hl2dm', 'dods', 'nd']: |  | ||||||
| 				libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib_srv.so', 'libtier0_srv.so'] |  | ||||||
| 				for i in libs: |  | ||||||
| 					link = os.path.join(workFolder, i) |  | ||||||
| 					target = os.path.join(staticLibs, i) |  | ||||||
| 					try: |  | ||||||
| 						os.lstat(link) |  | ||||||
| 					except: |  | ||||||
| 						if vboxhack == 1: |  | ||||||
| 							job.AddCommand(command.DirectCommand(['cp', '-f', target, link])) |  | ||||||
| 						else: |  | ||||||
| 							job.AddCommand(SymlinkCommand(link, target)) |  | ||||||
| 			elif sdk in ['l4d', 'csgo']: |  | ||||||
| 				libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.so', 'libtier0.so'] |  | ||||||
| 				if sdk == 'csgo': |  | ||||||
| 					libs.append('interfaces_i486.a') |  | ||||||
| 				for i in libs: |  | ||||||
| 					link = os.path.join(workFolder, i) |  | ||||||
| 					target = os.path.join(staticLibs, i) |  | ||||||
| 					try: |  | ||||||
| 						os.lstat(link) |  | ||||||
| 					except: |  | ||||||
| 						if vboxhack == 1: |  | ||||||
| 							job.AddCommand(command.DirectCommand(['cp', '-f', target, link])) |  | ||||||
| 						else: |  | ||||||
| 							job.AddCommand(SymlinkCommand(link, target)) |  | ||||||
| 			else: |  | ||||||
| 				for i in ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_i486.so', 'tier0_i486.so']: |  | ||||||
| 					link = os.path.join(workFolder, i) |  | ||||||
| 					target = os.path.join(staticLibs, i) |  | ||||||
| 					try: |  | ||||||
| 						os.lstat(link) |  | ||||||
| 					except: |  | ||||||
| 						if vboxhack == 1: |  | ||||||
| 							job.AddCommand(command.DirectCommand(['cp', '-f', target, link])) |  | ||||||
| 						else: |  | ||||||
| 							job.AddCommand(SymlinkCommand(link, target)) |  | ||||||
| 		elif AMBuild.target['platform'] == 'darwin': |  | ||||||
| 			staticLibs = os.path.join(sdkPath, 'lib', 'mac') |  | ||||||
| 			workFolder = os.path.join(AMBuild.outputFolder, job.workFolder) |  | ||||||
| 			for i in ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.dylib', 'libtier0.dylib']: |  | ||||||
| 				link = os.path.join(workFolder, i) |  | ||||||
| 				target = os.path.join(staticLibs, i) |  | ||||||
| 				try: |  | ||||||
| 					os.lstat(link) |  | ||||||
| 				except: |  | ||||||
| 					if vboxhack == 1: |  | ||||||
| 						job.AddCommand(command.DirectCommand(['cp', '-f', target, link])) |  | ||||||
| 					else: |  | ||||||
| 						job.AddCommand(SymlinkCommand(link, target)) |  | ||||||
| 		elif AMBuild.target['platform'] == 'windows': |  | ||||||
| 			libs = ['tier0', 'tier1', 'vstdlib', 'mathlib'] |  | ||||||
| 			if sdk in ['swarm', 'csgo']: |  | ||||||
| 				libs.append('interfaces') |  | ||||||
| 			for lib in libs: |  | ||||||
| 				libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib' |  | ||||||
| 				builder.RebuildIfNewer(libPath) |  | ||||||
| 				builder['POSTLINKFLAGS'].append(libPath) |  | ||||||
| 
 | 
 | ||||||
| 	def PostSetupHL2Job(self, job, builder, sdk): |   def configure(self): | ||||||
| 		if AMBuild.target['platform'] in ['linux', 'darwin']: |     builder.AddConfigureFile('push.txt') | ||||||
| 			builder.AddObjectFiles(['tier1_i486.a', 'mathlib_i486.a']) |  | ||||||
| 			if sdk == 'csgo': |  | ||||||
| 				builder.AddObjectFiles(['interfaces_i486.a']) |  | ||||||
| 
 | 
 | ||||||
| 	def DefaultHL2Compiler(self, path, sdk, noLink = False, oldMms = '-legacy'): |     cxx = builder.DetectCompilers() | ||||||
| 		compiler = self.DefaultExtCompiler(path) |  | ||||||
| 
 | 
 | ||||||
| 		mms = 'core' |     if cxx.like('gcc'): | ||||||
| 		if sdk == 'ep1': |       cxx.defines += [ | ||||||
| 			mms += oldMms |         'stricmp=strcasecmp', | ||||||
| 
 |         '_stricmp=strcasecmp', | ||||||
| 		compiler['CXXINCLUDES'].append(os.path.join(self.mmsPath, mms)) |         '_snprintf=snprintf', | ||||||
| 		compiler['CXXINCLUDES'].append(os.path.join(self.mmsPath, mms, 'sourcehook')) |         '_vsnprintf=vsnprintf', | ||||||
| 
 |         'HAVE_STDINT_H', | ||||||
| 		info = self.sdkInfo |         'GNUC', | ||||||
| 		compiler['CDEFINES'].extend(['SE_' + info[i]['name'] + '=' + info[i]['def'] for i in info]) |       ] | ||||||
| 		compiler['CDEFINES'].append("SE_PORTAL2=10") |       cxx.cflags += [ | ||||||
| 
 |         '-pipe', | ||||||
| 		paths = [['public'], ['public', 'engine'], ['public', 'mathlib'], ['public', 'vstdlib'], |         '-fno-strict-aliasing', | ||||||
| 						 ['public', 'tier0'], ['public', 'tier1']] |         '-Wall', | ||||||
| 		if sdk == 'ep1' or sdk == 'darkm': |         '-Werror', | ||||||
| 			paths.append(['public', 'dlls']) |         '-Wno-unused', | ||||||
| 			paths.append(['game_shared']) |         '-Wno-switch', | ||||||
| 		else: |         '-Wno-format', | ||||||
| 			paths.append(['public', 'game', 'server']) |         '-Wno-format-security', | ||||||
| 			paths.append(['game', 'shared']) |         '-Wno-array-bounds', | ||||||
| 			paths.append(['common']) |         '-Wno-sign-compare', | ||||||
| 
 |         '-msse', | ||||||
| 		info = self.sdkInfo[sdk] |         '-m32', | ||||||
| 		sdkPath = AMBuild.cache[info['sdk']] |       ] | ||||||
| 
 |       cxx.cxxflags += [ | ||||||
| 		compiler['CDEFINES'].append('SOURCE_ENGINE=' + info['def']) |           '-std=c++11', | ||||||
| 
 |  | ||||||
| 		if sdk == 'ep1': |  | ||||||
| 			if AMBuild.target['platform'] == 'linux': |  | ||||||
| 				staticLibs = os.path.join(sdkPath, 'linux_sdk') |  | ||||||
| 		else: |  | ||||||
| 			if AMBuild.target['platform'] == 'linux': |  | ||||||
| 				staticLibs = os.path.join(sdkPath, 'lib', 'linux') |  | ||||||
| 			elif AMBuild.target['platform'] == 'darwin': |  | ||||||
| 				staticLibs = os.path.join(sdkPath, 'lib', 'mac') |  | ||||||
| 
 |  | ||||||
| 		for i in paths: |  | ||||||
| 			compiler['CXXINCLUDES'].append(os.path.join(sdkPath, *i)) |  | ||||||
| 
 |  | ||||||
| 		if not noLink: |  | ||||||
| 			if AMBuild.target['platform'] == 'linux': |  | ||||||
| 				compiler['POSTLINKFLAGS'][0:0] = ['-lm'] |  | ||||||
| 				if sdk in ['tf2', 'css', 'l4d2', 'hl2dm', 'dods', 'nd']: |  | ||||||
| 					compiler['POSTLINKFLAGS'][0:0] = ['libtier0_srv.so'] |  | ||||||
| 					compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib_srv.so'] |  | ||||||
| 				elif sdk in ['l4d', 'csgo']: |  | ||||||
| 					compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so'] |  | ||||||
| 					compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so'] |  | ||||||
| 				else: |  | ||||||
| 					compiler['POSTLINKFLAGS'][0:0] = ['tier0_i486.so'] |  | ||||||
| 					compiler['POSTLINKFLAGS'][0:0] = ['vstdlib_i486.so'] |  | ||||||
| 			elif AMBuild.target['platform'] == 'darwin': |  | ||||||
| 				compiler['POSTLINKFLAGS'][0:0] = ['libtier0.dylib'] |  | ||||||
| 				compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.dylib'] |  | ||||||
| 
 |  | ||||||
| 		return compiler |  | ||||||
| 
 |  | ||||||
| sm = SM() |  | ||||||
| globals = { |  | ||||||
| 	'SM': sm |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| AMBuild.Include(os.path.join('buildbot', 'Versioning'), globals) |  | ||||||
| 
 |  | ||||||
| FileList = [ |  | ||||||
| 		['AMBuilder'], |  | ||||||
| 		['buildbot', 'PackageScript'] |  | ||||||
|       ] |       ] | ||||||
| 
 | 
 | ||||||
| for parts in FileList: |       have_gcc = cxx.vendor == 'gcc' | ||||||
| 	AMBuild.Include(os.path.join(*parts), globals) |       have_clang = cxx.vendor == 'clang' | ||||||
|  |       if have_clang or (have_gcc and cxx.version >= '4'): | ||||||
|  |         cxx.cflags += ['-fvisibility=hidden'] | ||||||
|  |         cxx.cxxflags += ['-fvisibility-inlines-hidden'] | ||||||
|  |         if have_clang or (have_gcc and cxx.version >= '4.6'): | ||||||
|  |           cxx.cflags += ['-Wno-narrowing'] | ||||||
|  |         if (have_gcc and cxx.version >= '4.7') or (have_clang and cxx.version >= '3'): | ||||||
|  |           cxx.cxxflags += ['-Wno-delete-non-virtual-dtor'] | ||||||
|  |         if have_gcc and cxx.version >= '4.8': | ||||||
|  |           cxx.cflags += ['-Wno-unused-result'] | ||||||
|  |       if have_clang: | ||||||
|  |         cxx.cxxflags += ['-Wno-implicit-exception-spec-mismatch'] | ||||||
|  |         if (builder.target_platform == 'mac' and cxx.version >= '5.1') or cxx.version >= '3.4': | ||||||
|  |           cxx.cxxflags += ['-Wno-deprecated-register'] | ||||||
|  |         else: | ||||||
|  |           cxx.cxxflags += ['-Wno-deprecated'] | ||||||
|  |         cxx.cflags += ['-Wno-sometimes-uninitialized'] | ||||||
| 
 | 
 | ||||||
|  |       cxx.linkflags += ['-m32'] | ||||||
|  |       cxx.cxxflags += [ | ||||||
|  |         '-fno-exceptions', | ||||||
|  |         '-fno-threadsafe-statics', | ||||||
|  |         '-Wno-non-virtual-dtor', | ||||||
|  |         '-Wno-overloaded-virtual', | ||||||
|  |       ] | ||||||
|  | 
 | ||||||
|  |       if have_gcc: | ||||||
|  |         cxx.cflags += ['-mfpmath=sse'] | ||||||
|  |     elif cxx.vendor == 'msvc': | ||||||
|  |       if builder.options.debug == '1': | ||||||
|  |         cxx.cflags += ['/MTd'] | ||||||
|  |         cxx.linkflags += ['/NODEFAULTLIB:libcmt'] | ||||||
|  |       else: | ||||||
|  |         cxx.cflags += ['/MT'] | ||||||
|  |       cxx.defines += [ | ||||||
|  |         '_CRT_SECURE_NO_DEPRECATE', | ||||||
|  |         '_CRT_SECURE_NO_WARNINGS', | ||||||
|  |         '_CRT_NONSTDC_NO_DEPRECATE', | ||||||
|  |         '_ITERATOR_DEBUG_LEVEL=0', | ||||||
|  |       ] | ||||||
|  |       cxx.cflags += [ | ||||||
|  |         '/W3', | ||||||
|  |       ] | ||||||
|  |       cxx.cxxflags += [ | ||||||
|  |         '/EHsc', | ||||||
|  |         '/GR-', | ||||||
|  |         '/TP', | ||||||
|  |       ] | ||||||
|  |       cxx.linkflags += [ | ||||||
|  |         '/MACHINE:X86', | ||||||
|  |         '/SUBSYSTEM:WINDOWS', | ||||||
|  |         'kernel32.lib', | ||||||
|  |         'user32.lib', | ||||||
|  |         'gdi32.lib', | ||||||
|  |         'winspool.lib', | ||||||
|  |         'comdlg32.lib', | ||||||
|  |         'advapi32.lib', | ||||||
|  |         'shell32.lib', | ||||||
|  |         'ole32.lib', | ||||||
|  |         'oleaut32.lib', | ||||||
|  |         'uuid.lib', | ||||||
|  |         'odbc32.lib', | ||||||
|  |         'odbccp32.lib', | ||||||
|  |       ]  | ||||||
|  | 
 | ||||||
|  |     # Optimization | ||||||
|  |     if builder.options.opt == '1': | ||||||
|  |       cxx.defines += ['NDEBUG'] | ||||||
|  |       if cxx.like('gcc'): | ||||||
|  |         cxx.cflags += ['-O3'] | ||||||
|  |       elif cxx.like('msvc'): | ||||||
|  |         cxx.cflags += ['/Ox'] | ||||||
|  |         cxx.linkflags += ['/OPT:ICF', '/OPT:REF'] | ||||||
|  | 
 | ||||||
|  |     # Debugging | ||||||
|  |     if builder.options.debug == '1': | ||||||
|  |       cxx.defines += ['DEBUG', '_DEBUG'] | ||||||
|  |       if cxx.like('msvc'): | ||||||
|  |         cxx.cflags += ['/Od', '/RTC1'] | ||||||
|  |         if cxx.version >= 1600: | ||||||
|  |           cxx.cflags += ['/d2Zi+'] | ||||||
|  | 
 | ||||||
|  |     # This needs to be after our optimization flags which could otherwise disable it. | ||||||
|  |     if cxx.vendor == 'msvc': | ||||||
|  |       # Don't omit the frame pointer. | ||||||
|  |       cxx.cflags += ['/Oy-'] | ||||||
|  | 
 | ||||||
|  |     # Platform-specifics | ||||||
|  |     if builder.target_platform == 'linux': | ||||||
|  |       cxx.defines += ['_LINUX', 'POSIX'] | ||||||
|  |       if cxx.vendor == 'gcc': | ||||||
|  |         cxx.linkflags += ['-static-libgcc'] | ||||||
|  |       elif cxx.vendor == 'clang': | ||||||
|  |         cxx.linkflags += ['-lgcc_eh'] | ||||||
|  |     elif builder.target_platform == 'mac': | ||||||
|  |       cxx.defines += ['OSX', '_OSX', 'POSIX'] | ||||||
|  |       cxx.cflags += ['-mmacosx-version-min=10.5'] | ||||||
|  |       cxx.linkflags += [ | ||||||
|  |         '-mmacosx-version-min=10.5', | ||||||
|  |         '-arch', 'i386', | ||||||
|  |         '-lstdc++', | ||||||
|  |         '-stdlib=libstdc++', | ||||||
|  |       ] | ||||||
|  |       cxx.cxxflags += ['-stdlib=libstdc++'] | ||||||
|  |     elif builder.target_platform == 'windows': | ||||||
|  |       cxx.defines += ['WIN32', '_WINDOWS'] | ||||||
|  | 	   | ||||||
|  |     cxx.defines += ['META_NO_HL2SDK'] | ||||||
|  | 	 | ||||||
|  |   def IncludeSDKs(self, builder): | ||||||
|  |     builder.compiler.cxxincludes += [ | ||||||
|  |       os.path.join(builder.currentSourcePath), | ||||||
|  |       os.path.join(builder.currentSourcePath, 'sdk'), | ||||||
|  |       os.path.join(self.mms_root, 'core'), | ||||||
|  |       os.path.join(self.mms_root, 'core', 'sourcehook'), | ||||||
|  |       os.path.join(self.sm_root, 'public'), | ||||||
|  |       os.path.join(self.sm_root, 'public', 'extensions'), | ||||||
|  |       os.path.join(self.sm_root, 'public', 'sourcepawn'), | ||||||
|  |       os.path.join(self.sm_root, 'public', 'amtl'), | ||||||
|  |       os.path.join(self.sm_root, 'public', 'jit'), | ||||||
|  |       os.path.join(self.sm_root, 'public', 'jit', 'x86'), | ||||||
|  |     ] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | DHooks = DHooksConfig() | ||||||
|  | DHooks.detectSDKs() | ||||||
|  | DHooks.configure() | ||||||
|  | DHooks.IncludeSDKs(builder) | ||||||
|  | 
 | ||||||
|  | program = builder.compiler.Library('dhooks.ext') | ||||||
|  | 
 | ||||||
|  | program.sources += [ | ||||||
|  |   'extension.cpp', | ||||||
|  |   'listeners.cpp', | ||||||
|  |   'natives.cpp', | ||||||
|  |   'vhook.cpp', | ||||||
|  |   'sdk/smsdk_ext.cpp', | ||||||
|  | ] | ||||||
|  | program.sources += [os.path.join(DHooks.sm_root, 'public', 'jit', 'x86', "assembler-x86.cpp"),] | ||||||
|  | 
 | ||||||
|  | DHooks.task = builder.Add(program) | ||||||
|  | 
 | ||||||
|  | builder.RunScript('buildbot/PackageScript', { 'DHooks': DHooks }) | ||||||
							
								
								
									
										38
									
								
								AMBuilder
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								AMBuilder
									
									
									
									
									
								
							| @ -1,38 +0,0 @@ | |||||||
| # vim: set ts=2 sw=2 tw=99 noet ft=python:  |  | ||||||
| import os |  | ||||||
| 
 |  | ||||||
| for i in SM.sdkInfo: |  | ||||||
| 	sdk = SM.sdkInfo[i] |  | ||||||
| 	if AMBuild.target['platform'] not in sdk['platform']: |  | ||||||
| 		continue |  | ||||||
| 
 |  | ||||||
| 	compiler = SM.DefaultHL2Compiler('.', i) |  | ||||||
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public')) |  | ||||||
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'sourcepawn')) |  | ||||||
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'extensions')) |  | ||||||
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'jit')) |  | ||||||
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'jit', 'x86')) |  | ||||||
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'amtl')) |  | ||||||
| 
 |  | ||||||
| 	if compiler.cc.name == 'gcc': |  | ||||||
| 		compiler['CFLAGS'].append('-Wno-parentheses') |  | ||||||
| 
 |  | ||||||
| 	#if i != 'ep1': |  | ||||||
| 	#	compiler['CDEFINES'].append('HOOKING_ENABLED') |  | ||||||
| 
 |  | ||||||
| 	name = 'dhooks.ext.' + sdk['ext'] |  | ||||||
| 	extension = AMBuild.AddJob(name) |  | ||||||
| 	binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler) |  | ||||||
| 	SM.PreSetupHL2Job(extension, binary, i) |  | ||||||
| 	binary.AddSourceFiles('.', [ |  | ||||||
| 		'extension.cpp', |  | ||||||
| 		'listeners.cpp', |  | ||||||
| 		'vhook.cpp', |  | ||||||
| 		'natives.cpp', |  | ||||||
| 		'sdk/smsdk_ext.cpp', |  | ||||||
| 		os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'jit', 'x86', 'assembler-x86.cpp') |  | ||||||
| 		]) |  | ||||||
| 	SM.PostSetupHL2Job(extension, binary, i) |  | ||||||
| 	#SM.AutoVersion('.', binary) |  | ||||||
| 	binary.SendToJob() |  | ||||||
| 
 |  | ||||||
							
								
								
									
										235
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										235
									
								
								Makefile
									
									
									
									
									
								
							| @ -1,235 +0,0 @@ | |||||||
| # (C)2004-2010 SourceMod Development Team
 |  | ||||||
| # Makefile written by David "BAILOPAN" Anderson
 |  | ||||||
| 
 |  | ||||||
| ###########################################
 |  | ||||||
| ### EDIT THESE PATHS FOR YOUR OWN SETUP ###
 |  | ||||||
| ###########################################
 |  | ||||||
| 
 |  | ||||||
| SMSDK = ../sourcemod-central |  | ||||||
| HL2SDK_ORIG = ../../../hl2sdk |  | ||||||
| HL2SDK_OB = ../../../hl2sdk-ob |  | ||||||
| HL2SDK_CSS = ../hl2sdk-css |  | ||||||
| HL2SDK_OB_VALVE = ../../../hl2sdk-ob-valve |  | ||||||
| HL2SDK_L4D = ../../../hl2sdk-l4d |  | ||||||
| HL2SDK_L4D2 = ../../../hl2sdk-l4d2 |  | ||||||
| HL2SDK_CSGO = ../../../hl2sdk-csgo |  | ||||||
| MMSOURCE19 = ../mmsource-1.9 |  | ||||||
| 
 |  | ||||||
| #####################################
 |  | ||||||
| ### EDIT BELOW FOR OTHER PROJECTS ###
 |  | ||||||
| #####################################
 |  | ||||||
| 
 |  | ||||||
| PROJECT = dhooks |  | ||||||
| 
 |  | ||||||
| #Uncomment for Metamod: Source enabled extension
 |  | ||||||
| USEMETA = true |  | ||||||
| 
 |  | ||||||
| OBJECTS = sdk/smsdk_ext.cpp extension.cpp vhook.cpp $(SMSDK)/public/jit/x86/assembler-x86.cpp listeners.cpp natives.cpp |  | ||||||
| 
 |  | ||||||
| ##############################################
 |  | ||||||
| ### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
 |  | ||||||
| ##############################################
 |  | ||||||
| 
 |  | ||||||
| C_OPT_FLAGS = -DNDEBUG -O3 -funroll-loops -pipe -fno-strict-aliasing |  | ||||||
| C_DEBUG_FLAGS = -D_DEBUG -DDEBUG -g -ggdb3 |  | ||||||
| C_GCC4_FLAGS = -fvisibility=hidden |  | ||||||
| CPP_GCC4_FLAGS = -fvisibility-inlines-hidden |  | ||||||
| CPP = gcc |  | ||||||
| CPP_OSX = clang |  | ||||||
| 
 |  | ||||||
| ##########################
 |  | ||||||
| ### SDK CONFIGURATIONS ###
 |  | ||||||
| ##########################
 |  | ||||||
| 
 |  | ||||||
| override ENGSET = false |  | ||||||
| 
 |  | ||||||
| # Check for valid list of engines
 |  | ||||||
| ifneq (,$(filter original orangebox orangeboxvalve css left4dead left4dead2 csgo,$(ENGINE))) |  | ||||||
| 	override ENGSET = true |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| ifeq "$(ENGINE)" "original" |  | ||||||
| 	HL2SDK = $(HL2SDK_ORIG) |  | ||||||
| 	CFLAGS += -DSOURCE_ENGINE=1 |  | ||||||
| endif |  | ||||||
| ifeq "$(ENGINE)" "orangebox" |  | ||||||
| 	HL2SDK = $(HL2SDK_OB) |  | ||||||
| 	CFLAGS += -DSOURCE_ENGINE=3 |  | ||||||
| endif |  | ||||||
| ifeq "$(ENGINE)" "css" |  | ||||||
| 	HL2SDK = $(HL2SDK_CSS) |  | ||||||
| 	CFLAGS += -DSOURCE_ENGINE=6 |  | ||||||
| endif |  | ||||||
| ifeq "$(ENGINE)" "orangeboxvalve" |  | ||||||
| 	HL2SDK = $(HL2SDK_OB_VALVE) |  | ||||||
| 	CFLAGS += -DSOURCE_ENGINE=7 |  | ||||||
| endif |  | ||||||
| ifeq "$(ENGINE)" "left4dead" |  | ||||||
| 	HL2SDK = $(HL2SDK_L4D) |  | ||||||
| 	CFLAGS += -DSOURCE_ENGINE=8 |  | ||||||
| endif |  | ||||||
| ifeq "$(ENGINE)" "left4dead2" |  | ||||||
| 	HL2SDK = $(HL2SDK_L4D2) |  | ||||||
| 	CFLAGS += -DSOURCE_ENGINE=9 |  | ||||||
| endif |  | ||||||
| ifeq "$(ENGINE)" "csgo" |  | ||||||
| 	HL2SDK = $(HL2SDK_CSGO) |  | ||||||
| 	CFLAGS += -DSOURCE_ENGINE=12 |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| HL2PUB = $(HL2SDK)/public |  | ||||||
| 
 |  | ||||||
| ifeq "$(ENGINE)" "original" |  | ||||||
| 	INCLUDE += -I$(HL2SDK)/public/dlls |  | ||||||
| 	METAMOD = $(MMSOURCE19)/core-legacy |  | ||||||
| else |  | ||||||
| 	INCLUDE += -I$(HL2SDK)/public/game/server |  | ||||||
| 	METAMOD = $(MMSOURCE19)/core |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| OS := $(shell uname -s) |  | ||||||
| 
 |  | ||||||
| ifeq "$(OS)" "Darwin" |  | ||||||
| 	LIB_EXT = dylib |  | ||||||
| 	HL2LIB = $(HL2SDK)/lib/mac |  | ||||||
| else |  | ||||||
| 	LIB_EXT = so |  | ||||||
| 	ifeq "$(ENGINE)" "original" |  | ||||||
| 		HL2LIB = $(HL2SDK)/linux_sdk |  | ||||||
| 	else |  | ||||||
| 		HL2LIB = $(HL2SDK)/lib/linux |  | ||||||
| 	endif |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| # if ENGINE is original or OB
 |  | ||||||
| ifneq (,$(filter original orangebox,$(ENGINE))) |  | ||||||
| 	LIB_SUFFIX = _i486.$(LIB_EXT) |  | ||||||
| else |  | ||||||
| 	LIB_PREFIX = lib |  | ||||||
| 	LIB_SUFFIX = _srv.$(LIB_EXT) |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn -I$(SMSDK)/public/extensions -I$(SMSDK)/public/jit/x86 -I$(SMSDK)/public/jit |  | ||||||
| 
 |  | ||||||
| ifeq "$(USEMETA)" "true" |  | ||||||
| 	LINK_HL2 = $(HL2LIB)/tier1_i486.a $(LIB_PREFIX)vstdlib$(LIB_SUFFIX) $(LIB_PREFIX)tier0$(LIB_SUFFIX) |  | ||||||
| 	ifeq "$(ENGINE)" "csgo" |  | ||||||
| 		LINK_HL2 += $(HL2LIB)/interfaces_i486.a |  | ||||||
| 	endif |  | ||||||
| 
 |  | ||||||
| 	LINK += $(LINK_HL2) |  | ||||||
| 
 |  | ||||||
| 	INCLUDE += -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 -I$(HL2SDK)/game/shared\
 |  | ||||||
| 	-I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/extensions \
 |  | ||||||
| 	-I$(SMSDK)/public/sourcepawn |  | ||||||
| 	CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 \
 |  | ||||||
| 		-DSE_ORANGEBOXVALVE=6 -DSE_LEFT4DEAD=7 -DSE_LEFT4DEAD2=8 -DSE_ALIENSWARM=9 \
 |  | ||||||
| 		-DSE_PORTAL2=10 -DSE_CSGO=11 -DSE_CSS=12 |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| LINK += -m32 -lm -ldl |  | ||||||
| 
 |  | ||||||
| CFLAGS += -DPOSIX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
 |  | ||||||
| 	-D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -DCOMPILER_GCC -Wall -Werror \
 |  | ||||||
| 	-Wno-overloaded-virtual -Wno-switch -Wno-unused -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -m32 |  | ||||||
| CPPFLAGS += -Wno-non-virtual-dtor -fno-exceptions -fno-rtti |  | ||||||
| 
 |  | ||||||
| ################################################
 |  | ||||||
| ### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
 |  | ||||||
| ################################################
 |  | ||||||
| 
 |  | ||||||
| BINARY = $(PROJECT).ext.$(LIB_EXT) |  | ||||||
| 
 |  | ||||||
| ifeq "$(DEBUG)" "true" |  | ||||||
| 	BIN_DIR = Debug |  | ||||||
| 	CFLAGS += $(C_DEBUG_FLAGS) |  | ||||||
| else |  | ||||||
| 	BIN_DIR = Release |  | ||||||
| 	CFLAGS += $(C_OPT_FLAGS) |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| ifeq "$(USEMETA)" "true" |  | ||||||
| 	BIN_DIR := $(BIN_DIR).$(ENGINE) |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| ifeq "$(OS)" "Darwin" |  | ||||||
| 	CPP = $(CPP_OSX) |  | ||||||
| 	LIB_EXT = dylib |  | ||||||
| 	CFLAGS += -DOSX -D_OSX |  | ||||||
| 	LINK += -dynamiclib -lstdc++ -mmacosx-version-min=10.5 |  | ||||||
| else |  | ||||||
| 	LIB_EXT = so |  | ||||||
| 	CFLAGS += -D_LINUX |  | ||||||
| 	LINK += -shared |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| IS_CLANG := $(shell $(CPP) --version | head -1 | grep clang > /dev/null && echo "1" || echo "0") |  | ||||||
| 
 |  | ||||||
| ifeq "$(IS_CLANG)" "1" |  | ||||||
| 	CPP_MAJOR := $(shell $(CPP) --version | grep clang | sed "s/.*version \([0-9]\)*\.[0-9]*.*/\1/") |  | ||||||
| 	CPP_MINOR := $(shell $(CPP) --version | grep clang | sed "s/.*version [0-9]*\.\([0-9]\)*.*/\1/") |  | ||||||
| else |  | ||||||
| 	CPP_MAJOR := $(shell $(CPP) -dumpversion >&1 | cut -b1) |  | ||||||
| 	CPP_MINOR := $(shell $(CPP) -dumpversion >&1 | cut -b3) |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| # If not clang
 |  | ||||||
| ifeq "$(IS_CLANG)" "0" |  | ||||||
| 	CFLAGS += -mfpmath=sse |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| # Clang || GCC >= 4
 |  | ||||||
| ifeq "$(shell expr $(IS_CLANG) \| $(CPP_MAJOR) \>= 4)" "1" |  | ||||||
| 	CFLAGS += $(C_GCC4_FLAGS) |  | ||||||
| 	CPPFLAGS += $(CPP_GCC4_FLAGS) |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| # Clang >= 3 || GCC >= 4.7
 |  | ||||||
| ifeq "$(shell expr $(IS_CLANG) \& $(CPP_MAJOR) \>= 3 \| $(CPP_MAJOR) \>= 4 \& $(CPP_MINOR) \>= 7)" "1" |  | ||||||
| 	CFLAGS += -Wno-delete-non-virtual-dtor |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| # OS is Linux and not using clang
 |  | ||||||
| ifeq "$(shell expr $(OS) \= Linux \& $(IS_CLANG) \= 0)" "1" |  | ||||||
| 	LINK += -static-libgcc |  | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| OBJ_BIN := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o) |  | ||||||
| 
 |  | ||||||
| # This will break if we include other Makefiles, but is fine for now. It allows
 |  | ||||||
| #  us to make a copy of this file that uses altered paths (ie. Makefile.mine)
 |  | ||||||
| #  or other changes without mucking up the original.
 |  | ||||||
| MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) |  | ||||||
| 
 |  | ||||||
| $(BIN_DIR)/%.o: %.cpp |  | ||||||
| 	$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $< |  | ||||||
| 
 |  | ||||||
| all: check |  | ||||||
| 	mkdir -p $(BIN_DIR)/sdk |  | ||||||
| 	mkdir -p $(BIN_DIR)/../sourcemod-central/public/jit/x86 |  | ||||||
| 	if [ "$(USEMETA)" = "true" ]; then \
 |  | ||||||
| 		ln -sf $(HL2LIB)/$(LIB_PREFIX)vstdlib$(LIB_SUFFIX); \
 |  | ||||||
| 		ln -sf $(HL2LIB)/$(LIB_PREFIX)tier0$(LIB_SUFFIX); \
 |  | ||||||
| 	fi |  | ||||||
| 	$(MAKE) -f $(MAKEFILE_NAME) extension |  | ||||||
| 
 |  | ||||||
| check: |  | ||||||
| 	if [ "$(USEMETA)" = "true" ] && [ "$(ENGSET)" = "false" ]; then \
 |  | ||||||
| 		echo "You must supply one of the following values for ENGINE:"; \
 |  | ||||||
| 		echo "csgo, left4dead2, left4dead, css, orangeboxvalve, orangebox, or original"; \
 |  | ||||||
| 		exit 1; \
 |  | ||||||
| 	fi |  | ||||||
| 
 |  | ||||||
| extension: check $(OBJ_BIN) |  | ||||||
| 	$(CPP) $(INCLUDE) $(OBJ_BIN) $(LINK) -o $(BIN_DIR)/$(BINARY) |  | ||||||
| 
 |  | ||||||
| debug: |  | ||||||
| 	$(MAKE) -f $(MAKEFILE_NAME) all DEBUG=true |  | ||||||
| 
 |  | ||||||
| default: all |  | ||||||
| 
 |  | ||||||
| clean: check |  | ||||||
| 	rm -rf $(BIN_DIR)/*.o |  | ||||||
| 	rm -rf $(BIN_DIR)/sdk/*.o |  | ||||||
| 	rm -rf $(BIN_DIR)/$(BINARY) |  | ||||||
| 
 |  | ||||||
| @ -1,115 +1,32 @@ | |||||||
| # vim: set ts=2 sw=2 tw=99 noet ft=python:  | # vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:  | ||||||
| import os | import os | ||||||
| import shutil |  | ||||||
| import ambuild.osutil as osutil |  | ||||||
| from ambuild.command import Command |  | ||||||
| 
 | 
 | ||||||
| job = AMBuild.AddJob('package') | builder.SetBuildFolder('package') | ||||||
| 
 | 
 | ||||||
| class DestroyPath(Command): | folder_list = [ | ||||||
| 	def __init__(self, folder): |   'addons/sourcemod/gamedata', | ||||||
| 		Command.__init__(self) |   'addons/sourcemod/extensions', | ||||||
| 		self.folder = folder |   'addons/sourcemod/scripting', | ||||||
| 
 |   'addons/sourcemod/scripting/include', | ||||||
| 	def destroy(self, path): |  | ||||||
| 		entries = os.listdir(path) |  | ||||||
| 		for entry in entries: |  | ||||||
| 			newpath = os.path.join(path, entry) |  | ||||||
| 			if os.path.isdir(newpath): |  | ||||||
| 				self.destroy(newpath) |  | ||||||
| 				os.rmdir(newpath) |  | ||||||
| 			elif os.path.isfile(newpath): |  | ||||||
| 				os.remove(newpath) |  | ||||||
| 
 |  | ||||||
| 	def run(self, runner, job): |  | ||||||
| 		runner.PrintOut('rm -rf {0}/*'.format(self.folder)) |  | ||||||
| 		self.destroy(self.folder) |  | ||||||
| 
 |  | ||||||
| class CreateFolders(Command): |  | ||||||
| 	def __init__(self, folders): |  | ||||||
| 		Command.__init__(self) |  | ||||||
| 		self.folders = folders |  | ||||||
| 	 |  | ||||||
| 	def run(self, runner, job): |  | ||||||
| 		for folder in self.folders: |  | ||||||
| 			path = os.path.join(*folder) |  | ||||||
| 			runner.PrintOut('mkdir {0}'.format(path)) |  | ||||||
| 			os.makedirs(path) |  | ||||||
| 
 |  | ||||||
| #Shallow folder copy |  | ||||||
| class CopyFolder(Command): |  | ||||||
| 	def __init__(self, fromList, toList, excludes = []): |  | ||||||
| 		Command.__init__(self) |  | ||||||
| 		self.fromPath = os.path.join(AMBuild.sourceFolder, *fromList) |  | ||||||
| 		self.toPath = os.path.join(*toList)  |  | ||||||
| 		self.excludes = excludes |  | ||||||
| 	 |  | ||||||
| 	def run(self, runner, job): |  | ||||||
| 		entries = os.listdir(self.fromPath) |  | ||||||
| 		for entry in entries: |  | ||||||
| 			if entry in self.excludes: |  | ||||||
| 				continue |  | ||||||
| 			path = os.path.join(self.fromPath, entry) |  | ||||||
| 			if not os.path.isfile(path): |  | ||||||
| 				continue |  | ||||||
| 			runner.PrintOut('copy {0} to {1}'.format(path, self.toPath)) |  | ||||||
| 			shutil.copy(path, self.toPath) |  | ||||||
| 
 |  | ||||||
| #Single file copy |  | ||||||
| class CopyFile(Command): |  | ||||||
| 	def __init__(self, fromFile, toPath): |  | ||||||
| 		Command.__init__(self) |  | ||||||
| 		self.fromFile = fromFile |  | ||||||
| 		self.toPath = toPath |  | ||||||
| 
 |  | ||||||
| 	def run(self, runner, job): |  | ||||||
| 		runner.PrintOut('copy {0} to {1}'.format(self.fromFile, self.toPath)) |  | ||||||
| 		shutil.copy(self.fromFile, self.toPath) |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| folders = [ |  | ||||||
| 	['addons', 'sourcemod', 'extensions'], |  | ||||||
| 	['addons', 'sourcemod', 'scripting', 'include'], |  | ||||||
| 	['addons', 'sourcemod', 'gamedata'], |  | ||||||
| ] | ] | ||||||
| 
 | 
 | ||||||
| #Setup | # Create the distribution folder hierarchy. | ||||||
| job.AddCommand(DestroyPath(os.path.join(AMBuild.outputFolder, 'package'))) | folder_map = {} | ||||||
| job.AddCommand(CreateFolders(folders)) | for folder in folder_list: | ||||||
|  |   norm_folder = os.path.normpath(folder) | ||||||
|  |   folder_map[folder] = builder.AddFolder(norm_folder) | ||||||
| 
 | 
 | ||||||
| #Copy Files | builder.AddCopy(DHooks.task.binary, folder_map['addons/sourcemod/extensions']) | ||||||
| job.AddCommand(CopyFile(os.path.join(AMBuild.sourceFolder, 'sourcemod', 'scripting', 'include', 'dhooks.inc'), |  | ||||||
|                         os.path.join('addons', 'sourcemod', 'scripting', 'include'))) |  | ||||||
| 
 | 
 | ||||||
| job.AddCommand(CopyFile(os.path.join(AMBuild.sourceFolder, 'sourcemod', 'scripting', 'dhooks-test.sp'), | # Do all straight-up file copies from the source tree. | ||||||
|                         os.path.join('addons', 'sourcemod', 'scripting'))) | def CopyFiles(src, dest, files): | ||||||
| 						 |   if not dest: | ||||||
| job.AddCommand(CopyFile(os.path.join(AMBuild.sourceFolder, 'sourcemod', 'gamedata', 'dhooks-test.games.txt'), |     dest = src | ||||||
|                         os.path.join('addons', 'sourcemod', 'gamedata'))) |   dest_entry = folder_map[dest] | ||||||
| 
 |   for source_file in files: | ||||||
| bincopies = [] |     source_path = os.path.join(builder.sourcePath, src, source_file) | ||||||
| 
 |     builder.AddCopy(source_path, dest_entry) | ||||||
| def AddNormalLibrary(name, dest): |  | ||||||
| 	dest = os.path.join('addons', 'sourcemod', dest) |  | ||||||
| 	bincopies.append(CopyFile(os.path.join('..', name, name + osutil.SharedLibSuffix()), dest)) |  | ||||||
| 	#pdb_list.append(name + '\\' + name + '.pdb') |  | ||||||
| 
 |  | ||||||
| def AddHL2Library(name, dest): |  | ||||||
| 	for i in SM.sdkInfo: |  | ||||||
| 		sdk = SM.sdkInfo[i] |  | ||||||
| 		if AMBuild.target['platform'] not in sdk['platform']: |  | ||||||
| 			continue |  | ||||||
| 		AddNormalLibrary(name + '.ext.' + sdk['ext'], dest) |  | ||||||
| 
 |  | ||||||
| #pdb_list = [] |  | ||||||
| 
 |  | ||||||
| AddHL2Library('dhooks', 'extensions') |  | ||||||
| 
 |  | ||||||
| job.AddCommandGroup(bincopies) |  | ||||||
| 
 |  | ||||||
| #if AMBuild.target['platform'] == 'windows': |  | ||||||
| #	pdblog = open(os.path.join(AMBuild.outputFolder, 'pdblog.txt'), 'wt') |  | ||||||
| #	for pdb in pdb_list: |  | ||||||
| #		pdblog.write(pdb + '\n') |  | ||||||
| #	pdblog.close() |  | ||||||
| 
 | 
 | ||||||
|  | CopyFiles('sourcemod/scripting', 'addons/sourcemod/scripting', ['dhooks-test.sp']) | ||||||
|  | CopyFiles('sourcemod/scripting/include', 'addons/sourcemod/scripting/include', ['dhooks.inc']) | ||||||
|  | CopyFiles('sourcemod/gamedata', 'addons/sourcemod/gamedata', ['dhooks-test.games.txt']) | ||||||
| @ -10,12 +10,14 @@ require 'helpers.pm'; | |||||||
| 
 | 
 | ||||||
| chdir('../../OUTPUT'); | chdir('../../OUTPUT'); | ||||||
| 
 | 
 | ||||||
| if ($^O eq "linux" || $^O eq "darwin") { | my $argn = $#ARGV + 1; | ||||||
| 	system("python3 build.py 2>&1"); | if ($argn > 0) { | ||||||
| } else { | 	$ENV{CC} = $ARGV[0]; | ||||||
| 	system("C:\\Python31\\python.exe build.py 2>&1"); | 	$ENV{CXX} = $ARGV[0]; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | system("ambuild --no-color 2>&1"); | ||||||
|  | 
 | ||||||
| if ($? != 0) | if ($? != 0) | ||||||
| { | { | ||||||
| 	die "Build failed: $!\n"; | 	die "Build failed: $!\n"; | ||||||
| @ -24,4 +26,3 @@ else | |||||||
| { | { | ||||||
| 	exit(0); | 	exit(0); | ||||||
| } | } | ||||||
| 
 |  | ||||||
|  | |||||||
							
								
								
									
										9
									
								
								changelog.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								changelog.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | - 2.0.0 | ||||||
|  | 	- Added ability to handle params with a size other than 4 | ||||||
|  | 	- Restructed how hooking was handled | ||||||
|  | 	- Fixed multiple memory leaks | ||||||
|  | 	- Use SDKHooks for entity listeners | ||||||
|  | 	- Remove the need for SDK specific builds | ||||||
|  | 	- Updated to use AMBuild2 | ||||||
|  | 	- General code rewrite | ||||||
|  | 	- Add mac support. | ||||||
							
								
								
									
										17
									
								
								configure.py
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								configure.py
									
									
									
									
									
								
							| @ -1,10 +1,15 @@ | |||||||
| # vim: set ts=2 sw=2 tw=99 noet: | # vim: set sts=2 ts=8 sw=2 tw=99 et: | ||||||
| import sys | import sys | ||||||
| import ambuild.runner as runner | from ambuild2 import run | ||||||
| 
 | 
 | ||||||
| run = runner.Runner() | builder = run.PrepareBuild(sourcePath = sys.path[0]) | ||||||
| run.options.add_option('--enable-debug', action='store_const', const='1', dest='debug', | builder.default_build_folder = 'obj-' + builder.target_platform | ||||||
|  | builder.options.add_option('--enable-debug', action='store_const', const='1', dest='debug', | ||||||
|                        help='Enable debugging symbols') |                        help='Enable debugging symbols') | ||||||
| run.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt', | builder.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt', | ||||||
|                        help='Enable optimization') |                        help='Enable optimization') | ||||||
| run.Configure(sys.path[0]) | builder.options.add_option('--mms-path', type=str, dest='mms_path', default=None, | ||||||
|  |                        help='Path to Metamod:Source') | ||||||
|  | builder.options.add_option('--sm-path', type=str, dest='sm_path', default=None, | ||||||
|  |                        help='Path to Sourcemod') | ||||||
|  | builder.Configure() | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								credits.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								credits.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | dvander - Helping with asm and being a huge help overall. | ||||||
|  | KyleS - Input and reviewing my shitty commits. | ||||||
|  | psychonic - Quacking and helping with buildbot along with coding questions. | ||||||
|  | asherkin - SourceHook knowledge. | ||||||
|  | Powerlord - Debugging and fixing crashes. | ||||||
| @ -1,7 +1,5 @@ | |||||||
| #include "extension.h" | #include "extension.h" | ||||||
| #include "vhook.h" |  | ||||||
| #include "listeners.h" | #include "listeners.h" | ||||||
| #include <macro-assembler-x86.h> |  | ||||||
| 
 | 
 | ||||||
| DHooks g_DHooksIface;		/**< Global singleton for extension's main interface */ | DHooks g_DHooksIface;		/**< Global singleton for extension's main interface */ | ||||||
| SMEXT_LINK(&g_DHooksIface); | SMEXT_LINK(&g_DHooksIface); | ||||||
| @ -15,8 +13,6 @@ HandleType_t g_HookSetupHandle = 0; | |||||||
| HandleType_t g_HookParamsHandle = 0; | HandleType_t g_HookParamsHandle = 0; | ||||||
| HandleType_t g_HookReturnHandle = 0; | HandleType_t g_HookReturnHandle = 0; | ||||||
| 
 | 
 | ||||||
| SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, false); |  | ||||||
| 
 |  | ||||||
| bool DHooks::SDK_OnLoad(char *error, size_t maxlength, bool late) | bool DHooks::SDK_OnLoad(char *error, size_t maxlength, bool late) | ||||||
| { | { | ||||||
| 	HandleError err; | 	HandleError err; | ||||||
| @ -49,8 +45,6 @@ bool DHooks::SDK_OnLoad(char *error, size_t maxlength, bool late) | |||||||
| 
 | 
 | ||||||
| 	g_pEntityListener = new DHooksEntityListener(); | 	g_pEntityListener = new DHooksEntityListener(); | ||||||
| 
 | 
 | ||||||
| 	SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, gamedll, g_pEntityListener, &DHooksEntityListener::LevelShutdown, false); |  | ||||||
| 
 |  | ||||||
| 	return true; | 	return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -81,15 +75,18 @@ void DHooks::SDK_OnAllLoaded() | |||||||
| 
 | 
 | ||||||
| void DHooks::SDK_OnUnload() | void DHooks::SDK_OnUnload() | ||||||
| { | { | ||||||
| 	CleanupHooks(NULL); | 	CleanupHooks(); | ||||||
| 	if(g_pEntityListener) | 	if(g_pEntityListener) | ||||||
| 	{ | 	{ | ||||||
| 		g_pEntityListener->CleanupListeners(NULL); | 		g_pEntityListener->CleanupListeners(); | ||||||
| 		g_pSDKHooks->RemoveEntityListener(g_pEntityListener); | 		g_pSDKHooks->RemoveEntityListener(g_pEntityListener); | ||||||
| 		SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, gamedll, g_pEntityListener, &DHooksEntityListener::LevelShutdown, false); |  | ||||||
| 		delete g_pEntityListener; | 		delete g_pEntityListener; | ||||||
| 	} | 	} | ||||||
| 	plsys->RemovePluginsListener(this); | 	plsys->RemovePluginsListener(this); | ||||||
|  | 
 | ||||||
|  | 	handlesys->RemoveType(g_HookSetupHandle, myself->GetIdentity()); | ||||||
|  | 	handlesys->RemoveType(g_HookParamsHandle, myself->GetIdentity()); | ||||||
|  | 	handlesys->RemoveType(g_HookReturnHandle, myself->GetIdentity()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool DHooks::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late) | bool DHooks::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late) | ||||||
| @ -118,20 +115,6 @@ bool DHooks::QueryRunning(char *error, size_t maxlength) | |||||||
| 	SM_CHECK_IFACE(SDKHOOKS, g_pSDKHooks); | 	SM_CHECK_IFACE(SDKHOOKS, g_pSDKHooks); | ||||||
| 	return true; | 	return true; | ||||||
| } | } | ||||||
| /*
 |  | ||||||
| // The default for this one is *supposed* to be false already
 |  | ||||||
| bool DHooks::QueryInterfaceDrop(SMInterface *pInterface) |  | ||||||
| { |  | ||||||
| 	if (strcmp(pInterface->GetInterfaceName(), SMINTERFACE_SDKTOOLS_NAME) == 0 |  | ||||||
| 		|| strcmp(pInterface->GetInterfaceName(), SMINTERFACE_BINTOOL_NAME) == 0) |  | ||||||
| 		|| strcmp(pInterface->GetInterfaceName(), SMINTERFACE_SDKHOOKS_NAME) == 0) |  | ||||||
| 	{ |  | ||||||
| 		return false; |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	return true; |  | ||||||
| } |  | ||||||
| */ |  | ||||||
| void DHooks::NotifyInterfaceDrop(SMInterface *pInterface) | void DHooks::NotifyInterfaceDrop(SMInterface *pInterface) | ||||||
| { | { | ||||||
| 	if(strcmp(pInterface->GetInterfaceName(), SMINTERFACE_SDKHOOKS_NAME) == 0) | 	if(strcmp(pInterface->GetInterfaceName(), SMINTERFACE_SDKHOOKS_NAME) == 0) | ||||||
| @ -140,6 +123,8 @@ void DHooks::NotifyInterfaceDrop(SMInterface *pInterface) | |||||||
| 		{ | 		{ | ||||||
| 			// If this fails, remove this line and just delete the ent listener instead
 | 			// If this fails, remove this line and just delete the ent listener instead
 | ||||||
| 			g_pSDKHooks->RemoveEntityListener(g_pEntityListener); | 			g_pSDKHooks->RemoveEntityListener(g_pEntityListener); | ||||||
|  | 
 | ||||||
|  | 			g_pEntityListener->CleanupListeners(); | ||||||
| 			delete g_pEntityListener; | 			delete g_pEntityListener; | ||||||
| 			g_pEntityListener = NULL; | 			g_pEntityListener = NULL; | ||||||
| 		} | 		} | ||||||
|  | |||||||
| @ -42,6 +42,8 @@ | |||||||
| #include <ISDKHooks.h> | #include <ISDKHooks.h> | ||||||
| #include <IBinTools.h> | #include <IBinTools.h> | ||||||
| #include <ISDKTools.h> | #include <ISDKTools.h> | ||||||
|  | #include <sh_vector.h> | ||||||
|  | #include "sdk-hacks.h" | ||||||
| 
 | 
 | ||||||
| /**
 | /**
 | ||||||
|  * @brief Sample implementation of the SDK Extension. |  * @brief Sample implementation of the SDK Extension. | ||||||
| @ -91,6 +93,7 @@ public: | |||||||
| 	virtual bool QueryRunning(char *error, size_t maxlength); | 	virtual bool QueryRunning(char *error, size_t maxlength); | ||||||
| 	//virtual bool QueryInterfaceDrop(SMInterface *pInterface);
 | 	//virtual bool QueryInterfaceDrop(SMInterface *pInterface);
 | ||||||
| 	virtual void NotifyInterfaceDrop(SMInterface *pInterface); | 	virtual void NotifyInterfaceDrop(SMInterface *pInterface); | ||||||
|  | 	virtual void OnCoreMapEnd(); | ||||||
| public: | public: | ||||||
| #if defined SMEXT_CONF_METAMOD | #if defined SMEXT_CONF_METAMOD | ||||||
| 	/**
 | 	/**
 | ||||||
|  | |||||||
| @ -3,28 +3,28 @@ | |||||||
| 
 | 
 | ||||||
| using namespace SourceHook; | using namespace SourceHook; | ||||||
| 
 | 
 | ||||||
| CUtlVector<EntityListener> g_EntityListeners; | SourceHook::CVector<EntityListener> g_EntityListeners; | ||||||
| 
 | 
 | ||||||
| void DHooksEntityListener::LevelShutdown() | void DHooks::OnCoreMapEnd() | ||||||
| { | { | ||||||
| 	for(int i = g_pHooks.Count() -1; i >= 0; i--) | 	for(int i = g_pHooks.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		DHooksManager *manager = g_pHooks.Element(i); | 		DHooksManager *manager = g_pHooks.at(i); | ||||||
| 		if(manager->callback->hookType == HookType_GameRules) | 		if(manager->callback->hookType == HookType_GameRules) | ||||||
| 		{ | 		{ | ||||||
| 			delete manager; | 			delete manager; | ||||||
| 			g_pHooks.Remove(i); | 			g_pHooks.erase(g_pHooks.iterAt(i)); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void DHooksEntityListener::CleanupListeners(IPluginContext *pContext) | void DHooksEntityListener::CleanupListeners(IPluginContext *pContext) | ||||||
| { | { | ||||||
| 	for(int i = g_EntityListeners.Count() -1; i >= 0; i--) | 	for(int i = g_EntityListeners.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		if(pContext == NULL || pContext == g_EntityListeners.Element(i).callback->GetParentRuntime()->GetDefaultContext()) | 		if(pContext == NULL || pContext == g_EntityListeners.at(i).callback->GetParentRuntime()->GetDefaultContext()) | ||||||
| 		{ | 		{ | ||||||
| 			g_EntityListeners.Remove(i); | 			g_EntityListeners.erase(g_EntityListeners.iterAt(i)); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| @ -33,9 +33,9 @@ void DHooksEntityListener::OnEntityCreated(CBaseEntity *pEntity, const char *cla | |||||||
| { | { | ||||||
| 	int entity = gamehelpers->EntityToBCompatRef(pEntity); | 	int entity = gamehelpers->EntityToBCompatRef(pEntity); | ||||||
| 
 | 
 | ||||||
| 	for(int i = g_EntityListeners.Count() -1; i >= 0; i--) | 	for(int i = g_EntityListeners.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		EntityListener listerner = g_EntityListeners.Element(i); | 		EntityListener listerner = g_EntityListeners.at(i); | ||||||
| 		if(listerner.type == ListenType_Created) | 		if(listerner.type == ListenType_Created) | ||||||
| 		{ | 		{ | ||||||
| 			IPluginFunction *callback = listerner.callback; | 			IPluginFunction *callback = listerner.callback; | ||||||
| @ -50,9 +50,9 @@ void DHooksEntityListener::OnEntityDestroyed(CBaseEntity *pEntity) | |||||||
| { | { | ||||||
| 	int entity = gamehelpers->EntityToBCompatRef(pEntity); | 	int entity = gamehelpers->EntityToBCompatRef(pEntity); | ||||||
| 
 | 
 | ||||||
| 	for(int i = g_EntityListeners.Count() -1; i >= 0; i--) | 	for(int i = g_EntityListeners.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		EntityListener listerner = g_EntityListeners.Element(i); | 		EntityListener listerner = g_EntityListeners.at(i); | ||||||
| 		if(listerner.type == ListenType_Deleted) | 		if(listerner.type == ListenType_Deleted) | ||||||
| 		{ | 		{ | ||||||
| 			IPluginFunction *callback = listerner.callback; | 			IPluginFunction *callback = listerner.callback; | ||||||
| @ -61,21 +61,21 @@ void DHooksEntityListener::OnEntityDestroyed(CBaseEntity *pEntity) | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	for(int i = g_pHooks.Count() -1; i >= 0; i--) | 	for(int i = g_pHooks.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		DHooksManager *manager = g_pHooks.Element(i); | 		DHooksManager *manager = g_pHooks.at(i); | ||||||
| 		if(manager->callback->entity == entity) | 		if(manager->callback->entity == entity) | ||||||
| 		{ | 		{ | ||||||
| 			delete manager; | 			delete manager; | ||||||
| 			g_pHooks.Remove(i); | 			g_pHooks.erase(g_pHooks.iterAt(i)); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| bool DHooksEntityListener::AddPluginEntityListener(ListenType type, IPluginFunction *callback) | bool DHooksEntityListener::AddPluginEntityListener(ListenType type, IPluginFunction *callback) | ||||||
| { | { | ||||||
| 	for(int i = g_EntityListeners.Count() -1; i >= 0; i--) | 	for(int i = g_EntityListeners.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		EntityListener listerner = g_EntityListeners.Element(i); | 		EntityListener listerner = g_EntityListeners.at(i); | ||||||
| 		if(listerner.callback == callback && listerner.type == type) | 		if(listerner.callback == callback && listerner.type == type) | ||||||
| 		{ | 		{ | ||||||
| 			return true; | 			return true; | ||||||
| @ -84,17 +84,17 @@ bool DHooksEntityListener::AddPluginEntityListener(ListenType type, IPluginFunct | |||||||
| 	EntityListener listener; | 	EntityListener listener; | ||||||
| 	listener.callback = callback; | 	listener.callback = callback; | ||||||
| 	listener.type = type; | 	listener.type = type; | ||||||
| 	g_EntityListeners.AddToTail(listener); | 	g_EntityListeners.push_back(listener); | ||||||
| 	return true; | 	return true; | ||||||
| } | } | ||||||
| bool DHooksEntityListener::RemovePluginEntityListener(ListenType type, IPluginFunction *callback) | bool DHooksEntityListener::RemovePluginEntityListener(ListenType type, IPluginFunction *callback) | ||||||
| { | { | ||||||
| 	for(int i = g_EntityListeners.Count() -1; i >= 0; i--) | 	for(int i = g_EntityListeners.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		EntityListener listerner = g_EntityListeners.Element(i); | 		EntityListener listerner = g_EntityListeners.at(i); | ||||||
| 		if(listerner.callback == callback && listerner.type == type) | 		if(listerner.callback == callback && listerner.type == type) | ||||||
| 		{ | 		{ | ||||||
| 			g_EntityListeners.Remove(i); | 			g_EntityListeners.erase(g_EntityListeners.iterAt(i)); | ||||||
| 			return true; | 			return true; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | |||||||
| @ -15,8 +15,7 @@ class DHooksEntityListener : public ISMEntityListener | |||||||
| public: | public: | ||||||
| 	virtual void OnEntityCreated(CBaseEntity *pEntity, const char *classname); | 	virtual void OnEntityCreated(CBaseEntity *pEntity, const char *classname); | ||||||
| 	virtual void OnEntityDestroyed(CBaseEntity *pEntity); | 	virtual void OnEntityDestroyed(CBaseEntity *pEntity); | ||||||
| 	void CleanupListeners(IPluginContext *func); | 	void CleanupListeners(IPluginContext *func = NULL); | ||||||
| 	virtual void LevelShutdown(); |  | ||||||
| 	bool AddPluginEntityListener(ListenType type, IPluginFunction *callback); | 	bool AddPluginEntityListener(ListenType type, IPluginFunction *callback); | ||||||
| 	bool RemovePluginEntityListener(ListenType type, IPluginFunction *callback); | 	bool RemovePluginEntityListener(ListenType type, IPluginFunction *callback); | ||||||
| }; | }; | ||||||
| @ -28,5 +27,5 @@ struct EntityListener | |||||||
| 	IPluginFunction *callback; | 	IPluginFunction *callback; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| extern CUtlVector<DHooksManager *> g_pHooks; | extern SourceHook::CVector<DHooksManager *> g_pHooks; | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -5,66 +5,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdk", "sdk.vcxproj", "{B3E7 | |||||||
| EndProject | EndProject | ||||||
| Global | Global | ||||||
| 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||||
| 		Debug - Alien Swarm|Win32 = Debug - Alien Swarm|Win32 |  | ||||||
| 		Debug - CS GO|Win32 = Debug - CS GO|Win32 |  | ||||||
| 		Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32 |  | ||||||
| 		Debug - Episode 1|Win32 = Debug - Episode 1|Win32 |  | ||||||
| 		Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32 |  | ||||||
| 		Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32 |  | ||||||
| 		Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32 |  | ||||||
| 		Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32 |  | ||||||
| 		Debug - Orange Box|Win32 = Debug - Orange Box|Win32 |  | ||||||
| 		Debug|Win32 = Debug|Win32 | 		Debug|Win32 = Debug|Win32 | ||||||
| 		Release - Alien Swarm|Win32 = Release - Alien Swarm|Win32 |  | ||||||
| 		Release - CS GO|Win32 = Release - CS GO|Win32 |  | ||||||
| 		Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32 |  | ||||||
| 		Release - Episode 1|Win32 = Release - Episode 1|Win32 |  | ||||||
| 		Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32 |  | ||||||
| 		Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32 |  | ||||||
| 		Release - Old Metamod|Win32 = Release - Old Metamod|Win32 |  | ||||||
| 		Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32 |  | ||||||
| 		Release - Orange Box|Win32 = Release - Orange Box|Win32 |  | ||||||
| 		Release|Win32 = Release|Win32 | 		Release|Win32 = Release|Win32 | ||||||
| 	EndGlobalSection | 	EndGlobalSection | ||||||
| 	GlobalSection(ProjectConfigurationPlatforms) = postSolution | 	GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Alien Swarm|Win32.ActiveCfg = Debug - Alien Swarm|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Alien Swarm|Win32.Build.0 = Debug - Alien Swarm|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - CS GO|Win32.ActiveCfg = Debug - CS GO|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - CS GO|Win32.Build.0 = Debug - CS GO|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.Build.0 = Debug - Old Metamod|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.ActiveCfg = Debug|Win32 | 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.ActiveCfg = Debug|Win32 | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.Build.0 = Debug|Win32 | 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.Build.0 = Debug|Win32 | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Alien Swarm|Win32.ActiveCfg = Release - Alien Swarm|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Alien Swarm|Win32.Build.0 = Release - Alien Swarm|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - CS GO|Win32.ActiveCfg = Release - CS GO|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - CS GO|Win32.Build.0 = Release - CS GO|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.Build.0 = Release - Old Metamod|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32 |  | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.ActiveCfg = Release|Win32 | 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.ActiveCfg = Release|Win32 | ||||||
| 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.Build.0 = Release|Win32 | 		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.Build.0 = Release|Win32 | ||||||
| 	EndGlobalSection | 	EndGlobalSection | ||||||
|  | |||||||
| @ -1,82 +1,10 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||||
|   <ItemGroup Label="ProjectConfigurations"> |   <ItemGroup Label="ProjectConfigurations"> | ||||||
|     <ProjectConfiguration Include="Debug - Alien Swarm|Win32"> |  | ||||||
|       <Configuration>Debug - Alien Swarm</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Debug - CS GO|Win32"> |  | ||||||
|       <Configuration>Debug - CS GO</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Debug - Dark Messiah|Win32"> |  | ||||||
|       <Configuration>Debug - Dark Messiah</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Debug - Episode 1|Win32"> |  | ||||||
|       <Configuration>Debug - Episode 1</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Debug - Left 4 Dead 2|Win32"> |  | ||||||
|       <Configuration>Debug - Left 4 Dead 2</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Debug - Left 4 Dead|Win32"> |  | ||||||
|       <Configuration>Debug - Left 4 Dead</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Debug - Old Metamod|Win32"> |  | ||||||
|       <Configuration>Debug - Old Metamod</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Debug - Orange Box Valve|Win32"> |  | ||||||
|       <Configuration>Debug - Orange Box Valve</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Debug - Orange Box|Win32"> |  | ||||||
|       <Configuration>Debug - Orange Box</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Debug|Win32"> |     <ProjectConfiguration Include="Debug|Win32"> | ||||||
|       <Configuration>Debug</Configuration> |       <Configuration>Debug</Configuration> | ||||||
|       <Platform>Win32</Platform> |       <Platform>Win32</Platform> | ||||||
|     </ProjectConfiguration> |     </ProjectConfiguration> | ||||||
|     <ProjectConfiguration Include="Release - Alien Swarm|Win32"> |  | ||||||
|       <Configuration>Release - Alien Swarm</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Release - CS GO|Win32"> |  | ||||||
|       <Configuration>Release - CS GO</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Release - Dark Messiah|Win32"> |  | ||||||
|       <Configuration>Release - Dark Messiah</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Release - Episode 1|Win32"> |  | ||||||
|       <Configuration>Release - Episode 1</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Release - Left 4 Dead 2|Win32"> |  | ||||||
|       <Configuration>Release - Left 4 Dead 2</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Release - Left 4 Dead|Win32"> |  | ||||||
|       <Configuration>Release - Left 4 Dead</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Release - Old Metamod|Win32"> |  | ||||||
|       <Configuration>Release - Old Metamod</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Release - Orange Box Valve|Win32"> |  | ||||||
|       <Configuration>Release - Orange Box Valve</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Release - Orange Box|Win32"> |  | ||||||
|       <Configuration>Release - Orange Box</Configuration> |  | ||||||
|       <Platform>Win32</Platform> |  | ||||||
|     </ProjectConfiguration> |  | ||||||
|     <ProjectConfiguration Include="Release|Win32"> |     <ProjectConfiguration Include="Release|Win32"> | ||||||
|       <Configuration>Release</Configuration> |       <Configuration>Release</Configuration> | ||||||
|       <Platform>Win32</Platform> |       <Platform>Win32</Platform> | ||||||
| @ -88,105 +16,6 @@ | |||||||
|     <Keyword>Win32Proj</Keyword> |     <Keyword>Win32Proj</Keyword> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Episode 1|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|     <WholeProgramOptimization>true</WholeProgramOptimization> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Episode 1|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - CS GO|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v100</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|     <WholeProgramOptimization>true</WholeProgramOptimization> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - CS GO|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Alien Swarm|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|     <WholeProgramOptimization>true</WholeProgramOptimization> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Alien Swarm|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Left 4 Dead 2|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|     <WholeProgramOptimization>true</WholeProgramOptimization> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Left 4 Dead 2|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Left 4 Dead|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|     <WholeProgramOptimization>true</WholeProgramOptimization> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Left 4 Dead|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box Valve|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v100</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|     <WholeProgramOptimization>true</WholeProgramOptimization> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box Valve|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|     <WholeProgramOptimization>true</WholeProgramOptimization> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Dark Messiah|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|     <WholeProgramOptimization>true</WholeProgramOptimization> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Dark Messiah|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Old Metamod|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|     <WholeProgramOptimization>true</WholeProgramOptimization> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Old Metamod|Win32'" Label="Configuration"> |  | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |  | ||||||
|     <PlatformToolset>v110</PlatformToolset> |  | ||||||
|     <CharacterSet>MultiByte</CharacterSet> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||||||
|     <ConfigurationType>DynamicLibrary</ConfigurationType> |     <ConfigurationType>DynamicLibrary</ConfigurationType> | ||||||
|     <PlatformToolset>v110</PlatformToolset> |     <PlatformToolset>v110</PlatformToolset> | ||||||
| @ -201,60 +30,6 @@ | |||||||
|   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||||||
|   <ImportGroup Label="ExtensionSettings"> |   <ImportGroup Label="ExtensionSettings"> | ||||||
|   </ImportGroup> |   </ImportGroup> | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Episode 1|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Episode 1|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - CS GO|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - CS GO|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Alien Swarm|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Alien Swarm|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Left 4 Dead 2|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Left 4 Dead 2|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Left 4 Dead|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Left 4 Dead|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box Valve|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box Valve|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Dark Messiah|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Dark Messiah|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Old Metamod|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Old Metamod|Win32'" Label="PropertySheets"> |  | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |  | ||||||
|   </ImportGroup> |  | ||||||
|   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | ||||||
|     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||||||
|   </ImportGroup> |   </ImportGroup> | ||||||
| @ -269,107 +44,19 @@ | |||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> | ||||||
|     <IntDir>$(Configuration)\</IntDir> |     <IntDir>$(Configuration)\</IntDir> | ||||||
|     <LinkIncremental>true</LinkIncremental> |     <LinkIncremental>true</LinkIncremental> | ||||||
|  |     <TargetName>dhooks.ext</TargetName> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> | ||||||
|     <IntDir>$(Configuration)\</IntDir> |     <IntDir>$(Configuration)\</IntDir> | ||||||
|     <LinkIncremental>false</LinkIncremental> |     <LinkIncremental>false</LinkIncremental> | ||||||
|   </PropertyGroup> |     <TargetName>dhooks.ext</TargetName> | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Old Metamod|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>true</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Old Metamod|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>false</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Dark Messiah|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>true</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Dark Messiah|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>false</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>true</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>false</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box Valve|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>true</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box Valve|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>false</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Left 4 Dead|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>true</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Left 4 Dead|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>false</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Left 4 Dead 2|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>true</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Left 4 Dead 2|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>false</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Alien Swarm|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>true</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Alien Swarm|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>false</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - CS GO|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>true</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - CS GO|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>false</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Episode 1|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>true</LinkIncremental> |  | ||||||
|   </PropertyGroup> |  | ||||||
|   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Episode 1|Win32'"> |  | ||||||
|     <OutDir>$(SolutionDir)$(Configuration)\</OutDir> |  | ||||||
|     <IntDir>$(Configuration)\</IntDir> |  | ||||||
|     <LinkIncremental>false</LinkIncremental> |  | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||||||
|     <ClCompile> |     <ClCompile> | ||||||
|       <Optimization>Disabled</Optimization> |       <Optimization>Disabled</Optimization> | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>..;..\sdk;$(MMSOURCE10)\core;$(MMSOURCE10)\core\sourcehook;$(SMCENTRAL)\public;$(SMCENTRAL)\public\sourcepawn;$(SMCENTRAL)\public\extensions;$(SMCENTRAL)\public\jit;$(SMCENTRAL)\public\jit\x86;$(SOURCEMOD)\public\amtl</AdditionalIncludeDirectories> | ||||||
|       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions> |       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;COMPILER_MSVC;COMPILER_MSVC32;META_NO_HL2SDK;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||||||
|       <MinimalRebuild>true</MinimalRebuild> |       <MinimalRebuild>true</MinimalRebuild> | ||||||
|       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | ||||||
|       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||||||
| @ -380,7 +67,7 @@ | |||||||
|       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|       <OutputFile>$(OutDir)sample.ext.dll</OutputFile> |       <OutputFile>$(OutDir)dhooks.ext.dll</OutputFile> | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |       <GenerateDebugInformation>true</GenerateDebugInformation> | ||||||
|       <SubSystem>Windows</SubSystem> |       <SubSystem>Windows</SubSystem> | ||||||
| @ -390,499 +77,36 @@ | |||||||
|     </Link> |     </Link> | ||||||
|   </ItemDefinitionGroup> |   </ItemDefinitionGroup> | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||||||
|     <ClCompile> |  | ||||||
|       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <OptimizeReferences>true</OptimizeReferences> |  | ||||||
|       <EnableCOMDATFolding>true</EnableCOMDATFolding> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Old Metamod|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <Optimization>Disabled</Optimization> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(MMSOURCE19)\core-legacy;$(MMSOURCE19)\core-legacy\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <MinimalRebuild>true</MinimalRebuild> |  | ||||||
|       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |  | ||||||
|       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;$(HL2SDK)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.1.ep1.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Old Metamod|Win32'"> |  | ||||||
|     <ClCompile> |     <ClCompile> | ||||||
|       <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |       <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> | ||||||
|       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(MMSOURCE19)\core-legacy;$(MMSOURCE19)\core-legacy\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>..;..\sdk;$(MMSOURCE10)\core;$(MMSOURCE10)\core\sourcehook;$(SMCENTRAL)\public;$(SMCENTRAL)\public\sourcepawn;$(SMCENTRAL)\public\extensions;$(SMCENTRAL)\public\jit;$(SMCENTRAL)\public\jit\x86;$(SOURCEMOD)\public\amtl</AdditionalIncludeDirectories> | ||||||
|       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> |       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;COMPILER_MSVC;COMPILER_MSVC32;META_NO_HL2SDK;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||||||
|       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |       <RuntimeTypeInfo>false</RuntimeTypeInfo> | ||||||
|       <PrecompiledHeader /> |       <PrecompiledHeader> | ||||||
|  |       </PrecompiledHeader> | ||||||
|       <WarningLevel>Level3</WarningLevel> |       <WarningLevel>Level3</WarningLevel> | ||||||
|       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|       <AdditionalDependencies>$(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;$(HL2SDK)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |       <AdditionalDependencies> | ||||||
|       <OutputFile>$(OutDir)sample.ext.1.ep1.dll</OutputFile> |       </AdditionalDependencies> | ||||||
|  |       <OutputFile>$(OutDir)dhooks.ext.dll</OutputFile> | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |       <GenerateDebugInformation>true</GenerateDebugInformation> | ||||||
|       <SubSystem>Windows</SubSystem> |       <SubSystem>Windows</SubSystem> | ||||||
|       <OptimizeReferences>true</OptimizeReferences> |       <OptimizeReferences>true</OptimizeReferences> | ||||||
|       <EnableCOMDATFolding>true</EnableCOMDATFolding> |       <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |       <RandomizedBaseAddress>false</RandomizedBaseAddress> | ||||||
|       <DataExecutionPrevention /> |       <DataExecutionPrevention> | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |       </DataExecutionPrevention> | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Dark Messiah|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <Optimization>Disabled</Optimization> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDK-DARKM)\public;$(HL2SDK-DARKM)\public\dlls;$(HL2SDK-DARKM)\public\engine;$(HL2SDK-DARKM)\public\tier0;$(HL2SDK-DARKM)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <MinimalRebuild>true</MinimalRebuild> |  | ||||||
|       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |  | ||||||
|       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDK-DARKM)\lib\public\tier0.lib;$(HL2SDK-DARKM)\lib\public\tier1.lib;$(HL2SDK-DARKM)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.darkm.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Dark Messiah|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDK-DARKM)\public;$(HL2SDK-DARKM)\public\dlls;$(HL2SDK-DARKM)\public\engine;$(HL2SDK-DARKM)\public\tier0;$(HL2SDK-DARKM)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDK-DARKM)\lib\public\tier0.lib;$(HL2SDK-DARKM)\lib\public\tier1.lib;$(HL2SDK-DARKM)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.darkm.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <OptimizeReferences>true</OptimizeReferences> |  | ||||||
|       <EnableCOMDATFolding>true</EnableCOMDATFolding> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <Optimization>Disabled</Optimization> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDKOB)\public;$(HL2SDKOB)\public\engine;$(HL2SDKOB)\public\game\server;$(HL2SDKOB)\public\tier0;$(HL2SDKOB)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=3;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <MinimalRebuild>true</MinimalRebuild> |  | ||||||
|       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |  | ||||||
|       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDKOB)\lib\public\tier0.lib;$(HL2SDKOB)\lib\public\tier1.lib;$(HL2SDKOB)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.ep2.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDKOB)\public;$(HL2SDKOB)\public\engine;$(HL2SDKOB)\public\game\server;$(HL2SDKOB)\public\tier0;$(HL2SDKOB)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=3;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDKOB)\lib\public\tier0.lib;$(HL2SDKOB)\lib\public\tier1.lib;$(HL2SDKOB)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.ep2.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <OptimizeReferences>true</OptimizeReferences> |  | ||||||
|       <EnableCOMDATFolding>true</EnableCOMDATFolding> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box Valve|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <Optimization>Disabled</Optimization> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDKOBVALVE)\public;$(HL2SDKOBVALVE)\public\engine;$(HL2SDKOBVALVE)\public\game\server;$(HL2SDKOBVALVE)\public\tier0;$(HL2SDKOBVALVE)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=6;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <MinimalRebuild>true</MinimalRebuild> |  | ||||||
|       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |  | ||||||
|       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDKOBVALVE)\lib\public\tier0.lib;$(HL2SDKOBVALVE)\lib\public\tier1.lib;$(HL2SDKOBVALVE)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.ep2v.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box Valve|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;$(HL2SDKOBVALVE)\public;$(HL2SDKOBVALVE)\public\engine;$(HL2SDKOBVALVE)\public\game\server;$(HL2SDKOBVALVE)\public\tier0;$(HL2SDKOBVALVE)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(SMCENTRAL)\public;$(SMCENTRAL)\public\sourcepawn;$(SMCENTRAL)\public\extensions;$(HL2SDKOBVALVE)\game\server;$(HL2SDKOBVALVE)\game\shared;$(SMCENTRAL)\public\jit;$(SMCENTRAL)\public\jit\x86;$(SMCENTRAL)\public\amtl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=6;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDKOBVALVE)\lib\public\tier0.lib;$(HL2SDKOBVALVE)\lib\public\tier1.lib;$(HL2SDKOBVALVE)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)dhooks.ext.2.css.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <OptimizeReferences>true</OptimizeReferences> |  | ||||||
|       <EnableCOMDATFolding>true</EnableCOMDATFolding> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Left 4 Dead|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <Optimization>Disabled</Optimization> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDKL4D)\public;$(HL2SDKL4D)\public\engine;$(HL2SDKL4D)\public\game\server;$(HL2SDKL4D)\public\tier0;$(HL2SDKL4D)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=7;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <MinimalRebuild>true</MinimalRebuild> |  | ||||||
|       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |  | ||||||
|       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDKL4D)\lib\public\tier0.lib;$(HL2SDKL4D)\lib\public\tier1.lib;$(HL2SDKL4D)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.l4d.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Left 4 Dead|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDKL4D)\public;$(HL2SDKL4D)\public\engine;$(HL2SDKL4D)\public\game\server;$(HL2SDKL4D)\public\tier0;$(HL2SDKL4D)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=7;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDKL4D)\lib\public\tier0.lib;$(HL2SDKL4D)\lib\public\tier1.lib;$(HL2SDKL4D)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.l4d.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <OptimizeReferences>true</OptimizeReferences> |  | ||||||
|       <EnableCOMDATFolding>true</EnableCOMDATFolding> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Left 4 Dead 2|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <Optimization>Disabled</Optimization> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDKL4D2)\public;$(HL2SDKL4D2)\public\engine;$(HL2SDKL4D2)\public\game\server;$(HL2SDKL4D2)\public\tier0;$(HL2SDKL4D2)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=8;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <MinimalRebuild>true</MinimalRebuild> |  | ||||||
|       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |  | ||||||
|       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDKL4D2)\lib\public\tier0.lib;$(HL2SDKL4D2)\lib\public\tier1.lib;$(HL2SDKL4D2)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.l4d2.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Left 4 Dead 2|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDKL4D2)\public;$(HL2SDKL4D2)\public\engine;$(HL2SDKL4D2)\public\game\server;$(HL2SDKL4D2)\public\tier0;$(HL2SDKL4D2)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=8;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDKL4D2)\lib\public\tier0.lib;$(HL2SDKL4D2)\lib\public\tier1.lib;$(HL2SDKL4D2)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.l4d2.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <OptimizeReferences>true</OptimizeReferences> |  | ||||||
|       <EnableCOMDATFolding>true</EnableCOMDATFolding> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Alien Swarm|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <Optimization>Disabled</Optimization> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDK-SWARM)\public;$(HL2SDK-SWARM)\public\engine;$(HL2SDK-SWARM)\public\game\server;$(HL2SDK-SWARM)\public\tier0;$(HL2SDK-SWARM)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=9;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <MinimalRebuild>true</MinimalRebuild> |  | ||||||
|       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |  | ||||||
|       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDK-SWARM)\lib\public\interfaces.lib;$(HL2SDK-SWARM)\lib\public\tier0.lib;$(HL2SDK-SWARM)\lib\public\tier1.lib;$(HL2SDK-SWARM)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.swarm.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Alien Swarm|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDK-SWARM)\public;$(HL2SDK-SWARM)\public\engine;$(HL2SDK-SWARM)\public\game\server;$(HL2SDK-SWARM)\public\tier0;$(HL2SDK-SWARM)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=9;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDK-SWARM)\lib\public\interfaces.lib;$(HL2SDK-SWARM)\lib\public\tier0.lib;$(HL2SDK-SWARM)\lib\public\tier1.lib;$(HL2SDK-SWARM)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.swarm.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <OptimizeReferences>true</OptimizeReferences> |  | ||||||
|       <EnableCOMDATFolding>true</EnableCOMDATFolding> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - CS GO|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <Optimization>Disabled</Optimization> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDKCSGO)\public;$(HL2SDKCSGO)\public\engine;$(HL2SDKCSGO)\public\game\server;$(HL2SDKCSGO)\public\tier0;$(HL2SDKCSGO)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=11;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <MinimalRebuild>true</MinimalRebuild> |  | ||||||
|       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |  | ||||||
|       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDKCSGO)\lib\public\interfaces.lib;$(HL2SDKCSGO)\lib\public\tier0.lib;$(HL2SDKCSGO)\lib\public\tier1.lib;$(HL2SDKCSGO)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.csgo.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - CS GO|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;$(HL2SDKCSGO)\public;$(HL2SDKCSGO)\public\engine;$(HL2SDKCSGO)\public\game\server;$(HL2SDKCSGO)\public\tier0;$(HL2SDKCSGO)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(SMCENTRAL)\public;$(SMCENTRAL)\public\sourcepawn;$(SMCENTRAL)\public\extensions;$(HL2SDKCSGO)\game\server;$(HL2SDKCSGO)\game\shared;$(SMCENTRAL)\public\jit;$(SMCENTRAL)\public\jit\x86;$(SMCENTRAL)\public\amtl</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=11;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDKCSGO)\lib\public\interfaces.lib;$(HL2SDKCSGO)\lib\public\tier1.lib;$(HL2SDKCSGO)\lib\public\vstdlib.lib;$(HL2SDKCSGO)\lib\public\tier0.lib</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)dhooks.ext.2.csgo.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <OptimizeReferences>true</OptimizeReferences> |  | ||||||
|       <EnableCOMDATFolding>true</EnableCOMDATFolding> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Episode 1|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <Optimization>Disabled</Optimization> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <MinimalRebuild>true</MinimalRebuild> |  | ||||||
|       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |  | ||||||
|       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;$(HL2SDK)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.ep1.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |  | ||||||
|     </Link> |  | ||||||
|   </ItemDefinitionGroup> |  | ||||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Episode 1|Win32'"> |  | ||||||
|     <ClCompile> |  | ||||||
|       <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions> |  | ||||||
|       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |  | ||||||
|       <AdditionalIncludeDirectories>..;..\sdk;..\..;..\..\sourcepawn;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |  | ||||||
|       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2;%(PreprocessorDefinitions)</PreprocessorDefinitions> |  | ||||||
|       <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |  | ||||||
|       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> |  | ||||||
|       <RuntimeTypeInfo>false</RuntimeTypeInfo> |  | ||||||
|       <PrecompiledHeader /> |  | ||||||
|       <WarningLevel>Level3</WarningLevel> |  | ||||||
|       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |  | ||||||
|     </ClCompile> |  | ||||||
|     <Link> |  | ||||||
|       <AdditionalDependencies>$(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;$(HL2SDK)\lib\public\vstdlib.lib;%(AdditionalDependencies)</AdditionalDependencies> |  | ||||||
|       <OutputFile>$(OutDir)sample.ext.2.ep1.dll</OutputFile> |  | ||||||
|       <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |  | ||||||
|       <GenerateDebugInformation>true</GenerateDebugInformation> |  | ||||||
|       <SubSystem>Windows</SubSystem> |  | ||||||
|       <OptimizeReferences>true</OptimizeReferences> |  | ||||||
|       <EnableCOMDATFolding>true</EnableCOMDATFolding> |  | ||||||
|       <RandomizedBaseAddress>false</RandomizedBaseAddress> |  | ||||||
|       <DataExecutionPrevention /> |  | ||||||
|       <TargetMachine>MachineX86</TargetMachine> |       <TargetMachine>MachineX86</TargetMachine> | ||||||
|     </Link> |     </Link> | ||||||
|   </ItemDefinitionGroup> |   </ItemDefinitionGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <ClCompile Include="..\..\..\sourcemod-central\public\jit\x86\assembler-x86.cpp" /> |     <ClCompile Include="$(SMCENTRAL)\public\jit\x86\assembler-x86.cpp" /> | ||||||
|     <ClCompile Include="..\extension.cpp" /> |     <ClCompile Include="..\extension.cpp" /> | ||||||
|     <ClCompile Include="..\listeners.cpp" /> |     <ClCompile Include="..\listeners.cpp" /> | ||||||
|     <ClCompile Include="..\natives.cpp" /> |     <ClCompile Include="..\natives.cpp" /> | ||||||
| @ -893,11 +117,11 @@ | |||||||
|     <ClInclude Include="..\extension.h" /> |     <ClInclude Include="..\extension.h" /> | ||||||
|     <ClInclude Include="..\listeners.h" /> |     <ClInclude Include="..\listeners.h" /> | ||||||
|     <ClInclude Include="..\natives.h" /> |     <ClInclude Include="..\natives.h" /> | ||||||
|  |     <ClInclude Include="..\sdk-hacks.h" /> | ||||||
|     <ClInclude Include="..\vfunc_call.h" /> |     <ClInclude Include="..\vfunc_call.h" /> | ||||||
|     <ClInclude Include="..\vhook.h" /> |     <ClInclude Include="..\vhook.h" /> | ||||||
|     <ClInclude Include="..\sdk\smsdk_config.h" /> |     <ClInclude Include="..\sdk\smsdk_config.h" /> | ||||||
|     <ClInclude Include="..\sdk\smsdk_ext.h" /> |     <ClInclude Include="..\sdk\smsdk_ext.h" /> | ||||||
|     <ClInclude Include="..\vhook_macros.h" /> |  | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||||||
|   <ImportGroup Label="ExtensionTargets"> |   <ImportGroup Label="ExtensionTargets"> | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ | |||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <ClCompile Include="..\vhook.cpp" /> |     <ClCompile Include="..\vhook.cpp" /> | ||||||
|     <ClCompile Include="..\extension.cpp" /> |     <ClCompile Include="..\extension.cpp" /> | ||||||
|     <ClCompile Include="..\..\..\sourcemod-central\public\jit\x86\assembler-x86.cpp"> |     <ClCompile Include="$(SMCENTRAL)\public\jit\x86\assembler-x86.cpp"> | ||||||
|       <Filter>JIT</Filter> |       <Filter>JIT</Filter> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <ClCompile Include="..\natives.cpp" /> |     <ClCompile Include="..\natives.cpp" /> | ||||||
| @ -25,9 +25,6 @@ | |||||||
|     <ClInclude Include="..\sdk\smsdk_ext.h"> |     <ClInclude Include="..\sdk\smsdk_ext.h"> | ||||||
|       <Filter>sdk</Filter> |       <Filter>sdk</Filter> | ||||||
|     </ClInclude> |     </ClInclude> | ||||||
|     <ClInclude Include="..\vhook_macros.h"> |  | ||||||
|       <Filter>Headers</Filter> |  | ||||||
|     </ClInclude> |  | ||||||
|     <ClInclude Include="..\natives.h"> |     <ClInclude Include="..\natives.h"> | ||||||
|       <Filter>Headers</Filter> |       <Filter>Headers</Filter> | ||||||
|     </ClInclude> |     </ClInclude> | ||||||
| @ -37,6 +34,9 @@ | |||||||
|     <ClInclude Include="..\vfunc_call.h"> |     <ClInclude Include="..\vfunc_call.h"> | ||||||
|       <Filter>Headers</Filter> |       <Filter>Headers</Filter> | ||||||
|     </ClInclude> |     </ClInclude> | ||||||
|  |     <ClInclude Include="..\sdk-hacks.h"> | ||||||
|  |       <Filter>Headers</Filter> | ||||||
|  |     </ClInclude> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <Filter Include="Headers"> |     <Filter Include="Headers"> | ||||||
|  | |||||||
							
								
								
									
										207
									
								
								natives.cpp
									
									
									
									
									
								
							
							
						
						
									
										207
									
								
								natives.cpp
									
									
									
									
									
								
							| @ -1,29 +1,4 @@ | |||||||
| #include "natives.h" | #include "natives.h" | ||||||
| #include <isaverestore.h> |  | ||||||
| 
 |  | ||||||
| #ifndef _DEBUG |  | ||||||
| #include <ehandle.h> |  | ||||||
| #else |  | ||||||
| #undef _DEBUG |  | ||||||
| #include <ehandle.h> |  | ||||||
| #define _DEBUG 1 |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
| CBaseEntity *UTIL_GetCBaseEntity(int num) |  | ||||||
| { |  | ||||||
| 	edict_t *pEdict = gamehelpers->EdictOfIndex(num); |  | ||||||
| 	if (!pEdict || pEdict->IsFree()) |  | ||||||
| 	{ |  | ||||||
| 		return NULL; |  | ||||||
| 	} |  | ||||||
| 	IServerUnknown *pUnk; |  | ||||||
| 	if ((pUnk=pEdict->GetUnknown()) == NULL) |  | ||||||
| 	{ |  | ||||||
| 		return NULL; |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	return pUnk->GetBaseEntity(); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| bool GetHandleIfValidOrError(HandleType_t type, void **object, IPluginContext *pContext, cell_t param) | bool GetHandleIfValidOrError(HandleType_t type, void **object, IPluginContext *pContext, cell_t param) | ||||||
| { | { | ||||||
| @ -42,22 +17,19 @@ bool GetHandleIfValidOrError(HandleType_t type, void **object, IPluginContext *p | |||||||
| 	return true; | 	return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #ifndef __linux__ |  | ||||||
| intptr_t GetObjectAddr(HookParamType type, void **params, int index) | intptr_t GetObjectAddr(HookParamType type, void **params, int index) | ||||||
| { | { | ||||||
|  | #ifdef  WIN32 | ||||||
| 	if(type == HookParamType_Object) | 	if(type == HookParamType_Object) | ||||||
| 		return (intptr_t)¶ms[index]; | 		return (intptr_t)¶ms[index]; | ||||||
| 	else if(type == HookParamType_ObjectPtr) | 	else if(type == HookParamType_ObjectPtr) | ||||||
| 		return (intptr_t)params[index]; | 		return (intptr_t)params[index]; | ||||||
| 
 | 
 | ||||||
| 	return 0; | 	return 0; | ||||||
| } |  | ||||||
| #else | #else | ||||||
| intptr_t GetObjectAddr(HookParamType type, void **params, int index) |  | ||||||
| { |  | ||||||
| 	return (intptr_t)params[index]; | 	return (intptr_t)params[index]; | ||||||
| } |  | ||||||
| #endif | #endif | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| //native Handle:DHookCreate(offset, HookType:hooktype, ReturnType:returntype, ThisPointerType:thistype, DHookCallback:callback);
 | //native Handle:DHookCreate(offset, HookType:hooktype, ReturnType:returntype, ThisPointerType:thistype, DHookCallback:callback);
 | ||||||
| cell_t Native_CreateHook(IPluginContext *pContext, const cell_t *params) | cell_t Native_CreateHook(IPluginContext *pContext, const cell_t *params) | ||||||
| @ -117,7 +89,7 @@ cell_t Native_AddParam(IPluginContext *pContext, const cell_t *params) | |||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	info.pass_type = GetParamTypePassType(info.type); | 	info.pass_type = GetParamTypePassType(info.type); | ||||||
| 	setup->params.AddToTail(info); | 	setup->params.push_back(info); | ||||||
| 
 | 
 | ||||||
| 	return 1; | 	return 1; | ||||||
| } | } | ||||||
| @ -137,15 +109,15 @@ cell_t Native_HookEntity(IPluginContext *pContext, const cell_t *params) | |||||||
| 	} | 	} | ||||||
| 	bool post = params[2] != 0; | 	bool post = params[2] != 0; | ||||||
| 
 | 
 | ||||||
| 	for(int i = g_pHooks.Count() -1; i >= 0; i--) | 	for(int i = g_pHooks.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		DHooksManager *manager = g_pHooks.Element(i); | 		DHooksManager *manager = g_pHooks.at(i); | ||||||
| 		if(manager->callback->hookType == HookType_Entity && manager->callback->entity == params[3] && manager->callback->offset == setup->offset && manager->callback->post == post && manager->remove_callback == pContext->GetFunctionById(params[4]) && manager->callback->plugin_callback == setup->callback) | 		if(manager->callback->hookType == HookType_Entity && manager->callback->entity == gamehelpers->ReferenceToBCompatRef(params[3]) && manager->callback->offset == setup->offset && manager->callback->post == post && manager->remove_callback == pContext->GetFunctionById(params[4]) && manager->callback->plugin_callback == setup->callback) | ||||||
| 		{ | 		{ | ||||||
| 			return manager->hookid; | 			return manager->hookid; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	CBaseEntity *pEnt = UTIL_GetCBaseEntity(params[3]); | 	CBaseEntity *pEnt = gamehelpers->ReferenceToEntity(params[3]); | ||||||
| 
 | 
 | ||||||
| 	if(!pEnt) | 	if(!pEnt) | ||||||
| 	{ | 	{ | ||||||
| @ -160,7 +132,7 @@ cell_t Native_HookEntity(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	g_pHooks.AddToTail(manager); | 	g_pHooks.push_back(manager); | ||||||
| 
 | 
 | ||||||
| 	return manager->hookid; | 	return manager->hookid; | ||||||
| } | } | ||||||
| @ -181,9 +153,9 @@ cell_t Native_HookGamerules(IPluginContext *pContext, const cell_t *params) | |||||||
| 
 | 
 | ||||||
| 	bool post = params[2] != 0; | 	bool post = params[2] != 0; | ||||||
| 
 | 
 | ||||||
| 	for(int i = g_pHooks.Count() -1; i >= 0; i--) | 	for(int i = g_pHooks.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		DHooksManager *manager = g_pHooks.Element(i); | 		DHooksManager *manager = g_pHooks.at(i); | ||||||
| 		if(manager->callback->hookType == HookType_GameRules && manager->callback->offset == setup->offset && manager->callback->post == post && manager->remove_callback == pContext->GetFunctionById(params[3]) && manager->callback->plugin_callback == setup->callback) | 		if(manager->callback->hookType == HookType_GameRules && manager->callback->offset == setup->offset && manager->callback->post == post && manager->remove_callback == pContext->GetFunctionById(params[3]) && manager->callback->plugin_callback == setup->callback) | ||||||
| 		{ | 		{ | ||||||
| 			return manager->hookid; | 			return manager->hookid; | ||||||
| @ -205,7 +177,7 @@ cell_t Native_HookGamerules(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	g_pHooks.AddToTail(manager); | 	g_pHooks.push_back(manager); | ||||||
| 
 | 
 | ||||||
| 	return manager->hookid; | 	return manager->hookid; | ||||||
| } | } | ||||||
| @ -221,14 +193,14 @@ cell_t Native_HookRaw(IPluginContext *pContext, const cell_t *params) | |||||||
| 
 | 
 | ||||||
| 	if(setup->hookType != HookType_Raw) | 	if(setup->hookType != HookType_Raw) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Hook is not a gamerules hook"); | 		return pContext->ThrowNativeError("Hook is not a raw hook"); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	bool post = params[2] != 0; | 	bool post = params[2] != 0; | ||||||
| 
 | 
 | ||||||
| 	for(int i = g_pHooks.Count() -1; i >= 0; i--) | 	for(int i = g_pHooks.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		DHooksManager *manager = g_pHooks.Element(i); | 		DHooksManager *manager = g_pHooks.at(i); | ||||||
| 		if(manager->callback->hookType == HookType_Raw && manager->callback->offset == setup->offset && manager->callback->post == post && manager->remove_callback == pContext->GetFunctionById(params[3]) && manager->callback->plugin_callback == setup->callback) | 		if(manager->callback->hookType == HookType_Raw && manager->callback->offset == setup->offset && manager->callback->post == post && manager->remove_callback == pContext->GetFunctionById(params[3]) && manager->callback->plugin_callback == setup->callback) | ||||||
| 		{ | 		{ | ||||||
| 			return manager->hookid; | 			return manager->hookid; | ||||||
| @ -250,20 +222,20 @@ cell_t Native_HookRaw(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	g_pHooks.AddToTail(manager); | 	g_pHooks.push_back(manager); | ||||||
| 
 | 
 | ||||||
| 	return manager->hookid; | 	return manager->hookid; | ||||||
| } | } | ||||||
| // native bool:DHookRemoveHookID(hookid);
 | // native bool:DHookRemoveHookID(hookid);
 | ||||||
| cell_t Native_RemoveHookID(IPluginContext *pContext, const cell_t *params) | cell_t Native_RemoveHookID(IPluginContext *pContext, const cell_t *params) | ||||||
| { | { | ||||||
| 	for(int i = g_pHooks.Count() -1; i >= 0; i--) | 	for(int i = g_pHooks.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		DHooksManager *manager = g_pHooks.Element(i); | 		DHooksManager *manager = g_pHooks.at(i); | ||||||
| 		if(manager->hookid == params[1] && manager->callback->plugin_callback->GetParentRuntime()->GetDefaultContext() == pContext) | 		if(manager->hookid == params[1] && manager->callback->plugin_callback->GetParentRuntime()->GetDefaultContext() == pContext) | ||||||
| 		{ | 		{ | ||||||
| 			delete manager; | 			delete manager; | ||||||
| 			g_pHooks.Remove(i); | 			g_pHooks.erase(g_pHooks.iterAt(i)); | ||||||
| 			return 1; | 			return 1; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| @ -279,23 +251,23 @@ cell_t Native_GetParam(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] < 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] < 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 	if(params[2] == 0) | 	if(params[2] == 0) | ||||||
| 	{ | 	{ | ||||||
| 		return paramStruct->dg->params.Count(); | 		return paramStruct->dg->params.size(); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| 	if(paramStruct->orgParams[index] == NULL && (paramStruct->dg->params.Element(index).type == HookParamType_CBaseEntity || paramStruct->dg->params.Element(index).type == HookParamType_Edict)) | 	if(paramStruct->orgParams[index] == NULL && (paramStruct->dg->params.at(index).type == HookParamType_CBaseEntity || paramStruct->dg->params.at(index).type == HookParamType_Edict)) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Trying to get value for null pointer."); | 		return pContext->ThrowNativeError("Trying to get value for null pointer."); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	switch(paramStruct->dg->params.Element(index).type) | 	switch(paramStruct->dg->params.at(index).type) | ||||||
| 	{ | 	{ | ||||||
| 		case HookParamType_Int: | 		case HookParamType_Int: | ||||||
| 			return (int)paramStruct->orgParams[index]; | 			return (int)paramStruct->orgParams[index]; | ||||||
| @ -308,7 +280,7 @@ cell_t Native_GetParam(IPluginContext *pContext, const cell_t *params) | |||||||
| 		case HookParamType_Float: | 		case HookParamType_Float: | ||||||
| 			return sp_ftoc(*(float *)paramStruct->orgParams[index]); | 			return sp_ftoc(*(float *)paramStruct->orgParams[index]); | ||||||
| 		default: | 		default: | ||||||
| 			return pContext->ThrowNativeError("Invalid param type (%i) to get", paramStruct->dg->params.Element(index).type); | 			return pContext->ThrowNativeError("Invalid param type (%i) to get", paramStruct->dg->params.at(index).type); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	return 1; | 	return 1; | ||||||
| @ -324,14 +296,14 @@ cell_t Native_SetParam(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| 	switch(paramStruct->dg->params.Element(index).type) | 	switch(paramStruct->dg->params.at(index).type) | ||||||
| 	{ | 	{ | ||||||
| 		case HookParamType_Int: | 		case HookParamType_Int: | ||||||
| 			paramStruct->newParams[index] = (void *)params[3]; | 			paramStruct->newParams[index] = (void *)params[3]; | ||||||
| @ -341,7 +313,7 @@ cell_t Native_SetParam(IPluginContext *pContext, const cell_t *params) | |||||||
| 			break; | 			break; | ||||||
| 		case HookParamType_CBaseEntity: | 		case HookParamType_CBaseEntity: | ||||||
| 		{ | 		{ | ||||||
| 			CBaseEntity *pEnt = UTIL_GetCBaseEntity(params[2]); | 			CBaseEntity *pEnt = gamehelpers->ReferenceToEntity(params[2]); | ||||||
| 			if(!pEnt) | 			if(!pEnt) | ||||||
| 			{ | 			{ | ||||||
| 				return pContext->ThrowNativeError("Invalid entity index passed for param value"); | 				return pContext->ThrowNativeError("Invalid entity index passed for param value"); | ||||||
| @ -364,7 +336,7 @@ cell_t Native_SetParam(IPluginContext *pContext, const cell_t *params) | |||||||
| 			*(float *)paramStruct->newParams[index] = sp_ctof(params[3]); | 			*(float *)paramStruct->newParams[index] = sp_ctof(params[3]); | ||||||
| 			break; | 			break; | ||||||
| 		default: | 		default: | ||||||
| 			return pContext->ThrowNativeError("Invalid param type (%i) to set", paramStruct->dg->params.Element(index).type); | 			return pContext->ThrowNativeError("Invalid param type (%i) to set", paramStruct->dg->params.at(index).type); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	paramStruct->isChanged[index] = true; | 	paramStruct->isChanged[index] = true; | ||||||
| @ -418,7 +390,7 @@ cell_t Native_SetReturn(IPluginContext *pContext, const cell_t *params) | |||||||
| 			break; | 			break; | ||||||
| 		case ReturnType_CBaseEntity: | 		case ReturnType_CBaseEntity: | ||||||
| 		{ | 		{ | ||||||
| 			CBaseEntity *pEnt = UTIL_GetCBaseEntity(params[2]); | 			CBaseEntity *pEnt = gamehelpers->ReferenceToEntity(params[2]); | ||||||
| 			if(!pEnt) | 			if(!pEnt) | ||||||
| 			{ | 			{ | ||||||
| 				return pContext->ThrowNativeError("Invalid entity index passed for return value"); | 				return pContext->ThrowNativeError("Invalid entity index passed for return value"); | ||||||
| @ -455,14 +427,14 @@ cell_t Native_GetParamVector(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| 	switch(paramStruct->dg->params.Element(index).type) | 	switch(paramStruct->dg->params.at(index).type) | ||||||
| 	{ | 	{ | ||||||
| 		case HookParamType_VectorPtr: | 		case HookParamType_VectorPtr: | ||||||
| 		{ | 		{ | ||||||
| @ -487,14 +459,14 @@ cell_t Native_SetParamVector(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| 	switch(paramStruct->dg->params.Element(index).type) | 	switch(paramStruct->dg->params.at(index).type) | ||||||
| 	{ | 	{ | ||||||
| 		case HookParamType_VectorPtr: | 		case HookParamType_VectorPtr: | ||||||
| 		{ | 		{ | ||||||
| @ -521,9 +493,9 @@ cell_t Native_GetParamString(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| @ -532,7 +504,7 @@ cell_t Native_GetParamString(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return pContext->ThrowNativeError("Trying to get value for null pointer."); | 		return pContext->ThrowNativeError("Trying to get value for null pointer."); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(paramStruct->dg->params.Element(index).type == HookParamType_CharPtr) | 	if(paramStruct->dg->params.at(index).type == HookParamType_CharPtr) | ||||||
| 	{ | 	{ | ||||||
| 		pContext->StringToLocal(params[3], params[4], (const char *)paramStruct->orgParams[index]); | 		pContext->StringToLocal(params[3], params[4], (const char *)paramStruct->orgParams[index]); | ||||||
| 	} | 	} | ||||||
| @ -601,9 +573,9 @@ cell_t Native_SetParamString(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| @ -611,7 +583,7 @@ cell_t Native_SetParamString(IPluginContext *pContext, const cell_t *params) | |||||||
| 	char *value; | 	char *value; | ||||||
| 	pContext->LocalToString(params[3], &value); | 	pContext->LocalToString(params[3], &value); | ||||||
| 
 | 
 | ||||||
| 	if(paramStruct->dg->params.Element(index).type == HookParamType_CharPtr) | 	if(paramStruct->dg->params.at(index).type == HookParamType_CharPtr) | ||||||
| 	{ | 	{ | ||||||
| 		if((char *)paramStruct->newParams[index] != NULL && paramStruct->isChanged[index]) | 		if((char *)paramStruct->newParams[index] != NULL && paramStruct->isChanged[index]) | ||||||
| 			delete (char *)paramStruct->newParams[index]; | 			delete (char *)paramStruct->newParams[index]; | ||||||
| @ -653,19 +625,19 @@ cell_t Native_GetParamObjectPtrVar(IPluginContext *pContext, const cell_t *param | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| 	if(paramStruct->dg->params.Element(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.Element(index).type != HookParamType_Object) | 	if(paramStruct->dg->params.at(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.at(index).type != HookParamType_Object) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.Element(index).type); | 		return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.at(index).type); | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	intptr_t addr = GetObjectAddr(paramStruct->dg->params.Element(index).type, paramStruct->orgParams, index); | 	intptr_t addr = GetObjectAddr(paramStruct->dg->params.at(index).type, paramStruct->orgParams, index); | ||||||
| 
 | 
 | ||||||
| 	switch((ObjectValueType)params[4]) | 	switch((ObjectValueType)params[4]) | ||||||
| 	{ | 	{ | ||||||
| @ -677,13 +649,19 @@ cell_t Native_GetParamObjectPtrVar(IPluginContext *pContext, const cell_t *param | |||||||
| 			return *(bool *)(addr + params[3]) ? 1 : 0; | 			return *(bool *)(addr + params[3]) ? 1 : 0; | ||||||
| 		case ObjectValueType_Ehandle: | 		case ObjectValueType_Ehandle: | ||||||
| 		{ | 		{ | ||||||
| 			EHANDLE hEntity = *(EHANDLE *)(addr + params[3]); | 			edict_t *pEnt = gamehelpers->GetHandleEntity(*(CBaseHandle *)(addr + params[3])); | ||||||
| 			return hEntity.IsValid()?hEntity.GetEntryIndex():-1; | 
 | ||||||
|  | 			if(!pEnt) | ||||||
|  | 			{ | ||||||
|  | 				return -1; | ||||||
|  | 			} | ||||||
|  | 
 | ||||||
|  | 			return gamehelpers->IndexOfEdict(pEnt); | ||||||
| 		} | 		} | ||||||
| 		case ObjectValueType_Float: | 		case ObjectValueType_Float: | ||||||
| 			return sp_ftoc(*(float *)(addr + params[3])); | 			return sp_ftoc(*(float *)(addr + params[3])); | ||||||
| 		case ObjectValueType_CBaseEntityPtr: | 		case ObjectValueType_CBaseEntityPtr: | ||||||
| 			return gamehelpers->EntityToBCompatRef(*(CBaseEntity **)(addr + params[3])); | 			return gamehelpers->EntityToBCompatRef((CBaseEntity *)(addr + params[3])); | ||||||
| 		case ObjectValueType_IntPtr: | 		case ObjectValueType_IntPtr: | ||||||
| 		{ | 		{ | ||||||
| 			int *ptr = *(int **)(addr + params[3]); | 			int *ptr = *(int **)(addr + params[3]); | ||||||
| @ -694,10 +672,16 @@ cell_t Native_GetParamObjectPtrVar(IPluginContext *pContext, const cell_t *param | |||||||
| 			bool *ptr = *(bool **)(addr + params[3]); | 			bool *ptr = *(bool **)(addr + params[3]); | ||||||
| 			return *ptr ? 1 : 0; | 			return *ptr ? 1 : 0; | ||||||
| 		} | 		} | ||||||
| 		case ObjectValueType_EhandlePtr: | 		case ObjectValueType_EhandlePtr://Im pretty sure this is never gonna happen
 | ||||||
| 		{ | 		{ | ||||||
| 			EHANDLE *hEntity = *(EHANDLE **)(addr + params[3]); | 			edict_t *pEnt = gamehelpers->GetHandleEntity(**(CBaseHandle **)(addr + params[3])); | ||||||
| 			return hEntity->IsValid()?hEntity->GetEntryIndex():-1; | 
 | ||||||
|  | 			if(!pEnt) | ||||||
|  | 			{ | ||||||
|  | 				return -1; | ||||||
|  | 			} | ||||||
|  | 
 | ||||||
|  | 			return gamehelpers->IndexOfEdict(pEnt); | ||||||
| 		} | 		} | ||||||
| 		case ObjectValueType_FloatPtr: | 		case ObjectValueType_FloatPtr: | ||||||
| 		{ | 		{ | ||||||
| @ -719,19 +703,19 @@ cell_t Native_SetParamObjectPtrVar(IPluginContext *pContext, const cell_t *param | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| 	if(paramStruct->dg->params.Element(index).type != HookParamType_ObjectPtr) | 	if(paramStruct->dg->params.at(index).type != HookParamType_ObjectPtr) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.Element(index).type); | 		return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.at(index).type); | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	intptr_t addr = GetObjectAddr(paramStruct->dg->params.Element(index).type, paramStruct->orgParams, index); | 	intptr_t addr = GetObjectAddr(paramStruct->dg->params.at(index).type, paramStruct->orgParams, index); | ||||||
| 
 | 
 | ||||||
| 	switch((ObjectValueType)params[4]) | 	switch((ObjectValueType)params[4]) | ||||||
| 	{ | 	{ | ||||||
| @ -743,14 +727,14 @@ cell_t Native_SetParamObjectPtrVar(IPluginContext *pContext, const cell_t *param | |||||||
| 			break; | 			break; | ||||||
| 		case ObjectValueType_Ehandle: | 		case ObjectValueType_Ehandle: | ||||||
| 		{ | 		{ | ||||||
| 			CBaseEntity *pEnt = UTIL_GetCBaseEntity(params[5]); | 			edict_t *pEnt = gamehelpers->EdictOfIndex(params[5]); | ||||||
| 
 | 
 | ||||||
| 			if(!pEnt) | 			if(pEnt->IsFree()) | ||||||
| 			{ | 			{ | ||||||
| 				return pContext->ThrowNativeError("Invalid entity passed"); | 				return pContext->ThrowNativeError("Invalid entity passed"); | ||||||
| 			} | 			} | ||||||
|  | 			gamehelpers->SetHandleEntity(*(CBaseHandle *)(addr + params[3]), pEnt); | ||||||
| 
 | 
 | ||||||
| 			*(EHANDLE *)(addr + params[3]) = pEnt; |  | ||||||
| 			break; | 			break; | ||||||
| 		} | 		} | ||||||
| 		case ObjectValueType_Float: | 		case ObjectValueType_Float: | ||||||
| @ -758,7 +742,7 @@ cell_t Native_SetParamObjectPtrVar(IPluginContext *pContext, const cell_t *param | |||||||
| 			break; | 			break; | ||||||
| 		case ObjectValueType_CBaseEntityPtr: | 		case ObjectValueType_CBaseEntityPtr: | ||||||
| 		{ | 		{ | ||||||
| 			CBaseEntity *pEnt = UTIL_GetCBaseEntity(params[5]); | 			CBaseEntity *pEnt = gamehelpers->ReferenceToEntity(params[5]); | ||||||
| 
 | 
 | ||||||
| 			if(!pEnt) | 			if(!pEnt) | ||||||
| 			{ | 			{ | ||||||
| @ -782,15 +766,14 @@ cell_t Native_SetParamObjectPtrVar(IPluginContext *pContext, const cell_t *param | |||||||
| 		} | 		} | ||||||
| 		case ObjectValueType_EhandlePtr: | 		case ObjectValueType_EhandlePtr: | ||||||
| 		{ | 		{ | ||||||
| 			CBaseEntity *pEnt = UTIL_GetCBaseEntity(params[5]); | 			edict_t *pEnt = gamehelpers->EdictOfIndex(params[5]); | ||||||
| 
 | 
 | ||||||
| 			if(!pEnt) | 			if(pEnt->IsFree()) | ||||||
| 			{ | 			{ | ||||||
| 				return pContext->ThrowNativeError("Invalid entity passed"); | 				return pContext->ThrowNativeError("Invalid entity passed"); | ||||||
| 			} | 			} | ||||||
|  | 			gamehelpers->SetHandleEntity(**(CBaseHandle **)(addr + params[3]), pEnt); | ||||||
| 
 | 
 | ||||||
| 			EHANDLE *hEntity = *(EHANDLE **)(addr + params[3]); |  | ||||||
| 			*hEntity = pEnt; |  | ||||||
| 			break; | 			break; | ||||||
| 		} | 		} | ||||||
| 		case ObjectValueType_FloatPtr: | 		case ObjectValueType_FloatPtr: | ||||||
| @ -815,19 +798,19 @@ cell_t Native_GetParamObjectPtrVarVector(IPluginContext *pContext, const cell_t | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| 	if(paramStruct->dg->params.Element(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.Element(index).type != HookParamType_Object) | 	if(paramStruct->dg->params.at(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.at(index).type != HookParamType_Object) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.Element(index).type); | 		return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.at(index).type); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	intptr_t addr = GetObjectAddr(paramStruct->dg->params.Element(index).type, paramStruct->orgParams, index); | 	intptr_t addr = GetObjectAddr(paramStruct->dg->params.at(index).type, paramStruct->orgParams, index); | ||||||
| 
 | 
 | ||||||
| 	cell_t *buffer; | 	cell_t *buffer; | ||||||
| 	pContext->LocalToPhysAddr(params[5], &buffer); | 	pContext->LocalToPhysAddr(params[5], &buffer); | ||||||
| @ -868,19 +851,19 @@ cell_t Native_SetParamObjectPtrVarVector(IPluginContext *pContext, const cell_t | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| 	if(paramStruct->dg->params.Element(index).type != HookParamType_ObjectPtr) | 	if(paramStruct->dg->params.at(index).type != HookParamType_ObjectPtr) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.Element(index).type); | 		return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.at(index).type); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	intptr_t addr = GetObjectAddr(paramStruct->dg->params.Element(index).type, paramStruct->orgParams, index); | 	intptr_t addr = GetObjectAddr(paramStruct->dg->params.at(index).type, paramStruct->orgParams, index); | ||||||
| 
 | 
 | ||||||
| 	cell_t *buffer; | 	cell_t *buffer; | ||||||
| 	pContext->LocalToPhysAddr(params[5], &buffer); | 	pContext->LocalToPhysAddr(params[5], &buffer); | ||||||
| @ -920,19 +903,19 @@ cell_t Native_GetParamObjectPtrString(IPluginContext *pContext, const cell_t *pa | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| 	if(paramStruct->dg->params.Element(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.Element(index).type != HookParamType_Object) | 	if(paramStruct->dg->params.at(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.at(index).type != HookParamType_Object) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.Element(index).type); | 		return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.at(index).type); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	intptr_t addr = GetObjectAddr(paramStruct->dg->params.Element(index).type, paramStruct->orgParams, index); | 	intptr_t addr = GetObjectAddr(paramStruct->dg->params.at(index).type, paramStruct->orgParams, index); | ||||||
| 
 | 
 | ||||||
| 	switch((ObjectValueType)params[4]) | 	switch((ObjectValueType)params[4]) | ||||||
| 	{ | 	{ | ||||||
| @ -1015,14 +998,14 @@ cell_t Native_IsNullParam(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(params[2] <= 0 || params[2] > paramStruct->dg->params.Count()) | 	if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) | ||||||
| 	{ | 	{ | ||||||
| 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.Count()); | 		return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int index = params[2] - 1; | 	int index = params[2] - 1; | ||||||
| 
 | 
 | ||||||
| 	HookParamType type = paramStruct->dg->params.Element(index).type; | 	HookParamType type = paramStruct->dg->params.at(index).type; | ||||||
| 
 | 
 | ||||||
| 	//Check that the type is ptr
 | 	//Check that the type is ptr
 | ||||||
| 	if(type == HookParamType_StringPtr || type == HookParamType_CharPtr || type == HookParamType_VectorPtr || type == HookParamType_CBaseEntity || type == HookParamType_ObjectPtr || type == HookParamType_Edict || type == HookParamType_Unknown) | 	if(type == HookParamType_StringPtr || type == HookParamType_CharPtr || type == HookParamType_VectorPtr || type == HookParamType_CBaseEntity || type == HookParamType_ObjectPtr || type == HookParamType_Edict || type == HookParamType_Unknown) | ||||||
|  | |||||||
| @ -10,5 +10,5 @@ extern ISDKTools *g_pSDKTools; | |||||||
| extern HandleType_t g_HookSetupHandle; | extern HandleType_t g_HookSetupHandle; | ||||||
| extern HandleType_t g_HookParamsHandle; | extern HandleType_t g_HookParamsHandle; | ||||||
| extern HandleType_t g_HookReturnHandle; | extern HandleType_t g_HookReturnHandle; | ||||||
| extern CUtlVector<DHooksManager *> g_pHooks; | extern SourceHook::CVector<DHooksManager *> g_pHooks; | ||||||
| #endif | #endif | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								product.version
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								product.version
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | 2.0.0-dev | ||||||
							
								
								
									
										75
									
								
								sdk-hacks.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								sdk-hacks.h
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,75 @@ | |||||||
|  | #ifndef _INCLUDE_SDK_HACKS_H_ | ||||||
|  | #define _INCLUDE_SDK_HACKS_H_ | ||||||
|  | 
 | ||||||
|  | class Vector | ||||||
|  | { | ||||||
|  | public: | ||||||
|  | 	Vector(float x1, float y1, float z1) | ||||||
|  | 	{ | ||||||
|  | 		this->x = x1; | ||||||
|  | 		this->y = y1; | ||||||
|  | 		this->z = z1; | ||||||
|  | 	} | ||||||
|  | 	Vector(void) | ||||||
|  | 	{ | ||||||
|  | 		this->x = 0.0; | ||||||
|  | 		this->y = 0.0; | ||||||
|  | 		this->z = 0.0; | ||||||
|  | 	} | ||||||
|  | 	float x; | ||||||
|  | 	float y; | ||||||
|  | 	float z; | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | struct string_t | ||||||
|  | { | ||||||
|  | public: | ||||||
|  | 	bool operator!() const							{ return ( pszValue == NULL );			} | ||||||
|  | 	bool operator==( const string_t &rhs ) const	{ return ( pszValue == rhs.pszValue );	} | ||||||
|  | 	bool operator!=( const string_t &rhs ) const	{ return ( pszValue != rhs.pszValue );	} | ||||||
|  | 	bool operator<( const string_t &rhs ) const		{ return ((void *)pszValue < (void *)rhs.pszValue ); } | ||||||
|  | 
 | ||||||
|  | 	const char *ToCStr() const						{ return ( pszValue ) ? pszValue : ""; 	} | ||||||
|  |  	 | ||||||
|  | protected: | ||||||
|  | 	const char *pszValue; | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | struct castable_string_t : public string_t // string_t is used in unions, hence, no constructor allowed
 | ||||||
|  | { | ||||||
|  | 	castable_string_t()							{ pszValue = NULL; } | ||||||
|  | 	castable_string_t( const char *pszFrom )	{ pszValue = (pszFrom && *pszFrom) ? pszFrom : 0; } | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | #define NULL_STRING			castable_string_t() | ||||||
|  | #define STRING( string_t_obj )	(string_t_obj).ToCStr() | ||||||
|  | #define MAKE_STRING( c_str )	castable_string_t( c_str ) | ||||||
|  | 
 | ||||||
|  | #define FL_EDICT_FREE		(1<<1) | ||||||
|  | 
 | ||||||
|  | struct edict_t | ||||||
|  | { | ||||||
|  | public: | ||||||
|  | 	bool IsFree() | ||||||
|  | 	{ | ||||||
|  | 		return (m_fStateFlags & FL_EDICT_FREE) != 0; | ||||||
|  | 	} | ||||||
|  | private: | ||||||
|  | 	int	m_fStateFlags;	 | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | class CBaseHandle | ||||||
|  | { | ||||||
|  | /*public:
 | ||||||
|  | 	bool IsValid() const {return m_Index != INVALID_EHANDLE_INDEX;} | ||||||
|  | 	int GetEntryIndex() const | ||||||
|  | 	{ | ||||||
|  | 		if ( !IsValid() ) | ||||||
|  | 			return NUM_ENT_ENTRIES-1; | ||||||
|  | 		return m_Index & ENT_ENTRY_MASK; | ||||||
|  | 	}*/ | ||||||
|  | private: | ||||||
|  | 	unsigned long	m_Index; | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | #endif | ||||||
| @ -298,8 +298,10 @@ ISmmPlugin *g_PLAPI = NULL;					/**< Metamod plugin API */ | |||||||
| SourceHook::ISourceHook *g_SHPtr = NULL;	/**< SourceHook pointer */ | SourceHook::ISourceHook *g_SHPtr = NULL;	/**< SourceHook pointer */ | ||||||
| ISmmAPI *g_SMAPI = NULL;					/**< SourceMM API pointer */ | ISmmAPI *g_SMAPI = NULL;					/**< SourceMM API pointer */ | ||||||
| 
 | 
 | ||||||
|  | #if !defined META_NO_HL2SDK | ||||||
| IVEngineServer *engine = NULL;				/**< IVEngineServer pointer */ | IVEngineServer *engine = NULL;				/**< IVEngineServer pointer */ | ||||||
| IServerGameDLL *gamedll = NULL;				/**< IServerGameDLL pointer */ | IServerGameDLL *gamedll = NULL;				/**< IServerGameDLL pointer */ | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
| /** Exposes the extension to Metamod */ | /** Exposes the extension to Metamod */ | ||||||
| SMM_API void *PL_EXPOSURE(const char *name, int *code) | SMM_API void *PL_EXPOSURE(const char *name, int *code) | ||||||
| @ -312,14 +314,14 @@ SMM_API void *PL_EXPOSURE(const char *name, int *code) | |||||||
| 	{ | 	{ | ||||||
| 		if (code) | 		if (code) | ||||||
| 		{ | 		{ | ||||||
| 			*code = IFACE_OK; | 			*code = META_IFACE_OK; | ||||||
| 		} | 		} | ||||||
| 		return static_cast<void *>(g_pExtensionIface); | 		return static_cast<void *>(g_pExtensionIface); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if (code) | 	if (code) | ||||||
| 	{ | 	{ | ||||||
| 		*code = IFACE_FAILED; | 		*code = META_IFACE_FAILED; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	return NULL; | 	return NULL; | ||||||
| @ -329,6 +331,7 @@ bool SDKExtension::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, | |||||||
| { | { | ||||||
| 	PLUGIN_SAVEVARS(); | 	PLUGIN_SAVEVARS(); | ||||||
| 
 | 
 | ||||||
|  | #if !defined META_NO_HL2SDK | ||||||
| 	#if !defined METAMOD_PLAPI_VERSION | 	#if !defined METAMOD_PLAPI_VERSION | ||||||
| 		GET_V_IFACE_ANY(serverFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); | 		GET_V_IFACE_ANY(serverFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); | ||||||
| 		GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER); | 		GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER); | ||||||
| @ -336,6 +339,7 @@ bool SDKExtension::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, | |||||||
| 		GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); | 		GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); | ||||||
| 		GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER); | 		GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER); | ||||||
| 	#endif | 	#endif | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
| 	m_SourceMMLoaded = true; | 	m_SourceMMLoaded = true; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -100,7 +100,7 @@ | |||||||
| 
 | 
 | ||||||
| #if defined SMEXT_CONF_METAMOD | #if defined SMEXT_CONF_METAMOD | ||||||
| #include <ISmmPlugin.h> | #include <ISmmPlugin.h> | ||||||
| #include <eiface.h> | //#include <eiface.h>
 | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| using namespace SourceMod; | using namespace SourceMod; | ||||||
| @ -301,9 +301,11 @@ extern INativeInterface *ninvoke; | |||||||
| 
 | 
 | ||||||
| #if defined SMEXT_CONF_METAMOD | #if defined SMEXT_CONF_METAMOD | ||||||
| PLUGIN_GLOBALVARS(); | PLUGIN_GLOBALVARS(); | ||||||
|  | 	#if !defined META_NO_HL2SDK | ||||||
| 	extern IVEngineServer *engine; | 	extern IVEngineServer *engine; | ||||||
| 	extern IServerGameDLL *gamedll; | 	extern IServerGameDLL *gamedll; | ||||||
| 	#endif | 	#endif | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
| /** Creates a SourceMod interface macro pair */ | /** Creates a SourceMod interface macro pair */ | ||||||
| #define SM_MKIFACE(name) SMINTERFACE_##name##_NAME, SMINTERFACE_##name##_VERSION | #define SM_MKIFACE(name) SMINTERFACE_##name##_NAME, SMINTERFACE_##name##_VERSION | ||||||
|  | |||||||
| @ -29,13 +29,13 @@ | |||||||
| 			} | 			} | ||||||
| 			"GetMaxs" | 			"GetMaxs" | ||||||
| 			{ | 			{ | ||||||
| 				"windows"	"337" | 				"windows"	"338" | ||||||
| 				"linux"		"338" | 				"linux"		"339" | ||||||
| 			} | 			} | ||||||
| 			"CanUse" | 			"CanUse" | ||||||
| 			{ | 			{ | ||||||
| 				"windows"	"258" | 				"windows"	"259" | ||||||
| 				"linux"		"259" | 				"linux"		"260" | ||||||
| 			} | 			} | ||||||
| 			"CanHaveAmmo" | 			"CanHaveAmmo" | ||||||
| 			{ | 			{ | ||||||
| @ -49,13 +49,13 @@ | |||||||
| 			} | 			} | ||||||
| 			"GetMaxPlayerSpeed" | 			"GetMaxPlayerSpeed" | ||||||
| 			{ | 			{ | ||||||
| 				"windows"	"436" | 				"windows"	"437" | ||||||
| 				"linux"		"437" | 				"linux"		"438" | ||||||
| 			} | 			} | ||||||
| 			"GiveAmmo" | 			"GiveAmmo" | ||||||
| 			{ | 			{ | ||||||
| 				"windows"	"250" | 				"windows"	"251" | ||||||
| 				"linux"		"251" | 				"linux"		"252" | ||||||
| 			} | 			} | ||||||
| 			"OnTakeDamage" | 			"OnTakeDamage" | ||||||
| 			{ | 			{ | ||||||
|  | |||||||
| @ -8,7 +8,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US | |||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #ifndef SM_GENERATED_BUILD | #ifndef SM_GENERATED_BUILD | ||||||
| #define BINARY_NAME "vphysics.ext.dll\0" | #define BINARY_NAME "dhooks.ext.dll\0" | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  | |||||||
							
								
								
									
										38
									
								
								vfunc_call.h
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								vfunc_call.h
									
									
									
									
									
								
							| @ -5,8 +5,8 @@ | |||||||
| #include "extension.h" | #include "extension.h" | ||||||
| 
 | 
 | ||||||
| #define PARAMINFO_SWITCH(passType) \ | #define PARAMINFO_SWITCH(passType) \ | ||||||
| 		paramInfo[i].flags = dg->params.Element(i).flag; \ | 		paramInfo[i].flags = dg->params.at(i).flag; \ | ||||||
| 		paramInfo[i].size = dg->params.Element(i).size; \ | 		paramInfo[i].size = dg->params.at(i).size; \ | ||||||
| 		paramInfo[i].type = passType; | 		paramInfo[i].type = passType; | ||||||
| 
 | 
 | ||||||
| #define VSTK_PARAM_SWITCH(paramType) \ | #define VSTK_PARAM_SWITCH(paramType) \ | ||||||
| @ -18,9 +18,9 @@ | |||||||
| 		{ \ | 		{ \ | ||||||
| 			*(paramType *)vptr = (paramType)(paramStruct->orgParams[i]); \ | 			*(paramType *)vptr = (paramType)(paramStruct->orgParams[i]); \ | ||||||
| 		} \ | 		} \ | ||||||
| 		if(i + 1 != dg->params.Count()) \ | 		if(i + 1 != dg->params.size()) \ | ||||||
| 		{ \ | 		{ \ | ||||||
| 			vptr += dg->params.Element(i).size; \ | 			vptr += dg->params.at(i).size; \ | ||||||
| 		} \ | 		} \ | ||||||
| 		break; | 		break; | ||||||
| #define VSTK_PARAM_SWITCH_FLOAT() \ | #define VSTK_PARAM_SWITCH_FLOAT() \ | ||||||
| @ -32,9 +32,9 @@ | |||||||
| 		{ \ | 		{ \ | ||||||
| 			*(float *)vptr = *(float *)(paramStruct->orgParams[i]); \ | 			*(float *)vptr = *(float *)(paramStruct->orgParams[i]); \ | ||||||
| 		} \ | 		} \ | ||||||
| 		if(i + 1 != dg->params.Count()) \ | 		if(i + 1 != dg->params.size()) \ | ||||||
| 		{ \ | 		{ \ | ||||||
| 			vptr += dg->params.Element(i).size; \ | 			vptr += dg->params.at(i).size; \ | ||||||
| 		} \ | 		} \ | ||||||
| 		break; | 		break; | ||||||
| 
 | 
 | ||||||
| @ -70,10 +70,10 @@ T CallVFunction(DHooksCallback *dg, HookParamsStruct *paramStruct, void *iface) | |||||||
| 	if(paramStruct) | 	if(paramStruct) | ||||||
| 	{ | 	{ | ||||||
| 		vptr += sizeof(void *); | 		vptr += sizeof(void *); | ||||||
| 		paramInfo = (SourceMod::PassInfo *)malloc(sizeof(SourceMod::PassInfo) * dg->params.Count()); | 		paramInfo = (SourceMod::PassInfo *)malloc(sizeof(SourceMod::PassInfo) * dg->params.size()); | ||||||
| 		for(int i = 0; i < dg->params.Count(); i++) | 		for(int i = 0; i < (int)dg->params.size(); i++) | ||||||
| 		{ | 		{ | ||||||
| 			switch(dg->params.Element(i).type) | 			switch(dg->params.at(i).type) | ||||||
| 			{ | 			{ | ||||||
| 				case HookParamType_Int: | 				case HookParamType_Int: | ||||||
| 					PARAMINFO_SWITCH(PassType_Basic); | 					PARAMINFO_SWITCH(PassType_Basic); | ||||||
| @ -113,12 +113,12 @@ T CallVFunction(DHooksCallback *dg, HookParamsStruct *paramStruct, void *iface) | |||||||
| 	 | 	 | ||||||
| 	if(dg->returnType == ReturnType_Void) | 	if(dg->returnType == ReturnType_Void) | ||||||
| 	{ | 	{ | ||||||
| 		pCall = g_pBinTools->CreateVCall(dg->offset, 0, 0, NULL, paramInfo, dg->params.Count()); | 		pCall = g_pBinTools->CreateVCall(dg->offset, 0, 0, NULL, paramInfo, dg->params.size()); | ||||||
| 		pCall->Execute(vstk, NULL); | 		pCall->Execute(vstk, NULL); | ||||||
| 	} | 	} | ||||||
| 	else | 	else | ||||||
| 	{ | 	{ | ||||||
| 		pCall = g_pBinTools->CreateVCall(dg->offset, 0, 0, &returnInfo, paramInfo, dg->params.Count()); | 		pCall = g_pBinTools->CreateVCall(dg->offset, 0, 0, &returnInfo, paramInfo, dg->params.size()); | ||||||
| 		pCall->Execute(vstk, &ret); | 		pCall->Execute(vstk, &ret); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| @ -157,10 +157,10 @@ Vector CallVFunction<Vector>(DHooksCallback *dg, HookParamsStruct *paramStruct, | |||||||
| 	if(paramStruct) | 	if(paramStruct) | ||||||
| 	{ | 	{ | ||||||
| 		vptr += sizeof(void *); | 		vptr += sizeof(void *); | ||||||
| 		paramInfo = (SourceMod::PassInfo *)malloc(sizeof(SourceMod::PassInfo) * dg->params.Count()); | 		paramInfo = (SourceMod::PassInfo *)malloc(sizeof(SourceMod::PassInfo) * dg->params.size()); | ||||||
| 		for(int i = 0; i < dg->params.Count(); i++) | 		for(int i = 0; i < (int)dg->params.size(); i++) | ||||||
| 		{ | 		{ | ||||||
| 			switch(dg->params.Element(i).type) | 			switch(dg->params.at(i).type) | ||||||
| 			{ | 			{ | ||||||
| 				case HookParamType_Int: | 				case HookParamType_Int: | ||||||
| 					PARAMINFO_SWITCH(PassType_Basic); | 					PARAMINFO_SWITCH(PassType_Basic); | ||||||
| @ -198,7 +198,7 @@ Vector CallVFunction<Vector>(DHooksCallback *dg, HookParamsStruct *paramStruct, | |||||||
| 
 | 
 | ||||||
| 	Vector ret; | 	Vector ret; | ||||||
| 
 | 
 | ||||||
| 	pCall = g_pBinTools->CreateVCall(dg->offset, 0, 0, &returnInfo, paramInfo, dg->params.Count()); | 	pCall = g_pBinTools->CreateVCall(dg->offset, 0, 0, &returnInfo, paramInfo, dg->params.size()); | ||||||
| 	pCall->Execute(vstk, &ret); | 	pCall->Execute(vstk, &ret); | ||||||
| 
 | 
 | ||||||
| 	pCall->Destroy(); | 	pCall->Destroy(); | ||||||
| @ -237,10 +237,10 @@ string_t CallVFunction<string_t>(DHooksCallback *dg, HookParamsStruct *paramStru | |||||||
| 	if(paramStruct) | 	if(paramStruct) | ||||||
| 	{ | 	{ | ||||||
| 		vptr += sizeof(void *); | 		vptr += sizeof(void *); | ||||||
| 		paramInfo = (SourceMod::PassInfo *)malloc(sizeof(SourceMod::PassInfo) * dg->params.Count()); | 		paramInfo = (SourceMod::PassInfo *)malloc(sizeof(SourceMod::PassInfo) * dg->params.size()); | ||||||
| 		for(int i = 0; i < dg->params.Count(); i++) | 		for(int i = 0; i < dg->params.size(); i++) | ||||||
| 		{ | 		{ | ||||||
| 			switch(dg->params.Element(i).type) | 			switch(dg->params.at(i).type) | ||||||
| 			{ | 			{ | ||||||
| 				case HookParamType_Int: | 				case HookParamType_Int: | ||||||
| 					PARAMINFO_SWITCH(PassType_Basic); | 					PARAMINFO_SWITCH(PassType_Basic); | ||||||
| @ -278,7 +278,7 @@ string_t CallVFunction<string_t>(DHooksCallback *dg, HookParamsStruct *paramStru | |||||||
| 
 | 
 | ||||||
| 	string_t ret; | 	string_t ret; | ||||||
| 
 | 
 | ||||||
| 	pCall = g_pBinTools->CreateVCall(dg->offset, 0, 0, &returnInfo, paramInfo, dg->params.Count()); | 	pCall = g_pBinTools->CreateVCall(dg->offset, 0, 0, &returnInfo, paramInfo, dg->params.size()); | ||||||
| 	pCall->Execute(vstk, &ret); | 	pCall->Execute(vstk, &ret); | ||||||
| 
 | 
 | ||||||
| 	pCall->Destroy(); | 	pCall->Destroy(); | ||||||
|  | |||||||
							
								
								
									
										51
									
								
								vhook.cpp
									
									
									
									
									
								
							
							
						
						
									
										51
									
								
								vhook.cpp
									
									
									
									
									
								
							| @ -3,11 +3,11 @@ | |||||||
| 
 | 
 | ||||||
| SourceHook::IHookManagerAutoGen *g_pHookManager = NULL; | SourceHook::IHookManagerAutoGen *g_pHookManager = NULL; | ||||||
| 
 | 
 | ||||||
| CUtlVector<DHooksManager *> g_pHooks; | SourceHook::CVector<DHooksManager *> g_pHooks; | ||||||
| 
 | 
 | ||||||
| using namespace SourceHook; | using namespace SourceHook; | ||||||
| 
 | 
 | ||||||
| #ifndef __linux__ | #ifdef  WIN32 | ||||||
| #define OBJECT_OFFSET sizeof(void *) | #define OBJECT_OFFSET sizeof(void *) | ||||||
| #else | #else | ||||||
| #define OBJECT_OFFSET (sizeof(void *)*2) | #define OBJECT_OFFSET (sizeof(void *)*2) | ||||||
| @ -24,6 +24,7 @@ DHooksManager::DHooksManager(HookSetup *setup, void *iface, IPluginFunction *rem | |||||||
| 	this->callback->post = post; | 	this->callback->post = post; | ||||||
| 	this->callback->hookType = setup->hookType; | 	this->callback->hookType = setup->hookType; | ||||||
| 	this->callback->params = setup->params; | 	this->callback->params = setup->params; | ||||||
|  | 
 | ||||||
| 	this->addr = 0; | 	this->addr = 0; | ||||||
| 
 | 
 | ||||||
| 	if(this->callback->hookType == HookType_Entity) | 	if(this->callback->hookType == HookType_Entity) | ||||||
| @ -41,9 +42,9 @@ DHooksManager::DHooksManager(HookSetup *setup, void *iface, IPluginFunction *rem | |||||||
| 
 | 
 | ||||||
| 	CProtoInfoBuilder protoInfo(ProtoInfo::CallConv_ThisCall); | 	CProtoInfoBuilder protoInfo(ProtoInfo::CallConv_ThisCall); | ||||||
| 
 | 
 | ||||||
| 	for(int i = this->callback->params.Count() -1; i >= 0; i--) | 	for(int i = this->callback->params.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		protoInfo.AddParam(this->callback->params.Element(i).size, this->callback->params.Element(i).pass_type, this->callback->params.Element(i).flag, NULL, NULL, NULL, NULL); | 		protoInfo.AddParam(this->callback->params.at(i).size, this->callback->params.at(i).pass_type, this->callback->params.at(i).flag, NULL, NULL, NULL, NULL); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if(this->callback->returnType == ReturnType_Void) | 	if(this->callback->returnType == ReturnType_Void) | ||||||
| @ -66,21 +67,21 @@ DHooksManager::DHooksManager(HookSetup *setup, void *iface, IPluginFunction *rem | |||||||
| 	{ | 	{ | ||||||
| 		protoInfo.SetReturnType(sizeof(void *), SourceHook::PassInfo::PassType_Basic, setup->returnFlag, NULL, NULL, NULL, NULL); | 		protoInfo.SetReturnType(sizeof(void *), SourceHook::PassInfo::PassType_Basic, setup->returnFlag, NULL, NULL, NULL, NULL); | ||||||
| 	} | 	} | ||||||
| 	HookManagerPubFunc hook = g_pHookManager->MakeHookMan(protoInfo, 0, this->callback->offset); | 	this->pManager = g_pHookManager->MakeHookMan(protoInfo, 0, this->callback->offset); | ||||||
| 
 | 
 | ||||||
| 	this->hookid = g_SHPtr->AddHook(g_PLID,ISourceHook::Hook_Normal, iface, 0, hook, this->callback, this->callback->post); | 	this->hookid = g_SHPtr->AddHook(g_PLID,ISourceHook::Hook_Normal, iface, 0, this->pManager, this->callback, this->callback->post); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CleanupHooks(IPluginContext *pContext) | void CleanupHooks(IPluginContext *pContext) | ||||||
| { | { | ||||||
| 	for(int i = g_pHooks.Count() -1; i >= 0; i--) | 	for(int i = g_pHooks.size() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		DHooksManager *manager = g_pHooks.Element(i); | 		DHooksManager *manager = g_pHooks.at(i); | ||||||
| 
 | 
 | ||||||
| 		if(pContext == NULL || pContext == manager->callback->plugin_callback->GetParentRuntime()->GetDefaultContext()) | 		if(pContext == NULL || pContext == manager->callback->plugin_callback->GetParentRuntime()->GetDefaultContext()) | ||||||
| 		{ | 		{ | ||||||
| 			delete manager; | 			delete manager; | ||||||
| 			g_pHooks.Remove(i); | 			g_pHooks.erase(g_pHooks.iterAt(i)); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| @ -110,12 +111,12 @@ SourceHook::PassInfo::PassType GetParamTypePassType(HookParamType type) | |||||||
| size_t GetStackArgsSize(DHooksCallback *dg) | size_t GetStackArgsSize(DHooksCallback *dg) | ||||||
| { | { | ||||||
| 	size_t res = 0; | 	size_t res = 0; | ||||||
| 	for(int i = dg->params.Count() - 1; i >= 0; i--) | 	for(int i = dg->params.size() - 1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		res += dg->params.Element(i).size; | 		res += dg->params.at(i).size; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	#ifndef __linux__ | 	#ifdef  WIN32 | ||||||
| 	if(dg->returnType == ReturnType_Vector)//Account for result vector ptr.
 | 	if(dg->returnType == ReturnType_Vector)//Account for result vector ptr.
 | ||||||
| 	#else | 	#else | ||||||
| 	if(dg->returnType == ReturnType_Vector || dg->returnType == ReturnType_String) | 	if(dg->returnType == ReturnType_Vector || dg->returnType == ReturnType_String) | ||||||
| @ -129,7 +130,7 @@ HookParamsStruct *GetParamStruct(DHooksCallback *dg, void **argStack, size_t arg | |||||||
| { | { | ||||||
| 	HookParamsStruct *params = new HookParamsStruct(); | 	HookParamsStruct *params = new HookParamsStruct(); | ||||||
| 	params->dg = dg; | 	params->dg = dg; | ||||||
| 	#ifndef __linux__ | 	#ifdef  WIN32 | ||||||
| 	if(dg->returnType != ReturnType_Vector) | 	if(dg->returnType != ReturnType_Vector) | ||||||
| 	#else | 	#else | ||||||
| 	if(dg->returnType != ReturnType_Vector && dg->returnType != ReturnType_String) | 	if(dg->returnType != ReturnType_Vector && dg->returnType != ReturnType_String) | ||||||
| @ -143,9 +144,9 @@ HookParamsStruct *GetParamStruct(DHooksCallback *dg, void **argStack, size_t arg | |||||||
| 		params->orgParams = (void **)malloc(argStackSize-OBJECT_OFFSET); | 		params->orgParams = (void **)malloc(argStackSize-OBJECT_OFFSET); | ||||||
| 		memcpy(params->orgParams, argStack+OBJECT_OFFSET, argStackSize-OBJECT_OFFSET); | 		memcpy(params->orgParams, argStack+OBJECT_OFFSET, argStackSize-OBJECT_OFFSET); | ||||||
| 	} | 	} | ||||||
| 	params->newParams = (void **)malloc(dg->params.Count() * sizeof(void *)); | 	params->newParams = (void **)malloc(dg->params.size() * sizeof(void *)); | ||||||
| 	params->isChanged = (bool *)malloc(dg->params.Count() * sizeof(bool)); | 	params->isChanged = (bool *)malloc(dg->params.size() * sizeof(bool)); | ||||||
| 	for(int i = 0; i < dg->params.Count(); i++) | 	for(int i = 0; i < (int)dg->params.size(); i++) | ||||||
| 	{ | 	{ | ||||||
| 		params->newParams[i] = NULL; | 		params->newParams[i] = NULL; | ||||||
| 		params->isChanged[i] = false; | 		params->isChanged[i] = false; | ||||||
| @ -224,7 +225,7 @@ cell_t GetThisPtr(void *iface, ThisPointerType type) | |||||||
| 	return (cell_t)iface; | 	return (cell_t)iface; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #ifndef __linux__ | #ifdef  WIN32 | ||||||
| void *Callback(DHooksCallback *dg, void **argStack, size_t *argsizep) | void *Callback(DHooksCallback *dg, void **argStack, size_t *argsizep) | ||||||
| #else | #else | ||||||
| void *Callback(DHooksCallback *dg, void **argStack) | void *Callback(DHooksCallback *dg, void **argStack) | ||||||
| @ -235,7 +236,7 @@ void *Callback(DHooksCallback *dg, void **argStack) | |||||||
| 	Handle_t rHndl; | 	Handle_t rHndl; | ||||||
| 	Handle_t pHndl; | 	Handle_t pHndl; | ||||||
| 
 | 
 | ||||||
| 	#ifndef __linux__ | 	#ifdef  WIN32 | ||||||
| 	*argsizep = GetStackArgsSize(dg); | 	*argsizep = GetStackArgsSize(dg); | ||||||
| 	#else | 	#else | ||||||
| 	size_t argsize = GetStackArgsSize(dg); | 	size_t argsize = GetStackArgsSize(dg); | ||||||
| @ -262,7 +263,7 @@ void *Callback(DHooksCallback *dg, void **argStack) | |||||||
| 		dg->plugin_callback->PushCell(rHndl); | 		dg->plugin_callback->PushCell(rHndl); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	#ifndef __linux__ | 	#ifdef  WIN32 | ||||||
| 	if(*argsizep > 0) | 	if(*argsizep > 0) | ||||||
| 	{ | 	{ | ||||||
| 		paramStruct = GetParamStruct(dg, argStack, *argsizep); | 		paramStruct = GetParamStruct(dg, argStack, *argsizep); | ||||||
| @ -380,7 +381,7 @@ void *Callback(DHooksCallback *dg, void **argStack) | |||||||
| 	} | 	} | ||||||
| 	return ret; | 	return ret; | ||||||
| } | } | ||||||
| #ifndef __linux__ | #ifdef  WIN32 | ||||||
| float Callback_float(DHooksCallback *dg, void **argStack, size_t *argsizep) | float Callback_float(DHooksCallback *dg, void **argStack, size_t *argsizep) | ||||||
| #else | #else | ||||||
| float Callback_float(DHooksCallback *dg, void **argStack) | float Callback_float(DHooksCallback *dg, void **argStack) | ||||||
| @ -391,7 +392,7 @@ float Callback_float(DHooksCallback *dg, void **argStack) | |||||||
| 	Handle_t rHndl; | 	Handle_t rHndl; | ||||||
| 	Handle_t pHndl; | 	Handle_t pHndl; | ||||||
| 
 | 
 | ||||||
| 	#ifndef __linux__ | 	#ifdef  WIN32 | ||||||
| 	*argsizep = GetStackArgsSize(dg); | 	*argsizep = GetStackArgsSize(dg); | ||||||
| 	#else | 	#else | ||||||
| 	size_t argsize = GetStackArgsSize(dg); | 	size_t argsize = GetStackArgsSize(dg); | ||||||
| @ -417,7 +418,7 @@ float Callback_float(DHooksCallback *dg, void **argStack) | |||||||
| 	} | 	} | ||||||
| 	dg->plugin_callback->PushCell(rHndl); | 	dg->plugin_callback->PushCell(rHndl); | ||||||
| 
 | 
 | ||||||
| 	#ifndef __linux__ | 	#ifdef  WIN32 | ||||||
| 	if(*argsizep > 0) | 	if(*argsizep > 0) | ||||||
| 	{ | 	{ | ||||||
| 		paramStruct = GetParamStruct(dg, argStack, *argsizep); | 		paramStruct = GetParamStruct(dg, argStack, *argsizep); | ||||||
| @ -534,7 +535,7 @@ float Callback_float(DHooksCallback *dg, void **argStack) | |||||||
| 	} | 	} | ||||||
| 	return *(float *)ret; | 	return *(float *)ret; | ||||||
| } | } | ||||||
| #ifndef __linux__ | #ifdef  WIN32 | ||||||
| Vector *Callback_vector(DHooksCallback *dg, void **argStack, size_t *argsizep) | Vector *Callback_vector(DHooksCallback *dg, void **argStack, size_t *argsizep) | ||||||
| #else | #else | ||||||
| Vector *Callback_vector(DHooksCallback *dg, void **argStack) | Vector *Callback_vector(DHooksCallback *dg, void **argStack) | ||||||
| @ -547,7 +548,7 @@ Vector *Callback_vector(DHooksCallback *dg, void **argStack) | |||||||
| 	Handle_t rHndl; | 	Handle_t rHndl; | ||||||
| 	Handle_t pHndl; | 	Handle_t pHndl; | ||||||
| 
 | 
 | ||||||
| 	#ifndef __linux__ | 	#ifdef  WIN32 | ||||||
| 	*argsizep = GetStackArgsSize(dg); | 	*argsizep = GetStackArgsSize(dg); | ||||||
| 	#else | 	#else | ||||||
| 	size_t argsize = GetStackArgsSize(dg); | 	size_t argsize = GetStackArgsSize(dg); | ||||||
| @ -573,7 +574,7 @@ Vector *Callback_vector(DHooksCallback *dg, void **argStack) | |||||||
| 	} | 	} | ||||||
| 	dg->plugin_callback->PushCell(rHndl); | 	dg->plugin_callback->PushCell(rHndl); | ||||||
| 
 | 
 | ||||||
| 	#ifndef __linux__ | 	#ifdef  WIN32 | ||||||
| 	if(*argsizep > 0) | 	if(*argsizep > 0) | ||||||
| 	{ | 	{ | ||||||
| 		paramStruct = GetParamStruct(dg, argStack, *argsizep); | 		paramStruct = GetParamStruct(dg, argStack, *argsizep); | ||||||
|  | |||||||
							
								
								
									
										24
									
								
								vhook.h
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								vhook.h
									
									
									
									
									
								
							| @ -126,7 +126,7 @@ public: | |||||||
| class DHooksInfo | class DHooksInfo | ||||||
| { | { | ||||||
| public: | public: | ||||||
| 	CUtlVector<ParamInfo> params; | 	SourceHook::CVector<ParamInfo> params; | ||||||
| 	int offset; | 	int offset; | ||||||
| 	unsigned int returnFlag; | 	unsigned int returnFlag; | ||||||
| 	ReturnType returnType; | 	ReturnType returnType; | ||||||
| @ -154,7 +154,7 @@ public: | |||||||
| 	void **oldvtable; | 	void **oldvtable; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #ifndef __linux__ | #ifdef  WIN32 | ||||||
| void *Callback(DHooksCallback *dg, void **stack, size_t *argsizep); | void *Callback(DHooksCallback *dg, void **stack, size_t *argsizep); | ||||||
| float Callback_float(DHooksCallback *dg, void **stack, size_t *argsizep); | float Callback_float(DHooksCallback *dg, void **stack, size_t *argsizep); | ||||||
| Vector *Callback_vector(DHooksCallback *dg, void **stack, size_t *argsizep); | Vector *Callback_vector(DHooksCallback *dg, void **stack, size_t *argsizep); | ||||||
| @ -164,12 +164,13 @@ float Callback_float(DHooksCallback *dg, void **stack); | |||||||
| Vector *Callback_vector(DHooksCallback *dg, void **stack); | Vector *Callback_vector(DHooksCallback *dg, void **stack); | ||||||
| string_t *Callback_stringt(DHooksCallback *dg, void **stack); | string_t *Callback_stringt(DHooksCallback *dg, void **stack); | ||||||
| #endif | #endif | ||||||
|  | 
 | ||||||
| bool SetupHookManager(ISmmAPI *ismm); | bool SetupHookManager(ISmmAPI *ismm); | ||||||
| void CleanupHooks(IPluginContext *pContext); | void CleanupHooks(IPluginContext *pContext = NULL); | ||||||
| size_t GetParamTypeSize(HookParamType type); | size_t GetParamTypeSize(HookParamType type); | ||||||
| SourceHook::PassInfo::PassType GetParamTypePassType(HookParamType type); | SourceHook::PassInfo::PassType GetParamTypePassType(HookParamType type); | ||||||
| 
 | 
 | ||||||
| #ifdef  __linux__ | #ifndef  WIN32 | ||||||
| static void *GenerateThunk(ReturnType type) | static void *GenerateThunk(ReturnType type) | ||||||
| { | { | ||||||
| 	MacroAssemblerX86 masm; | 	MacroAssemblerX86 masm; | ||||||
| @ -293,20 +294,20 @@ public: | |||||||
| 		} | 		} | ||||||
| 		if(this->newParams != NULL) | 		if(this->newParams != NULL) | ||||||
| 		{ | 		{ | ||||||
| 			for(int i = dg->params.Count() - 1; i >= 0 ; i--) | 			for(int i = dg->params.size() - 1; i >= 0 ; i--) | ||||||
| 			{ | 			{ | ||||||
| 				if(this->newParams[i] == NULL) | 				if(this->newParams[i] == NULL) | ||||||
| 					continue; | 					continue; | ||||||
| 
 | 
 | ||||||
| 				if(dg->params.Element(i).type == HookParamType_VectorPtr) | 				if(dg->params.at(i).type == HookParamType_VectorPtr) | ||||||
| 				{ | 				{ | ||||||
| 					delete (Vector *)this->newParams[i]; | 					delete (Vector *)this->newParams[i]; | ||||||
| 				} | 				} | ||||||
| 				else if(dg->params.Element(i).type == HookParamType_CharPtr) | 				else if(dg->params.at(i).type == HookParamType_CharPtr) | ||||||
| 				{ | 				{ | ||||||
| 					delete (char *)this->newParams[i]; | 					delete (char *)this->newParams[i]; | ||||||
| 				} | 				} | ||||||
| 				else if(dg->params.Element(i).type == HookParamType_Float) | 				else if(dg->params.at(i).type == HookParamType_Float) | ||||||
| 				{ | 				{ | ||||||
| 					delete (float *)this->newParams[i]; | 					delete (float *)this->newParams[i]; | ||||||
| 				} | 				} | ||||||
| @ -339,7 +340,7 @@ public: | |||||||
| 	ReturnType returnType; | 	ReturnType returnType; | ||||||
| 	HookType hookType; | 	HookType hookType; | ||||||
| 	ThisPointerType thisType; | 	ThisPointerType thisType; | ||||||
| 	CUtlVector<ParamInfo> params; | 	SourceHook::CVector<ParamInfo> params; | ||||||
| 	int offset; | 	int offset; | ||||||
| 	IPluginFunction *callback; | 	IPluginFunction *callback; | ||||||
| }; | }; | ||||||
| @ -358,6 +359,10 @@ public: | |||||||
| 				this->remove_callback->PushCell(this->hookid); | 				this->remove_callback->PushCell(this->hookid); | ||||||
| 				this->remove_callback->Execute(NULL); | 				this->remove_callback->Execute(NULL); | ||||||
| 			} | 			} | ||||||
|  | 			if(this->pManager) | ||||||
|  | 			{ | ||||||
|  | 				g_pHookManager->ReleaseHookMan(this->pManager); | ||||||
|  | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| public: | public: | ||||||
| @ -365,6 +370,7 @@ public: | |||||||
| 	int hookid; | 	int hookid; | ||||||
| 	DHooksCallback *callback; | 	DHooksCallback *callback; | ||||||
| 	IPluginFunction *remove_callback; | 	IPluginFunction *remove_callback; | ||||||
|  | 	SourceHook::HookManagerPubFunc pManager; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| size_t GetStackArgsSize(DHooksCallback *dg); | size_t GetStackArgsSize(DHooksCallback *dg); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user