Compare commits
195
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f008349cbc | ||
|
|
c978f8620e | ||
|
|
ec9a4ab9c5 | ||
|
|
de40e8990f | ||
|
|
ae07dc524d | ||
|
|
31426fb8d0 | ||
|
|
f538a51ef4 | ||
|
|
55ee8af1e6 | ||
|
|
85ed2e01a4 | ||
|
|
9eddf38b92 | ||
|
|
4ca976f883 | ||
|
|
ba9db46290 | ||
|
|
b58fe300ba | ||
|
|
4eb3754afc | ||
|
|
ae6ae0e3ea | ||
|
|
e903810d34 | ||
|
|
b73fd01490 | ||
|
|
af0d46fcc1 | ||
|
|
773216d517 | ||
|
|
ccfdcfb727 | ||
|
|
8bf7f1a00f | ||
|
|
5e99870df0 | ||
|
|
6f8d002404 | ||
|
|
3a94a3268a | ||
|
|
8355efaca4 | ||
|
|
2f388cfdb4 | ||
|
|
272473ed02 | ||
|
|
6e95680838 | ||
|
|
18e089e9d0 | ||
|
|
185e5fe6db | ||
|
|
2b84454e77 | ||
|
|
bb66d660b9 | ||
|
|
3867d70d53 | ||
|
|
144c1a3a13 | ||
|
|
c2197a4422 | ||
|
|
c3c51ff3a3 | ||
|
|
a2d3e1bee5 | ||
|
|
6fa750bffe | ||
|
|
83841cc218 | ||
|
|
5c7e6c79c8 | ||
|
|
b20ff4075a | ||
|
|
f860ef10e6 | ||
|
|
e357a5d650 | ||
|
|
c3bded70c5 | ||
|
|
c11f2569ce | ||
|
|
c56d550333 | ||
|
|
4e96ffb438 | ||
|
|
6b4b5eb0b1 | ||
|
|
74847c5b4f | ||
|
|
116fbe9a7a | ||
|
|
79f412c55c | ||
|
|
d839b83b6b | ||
|
|
9bcc3de922 | ||
|
|
30ebb670f4 | ||
|
|
b702099530 | ||
|
|
dd0339e05b | ||
|
|
88ee039ea6 | ||
|
|
9b965ddfe5 | ||
|
|
6e4dcc9041 | ||
|
|
71925cd3b2 | ||
|
|
82160205e5 | ||
|
|
8307f8fd9b | ||
|
|
a62b783c0e | ||
|
|
2f86fe58aa | ||
|
|
20d9b28df5 | ||
|
|
4c3fe1a1e7 | ||
|
|
e95f0f333e | ||
|
|
129395c896 | ||
|
|
f2eccadff3 | ||
|
|
4eafdc2a1e | ||
|
|
e4fd32609a | ||
|
|
3f43fca3a9 | ||
|
|
0d6b93c5a0 | ||
|
|
bf4bce8250 | ||
|
|
6942614ef9 | ||
|
|
f6c496717c | ||
|
|
9c69e9e66a | ||
|
|
b5b5d7e239 | ||
|
|
6acf264636 | ||
|
|
52ecfd8b0a | ||
|
|
5b6cb0707c | ||
|
|
a29027a4a3 | ||
|
|
94e471192d | ||
|
|
691b9d128e | ||
|
|
c9631c19ac | ||
|
|
893b52a1e9 | ||
|
|
527b98661a | ||
|
|
823b0f9702 | ||
|
|
bcdc2c3933 | ||
|
|
bf84e29c4d | ||
|
|
4b5c62bd2f | ||
|
|
1dd00127a5 | ||
|
|
8c0a53cfdb | ||
|
|
5d485df4b8 | ||
|
|
0656857960 | ||
|
|
af69434738 | ||
|
|
d713c52524 | ||
|
|
ef59237dad | ||
|
|
049f99a658 | ||
|
|
ffe50ed9f1 | ||
|
|
f2266b45a3 | ||
|
|
c5f57cb3e4 | ||
|
|
21a645e1c6 | ||
|
|
e4505b981b | ||
|
|
30c9d56e3f | ||
|
|
e29cf999a9 | ||
|
|
df9ae818db | ||
|
|
f725ee4fb4 | ||
|
|
ce51189e9a | ||
|
|
84ffb3de43 | ||
|
|
cc5d87578f | ||
|
|
123a5c6f66 | ||
|
|
9e20e01ee4 | ||
|
|
c275bcdb96 | ||
|
|
0036fe29cd | ||
|
|
6e6655f577 | ||
|
|
66220ba56a | ||
|
|
d0e54cafe7 | ||
|
|
20bdc2b435 | ||
|
|
ad2650b0aa | ||
|
|
4ac8430608 | ||
|
|
c6405bfb63 | ||
|
|
cdbaac15a1 | ||
|
|
d2cf4e3364 | ||
|
|
bce587edca | ||
|
|
f55a11b8cf | ||
|
|
71f73ddc3a | ||
|
|
693c0cf41b | ||
|
|
ce77a86808 | ||
|
|
a8242fd7e3 | ||
|
|
cfe8757570 | ||
|
|
896d949a82 | ||
|
|
391807c8ce | ||
|
|
39539757cf | ||
|
|
479b1e8225 | ||
|
|
956259b336 | ||
|
|
e6b7b79127 | ||
|
|
a1f6c94f1e | ||
|
|
5f312fb76e | ||
|
|
b231caae50 | ||
|
|
5596e65f6d | ||
|
|
fc7f7efc4b | ||
|
|
8a73628451 | ||
|
|
1928cb7e33 | ||
|
|
67b7df2a4e | ||
|
|
fd5033120a | ||
|
|
080ee88b17 | ||
|
|
7951515ff3 | ||
|
|
d1568472c6 | ||
|
|
227e2e1b0c | ||
|
|
7b0bbbd463 | ||
|
|
b1a904c7a5 | ||
|
|
7a124f2aa2 | ||
|
|
b002adc509 | ||
|
|
2e34f2e67c | ||
|
|
315a5c642e | ||
|
|
3697bc3866 | ||
|
|
a63ea2a68d | ||
|
|
e299092ff5 | ||
|
|
f0b69facb3 | ||
|
|
ab8563f0d4 | ||
|
|
1d666b09e2 | ||
|
|
8fcd0478a1 | ||
|
|
3c50ed1cf2 | ||
|
|
3a28a09f15 | ||
|
|
8e8f284cc3 | ||
|
|
fa4e61b877 | ||
|
|
a39d94ffe9 | ||
|
|
4326c3d431 | ||
|
|
dc5aca5f20 | ||
|
|
9182d92d86 | ||
|
|
8dc95a114c | ||
|
|
caf22b7233 | ||
|
|
465bebb170 | ||
|
|
f3006a478f | ||
|
|
9887f9da48 | ||
|
|
cfe11be9c9 | ||
|
|
4118905620 | ||
|
|
3b7b0d27cb | ||
|
|
9a1713a9f8 | ||
|
|
2995531ca6 | ||
|
|
46e10e10a0 | ||
|
|
8fadaff281 | ||
|
|
fccc1ebb50 | ||
|
|
03b183e492 | ||
|
|
0e37d2c1bf | ||
|
|
f7daefc76e | ||
|
|
071b013f5e | ||
|
|
e69d16ff71 | ||
|
|
1f599c8771 | ||
|
|
9389a0f138 | ||
|
|
997687c3ab | ||
|
|
fe05b6c2d0 | ||
|
|
097ca03761 | ||
|
|
f182cd1d6a |
@@ -24,5 +24,3 @@
|
|||||||
# Files generated by Windows Explorer
|
# Files generated by Windows Explorer
|
||||||
(^|/)[dD]esktop\.ini$
|
(^|/)[dD]esktop\.ini$
|
||||||
(^|/)[tT]humbs\.db$
|
(^|/)[tT]humbs\.db$
|
||||||
syntax: glob
|
|
||||||
build/*
|
|
||||||
|
|||||||
@@ -3,3 +3,10 @@ e6ef5ecdf8d75740ca2685a709bf321f8873bc3b sourcemod-1.1.0
|
|||||||
e877885fac80be71822641f7a9122cebc9812521 sourcemod-1.1.1
|
e877885fac80be71822641f7a9122cebc9812521 sourcemod-1.1.1
|
||||||
b3ffa8a4511c4eadaf533fc790aa6b14f7f0c6ea sourcemod-1.1.2
|
b3ffa8a4511c4eadaf533fc790aa6b14f7f0c6ea sourcemod-1.1.2
|
||||||
3a73bbf60f34befa9b66be03fa5974b394bb3411 sourcemod-1.2.0
|
3a73bbf60f34befa9b66be03fa5974b394bb3411 sourcemod-1.2.0
|
||||||
|
ddd707c3454c382db5db9d28148cd19227f44759 sourcemod-1.4.0
|
||||||
|
f74e1dea2ef2c5a12b5238badc0e877106804191 sourcemod-1.4.1
|
||||||
|
0026e1394254c392244c7b140e3075974ab5a6db sourcemod-1.4.2
|
||||||
|
608f4c94872e3624404a1d105284163bc57fadf7 sourcemod-1.4.3
|
||||||
|
29186166cc99e73c61995a0bd0450fc6c36466bc sourcemod-1.4.4
|
||||||
|
9560adae2a7263e6e076d5bc2e1c2838c27d686a sourcemod-1.4.5
|
||||||
|
56a9ba4cd1e2ca8a583f7e150af058ce5d41ca33 sourcemod-1.4.6
|
||||||
|
|||||||
+91
-179
@@ -1,31 +1,8 @@
|
|||||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from ambuild.command import Command
|
|
||||||
from ambuild.command import ShellCommand
|
|
||||||
from ambuild.command import SymlinkCommand
|
from ambuild.command import SymlinkCommand
|
||||||
|
|
||||||
class ExtractDebugInfoCommand(Command):
|
|
||||||
def __init__(self, binary, outfile):
|
|
||||||
Command.__init__(self)
|
|
||||||
self.binary = binary
|
|
||||||
self.outfile = outfile
|
|
||||||
|
|
||||||
def run(self, runner, job):
|
|
||||||
if AMBuild.cache['debug']:
|
|
||||||
return
|
|
||||||
|
|
||||||
if not self.binary.NeedsRelink(self.outfile):
|
|
||||||
return
|
|
||||||
|
|
||||||
if AMBuild.target['platform'] == 'linux':
|
|
||||||
job.AddCommand(ShellCommand('objcopy --only-keep-debug ' + self.outfile + ' ' + self.outfile + '.dbg'))
|
|
||||||
job.AddCommand(ShellCommand('objcopy --strip-debug ' + self.outfile))
|
|
||||||
job.AddCommand(ShellCommand('objcopy --add-gnu-debuglink=' + os.path.basename(self.outfile) + '.dbg ' + self.outfile))
|
|
||||||
elif AMBuild.target['platform'] == 'darwin':
|
|
||||||
job.AddCommand(ShellCommand('dsymutil ' + self.outfile))
|
|
||||||
job.AddCommand(ShellCommand('strip -S ' + self.outfile))
|
|
||||||
|
|
||||||
class SM:
|
class SM:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.compiler = Cpp.Compiler()
|
self.compiler = Cpp.Compiler()
|
||||||
@@ -33,96 +10,81 @@ class SM:
|
|||||||
#Build SDK info
|
#Build SDK info
|
||||||
self.possibleSdks = { }
|
self.possibleSdks = { }
|
||||||
self.possibleSdks['ep1'] = {'sdk': 'HL2SDK', 'ext': '1.ep1', 'def': '1',
|
self.possibleSdks['ep1'] = {'sdk': 'HL2SDK', 'ext': '1.ep1', 'def': '1',
|
||||||
'name': 'EPISODEONE', 'platform': ['windows', 'linux'],
|
'name': 'EPISODEONE', 'platform': ['windows', 'linux']}
|
||||||
'dir': 'hl2sdk'}
|
|
||||||
self.possibleSdks['ep2'] = {'sdk': 'HL2SDKOB', 'ext': '2.ep2', 'def': '3',
|
self.possibleSdks['ep2'] = {'sdk': 'HL2SDKOB', 'ext': '2.ep2', 'def': '3',
|
||||||
'name': 'ORANGEBOX', 'platform': ['windows', 'linux'],
|
'name': 'ORANGEBOX', 'platform': ['windows', 'linux']}
|
||||||
'dir': 'hl2sdk-ob'}
|
self.possibleSdks['ep2v'] = {'sdk': 'HL2SDKOBVALVE', 'ext': '2.ep2v', 'def': '6',
|
||||||
self.possibleSdks['css'] = {'sdk': 'HL2SDKCSS', 'ext': '2.css', 'def': '6',
|
'name': 'ORANGEBOXVALVE', 'platform': ['windows', 'linux', 'darwin']}
|
||||||
'name': 'CSS', 'platform': ['windows', 'linux', 'darwin'],
|
self.possibleSdks['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '7',
|
||||||
'dir': 'hl2sdk-css'}
|
'name': 'LEFT4DEAD', 'platform': ['windows', 'linux', 'darwin']}
|
||||||
self.possibleSdks['hl2dm'] = {'sdk': 'HL2SDKHL2DM', 'ext': '2.hl2dm', 'def': '7',
|
self.possibleSdks['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '8',
|
||||||
'name': 'HL2DM', 'platform': ['windows', 'linux', 'darwin'],
|
'name': 'LEFT4DEAD2', 'platform': ['windows', 'linux', 'darwin']}
|
||||||
'dir': 'hl2sdk-hl2dm'}
|
|
||||||
self.possibleSdks['dods'] = {'sdk': 'HL2SDKDODS', 'ext': '2.dods', 'def': '8',
|
|
||||||
'name': 'DODS', 'platform': ['windows', 'linux', 'darwin'],
|
|
||||||
'dir': 'hl2sdk-dods'}
|
|
||||||
self.possibleSdks['tf2'] = {'sdk': 'HL2SDKTF2', 'ext': '2.tf2', 'def': '9',
|
|
||||||
'name': 'TF2', 'platform': ['windows', 'linux', 'darwin'],
|
|
||||||
'dir': 'hl2sdk-tf2'}
|
|
||||||
self.possibleSdks['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '10',
|
|
||||||
'name': 'LEFT4DEAD', 'platform': ['windows', 'linux', 'darwin'],
|
|
||||||
'dir': 'hl2sdk-l4d'}
|
|
||||||
self.possibleSdks['nd'] = {'sdk': 'HL2SDKND', 'ext': '2.nd', 'def': '11',
|
|
||||||
'name': 'NUCLEARDAWN', 'platform': ['windows', 'linux', 'darwin'],
|
|
||||||
'dir': 'hl2sdk-nd'}
|
|
||||||
self.possibleSdks['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '12',
|
|
||||||
'name': 'LEFT4DEAD2', 'platform': ['windows', 'linux', 'darwin'],
|
|
||||||
'dir': 'hl2sdk-l4d2'}
|
|
||||||
self.possibleSdks['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2',
|
self.possibleSdks['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2',
|
||||||
'name': 'DARKMESSIAH', 'platform': ['windows'],
|
'name': 'DARKMESSIAH', 'platform': ['windows']}
|
||||||
'dir': 'hl2sdk-darkm'}
|
self.possibleSdks['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '9',
|
||||||
self.possibleSdks['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '13',
|
'name': 'ALIENSWARM', 'platform': ['windows']}
|
||||||
'name': 'ALIENSWARM', 'platform': ['windows'],
|
self.possibleSdks['bgt'] = {'sdk': 'HL2SDK-BGT', 'ext': '2.bgt', 'def': '4',
|
||||||
'dir': 'hl2sdk-swarm'}
|
'name': 'BLOODYGOODTIME', 'platform': ['windows']}
|
||||||
self.possibleSdks['bgt'] = {'sdk': 'HL2SDK-BGT', 'ext': '2.bgt', 'def': '4',
|
self.possibleSdks['eye'] = {'sdk': 'HL2SDK-EYE', 'ext': '2.eye', 'def': '5',
|
||||||
'name': 'BLOODYGOODTIME', 'platform': ['windows'],
|
'name': 'EYE', 'platform': ['windows']}
|
||||||
'dir': 'hl2sdk-bgt'}
|
|
||||||
self.possibleSdks['eye'] = {'sdk': 'HL2SDK-EYE', 'ext': '2.eye', 'def': '5',
|
|
||||||
'name': 'EYE', 'platform': ['windows'],
|
|
||||||
'dir': 'hl2sdk-eye'}
|
|
||||||
self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '15',
|
|
||||||
'name': 'CSGO', 'platform': ['windows', 'linux', 'darwin'],
|
|
||||||
'dir': 'hl2sdk-csgo'}
|
|
||||||
# self.possibleSdks['portal2'] = {'sdk': 'HL2SDK-PORTAL2', 'ext': '2.portal2', 'def': '14',
|
|
||||||
# 'name': 'PORTAL2', 'platform': ['windows'],
|
|
||||||
# 'dir': 'hl2sdk-portal'}
|
|
||||||
|
|
||||||
self.sdkInfo = { }
|
self.sdkInfo = { }
|
||||||
|
|
||||||
if AMBuild.mode == 'config':
|
if AMBuild.mode == 'config':
|
||||||
#Detect compilers
|
#Detect compilers
|
||||||
self.compiler.DetectAll(AMBuild)
|
self.compiler.DetectAll(AMBuild)
|
||||||
|
|
||||||
self.hasMySql = AMBuild.options.hasMySql
|
|
||||||
AMBuild.cache.CacheVariable('hasMySql', self.hasMySql)
|
|
||||||
|
|
||||||
AMBuild.cache.CacheVariable('debug', AMBuild.options.debug)
|
#Detect variables
|
||||||
|
envvars = { 'MMSOURCE18': 'mmsource-1.8',
|
||||||
#Environment variable paths to external headers
|
'HL2SDKOBVALVE': 'hl2sdk-ob-valve',
|
||||||
envvars = { 'MMSOURCE110': 'mmsource-1.10', 'MYSQL5': 'mysql-5.0' }
|
'HL2SDKL4D': 'hl2sdk-l4d',
|
||||||
|
'HL2SDKL4D2': 'hl2sdk-l4d2',
|
||||||
#Look for Metamod:Source and MySQL if not disabled
|
'MYSQL5': 'mysql-5.0'
|
||||||
for env in envvars:
|
}
|
||||||
if not self.hasMySql and env == 'MYSQL5':
|
|
||||||
continue
|
|
||||||
path = self.ResolveEnvPath(env, envvars[env])
|
|
||||||
if path == None:
|
|
||||||
raise Exception('Could not find a valid path for {0}'.format(env))
|
|
||||||
AMBuild.cache.CacheVariable(env, path)
|
|
||||||
|
|
||||||
#Look for SDK directories
|
|
||||||
for sdk in self.possibleSdks:
|
|
||||||
#Get list of SDKs to build against or 'all' or 'present'
|
|
||||||
sdkList = AMBuild.options.sdks.split(',')
|
|
||||||
#Build against all supported SDKs?
|
|
||||||
useAll = sdkList[0] == 'all'
|
|
||||||
#Build against supported SDKs that exist?
|
|
||||||
usePresent = sdkList[0] == 'present'
|
|
||||||
|
|
||||||
info = self.possibleSdks[sdk]
|
if AMBuild.target['platform'] != 'darwin':
|
||||||
if AMBuild.target['platform'] in info['platform']:
|
envvars['HL2SDK'] = 'hl2sdk'
|
||||||
env = info['sdk']
|
envvars['HL2SDKOB'] = 'hl2sdk-ob'
|
||||||
dir = info['dir']
|
|
||||||
sdkPath = self.ResolveEnvPath(env, dir)
|
#Dark Messiah is Windows-only
|
||||||
if sdkPath == None:
|
if AMBuild.target['platform'] == 'windows':
|
||||||
if useAll or sdk in sdkList:
|
envvars['HL2SDK-DARKM'] = 'hl2sdk-darkm'
|
||||||
raise Exception('Could not find a valid path for {0}'.format(env))
|
envvars['HL2SDK-SWARM'] = 'hl2sdk-swarm'
|
||||||
else:
|
envvars['HL2SDK-BGT'] = 'hl2sdk-bgt'
|
||||||
continue
|
envvars['HL2SDK-EYE'] = 'hl2sdk-eye'
|
||||||
if useAll or usePresent or sdk in sdkList:
|
|
||||||
|
# Finds if a dict with `key` set to `value` is present on the dict of dicts `dictionary`
|
||||||
|
def findDictByKey(dictionary, key, value):
|
||||||
|
for index in dictionary:
|
||||||
|
elem = dictionary[index]
|
||||||
|
if elem[key] == value:
|
||||||
|
return (elem, index)
|
||||||
|
return None
|
||||||
|
|
||||||
|
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))
|
||||||
|
elif i.startswith('HL2SDK'):
|
||||||
|
(info, sdk) = findDictByKey(self.possibleSdks, 'sdk', i)
|
||||||
self.sdkInfo[sdk] = info
|
self.sdkInfo[sdk] = info
|
||||||
AMBuild.cache.CacheVariable(env, sdkPath)
|
else:
|
||||||
|
head = os.getcwd()
|
||||||
|
oldhead = None
|
||||||
|
while head != None and head != oldhead:
|
||||||
|
path = os.path.join(head, envvars[i])
|
||||||
|
if os.path.isdir(path):
|
||||||
|
break
|
||||||
|
oldhead = head
|
||||||
|
head, tail = os.path.split(head)
|
||||||
|
if i.startswith('HL2SDK'):
|
||||||
|
if head != None and head != oldhead:
|
||||||
|
(info, sdk) = findDictByKey(self.possibleSdks, 'sdk', i)
|
||||||
|
self.sdkInfo[sdk] = info
|
||||||
|
elif head == None or head == oldhead:
|
||||||
|
raise Exception('Could not find a valid path for {0}'.format(i))
|
||||||
|
AMBuild.cache.CacheVariable(i, path)
|
||||||
|
|
||||||
if len(self.sdkInfo) < 1:
|
if len(self.sdkInfo) < 1:
|
||||||
raise Exception('At least one SDK must be available.')
|
raise Exception('At least one SDK must be available.')
|
||||||
@@ -151,14 +113,14 @@ class SM:
|
|||||||
self.compiler.AddToListVar('CFLAGS', '-Wno-unused')
|
self.compiler.AddToListVar('CFLAGS', '-Wno-unused')
|
||||||
self.compiler.AddToListVar('CFLAGS', '-Wno-switch')
|
self.compiler.AddToListVar('CFLAGS', '-Wno-switch')
|
||||||
self.compiler.AddToListVar('CFLAGS', '-msse')
|
self.compiler.AddToListVar('CFLAGS', '-msse')
|
||||||
self.compiler.AddToListVar('CFLAGS', '-g3')
|
|
||||||
self.compiler.AddToListVar('CFLAGS', '-m32')
|
self.compiler.AddToListVar('CFLAGS', '-m32')
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-m32')
|
self.compiler.AddToListVar('POSTLINKFLAGS', '-m32')
|
||||||
self.compiler.AddToListVar('CXXFLAGS', '-fno-exceptions')
|
self.compiler.AddToListVar('CXXFLAGS', '-fno-exceptions')
|
||||||
|
self.compiler.AddToListVar('CXXFLAGS', '-fno-rtti')
|
||||||
self.compiler.AddToListVar('CXXFLAGS', '-fno-threadsafe-statics')
|
self.compiler.AddToListVar('CXXFLAGS', '-fno-threadsafe-statics')
|
||||||
self.compiler.AddToListVar('CXXFLAGS', '-Wno-non-virtual-dtor')
|
self.compiler.AddToListVar('CXXFLAGS', '-Wno-non-virtual-dtor')
|
||||||
self.compiler.AddToListVar('CXXFLAGS', '-Wno-overloaded-virtual')
|
self.compiler.AddToListVar('CXXFLAGS', '-Wno-overloaded-virtual')
|
||||||
if (self.vendor == 'gcc' and cxx.majorVersion >= 4 and cxx.minorVersion >= 7) or \
|
if (self.vendor == 'gcc' and cxx.majorVersion >= 4 and cxx.minorVersion >= 3) or \
|
||||||
(self.vendor == 'clang' and cxx.majorVersion >= 3):
|
(self.vendor == 'clang' and cxx.majorVersion >= 3):
|
||||||
self.compiler.AddToListVar('CXXFLAGS', '-Wno-delete-non-virtual-dtor')
|
self.compiler.AddToListVar('CXXFLAGS', '-Wno-delete-non-virtual-dtor')
|
||||||
self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H')
|
self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H')
|
||||||
@@ -211,27 +173,20 @@ class SM:
|
|||||||
if AMBuild.options.debug == '1':
|
if AMBuild.options.debug == '1':
|
||||||
self.compiler.AddToListVar('CDEFINES', 'DEBUG')
|
self.compiler.AddToListVar('CDEFINES', 'DEBUG')
|
||||||
self.compiler.AddToListVar('CDEFINES', '_DEBUG')
|
self.compiler.AddToListVar('CDEFINES', '_DEBUG')
|
||||||
if self.vendor == 'msvc':
|
if self.vendor == 'gcc' or self.vendor == 'clang':
|
||||||
|
self.compiler.AddToListVar('CFLAGS', '-g3')
|
||||||
|
elif self.vendor == 'msvc':
|
||||||
self.compiler.AddToListVar('CFLAGS', '/Od')
|
self.compiler.AddToListVar('CFLAGS', '/Od')
|
||||||
self.compiler.AddToListVar('CFLAGS', '/RTC1')
|
self.compiler.AddToListVar('CFLAGS', '/RTC1')
|
||||||
|
|
||||||
#This needs to be after our optimization flags which could otherwise disable it.
|
|
||||||
if self.vendor == 'msvc':
|
|
||||||
# Don't omit frame pointer
|
|
||||||
self.compiler.AddToListVar('CFLAGS', '/Oy-')
|
|
||||||
|
|
||||||
#Platform-specifics
|
#Platform-specifics
|
||||||
if AMBuild.target['platform'] == 'linux':
|
if AMBuild.target['platform'] == 'linux':
|
||||||
self.compiler.AddToListVar('CDEFINES', '_LINUX')
|
self.compiler.AddToListVar('CDEFINES', '_LINUX')
|
||||||
self.compiler.AddToListVar('CDEFINES', 'POSIX')
|
|
||||||
if self.vendor == 'gcc':
|
if self.vendor == 'gcc':
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-static-libgcc')
|
self.compiler.AddToListVar('POSTLINKFLAGS', '-static-libgcc')
|
||||||
if self.vendor == 'clang':
|
if self.vendor == 'clang':
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-lgcc_eh')
|
self.compiler.AddToListVar('POSTLINKFLAGS', '-lgcc_eh')
|
||||||
elif AMBuild.target['platform'] == 'darwin':
|
elif AMBuild.target['platform'] == 'darwin':
|
||||||
self.compiler.AddToListVar('CDEFINES', 'OSX')
|
|
||||||
self.compiler.AddToListVar('CDEFINES', '_OSX')
|
|
||||||
self.compiler.AddToListVar('CDEFINES', 'POSIX')
|
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5')
|
self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5')
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386'])
|
self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386'])
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++')
|
self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++')
|
||||||
@@ -265,13 +220,12 @@ class SM:
|
|||||||
self.sdkInfo = AMBuild.cache['sdkInfo']
|
self.sdkInfo = AMBuild.cache['sdkInfo']
|
||||||
self.compiler.FromConfig(AMBuild, 'compiler')
|
self.compiler.FromConfig(AMBuild, 'compiler')
|
||||||
self.targetMap = AMBuild.cache['targetMap']
|
self.targetMap = AMBuild.cache['targetMap']
|
||||||
self.hasMySql = AMBuild.cache['hasMySql']
|
|
||||||
|
|
||||||
if AMBuild.target['platform'] == 'windows':
|
if AMBuild.target['platform'] == 'windows':
|
||||||
self.compiler.AddToListVar('RCINCLUDES', os.path.join(AMBuild.sourceFolder, 'public'))
|
self.compiler.AddToListVar('RCINCLUDES', os.path.join(AMBuild.sourceFolder, 'public'))
|
||||||
self.compiler.AddToListVar('RCINCLUDES',
|
self.compiler.AddToListVar('RCINCLUDES',
|
||||||
os.path.join(AMBuild.outputFolder, 'includes'))
|
os.path.join(AMBuild.outputFolder, 'includes'))
|
||||||
self.mmsPath = AMBuild.cache['MMSOURCE110']
|
self.mmsPath = AMBuild.cache['MMSOURCE18']
|
||||||
|
|
||||||
def DefaultCompiler(self):
|
def DefaultCompiler(self):
|
||||||
return self.compiler.Clone()
|
return self.compiler.Clone()
|
||||||
@@ -305,10 +259,6 @@ class SM:
|
|||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
def ExtractDebugInfo(self, job, binary):
|
|
||||||
src = os.path.join('..', AMBuild.outputFolder, job.workFolder, binary.binaryFile)
|
|
||||||
job.AddCommand(ExtractDebugInfoCommand(binary, src))
|
|
||||||
|
|
||||||
def PreSetupHL2Job(self, job, builder, sdk):
|
def PreSetupHL2Job(self, job, builder, sdk):
|
||||||
info = self.sdkInfo[sdk]
|
info = self.sdkInfo[sdk]
|
||||||
sdkPath = AMBuild.cache[info['sdk']]
|
sdkPath = AMBuild.cache[info['sdk']]
|
||||||
@@ -318,31 +268,26 @@ class SM:
|
|||||||
else:
|
else:
|
||||||
staticLibs = os.path.join(sdkPath, 'lib', 'linux')
|
staticLibs = os.path.join(sdkPath, 'lib', 'linux')
|
||||||
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
|
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
|
||||||
if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'l4d2']:
|
if sdk == 'ep2v':
|
||||||
libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib_srv.so', 'libtier0_srv.so']
|
for i in ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib_srv.so', 'libtier0_srv.so']:
|
||||||
for lib in libs:
|
link = os.path.join(workFolder, i)
|
||||||
link = os.path.join(workFolder, lib)
|
target = os.path.join(staticLibs, i)
|
||||||
target = os.path.join(staticLibs, lib)
|
|
||||||
try:
|
try:
|
||||||
os.lstat(link)
|
os.lstat(link)
|
||||||
except:
|
except:
|
||||||
job.AddCommand(SymlinkCommand(link, target))
|
job.AddCommand(SymlinkCommand(link, target))
|
||||||
elif sdk in ['l4d', 'nd', 'csgo']:
|
elif sdk in ['l4d', 'l4d2']:
|
||||||
libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.so', 'libtier0.so']
|
for i in ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.so', 'libtier0.so']:
|
||||||
if sdk == 'csgo':
|
link = os.path.join(workFolder, i)
|
||||||
libs.append('interfaces_i486.a')
|
target = os.path.join(staticLibs, i)
|
||||||
for lib in libs:
|
|
||||||
link = os.path.join(workFolder, lib)
|
|
||||||
target = os.path.join(staticLibs, lib)
|
|
||||||
try:
|
try:
|
||||||
os.lstat(link)
|
os.lstat(link)
|
||||||
except:
|
except:
|
||||||
job.AddCommand(SymlinkCommand(link, target))
|
job.AddCommand(SymlinkCommand(link, target))
|
||||||
else:
|
else:
|
||||||
libs = ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_i486.so', 'tier0_i486.so']
|
for i in ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_i486.so', 'tier0_i486.so']:
|
||||||
for lib in libs:
|
link = os.path.join(workFolder, i)
|
||||||
link = os.path.join(workFolder, lib)
|
target = os.path.join(staticLibs, i)
|
||||||
target = os.path.join(staticLibs, lib)
|
|
||||||
try:
|
try:
|
||||||
os.lstat(link)
|
os.lstat(link)
|
||||||
except:
|
except:
|
||||||
@@ -350,19 +295,16 @@ class SM:
|
|||||||
elif AMBuild.target['platform'] == 'darwin':
|
elif AMBuild.target['platform'] == 'darwin':
|
||||||
staticLibs = os.path.join(sdkPath, 'lib', 'mac')
|
staticLibs = os.path.join(sdkPath, 'lib', 'mac')
|
||||||
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
|
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
|
||||||
libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.dylib', 'libtier0.dylib']
|
for i in ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.dylib', 'libtier0.dylib']:
|
||||||
if sdk == 'csgo':
|
link = os.path.join(workFolder, i)
|
||||||
libs.append('interfaces_i486.a')
|
target = os.path.join(staticLibs, i)
|
||||||
for lib in libs:
|
|
||||||
link = os.path.join(workFolder, lib)
|
|
||||||
target = os.path.join(staticLibs, lib)
|
|
||||||
try:
|
try:
|
||||||
os.lstat(link)
|
os.lstat(link)
|
||||||
except:
|
except:
|
||||||
job.AddCommand(SymlinkCommand(link, target))
|
job.AddCommand(SymlinkCommand(link, target))
|
||||||
elif AMBuild.target['platform'] == 'windows':
|
elif AMBuild.target['platform'] == 'windows':
|
||||||
libs = ['tier0', 'tier1', 'vstdlib', 'mathlib']
|
libs = ['tier0', 'tier1', 'vstdlib', 'mathlib']
|
||||||
if sdk in ['swarm', 'csgo']:
|
if sdk == 'swarm':
|
||||||
libs.append('interfaces')
|
libs.append('interfaces')
|
||||||
for lib in libs:
|
for lib in libs:
|
||||||
libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
|
libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
|
||||||
@@ -372,9 +314,7 @@ class SM:
|
|||||||
def PostSetupHL2Job(self, job, builder, sdk):
|
def PostSetupHL2Job(self, job, builder, sdk):
|
||||||
if AMBuild.target['platform'] in ['linux', 'darwin']:
|
if AMBuild.target['platform'] in ['linux', 'darwin']:
|
||||||
builder.AddObjectFiles(['tier1_i486.a', 'mathlib_i486.a'])
|
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'):
|
def DefaultHL2Compiler(self, path, sdk, noLink = False, oldMms = '-legacy'):
|
||||||
compiler = self.DefaultExtCompiler(path)
|
compiler = self.DefaultExtCompiler(path)
|
||||||
|
|
||||||
@@ -387,10 +327,6 @@ class SM:
|
|||||||
|
|
||||||
info = self.possibleSdks
|
info = self.possibleSdks
|
||||||
compiler['CDEFINES'].extend(['SE_' + info[i]['name'] + '=' + info[i]['def'] for i in info])
|
compiler['CDEFINES'].extend(['SE_' + info[i]['name'] + '=' + info[i]['def'] for i in info])
|
||||||
|
|
||||||
# We don't build for Portal 2 (yet?, ever?), but using this define in code as
|
|
||||||
# it saves trouble if we ever need to
|
|
||||||
compiler['CDEFINES'].append('SE_PORTAL2=14')
|
|
||||||
|
|
||||||
paths = [['public'], ['public', 'engine'], ['public', 'mathlib'], ['public', 'vstdlib'],
|
paths = [['public'], ['public', 'engine'], ['public', 'mathlib'], ['public', 'vstdlib'],
|
||||||
['public', 'tier0'], ['public', 'tier1']]
|
['public', 'tier0'], ['public', 'tier1']]
|
||||||
@@ -408,11 +344,8 @@ class SM:
|
|||||||
|
|
||||||
compiler['CDEFINES'].append('SOURCE_ENGINE=' + info['def'])
|
compiler['CDEFINES'].append('SOURCE_ENGINE=' + info['def'])
|
||||||
|
|
||||||
if sdk in ['swarm','csgo']:
|
if sdk == 'swarm' and AMBuild.target['platform'] == 'windows':
|
||||||
if AMBuild.target['platform'] == 'windows':
|
compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
|
||||||
compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
|
|
||||||
else:
|
|
||||||
compiler['CDEFINES'].extend(['COMPILER_GCC'])
|
|
||||||
|
|
||||||
if sdk == 'ep1':
|
if sdk == 'ep1':
|
||||||
if AMBuild.target['platform'] == 'linux':
|
if AMBuild.target['platform'] == 'linux':
|
||||||
@@ -429,10 +362,10 @@ class SM:
|
|||||||
if not noLink:
|
if not noLink:
|
||||||
if AMBuild.target['platform'] == 'linux':
|
if AMBuild.target['platform'] == 'linux':
|
||||||
compiler['POSTLINKFLAGS'][0:0] = ['-lm']
|
compiler['POSTLINKFLAGS'][0:0] = ['-lm']
|
||||||
if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'l4d2']:
|
if sdk == 'ep2v':
|
||||||
compiler['POSTLINKFLAGS'][0:0] = ['libtier0_srv.so']
|
compiler['POSTLINKFLAGS'][0:0] = ['libtier0_srv.so']
|
||||||
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib_srv.so']
|
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib_srv.so']
|
||||||
elif sdk in ['l4d', 'nd', 'csgo']:
|
elif sdk in ['l4d', 'l4d2']:
|
||||||
compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so']
|
compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so']
|
||||||
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so']
|
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so']
|
||||||
else:
|
else:
|
||||||
@@ -443,22 +376,6 @@ class SM:
|
|||||||
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.dylib']
|
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.dylib']
|
||||||
|
|
||||||
return compiler
|
return compiler
|
||||||
|
|
||||||
def ResolveEnvPath(self, env, defaultDir):
|
|
||||||
if env in os.environ:
|
|
||||||
path = os.environ[env]
|
|
||||||
if os.path.isdir(path):
|
|
||||||
return path
|
|
||||||
else:
|
|
||||||
head = os.getcwd()
|
|
||||||
oldhead = None
|
|
||||||
while head != None and head != oldhead:
|
|
||||||
path = os.path.join(head, defaultDir)
|
|
||||||
if os.path.isdir(path):
|
|
||||||
return path
|
|
||||||
oldhead = head
|
|
||||||
head, tail = os.path.split(head)
|
|
||||||
return None
|
|
||||||
|
|
||||||
sm = SM()
|
sm = SM()
|
||||||
globals = {
|
globals = {
|
||||||
@@ -477,7 +394,6 @@ FileList = [
|
|||||||
['extensions', 'curl', 'AMBuilder'],
|
['extensions', 'curl', 'AMBuilder'],
|
||||||
['extensions', 'geoip', 'AMBuilder'],
|
['extensions', 'geoip', 'AMBuilder'],
|
||||||
['extensions', 'mysql', 'AMBuilder'],
|
['extensions', 'mysql', 'AMBuilder'],
|
||||||
['extensions', 'sdkhooks', 'AMBuilder'],
|
|
||||||
['extensions', 'sdktools', 'AMBuilder'],
|
['extensions', 'sdktools', 'AMBuilder'],
|
||||||
['extensions', 'topmenus', 'AMBuilder'],
|
['extensions', 'topmenus', 'AMBuilder'],
|
||||||
['extensions', 'updater', 'AMBuilder'],
|
['extensions', 'updater', 'AMBuilder'],
|
||||||
@@ -487,13 +403,9 @@ FileList = [
|
|||||||
['sourcepawn', 'jit', 'AMBuilder'],
|
['sourcepawn', 'jit', 'AMBuilder'],
|
||||||
['sourcepawn', 'compiler', 'AMBuilder'],
|
['sourcepawn', 'compiler', 'AMBuilder'],
|
||||||
['plugins', 'AMBuilder'],
|
['plugins', 'AMBuilder'],
|
||||||
['tools', 'buildbot', 'PackageScript'],
|
['tools', 'buildbot', 'PackageScript']
|
||||||
['tools', 'buildbot', 'BreakpadSymbols']
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if not sm.hasMySql:
|
|
||||||
FileList.remove(['extensions', 'mysql', 'AMBuilder'])
|
|
||||||
|
|
||||||
for parts in FileList:
|
for parts in FileList:
|
||||||
AMBuild.Include(os.path.join(*parts), globals)
|
AMBuild.Include(os.path.join(*parts), globals)
|
||||||
|
|
||||||
|
|||||||
@@ -1,87 +1,7 @@
|
|||||||
SourceMod Changelog
|
SourceMod Changelog
|
||||||
|
|
||||||
SourceMod 1.5.0 [2013-08-25]
|
|
||||||
|
|
||||||
URL: http://wiki.alliedmods.net/SourceMod_1.5.0_Release_Notes
|
|
||||||
|
|
||||||
User Changes:
|
|
||||||
|
|
||||||
- Added support for Counter-Strike: Global Offensive (bug 5299, bug 5579).
|
|
||||||
- Split CS:S, TF2, DoD:S, HL2:DM, and ND to separate binaries (bug 5370, bug 5813).
|
|
||||||
- Added support for runoff voting in mapchooser (bug 4218).
|
|
||||||
- Added option to require Steam validation before granting admin access (bug 4837) (VoiDeD).
|
|
||||||
- Added localization support for many more core and base plugin messages (bug 5120, bug 5146).
|
|
||||||
- Added the ability to override RegConsoleCommand-created commands (bug 5199).
|
|
||||||
- Added support for "fuzzy" (partial) map names in map-related natives and cmds for L4D and later (bug 5599).
|
|
||||||
- Updated Reserved Slots to use max humans as max count (bug 5444).
|
|
||||||
- Added support for custom maxitems on radio menus (bug 5371).
|
|
||||||
- Improved console config editing (bug 5470).
|
|
||||||
- Increased map name buffer sizes in mapchooser to better account for nested maps (bug 5609) (Peace-Maker).
|
|
||||||
- Fixed JIT conflicts with SELinux (bug 5581).
|
|
||||||
- Added logged error when PlayerRunCommand offset lookup fails (bug 5535) (GoD-Tony).
|
|
||||||
- Fixed double print when sending psay to self (bug 5649) (Peace-Maker).
|
|
||||||
- Fixed check against uninitialized string in extension loader (bug 5546) (KyleS).
|
|
||||||
- Fixed possible runtime errors in basetriggers for not-ingame clients (bug 5191) (Peace-Maker).
|
|
||||||
- Check all possible mapcycle paths on newer orangebox games (bug 5719).
|
|
||||||
- Fixed ReadMapList not seeing maps in all valve search paths (bug 5715) (VoiDeD).
|
|
||||||
- Fixed typo in too-many-params native error message (Peace-Maker).
|
|
||||||
- Fixed various issues in clientprefs (bug 5538) (KyleS).
|
|
||||||
- Removed debug printout from PerformGravity (bug 5679) (KyleS).
|
|
||||||
- Fixed broken translating in some plugins and natives (bug 5612) (KyleS).
|
|
||||||
- Fixed issues with COMMAND_FILTER_NO_BOTS and @bots multi-target.
|
|
||||||
- Fixed crash in SDKHooks when throwing bad ent type error on logical ent (KyleS).
|
|
||||||
|
|
||||||
Developer Changes:
|
|
||||||
|
|
||||||
- Added support for CS:GO to the CStrike extension (bug 5299) (Drifter).
|
|
||||||
- Added support for new protobuf usermessages used in newer games (bug 5579, bug 5588, bug 5590, bug 5633).
|
|
||||||
- Added latest SDKHooks version as first-party extension.
|
|
||||||
- Updated SQLite to version 3.7.15.1 (bug 5235).
|
|
||||||
- Added natives for changing team score and mvp stars on CSS/CSGO (bug 5295) (Drifter).
|
|
||||||
- Added global pre and post forwards for client chat (bug 5394) (KyleS).
|
|
||||||
- Added TF2_CanPlayerTeleport forward to the TF2 game extension (bug 5283) (VoiDeD).
|
|
||||||
- Added GetEntityAddress native (bug 5269) (ProdigySim).
|
|
||||||
- Added more parameters to PlayerRunCommand forward (bug 5346) (GoD-Tony).
|
|
||||||
- Added forwards to basecomm plugin (bug 5466) (Drifter).
|
|
||||||
- Added symbol lookup support to gamedata on Windows (bug 5511) (GoD-Tony).
|
|
||||||
- Exposed GetLanguageInfo in ITranslator interface (bug 5249) (VoiDeD).
|
|
||||||
- Increase maximum .sp line length to 4095 characters. (bug 5347) (theY4Kman).
|
|
||||||
- Improved netprop dump output (bug 5471).
|
|
||||||
- Added int64 typename to netprop dumps (bug 5655).
|
|
||||||
- Added GetMaxHumanPlayers native exposing IServerGameClients func (bug 5551).
|
|
||||||
- Added WeaponIDToAlias native to CStrike extension (bug 5460) (KyleS).
|
|
||||||
- Fixed OnLibraryAdded/Removed not being called in all plugins (bug 5431).
|
|
||||||
- Made thread worker processing limits configurable at runtime (bug 5326).
|
|
||||||
- Added support in TF2 ext for detection of player conds >= 64 (bug 5565).
|
|
||||||
- Updated button defines in entity_prop_stocks (bug 5564).
|
|
||||||
- Added GetPlayerResourceEntity to SDKTools to replace old, semi-broken TF2-only version (bug 5491).
|
|
||||||
- Exposed third parameter of TF2's AddCond in TF2_AddCondition (bug 5641) (FlaminSarge).
|
|
||||||
- Added GetSteamAccountID function to IPlayerHelpers and native for sp (bug 5548) (KyleS).
|
|
||||||
- Added ISDKHooks interface with entity listeners (bug 5602) (GoD-Tony).
|
|
||||||
- Added file upload support to webternet extension.
|
|
||||||
- Added more alternative names for TFClass_Heavy (bug 5338) (Afronanny).
|
|
||||||
- Throw error instead of crash when calling SetTeamScore between maps (bug 5718) (KyleS).
|
|
||||||
- Fixed clients not being marked as in kick queue in some cases (bug 5746) (SystematicMania).
|
|
||||||
- Made compile.sh set working dir to own dir (bug 5710) (KyleS).
|
|
||||||
- Added CS_IsValidWeaponID native and validity checks to other natives (bug 5566) (Drifter).
|
|
||||||
- Numerous code documentation fixups (bug 5720) (Tsunami).
|
|
||||||
- Fixed cmd listener callback return behavior to match func doc (bug 5882).
|
|
||||||
|
|
||||||
Internal Changes:
|
|
||||||
|
|
||||||
- Fixed handle misuse in clientprefs plugin (bug 5805) (KyleS).
|
|
||||||
- Removed call to getchar() in debug build of compiler (bug 5626) (KyleS).
|
|
||||||
- Fixed instability issues with cloned handles (bug 5245, bug 5240) (KyleS).
|
|
||||||
- Changed extension unload order to avoid exposing finalization window (bug 5556) (KyleS).
|
|
||||||
- Call OnPluginEnd before finalizer hooks have run (bug 4519).
|
|
||||||
- Fixed potential for reading out of library bounds in MemoryUtils::FindPattern.
|
|
||||||
- Fixed typo in TF2 ext asm.c causing accidental assignment instead of compare.
|
|
||||||
- Overhauled versioning information (bug 5453).
|
|
||||||
- Changed from RemoveEdict to using the Kill input for TF2_RemoveWeapon.
|
|
||||||
- Fixed accidental assignment in each of SDKTools and sp compiler (bug 5745) (KyleS).
|
|
||||||
- Fixed potential deadlock in HandleSystem::TryAndFreeSomeHandles (bug 5665) (KyleS).
|
|
||||||
|
|
||||||
----------------------------------------------------------
|
|
||||||
SourceMod 1.4.7 [2013-02-06]
|
SourceMod 1.4.7 [2013-02-06]
|
||||||
|
|
||||||
URL: http://wiki.alliedmods.net/SourceMod_1.4.7_Release_Notes
|
URL: http://wiki.alliedmods.net/SourceMod_1.4.7_Release_Notes
|
||||||
|
|||||||
+1
-9
@@ -107,15 +107,7 @@
|
|||||||
* Currently this will log details about the gamedata updating process.
|
* Currently this will log details about the gamedata updating process.
|
||||||
*/
|
*/
|
||||||
"DebugSpew" "no"
|
"DebugSpew" "no"
|
||||||
|
|
||||||
/**
|
|
||||||
* If set to yes, SourceMod will validate steamid auth strings with the Steam backend before giving out admin access.
|
|
||||||
* This can prevent malicious users from impersonating admins with stolen Steam apptickets.
|
|
||||||
* If Steam is down, admins will not be authenticated until Steam comes back up.
|
|
||||||
* This option increases the security of your server, but is still experimental.
|
|
||||||
*/
|
|
||||||
"SteamAuthstringValidation" "no"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables or disables whether SourceMod blocks known or potentially malicious plugins from loading.
|
* Enables or disables whether SourceMod blocks known or potentially malicious plugins from loading.
|
||||||
* It is STRONGLY advised that this is left enabled, there have been cases in the past with plugins that
|
* It is STRONGLY advised that this is left enabled, there have been cases in the past with plugins that
|
||||||
|
|||||||
@@ -7,9 +7,4 @@ run.options.add_option('--enable-debug', action='store_const', const='1', dest='
|
|||||||
help='Enable debugging symbols')
|
help='Enable debugging symbols')
|
||||||
run.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt',
|
run.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt',
|
||||||
help='Enable optimization')
|
help='Enable optimization')
|
||||||
run.options.add_option('--no-mysql', action='store_false', default=True, dest='hasMySql',
|
|
||||||
help='Disable building MySQL extension')
|
|
||||||
run.options.add_option('-s', '--sdks', default='all', dest='sdks',
|
|
||||||
help='Build against specified SDKs; valid args are "all", "present", or '
|
|
||||||
'comma-delimited list of engine names (default: %default)')
|
|
||||||
run.Configure(sys.path[0])
|
run.Configure(sys.path[0])
|
||||||
|
|||||||
+1
-51
@@ -1,6 +1,5 @@
|
|||||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||||
import os
|
import os
|
||||||
from ambuild.command import SymlinkCommand
|
|
||||||
|
|
||||||
for i in SM.sdkInfo:
|
for i in SM.sdkInfo:
|
||||||
sdk = SM.sdkInfo[i]
|
sdk = SM.sdkInfo[i]
|
||||||
@@ -11,38 +10,9 @@ for i in SM.sdkInfo:
|
|||||||
|
|
||||||
compiler = SM.DefaultHL2Compiler('core', i)
|
compiler = SM.DefaultHL2Compiler('core', i)
|
||||||
|
|
||||||
if i == 'csgo':
|
|
||||||
# Protobuf 2.3 headers have some signed/unsigned compares. I believe that it's fixed in later versions, but Valve.
|
|
||||||
if isinstance(compiler.cxx, Cpp.CompatGCC):
|
|
||||||
compiler.AddToListVar('CFLAGS', '-Wno-sign-compare')
|
|
||||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'common', 'protobuf-2.3.0', 'src'))
|
|
||||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'public', 'engine', 'protobuf'))
|
|
||||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'public', 'game', 'shared', 'csgo', 'protobuf'))
|
|
||||||
|
|
||||||
extension = AMBuild.AddJob(name)
|
extension = AMBuild.AddJob(name)
|
||||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||||
SM.PreSetupHL2Job(extension, binary, i)
|
SM.PreSetupHL2Job(extension, binary, i)
|
||||||
|
|
||||||
if i == 'csgo':
|
|
||||||
if AMBuild.target['platform'] == 'linux':
|
|
||||||
link = os.path.join(os.path.join(AMBuild.outputFolder, extension.workFolder), 'libprotobuf.a')
|
|
||||||
target = os.path.join(os.path.join(AMBuild.cache[sdk['sdk']], 'lib', 'linux32', 'release'), 'libprotobuf.a')
|
|
||||||
try:
|
|
||||||
os.lstat(link)
|
|
||||||
except:
|
|
||||||
extension.AddCommand(SymlinkCommand(link, target))
|
|
||||||
elif AMBuild.target['platform'] == 'darwin':
|
|
||||||
link = os.path.join(os.path.join(AMBuild.outputFolder, extension.workFolder), 'libprotobuf.a')
|
|
||||||
target = os.path.join(os.path.join(AMBuild.cache[sdk['sdk']], 'lib', 'osx32', 'release'), 'libprotobuf.a')
|
|
||||||
try:
|
|
||||||
os.lstat(link)
|
|
||||||
except:
|
|
||||||
extension.AddCommand(SymlinkCommand(link, target))
|
|
||||||
elif AMBuild.target['platform'] == 'windows':
|
|
||||||
libPath = os.path.join(AMBuild.cache[sdk['sdk']], 'lib', 'win32', 'release', 'vs2010', 'libprotobuf.lib')
|
|
||||||
binary.RebuildIfNewer(libPath)
|
|
||||||
binary['POSTLINKFLAGS'].append(libPath)
|
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
'AdminCache.cpp',
|
'AdminCache.cpp',
|
||||||
'ExtensionSys.cpp',
|
'ExtensionSys.cpp',
|
||||||
@@ -79,6 +49,7 @@ for i in SM.sdkInfo:
|
|||||||
'CoreConfig.cpp',
|
'CoreConfig.cpp',
|
||||||
'Logger.cpp',
|
'Logger.cpp',
|
||||||
'PluginInfoDatabase.cpp',
|
'PluginInfoDatabase.cpp',
|
||||||
|
'smn_bitbuffer.cpp',
|
||||||
'smn_halflife.cpp',
|
'smn_halflife.cpp',
|
||||||
'PluginSys.cpp',
|
'PluginSys.cpp',
|
||||||
'smn_console.cpp',
|
'smn_console.cpp',
|
||||||
@@ -100,29 +71,8 @@ for i in SM.sdkInfo:
|
|||||||
'sm_srvcmds.cpp',
|
'sm_srvcmds.cpp',
|
||||||
'ConsoleDetours.cpp'
|
'ConsoleDetours.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
if i == 'csgo':
|
|
||||||
files.append('smn_protobuf.cpp')
|
|
||||||
else:
|
|
||||||
files.append('smn_bitbuffer.cpp')
|
|
||||||
|
|
||||||
binary.AddSourceFiles('core', files)
|
binary.AddSourceFiles('core', files)
|
||||||
|
|
||||||
if i == 'csgo':
|
|
||||||
files = [
|
|
||||||
os.path.join('public', 'engine', 'protobuf', 'netmessages.pb.cc'),
|
|
||||||
os.path.join('public', 'game', 'shared', 'csgo', 'protobuf', 'cstrike15_usermessages.pb.cc'),
|
|
||||||
os.path.join('public', 'game', 'shared', 'csgo', 'protobuf', 'cstrike15_usermessage_helpers.cpp'),
|
|
||||||
]
|
|
||||||
binary.AddSourceFiles(AMBuild.cache[sdk['sdk']], files)
|
|
||||||
|
|
||||||
SM.PostSetupHL2Job(extension, binary, i)
|
SM.PostSetupHL2Job(extension, binary, i)
|
||||||
|
|
||||||
if i == 'csgo':
|
|
||||||
if AMBuild.target['platform'] in ['linux', 'darwin']:
|
|
||||||
binary.AddObjectFiles(['libprotobuf.a'])
|
|
||||||
|
|
||||||
SM.AutoVersion('core', binary)
|
SM.AutoVersion('core', binary)
|
||||||
SM.ExtractDebugInfo(extension, binary)
|
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
|
|
||||||
|
|||||||
+49
-129
@@ -59,17 +59,13 @@ ChatTriggers g_ChatTriggers;
|
|||||||
bool g_bSupressSilentFails = false;
|
bool g_bSupressSilentFails = false;
|
||||||
|
|
||||||
ChatTriggers::ChatTriggers() : m_pSayCmd(NULL), m_bWillProcessInPost(false),
|
ChatTriggers::ChatTriggers() : m_pSayCmd(NULL), m_bWillProcessInPost(false),
|
||||||
m_ReplyTo(SM_REPLY_CONSOLE)
|
m_bTriggerWasSilent(false), m_ReplyTo(SM_REPLY_CONSOLE)
|
||||||
{
|
{
|
||||||
m_PubTrigger = sm_strdup("!");
|
m_PubTrigger = sm_strdup("!");
|
||||||
m_PrivTrigger = sm_strdup("/");
|
m_PrivTrigger = sm_strdup("/");
|
||||||
m_PubTriggerSize = 1;
|
m_PubTriggerSize = 1;
|
||||||
m_PrivTriggerSize = 1;
|
m_PrivTriggerSize = 1;
|
||||||
m_bIsChatTrigger = false;
|
m_bIsChatTrigger = false;
|
||||||
m_bPluginIgnored = false;
|
|
||||||
#if SOURCE_ENGINE == SE_EPISODEONE
|
|
||||||
m_bIsINS = false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatTriggers::~ChatTriggers()
|
ChatTriggers::~ChatTriggers()
|
||||||
@@ -113,8 +109,6 @@ void ChatTriggers::OnSourceModAllInitialized()
|
|||||||
{
|
{
|
||||||
m_pShouldFloodBlock = g_Forwards.CreateForward("OnClientFloodCheck", ET_Event, 1, NULL, Param_Cell);
|
m_pShouldFloodBlock = g_Forwards.CreateForward("OnClientFloodCheck", ET_Event, 1, NULL, Param_Cell);
|
||||||
m_pDidFloodBlock = g_Forwards.CreateForward("OnClientFloodResult", ET_Event, 2, NULL, Param_Cell, Param_Cell);
|
m_pDidFloodBlock = g_Forwards.CreateForward("OnClientFloodResult", ET_Event, 2, NULL, Param_Cell, Param_Cell);
|
||||||
m_pOnClientSayCmd = g_Forwards.CreateForward("OnClientSayCommand", ET_Event, 3, NULL, Param_Cell, Param_String, Param_String);
|
|
||||||
m_pOnClientSayCmd_Post = g_Forwards.CreateForward("OnClientSayCommand_Post", ET_Ignore, 3, NULL, Param_Cell, Param_String, Param_String);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatTriggers::OnSourceModAllInitialized_Post()
|
void ChatTriggers::OnSourceModAllInitialized_Post()
|
||||||
@@ -137,62 +131,23 @@ void ChatTriggers::OnSourceModGameInitialized()
|
|||||||
SH_ADD_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayTeamCmd, this, &ChatTriggers::OnSayCommand_Pre, false);
|
SH_ADD_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayTeamCmd, this, &ChatTriggers::OnSayCommand_Pre, false);
|
||||||
SH_ADD_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayTeamCmd, this, &ChatTriggers::OnSayCommand_Post, true);
|
SH_ADD_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayTeamCmd, this, &ChatTriggers::OnSayCommand_Post, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_EPISODEONE
|
|
||||||
m_bIsINS = (strcmp(g_SourceMod.GetGameFolderName(), "insurgency") == 0);
|
|
||||||
|
|
||||||
if (m_bIsINS)
|
|
||||||
{
|
|
||||||
m_pSay2Cmd = FindCommand("say2");
|
|
||||||
if (m_pSay2Cmd)
|
|
||||||
{
|
|
||||||
SH_ADD_HOOK(ConCommand, Dispatch, m_pSay2Cmd, SH_MEMBER(this, &ChatTriggers::OnSayCommand_Pre), false);
|
|
||||||
SH_ADD_HOOK(ConCommand, Dispatch, m_pSay2Cmd, SH_MEMBER(this, &ChatTriggers::OnSayCommand_Post), true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#elif SOURCE_ENGINE == SE_NUCLEARDAWN
|
|
||||||
m_pSaySquadCmd = FindCommand("say_squad");
|
|
||||||
|
|
||||||
if (m_pSaySquadCmd)
|
|
||||||
{
|
|
||||||
SH_ADD_HOOK(ConCommand, Dispatch, m_pSaySquadCmd, SH_MEMBER(this, &ChatTriggers::OnSayCommand_Pre), false);
|
|
||||||
SH_ADD_HOOK(ConCommand, Dispatch, m_pSaySquadCmd, SH_MEMBER(this, &ChatTriggers::OnSayCommand_Post), true);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatTriggers::OnSourceModShutdown()
|
void ChatTriggers::OnSourceModShutdown()
|
||||||
{
|
{
|
||||||
|
if (m_pSayTeamCmd)
|
||||||
|
{
|
||||||
|
SH_REMOVE_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayTeamCmd, this, &ChatTriggers::OnSayCommand_Post, true);
|
||||||
|
SH_REMOVE_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayTeamCmd, this, &ChatTriggers::OnSayCommand_Pre, false);
|
||||||
|
}
|
||||||
if (m_pSayCmd)
|
if (m_pSayCmd)
|
||||||
{
|
{
|
||||||
SH_REMOVE_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayCmd, this, &ChatTriggers::OnSayCommand_Post, true);
|
SH_REMOVE_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayCmd, this, &ChatTriggers::OnSayCommand_Post, true);
|
||||||
SH_REMOVE_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayCmd, this, &ChatTriggers::OnSayCommand_Pre, false);
|
SH_REMOVE_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayCmd, this, &ChatTriggers::OnSayCommand_Pre, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_pSayTeamCmd)
|
|
||||||
{
|
|
||||||
SH_REMOVE_HOOK(ConCommand, Dispatch, m_pSayTeamCmd, SH_MEMBER(this, &ChatTriggers::OnSayCommand_Post), true);
|
|
||||||
SH_REMOVE_HOOK(ConCommand, Dispatch, m_pSayTeamCmd, SH_MEMBER(this, &ChatTriggers::OnSayCommand_Pre), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_EPISODEONE
|
|
||||||
if (m_bIsINS && m_pSay2Cmd)
|
|
||||||
{
|
|
||||||
SH_REMOVE_HOOK(ConCommand, Dispatch, m_pSay2Cmd, SH_MEMBER(this, &ChatTriggers::OnSayCommand_Pre), false);
|
|
||||||
SH_REMOVE_HOOK(ConCommand, Dispatch, m_pSay2Cmd, SH_MEMBER(this, &ChatTriggers::OnSayCommand_Post), true);
|
|
||||||
}
|
|
||||||
#elif SOURCE_ENGINE == SE_NUCLEARDAWN
|
|
||||||
if (m_pSaySquadCmd)
|
|
||||||
{
|
|
||||||
SH_REMOVE_HOOK(ConCommand, Dispatch, m_pSaySquadCmd, SH_MEMBER(this, &ChatTriggers::OnSayCommand_Pre), false);
|
|
||||||
SH_REMOVE_HOOK(ConCommand, Dispatch, m_pSaySquadCmd, SH_MEMBER(this, &ChatTriggers::OnSayCommand_Post), true);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_Forwards.ReleaseForward(m_pShouldFloodBlock);
|
g_Forwards.ReleaseForward(m_pShouldFloodBlock);
|
||||||
g_Forwards.ReleaseForward(m_pDidFloodBlock);
|
g_Forwards.ReleaseForward(m_pDidFloodBlock);
|
||||||
g_Forwards.ReleaseForward(m_pOnClientSayCmd);
|
|
||||||
g_Forwards.ReleaseForward(m_pOnClientSayCmd_Post);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||||
@@ -203,10 +158,24 @@ void ChatTriggers::OnSayCommand_Pre()
|
|||||||
{
|
{
|
||||||
CCommand command;
|
CCommand command;
|
||||||
#endif
|
#endif
|
||||||
int client = g_ConCmds.GetCommandClient();
|
int client;
|
||||||
|
CPlayer *pPlayer;
|
||||||
|
|
||||||
|
client = g_ConCmds.GetCommandClient();
|
||||||
m_bIsChatTrigger = false;
|
m_bIsChatTrigger = false;
|
||||||
m_bWasFloodedMessage = false;
|
m_bWasFloodedMessage = false;
|
||||||
m_bPluginIgnored = false;
|
|
||||||
|
/* The server console cannot do this */
|
||||||
|
if (client == 0 || (pPlayer = g_Players.GetPlayerByIndex(client)) == NULL)
|
||||||
|
{
|
||||||
|
RETURN_META(MRES_IGNORED);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We guarantee the client is connected */
|
||||||
|
if (!pPlayer->IsConnected())
|
||||||
|
{
|
||||||
|
RETURN_META(MRES_IGNORED);
|
||||||
|
}
|
||||||
|
|
||||||
const char *args = command.ArgS();
|
const char *args = command.ArgS();
|
||||||
|
|
||||||
@@ -215,31 +184,6 @@ void ChatTriggers::OnSayCommand_Pre()
|
|||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save these off for post hook as the command data returned from the engine in older engine versions
|
|
||||||
* can be NULL, despite the data still being there and valid. */
|
|
||||||
m_Arg0Backup = command.Arg(0);
|
|
||||||
m_ArgSBackup = command.ArgS();
|
|
||||||
|
|
||||||
/* The server console cannot do this */
|
|
||||||
if (client == 0)
|
|
||||||
{
|
|
||||||
cell_t res = CallOnClientSayCommand(client);
|
|
||||||
if (res >= Pl_Handled)
|
|
||||||
{
|
|
||||||
m_bPluginIgnored = (res >= Pl_Stop);
|
|
||||||
RETURN_META(MRES_SUPERCEDE);
|
|
||||||
}
|
|
||||||
RETURN_META(MRES_IGNORED);
|
|
||||||
}
|
|
||||||
|
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
|
||||||
|
|
||||||
/* We guarantee the client is connected */
|
|
||||||
if (!pPlayer || !pPlayer->IsConnected())
|
|
||||||
{
|
|
||||||
RETURN_META(MRES_IGNORED);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check if we need to block this message from being sent */
|
/* Check if we need to block this message from being sent */
|
||||||
if (ClientIsFlooding(client))
|
if (ClientIsFlooding(client))
|
||||||
{
|
{
|
||||||
@@ -267,13 +211,6 @@ void ChatTriggers::OnSayCommand_Pre()
|
|||||||
is_quoted = true;
|
is_quoted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_EPISODEONE
|
|
||||||
if (m_bIsINS && strcmp(m_Arg0Backup, "say2") == 0 && strlen(args) >= 4)
|
|
||||||
{
|
|
||||||
args += 4;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool is_trigger = false;
|
bool is_trigger = false;
|
||||||
bool is_silent = false;
|
bool is_silent = false;
|
||||||
|
|
||||||
@@ -290,28 +227,38 @@ void ChatTriggers::OnSayCommand_Pre()
|
|||||||
args = &args[m_PrivTriggerSize];
|
args = &args[m_PrivTriggerSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!is_trigger)
|
||||||
|
{
|
||||||
|
RETURN_META(MRES_IGNORED);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if this is actually a command!
|
* Test if this is actually a command!
|
||||||
*/
|
*/
|
||||||
if (is_trigger && PreProcessTrigger(PEntityOfEntIndex(client), args, is_quoted))
|
if (!PreProcessTrigger(PEntityOfEntIndex(client), args, is_quoted))
|
||||||
{
|
{
|
||||||
m_bIsChatTrigger = true;
|
CPlayer *pPlayer;
|
||||||
|
if (is_silent
|
||||||
/**
|
&& g_bSupressSilentFails
|
||||||
* We'll execute it in post.
|
&& client != 0
|
||||||
*/
|
&& (pPlayer = g_Players.GetPlayerByIndex(client)) != NULL
|
||||||
m_bWillProcessInPost = true;
|
&& pPlayer->GetAdminId() != INVALID_ADMIN_ID)
|
||||||
|
{
|
||||||
|
RETURN_META(MRES_SUPERCEDE);
|
||||||
|
}
|
||||||
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
cell_t res = CallOnClientSayCommand(client);
|
m_bIsChatTrigger = true;
|
||||||
|
|
||||||
if (res >= Pl_Handled)
|
/**
|
||||||
{
|
* We'll execute it in post.
|
||||||
m_bPluginIgnored = (res >= Pl_Stop);
|
*/
|
||||||
RETURN_META(MRES_SUPERCEDE);
|
m_bWillProcessInPost = true;
|
||||||
}
|
m_bTriggerWasSilent = is_silent;
|
||||||
|
|
||||||
if (is_silent && (m_bIsChatTrigger || (g_bSupressSilentFails && pPlayer->GetAdminId() != INVALID_ADMIN_ID)))
|
/* If we're silent, block */
|
||||||
|
if (is_silent)
|
||||||
{
|
{
|
||||||
RETURN_META(MRES_SUPERCEDE);
|
RETURN_META(MRES_SUPERCEDE);
|
||||||
}
|
}
|
||||||
@@ -326,33 +273,19 @@ void ChatTriggers::OnSayCommand_Post(const CCommand &command)
|
|||||||
void ChatTriggers::OnSayCommand_Post()
|
void ChatTriggers::OnSayCommand_Post()
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int client = g_ConCmds.GetCommandClient();
|
m_bIsChatTrigger = false;
|
||||||
|
m_bWasFloodedMessage = false;
|
||||||
if (m_bWillProcessInPost)
|
if (m_bWillProcessInPost)
|
||||||
{
|
{
|
||||||
/* Reset this for re-entrancy */
|
/* Reset this for re-entrancy */
|
||||||
m_bWillProcessInPost = false;
|
m_bWillProcessInPost = false;
|
||||||
|
|
||||||
/* Execute the cached command */
|
/* Execute the cached command */
|
||||||
|
int client = g_ConCmds.GetCommandClient();
|
||||||
unsigned int old = SetReplyTo(SM_REPLY_CHAT);
|
unsigned int old = SetReplyTo(SM_REPLY_CHAT);
|
||||||
serverpluginhelpers->ClientCommand(PEntityOfEntIndex(client), m_ToExecute);
|
serverpluginhelpers->ClientCommand(PEntityOfEntIndex(client), m_ToExecute);
|
||||||
SetReplyTo(old);
|
SetReplyTo(old);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_bPluginIgnored)
|
|
||||||
{
|
|
||||||
m_bPluginIgnored = false;
|
|
||||||
}
|
|
||||||
else if (!m_bWasFloodedMessage && !m_bIsChatTrigger && m_pOnClientSayCmd_Post->GetFunctionCount() != 0)
|
|
||||||
{
|
|
||||||
m_pOnClientSayCmd_Post->PushCell(client);
|
|
||||||
m_pOnClientSayCmd_Post->PushString(m_Arg0Backup);
|
|
||||||
m_pOnClientSayCmd_Post->PushString(m_ArgSBackup);
|
|
||||||
m_pOnClientSayCmd_Post->Execute(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_bIsChatTrigger = false;
|
|
||||||
m_bWasFloodedMessage = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChatTriggers::PreProcessTrigger(edict_t *pEdict, const char *args, bool is_quoted)
|
bool ChatTriggers::PreProcessTrigger(edict_t *pEdict, const char *args, bool is_quoted)
|
||||||
@@ -429,19 +362,6 @@ bool ChatTriggers::PreProcessTrigger(edict_t *pEdict, const char *args, bool is_
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cell_t ChatTriggers::CallOnClientSayCommand(int client)
|
|
||||||
{
|
|
||||||
cell_t res = Pl_Continue;
|
|
||||||
if (!m_bIsChatTrigger && m_pOnClientSayCmd->GetFunctionCount() != 0)
|
|
||||||
{
|
|
||||||
m_pOnClientSayCmd->PushCell(client);
|
|
||||||
m_pOnClientSayCmd->PushString(m_Arg0Backup);
|
|
||||||
m_pOnClientSayCmd->PushString(m_ArgSBackup);
|
|
||||||
m_pOnClientSayCmd->Execute(&res);
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int ChatTriggers::SetReplyTo(unsigned int reply)
|
unsigned int ChatTriggers::SetReplyTo(unsigned int reply)
|
||||||
{
|
{
|
||||||
unsigned int old = m_ReplyTo;
|
unsigned int old = m_ReplyTo;
|
||||||
|
|||||||
+1
-14
@@ -69,34 +69,21 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool PreProcessTrigger(edict_t *pEdict, const char *args, bool is_quoted);
|
bool PreProcessTrigger(edict_t *pEdict, const char *args, bool is_quoted);
|
||||||
bool ClientIsFlooding(int client);
|
bool ClientIsFlooding(int client);
|
||||||
cell_t CallOnClientSayCommand(int client);
|
|
||||||
private:
|
private:
|
||||||
ConCommand *m_pSayCmd;
|
ConCommand *m_pSayCmd;
|
||||||
ConCommand *m_pSayTeamCmd;
|
ConCommand *m_pSayTeamCmd;
|
||||||
#if SOURCE_ENGINE == SE_EPISODEONE
|
|
||||||
ConCommand *m_pSay2Cmd;
|
|
||||||
#elif SOURCE_ENGINE == SE_NUCLEARDAWN
|
|
||||||
ConCommand *m_pSaySquadCmd;
|
|
||||||
#endif
|
|
||||||
char *m_PubTrigger;
|
char *m_PubTrigger;
|
||||||
size_t m_PubTriggerSize;
|
size_t m_PubTriggerSize;
|
||||||
char *m_PrivTrigger;
|
char *m_PrivTrigger;
|
||||||
size_t m_PrivTriggerSize;
|
size_t m_PrivTriggerSize;
|
||||||
bool m_bWillProcessInPost;
|
bool m_bWillProcessInPost;
|
||||||
|
bool m_bTriggerWasSilent;
|
||||||
bool m_bIsChatTrigger;
|
bool m_bIsChatTrigger;
|
||||||
bool m_bWasFloodedMessage;
|
bool m_bWasFloodedMessage;
|
||||||
bool m_bPluginIgnored;
|
|
||||||
unsigned int m_ReplyTo;
|
unsigned int m_ReplyTo;
|
||||||
char m_ToExecute[300];
|
char m_ToExecute[300];
|
||||||
const char *m_Arg0Backup;
|
|
||||||
const char *m_ArgSBackup;
|
|
||||||
IForward *m_pShouldFloodBlock;
|
IForward *m_pShouldFloodBlock;
|
||||||
IForward *m_pDidFloodBlock;
|
IForward *m_pDidFloodBlock;
|
||||||
IForward *m_pOnClientSayCmd;
|
|
||||||
IForward *m_pOnClientSayCmd_Post;
|
|
||||||
#if SOURCE_ENGINE == SE_EPISODEONE
|
|
||||||
bool m_bIsINS;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern ChatTriggers g_ChatTriggers;
|
extern ChatTriggers g_ChatTriggers;
|
||||||
|
|||||||
+48
-2
@@ -559,6 +559,44 @@ bool ConCmdManager::CheckAccess(int client, const char *cmd, AdminCmdInfo *pAdmi
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ConCmdManager::AddConsoleCommand(IPluginFunction *pFunction,
|
||||||
|
const char *name,
|
||||||
|
const char *description,
|
||||||
|
int flags)
|
||||||
|
{
|
||||||
|
ConCmdInfo *pInfo = AddOrFindCommand(name, description, flags);
|
||||||
|
|
||||||
|
if (!pInfo)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CmdHook *pHook = new CmdHook();
|
||||||
|
|
||||||
|
pHook->pf = pFunction;
|
||||||
|
if (description && description[0])
|
||||||
|
{
|
||||||
|
pHook->helptext.assign(description);
|
||||||
|
}
|
||||||
|
pInfo->conhooks.push_back(pHook);
|
||||||
|
|
||||||
|
/* Add to the plugin */
|
||||||
|
CmdList *pList;
|
||||||
|
IPlugin *pPlugin = g_PluginSys.GetPluginByCtx(pFunction->GetParentContext()->GetContext());
|
||||||
|
if (!pPlugin->GetProperty("CommandList", (void **)&pList))
|
||||||
|
{
|
||||||
|
pList = new CmdList();
|
||||||
|
pPlugin->SetProperty("CommandList", pList);
|
||||||
|
}
|
||||||
|
PlCmdInfo info;
|
||||||
|
info.pInfo = pInfo;
|
||||||
|
info.type = Cmd_Console;
|
||||||
|
info.pHook = pHook;
|
||||||
|
AddToPlCmdList(pList, info);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool ConCmdManager::AddAdminCommand(IPluginFunction *pFunction,
|
bool ConCmdManager::AddAdminCommand(IPluginFunction *pFunction,
|
||||||
const char *name,
|
const char *name,
|
||||||
const char *group,
|
const char *group,
|
||||||
@@ -620,6 +658,7 @@ bool ConCmdManager::AddAdminCommand(IPluginFunction *pFunction,
|
|||||||
/* Finally, add the hook */
|
/* Finally, add the hook */
|
||||||
pInfo->conhooks.push_back(pHook);
|
pInfo->conhooks.push_back(pHook);
|
||||||
pInfo->admin = *(pHook->pAdmin);
|
pInfo->admin = *(pHook->pAdmin);
|
||||||
|
pInfo->is_admin_set = true;
|
||||||
|
|
||||||
/* Now add to the plugin */
|
/* Now add to the plugin */
|
||||||
CmdList *pList;
|
CmdList *pList;
|
||||||
@@ -764,6 +803,7 @@ void ConCmdManager::UpdateAdminCmdFlags(const char *cmd, OverrideType type, Flag
|
|||||||
pInfo->admin = *(pHook->pAdmin);
|
pInfo->admin = *(pHook->pAdmin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pInfo->is_admin_set = true;
|
||||||
}
|
}
|
||||||
else if (type == Override_CommandGroup)
|
else if (type == Override_CommandGroup)
|
||||||
{
|
{
|
||||||
@@ -797,6 +837,7 @@ void ConCmdManager::UpdateAdminCmdFlags(const char *cmd, OverrideType type, Flag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pInfo->is_admin_set = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -864,7 +905,7 @@ bool ConCmdManager::LookForCommandAdminFlags(const char *cmd, FlagBits *pFlags)
|
|||||||
|
|
||||||
*pFlags = pInfo->admin.eflags;
|
*pFlags = pInfo->admin.eflags;
|
||||||
|
|
||||||
return true;
|
return pInfo->is_admin_set;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConCmdInfo *ConCmdManager::AddOrFindCommand(const char *name, const char *description, int flags)
|
ConCmdInfo *ConCmdManager::AddOrFindCommand(const char *name, const char *description, int flags)
|
||||||
@@ -901,6 +942,7 @@ ConCmdInfo *ConCmdManager::AddOrFindCommand(const char *name, const char *descri
|
|||||||
}
|
}
|
||||||
|
|
||||||
pInfo->pCmd = pCmd;
|
pInfo->pCmd = pCmd;
|
||||||
|
pInfo->is_admin_set = false;
|
||||||
|
|
||||||
sm_trie_insert(m_pCmds, name, pInfo);
|
sm_trie_insert(m_pCmds, name, pInfo);
|
||||||
AddToCmdList(pInfo);
|
AddToCmdList(pInfo);
|
||||||
@@ -953,9 +995,13 @@ void ConCmdManager::OnRootConsoleCommand(const char *cmdname, const CCommand &co
|
|||||||
{
|
{
|
||||||
type = "server";
|
type = "server";
|
||||||
}
|
}
|
||||||
|
else if (cmd.type == Cmd_Console)
|
||||||
|
{
|
||||||
|
type = "console";
|
||||||
|
}
|
||||||
else if (cmd.type == Cmd_Admin)
|
else if (cmd.type == Cmd_Admin)
|
||||||
{
|
{
|
||||||
type = (cmd.pInfo->admin.eflags == 0)?"console":"admin";
|
type = "admin";
|
||||||
}
|
}
|
||||||
name = cmd.pInfo->pCmd->GetName();
|
name = cmd.pInfo->pCmd->GetName();
|
||||||
if (cmd.pHook->helptext.size())
|
if (cmd.pHook->helptext.size())
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ using namespace SourceHook;
|
|||||||
enum CmdType
|
enum CmdType
|
||||||
{
|
{
|
||||||
Cmd_Server,
|
Cmd_Server,
|
||||||
|
Cmd_Console,
|
||||||
Cmd_Admin,
|
Cmd_Admin,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -88,6 +89,7 @@ struct ConCmdInfo
|
|||||||
List<CmdHook *> srvhooks; /**< Hooks as a server command */
|
List<CmdHook *> srvhooks; /**< Hooks as a server command */
|
||||||
List<CmdHook *> conhooks; /**< Hooks as a console command */
|
List<CmdHook *> conhooks; /**< Hooks as a console command */
|
||||||
AdminCmdInfo admin; /**< Admin info, if any */
|
AdminCmdInfo admin; /**< Admin info, if any */
|
||||||
|
bool is_admin_set; /**< Whether or not admin info is set */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef List<ConCmdInfo *> ConCmdList;
|
typedef List<ConCmdInfo *> ConCmdList;
|
||||||
@@ -117,6 +119,7 @@ public: //IConCommandTracker
|
|||||||
void OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name, bool is_read_safe);
|
void OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name, bool is_read_safe);
|
||||||
public:
|
public:
|
||||||
bool AddServerCommand(IPluginFunction *pFunction, const char *name, const char *description, int flags);
|
bool AddServerCommand(IPluginFunction *pFunction, const char *name, const char *description, int flags);
|
||||||
|
bool AddConsoleCommand(IPluginFunction *pFunction, const char *name, const char *description, int flags);
|
||||||
bool AddAdminCommand(IPluginFunction *pFunction,
|
bool AddAdminCommand(IPluginFunction *pFunction,
|
||||||
const char *name,
|
const char *name,
|
||||||
const char *group,
|
const char *group,
|
||||||
|
|||||||
@@ -688,7 +688,7 @@ cell_t ConsoleDetours::InternalDispatch(int client, const CCommand& args)
|
|||||||
if (strcmp(name, "sm") == 0)
|
if (strcmp(name, "sm") == 0)
|
||||||
result = Pl_Continue;
|
result = Pl_Continue;
|
||||||
|
|
||||||
if (result >= Pl_Handled)
|
if (result >= Pl_Stop)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
Listener **plistener = m_CmdLookup.retrieve(name);
|
Listener **plistener = m_CmdLookup.retrieve(name);
|
||||||
|
|||||||
+4
-17
@@ -193,30 +193,17 @@ void CoreConfig::OnRootConsoleCommand(const char *cmdname, const CCommand &comma
|
|||||||
|
|
||||||
if (res == ConfigResult_Reject)
|
if (res == ConfigResult_Reject)
|
||||||
{
|
{
|
||||||
g_RootMenu.ConsolePrint("[SM] Could not set config option \"%s\" to \"%s\". (%s)", option, value, error);
|
g_RootMenu.ConsolePrint("[SM] Could not set config option \"%s\" to \"%s\" (%s)", option, value, error);
|
||||||
} else if (res == ConfigResult_Ignore) {
|
} else if (res == ConfigResult_Ignore) {
|
||||||
g_RootMenu.ConsolePrint("[SM] No such config option \"%s\" exists.", option);
|
g_RootMenu.ConsolePrint("[SM] No such config option \"%s\" exists.", option);
|
||||||
} else {
|
} else {
|
||||||
g_RootMenu.ConsolePrint("[SM] Config option \"%s\" successfully set to \"%s\".", option, value);
|
g_RootMenu.ConsolePrint("Config option \"%s\" successfully set to \"%s.\"", option, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
} else if (argcount >= 3) {
|
|
||||||
const char *option = command.Arg(2);
|
|
||||||
|
|
||||||
const char *value = GetCoreConfigValue(option);
|
|
||||||
|
|
||||||
if (value == NULL)
|
|
||||||
{
|
|
||||||
g_RootMenu.ConsolePrint("[SM] No such config option \"%s\" exists.", option);
|
|
||||||
} else {
|
|
||||||
g_RootMenu.ConsolePrint("[SM] Config option \"%s\" is set to \"%s\".", option, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_RootMenu.ConsolePrint("[SM] Usage: sm config <option> [value]");
|
g_RootMenu.ConsolePrint("[SM] Usage: sm config <option> <value>");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreConfig::Initialize()
|
void CoreConfig::Initialize()
|
||||||
@@ -408,7 +395,7 @@ bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
|
|||||||
FILE *fp = fopen(file, "wt");
|
FILE *fp = fopen(file, "wt");
|
||||||
if (fp)
|
if (fp)
|
||||||
{
|
{
|
||||||
fprintf(fp, "// This file was auto-generated by SourceMod (v%s)\n", SM_VERSION_STRING);
|
fprintf(fp, "// This file was auto-generated by SourceMod (v%s)\n", SM_FULL_VERSION);
|
||||||
fprintf(fp, "// ConVars for plugin \"%s\"\n", pl->GetFilename());
|
fprintf(fp, "// ConVars for plugin \"%s\"\n", pl->GetFilename());
|
||||||
fprintf(fp, "\n\n");
|
fprintf(fp, "\n\n");
|
||||||
|
|
||||||
|
|||||||
+12
-49
@@ -66,8 +66,6 @@ CRemoteExtension::CRemoteExtension(IExtensionInterface *pAPI, const char *filena
|
|||||||
#define GAMEFIX "2.l4d"
|
#define GAMEFIX "2.l4d"
|
||||||
#elif SOURCE_ENGINE == SE_LEFT4DEAD2
|
#elif SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||||
#define GAMEFIX "2.l4d2"
|
#define GAMEFIX "2.l4d2"
|
||||||
#elif SOURCE_ENGINE == SE_NUCLEARDAWN
|
|
||||||
#define GAMEFIX "2.nd"
|
|
||||||
#elif SOURCE_ENGINE == SE_ALIENSWARM
|
#elif SOURCE_ENGINE == SE_ALIENSWARM
|
||||||
#define GAMEFIX "2.swarm"
|
#define GAMEFIX "2.swarm"
|
||||||
#elif SOURCE_ENGINE == SE_ORANGEBOX
|
#elif SOURCE_ENGINE == SE_ORANGEBOX
|
||||||
@@ -76,20 +74,10 @@ CRemoteExtension::CRemoteExtension(IExtensionInterface *pAPI, const char *filena
|
|||||||
#define GAMEFIX "2.bgt"
|
#define GAMEFIX "2.bgt"
|
||||||
#elif SOURCE_ENGINE == SE_EYE
|
#elif SOURCE_ENGINE == SE_EYE
|
||||||
#define GAMEFIX "2.eye"
|
#define GAMEFIX "2.eye"
|
||||||
#elif SOURCE_ENGINE == SE_CSS
|
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
#define GAMEFIX "2.css"
|
#define GAMEFIX "2.ep2v"
|
||||||
#elif SOURCE_ENGINE == SE_HL2DM
|
|
||||||
#define GAMEFIX "2.hl2dm"
|
|
||||||
#elif SOURCE_ENGINE == SE_DODS
|
|
||||||
#define GAMEFIX "2.dods"
|
|
||||||
#elif SOURCE_ENGINE == SE_TF2
|
|
||||||
#define GAMEFIX "2.tf2"
|
|
||||||
#elif SOURCE_ENGINE == SE_DARKMESSIAH
|
#elif SOURCE_ENGINE == SE_DARKMESSIAH
|
||||||
#define GAMEFIX "2.darkm"
|
#define GAMEFIX "2.darkm"
|
||||||
#elif SOURCE_ENGINE == SE_PORTAL2
|
|
||||||
#define GAMEFIX "2.portal2"
|
|
||||||
#elif SOURCE_ENGINE == SE_CSGO
|
|
||||||
#define GAMEFIX "2.csgo"
|
|
||||||
#else
|
#else
|
||||||
#define GAMEFIX "2.ep1"
|
#define GAMEFIX "2.ep1"
|
||||||
#endif //(SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
#endif //(SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||||
@@ -122,31 +110,6 @@ CLocalExtension::CLocalExtension(const char *filename)
|
|||||||
goto found;
|
goto found;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM
|
|
||||||
/* COMPAT HACK: One-halfth, if ep2v, see if there is an engine specific build in the new place with old naming */
|
|
||||||
g_SourceMod.BuildPath(Path_SM,
|
|
||||||
path,
|
|
||||||
PLATFORM_MAX_PATH,
|
|
||||||
"extensions/%s.2.ep2v." PLATFORM_LIB_EXT,
|
|
||||||
filename);
|
|
||||||
|
|
||||||
if (g_LibSys.IsPathFile(path))
|
|
||||||
{
|
|
||||||
goto found;
|
|
||||||
}
|
|
||||||
#elif SOURCE_ENGINE == SE_NUCLEARDAWN
|
|
||||||
g_SourceMod.BuildPath(Path_SM,
|
|
||||||
path,
|
|
||||||
PLATFORM_MAX_PATH,
|
|
||||||
"extensions/%s.2.l4d2." PLATFORM_LIB_EXT,
|
|
||||||
filename);
|
|
||||||
|
|
||||||
if (g_LibSys.IsPathFile(path))
|
|
||||||
{
|
|
||||||
goto found;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* First see if there is an engine specific build! */
|
/* First see if there is an engine specific build! */
|
||||||
g_SourceMod.BuildPath(Path_SM,
|
g_SourceMod.BuildPath(Path_SM,
|
||||||
path,
|
path,
|
||||||
@@ -154,10 +117,10 @@ CLocalExtension::CLocalExtension(const char *filename)
|
|||||||
"extensions/auto." GAMEFIX "/%s." PLATFORM_LIB_EXT,
|
"extensions/auto." GAMEFIX "/%s." PLATFORM_LIB_EXT,
|
||||||
filename);
|
filename);
|
||||||
|
|
||||||
|
normal:
|
||||||
/* Try the "normal" version */
|
/* Try the "normal" version */
|
||||||
if (!g_LibSys.IsPathFile(path))
|
if (!g_LibSys.IsPathFile(path))
|
||||||
{
|
{
|
||||||
normal:
|
|
||||||
g_SourceMod.BuildPath(Path_SM,
|
g_SourceMod.BuildPath(Path_SM,
|
||||||
path,
|
path,
|
||||||
PLATFORM_MAX_PATH,
|
PLATFORM_MAX_PATH,
|
||||||
@@ -836,13 +799,6 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tell it to unload */
|
|
||||||
if (pExt->IsLoaded())
|
|
||||||
{
|
|
||||||
IExtensionInterface *pAPI = pExt->GetAPI();
|
|
||||||
pAPI->OnExtensionUnload();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* First remove us from internal lists */
|
/* First remove us from internal lists */
|
||||||
g_ShareSys.RemoveInterfaces(_pExt);
|
g_ShareSys.RemoveInterfaces(_pExt);
|
||||||
m_Libs.remove(pExt);
|
m_Libs.remove(pExt);
|
||||||
@@ -866,7 +822,7 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt)
|
|||||||
s_iter != pExt->m_Libraries.end();
|
s_iter != pExt->m_Libraries.end();
|
||||||
s_iter++)
|
s_iter++)
|
||||||
{
|
{
|
||||||
g_PluginSys.OnLibraryAction((*s_iter).c_str(), LibraryAction_Removed);
|
g_PluginSys.OnLibraryAction((*s_iter).c_str(), false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Notify and/or unload all dependencies */
|
/* Notify and/or unload all dependencies */
|
||||||
@@ -937,6 +893,13 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tell it to unload */
|
||||||
|
if (pExt->IsLoaded())
|
||||||
|
{
|
||||||
|
IExtensionInterface *pAPI = pExt->GetAPI();
|
||||||
|
pAPI->OnExtensionUnload();
|
||||||
|
}
|
||||||
|
|
||||||
pExt->Unload();
|
pExt->Unload();
|
||||||
delete pExt;
|
delete pExt;
|
||||||
|
|
||||||
@@ -1432,7 +1395,7 @@ void CExtensionManager::AddLibrary(IExtension *pSource, const char *library)
|
|||||||
{
|
{
|
||||||
CExtension *pExt = (CExtension *)pSource;
|
CExtension *pExt = (CExtension *)pSource;
|
||||||
pExt->AddLibrary(library);
|
pExt->AddLibrary(library);
|
||||||
g_PluginSys.OnLibraryAction(library, LibraryAction_Added);
|
g_PluginSys.OnLibraryAction(library, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CExtensionManager::LibraryExists(const char *library)
|
bool CExtensionManager::LibraryExists(const char *library)
|
||||||
|
|||||||
+45
-175
@@ -42,21 +42,17 @@
|
|||||||
#include "logic_bridge.h"
|
#include "logic_bridge.h"
|
||||||
#include <tier0/mem.h>
|
#include <tier0/mem.h>
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
#include <cstrike15_usermessages.pb.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef ICommandLine *(*FakeGetCommandLine)();
|
typedef ICommandLine *(*FakeGetCommandLine)();
|
||||||
|
|
||||||
#if defined _WIN32
|
#if defined _WIN32
|
||||||
#define TIER0_NAME "tier0.dll"
|
#define TIER0_NAME "tier0.dll"
|
||||||
#define VSTDLIB_NAME "vstdlib.dll"
|
#define VSTDLIB_NAME "vstdlib.dll"
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
#define TIER0_NAME "libtier0.dylib"
|
#define TIER0_NAME "libtier0.dylib"
|
||||||
#define VSTDLIB_NAME "libvstdlib.dylib"
|
#define VSTDLIB_NAME "libvstdlib.dylib"
|
||||||
#elif defined __linux__
|
#elif defined __linux__
|
||||||
#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_LEFT4DEAD2
|
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
#define TIER0_NAME "libtier0_srv.so"
|
#define TIER0_NAME "libtier0_srv.so"
|
||||||
#define VSTDLIB_NAME "libvstdlib_srv.so"
|
#define VSTDLIB_NAME "libvstdlib_srv.so"
|
||||||
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
|
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||||
@@ -65,7 +61,7 @@ typedef ICommandLine *(*FakeGetCommandLine)();
|
|||||||
#else
|
#else
|
||||||
#define TIER0_NAME "tier0_i486.so"
|
#define TIER0_NAME "tier0_i486.so"
|
||||||
#define VSTDLIB_NAME "vstdlib_i486.so"
|
#define VSTDLIB_NAME "vstdlib_i486.so"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHalfLife2 g_HL2;
|
CHalfLife2 g_HL2;
|
||||||
@@ -239,44 +235,44 @@ void CHalfLife2::InitCommandLine()
|
|||||||
|
|
||||||
if (!g_LibSys.IsPathFile(path))
|
if (!g_LibSys.IsPathFile(path))
|
||||||
{
|
{
|
||||||
g_Logger.LogError("Could not find path for: " TIER0_NAME);
|
g_Logger.LogError("Could not find path for: " TIER0_NAME);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ILibrary *lib = g_LibSys.OpenLibrary(path, error, sizeof(error));
|
ILibrary *lib = g_LibSys.OpenLibrary(path, error, sizeof(error));
|
||||||
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine_Tier0");
|
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine_Tier0");
|
||||||
|
|
||||||
/* '_Tier0' dropped on Alien Swarm version */
|
/* '_Tier0' dropped on Alien Swarm version */
|
||||||
if (m_pGetCommandLine == NULL)
|
if (m_pGetCommandLine == NULL)
|
||||||
{
|
{
|
||||||
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine");
|
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_pGetCommandLine == NULL)
|
if (m_pGetCommandLine == NULL)
|
||||||
{
|
{
|
||||||
/* We probably have a Ship engine. */
|
/* We probably have a Ship engine. */
|
||||||
lib->CloseLibrary();
|
lib->CloseLibrary();
|
||||||
g_SourceMod.BuildPath(Path_Game, path, sizeof(path), "../bin/" VSTDLIB_NAME);
|
g_SourceMod.BuildPath(Path_Game, path, sizeof(path), "../bin/" VSTDLIB_NAME);
|
||||||
if (!g_LibSys.IsPathFile(path))
|
if (!g_LibSys.IsPathFile(path))
|
||||||
{
|
{
|
||||||
g_Logger.LogError("Could not find path for: " VSTDLIB_NAME);
|
g_Logger.LogError("Could not find path for: " VSTDLIB_NAME);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((lib = g_LibSys.OpenLibrary(path, error, sizeof(error))) == NULL)
|
if ((lib = g_LibSys.OpenLibrary(path, error, sizeof(error))) == NULL)
|
||||||
{
|
{
|
||||||
g_Logger.LogError("Could not load %s: %s", path, error);
|
g_Logger.LogError("Could not load %s: %s", path, error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine");
|
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine");
|
||||||
|
|
||||||
if (m_pGetCommandLine == NULL)
|
if (m_pGetCommandLine == NULL)
|
||||||
{
|
{
|
||||||
g_Logger.LogError("Could not locate any command line functionality");
|
g_Logger.LogError("Could not locate any command line functionality");
|
||||||
}
|
}
|
||||||
|
|
||||||
lib->CloseLibrary();
|
lib->CloseLibrary();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -512,9 +508,7 @@ void CHalfLife2::SetEdictStateChanged(edict_t *pEdict, unsigned short offset)
|
|||||||
|
|
||||||
bool CHalfLife2::TextMsg(int client, int dest, const char *msg)
|
bool CHalfLife2::TextMsg(int client, int dest, const char *msg)
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE != SE_CSGO
|
|
||||||
bf_write *pBitBuf = NULL;
|
bf_write *pBitBuf = NULL;
|
||||||
#endif
|
|
||||||
cell_t players[] = {client};
|
cell_t players[] = {client};
|
||||||
|
|
||||||
if (dest == HUD_PRINTTALK)
|
if (dest == HUD_PRINTTALK)
|
||||||
@@ -527,18 +521,7 @@ bool CHalfLife2::TextMsg(int client, int dest, const char *msg)
|
|||||||
char buffer[192];
|
char buffer[192];
|
||||||
UTIL_Format(buffer, sizeof(buffer), "%s\1\n", msg);
|
UTIL_Format(buffer, sizeof(buffer), "%s\1\n", msg);
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
if ((pBitBuf = g_UserMsgs.StartMessage(m_SayTextMsg, players, 1, USERMSG_RELIABLE)) == NULL)
|
||||||
CCSUsrMsg_SayText *pMsg;
|
|
||||||
if ((pMsg = (CCSUsrMsg_SayText *)g_UserMsgs.StartProtobufMessage(m_SayTextMsg, players, 1, USERMSG_RELIABLE)) == NULL)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
pMsg->set_ent_idx(0);
|
|
||||||
pMsg->set_text(buffer);
|
|
||||||
pMsg->set_chat(false);
|
|
||||||
#else
|
|
||||||
if ((pBitBuf = g_UserMsgs.StartBitBufMessage(m_SayTextMsg, players, 1, USERMSG_RELIABLE)) == NULL)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -546,7 +529,6 @@ bool CHalfLife2::TextMsg(int client, int dest, const char *msg)
|
|||||||
pBitBuf->WriteByte(0);
|
pBitBuf->WriteByte(0);
|
||||||
pBitBuf->WriteString(buffer);
|
pBitBuf->WriteString(buffer);
|
||||||
pBitBuf->WriteByte(1);
|
pBitBuf->WriteByte(1);
|
||||||
#endif
|
|
||||||
|
|
||||||
g_UserMsgs.EndMessage();
|
g_UserMsgs.EndMessage();
|
||||||
|
|
||||||
@@ -554,29 +536,13 @@ bool CHalfLife2::TextMsg(int client, int dest, const char *msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
if ((pBitBuf = g_UserMsgs.StartMessage(m_MsgTextMsg, players, 1, USERMSG_RELIABLE)) == NULL)
|
||||||
CCSUsrMsg_TextMsg *pMsg;
|
|
||||||
if ((pMsg = (CCSUsrMsg_TextMsg *)g_UserMsgs.StartProtobufMessage(m_MsgTextMsg, players, 1, USERMSG_RELIABLE)) == NULL)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Client tries to read all 5 'params' and will crash if less
|
|
||||||
pMsg->set_msg_dst(dest);
|
|
||||||
pMsg->add_params(msg);
|
|
||||||
pMsg->add_params("");
|
|
||||||
pMsg->add_params("");
|
|
||||||
pMsg->add_params("");
|
|
||||||
pMsg->add_params("");
|
|
||||||
#else
|
|
||||||
if ((pBitBuf = g_UserMsgs.StartBitBufMessage(m_MsgTextMsg, players, 1, USERMSG_RELIABLE)) == NULL)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
pBitBuf->WriteByte(dest);
|
pBitBuf->WriteByte(dest);
|
||||||
pBitBuf->WriteString(msg);
|
pBitBuf->WriteString(msg);
|
||||||
#endif
|
|
||||||
|
|
||||||
g_UserMsgs.EndMessage();
|
g_UserMsgs.EndMessage();
|
||||||
|
|
||||||
@@ -585,20 +551,10 @@ bool CHalfLife2::TextMsg(int client, int dest, const char *msg)
|
|||||||
|
|
||||||
bool CHalfLife2::HintTextMsg(int client, const char *msg)
|
bool CHalfLife2::HintTextMsg(int client, const char *msg)
|
||||||
{
|
{
|
||||||
|
bf_write *pBitBuf = NULL;
|
||||||
cell_t players[] = {client};
|
cell_t players[] = {client};
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
if ((pBitBuf = g_UserMsgs.StartMessage(m_HinTextMsg, players, 1, USERMSG_RELIABLE)) == NULL)
|
||||||
CCSUsrMsg_HintText *pMsg;
|
|
||||||
if ((pMsg = (CCSUsrMsg_HintText *)g_UserMsgs.StartProtobufMessage(m_HinTextMsg, players, 1, USERMSG_RELIABLE)) == NULL)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
pMsg->set_text(msg);
|
|
||||||
#else
|
|
||||||
bf_write *pBitBuf = NULL;
|
|
||||||
|
|
||||||
if ((pBitBuf = g_UserMsgs.StartBitBufMessage(m_HinTextMsg, players, 1, USERMSG_RELIABLE)) == NULL)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -609,7 +565,6 @@ bool CHalfLife2::HintTextMsg(int client, const char *msg)
|
|||||||
pBitBuf->WriteByte(1);
|
pBitBuf->WriteByte(1);
|
||||||
}
|
}
|
||||||
pBitBuf->WriteString(msg);
|
pBitBuf->WriteString(msg);
|
||||||
#endif
|
|
||||||
g_UserMsgs.EndMessage();
|
g_UserMsgs.EndMessage();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -617,18 +572,9 @@ bool CHalfLife2::HintTextMsg(int client, const char *msg)
|
|||||||
|
|
||||||
bool CHalfLife2::HintTextMsg(cell_t *players, int count, const char *msg)
|
bool CHalfLife2::HintTextMsg(cell_t *players, int count, const char *msg)
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
CCSUsrMsg_HintText *pMsg;
|
|
||||||
if ((pMsg = (CCSUsrMsg_HintText *)g_UserMsgs.StartProtobufMessage(m_HinTextMsg, players, count, USERMSG_RELIABLE)) == NULL)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
pMsg->set_text(msg);
|
|
||||||
#else
|
|
||||||
bf_write *pBitBuf = NULL;
|
bf_write *pBitBuf = NULL;
|
||||||
|
|
||||||
if ((pBitBuf = g_UserMsgs.StartBitBufMessage(m_HinTextMsg, players, count, USERMSG_RELIABLE)) == NULL)
|
if ((pBitBuf = g_UserMsgs.StartMessage(m_HinTextMsg, players, count, USERMSG_RELIABLE)) == NULL)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -639,8 +585,6 @@ bool CHalfLife2::HintTextMsg(cell_t *players, int count, const char *msg)
|
|||||||
pBitBuf->WriteByte(1);
|
pBitBuf->WriteByte(1);
|
||||||
}
|
}
|
||||||
pBitBuf->WriteString(msg);
|
pBitBuf->WriteString(msg);
|
||||||
#endif
|
|
||||||
|
|
||||||
g_UserMsgs.EndMessage();
|
g_UserMsgs.EndMessage();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -648,23 +592,15 @@ bool CHalfLife2::HintTextMsg(cell_t *players, int count, const char *msg)
|
|||||||
|
|
||||||
bool CHalfLife2::ShowVGUIMenu(int client, const char *name, KeyValues *data, bool show)
|
bool CHalfLife2::ShowVGUIMenu(int client, const char *name, KeyValues *data, bool show)
|
||||||
{
|
{
|
||||||
|
bf_write *pBitBuf = NULL;
|
||||||
KeyValues *SubKey = NULL;
|
KeyValues *SubKey = NULL;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
cell_t players[] = {client};
|
cell_t players[] = {client};
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
if ((pBitBuf = g_UserMsgs.StartMessage(m_VGUIMenu, players, 1, USERMSG_RELIABLE)) == NULL)
|
||||||
CCSUsrMsg_VGUIMenu *pMsg;
|
|
||||||
if ((pMsg = (CCSUsrMsg_VGUIMenu *)g_UserMsgs.StartProtobufMessage(m_VGUIMenu, players, 1, USERMSG_RELIABLE)) == NULL)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
bf_write *pBitBuf = NULL;
|
|
||||||
if ((pBitBuf = g_UserMsgs.StartBitBufMessage(m_VGUIMenu, players, 1, USERMSG_RELIABLE)) == NULL)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
@@ -677,18 +613,6 @@ bool CHalfLife2::ShowVGUIMenu(int client, const char *name, KeyValues *data, boo
|
|||||||
SubKey = data->GetFirstSubKey();
|
SubKey = data->GetFirstSubKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
pMsg->set_name(name);
|
|
||||||
pMsg->set_show(show);
|
|
||||||
|
|
||||||
while (SubKey)
|
|
||||||
{
|
|
||||||
CCSUsrMsg_VGUIMenu_Subkey *key = pMsg->add_subkeys();
|
|
||||||
key->set_name(SubKey->GetName());
|
|
||||||
key->set_str(SubKey->GetString());
|
|
||||||
SubKey = SubKey->GetNextKey();
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
pBitBuf->WriteString(name);
|
pBitBuf->WriteString(name);
|
||||||
pBitBuf->WriteByte((show) ? 1 : 0);
|
pBitBuf->WriteByte((show) ? 1 : 0);
|
||||||
pBitBuf->WriteByte(count);
|
pBitBuf->WriteByte(count);
|
||||||
@@ -698,8 +622,6 @@ bool CHalfLife2::ShowVGUIMenu(int client, const char *name, KeyValues *data, boo
|
|||||||
pBitBuf->WriteString(SubKey->GetString());
|
pBitBuf->WriteString(SubKey->GetString());
|
||||||
SubKey = SubKey->GetNextKey();
|
SubKey = SubKey->GetNextKey();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
g_UserMsgs.EndMessage();
|
g_UserMsgs.EndMessage();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -831,14 +753,6 @@ const char *CHalfLife2::CurrentCommandName()
|
|||||||
|
|
||||||
void CHalfLife2::AddDelayedKick(int client, int userid, const char *msg)
|
void CHalfLife2::AddDelayedKick(int client, int userid, const char *msg)
|
||||||
{
|
{
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
|
||||||
if (!pPlayer || !pPlayer->IsConnected() || pPlayer->IsInKickQueue())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pPlayer->MarkAsBeingKicked();
|
|
||||||
|
|
||||||
DelayedKickInfo kick;
|
DelayedKickInfo kick;
|
||||||
|
|
||||||
kick.client = client;
|
kick.client = client;
|
||||||
@@ -1160,47 +1074,3 @@ const char *CHalfLife2::GetEntityClassname(CBaseEntity *pEntity)
|
|||||||
|
|
||||||
return *(const char **)(((unsigned char *)pEntity) + offset);
|
return *(const char **)(((unsigned char *)pEntity) + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
|
||||||
static bool ResolveFuzzyMapName(const char *fuzzyName, char *outFullname, int size)
|
|
||||||
{
|
|
||||||
static ConCommand *pHelperCmd = g_pCVar->FindCommand("changelevel");
|
|
||||||
if (!pHelperCmd || !pHelperCmd->CanAutoComplete())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
static size_t helperCmdLen = strlen(pHelperCmd->GetName());
|
|
||||||
|
|
||||||
CUtlVector<CUtlString> results;
|
|
||||||
pHelperCmd->AutoCompleteSuggest(fuzzyName, results);
|
|
||||||
if (results.Count() == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Results come back as you'd see in autocomplete. (ie. "changelevel fullmapnamehere"),
|
|
||||||
// so skip ahead to start of map path/name
|
|
||||||
|
|
||||||
// Like the engine, we're only going to deal with the first match.
|
|
||||||
|
|
||||||
strncopy(outFullname, &results[0][helperCmdLen + 1], size);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool CHalfLife2::IsMapValid(const char *map)
|
|
||||||
{
|
|
||||||
if (!map || !map[0])
|
|
||||||
return false;
|
|
||||||
|
|
||||||
bool ret = engine->IsMapValid(map);
|
|
||||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
|
||||||
if (!ret)
|
|
||||||
{
|
|
||||||
static char szFuzzyName[PLATFORM_MAX_PATH];
|
|
||||||
if (ResolveFuzzyMapName(map, szFuzzyName, sizeof(szFuzzyName)))
|
|
||||||
{
|
|
||||||
ret = engine->IsMapValid(szFuzzyName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -45,9 +45,6 @@
|
|||||||
#include <datamap.h>
|
#include <datamap.h>
|
||||||
#include <ihandleentity.h>
|
#include <ihandleentity.h>
|
||||||
#include <tier0/icommandline.h>
|
#include <tier0/icommandline.h>
|
||||||
#if SOURCE_ENGINE >= SE_PORTAL2
|
|
||||||
#include <string_t.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class CCommand;
|
class CCommand;
|
||||||
|
|
||||||
@@ -91,7 +88,6 @@ struct DelayedKickInfo
|
|||||||
char buffer[384];
|
char buffer[384];
|
||||||
};
|
};
|
||||||
|
|
||||||
// copy from game/shared/entitylist_base.h
|
|
||||||
class CEntInfo
|
class CEntInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -99,10 +95,6 @@ public:
|
|||||||
int m_SerialNumber;
|
int m_SerialNumber;
|
||||||
CEntInfo *m_pPrev;
|
CEntInfo *m_pPrev;
|
||||||
CEntInfo *m_pNext;
|
CEntInfo *m_pNext;
|
||||||
#if SOURCE_ENGINE >= SE_PORTAL2
|
|
||||||
string_t m_iName;
|
|
||||||
string_t m_iClassName;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CHalfLife2 :
|
class CHalfLife2 :
|
||||||
@@ -149,7 +141,6 @@ public: //IGameHelpers
|
|||||||
ICommandLine *GetValveCommandLine();
|
ICommandLine *GetValveCommandLine();
|
||||||
const char *GetEntityClassname(edict_t *pEdict);
|
const char *GetEntityClassname(edict_t *pEdict);
|
||||||
const char *GetEntityClassname(CBaseEntity *pEntity);
|
const char *GetEntityClassname(CBaseEntity *pEntity);
|
||||||
bool IsMapValid(const char *map);
|
|
||||||
public:
|
public:
|
||||||
void AddToFakeCliCmdQueue(int client, int userid, const char *cmd);
|
void AddToFakeCliCmdQueue(int client, int userid, const char *cmd);
|
||||||
void ProcessFakeCliCmdQueue();
|
void ProcessFakeCliCmdQueue();
|
||||||
|
|||||||
+38
-47
@@ -579,7 +579,6 @@ HandleError HandleSystem::CloneHandle(QHandle *pHandle, unsigned int index, Hand
|
|||||||
}
|
}
|
||||||
|
|
||||||
pNewHandle->clone = index;
|
pNewHandle->clone = index;
|
||||||
pNewHandle->object = NULL;
|
|
||||||
pHandle->refcount++;
|
pHandle->refcount++;
|
||||||
|
|
||||||
*newhandle = new_handle;
|
*newhandle = new_handle;
|
||||||
@@ -660,14 +659,6 @@ void HandleSystem::GetHandleUnchecked(Handle_t hndl, QHandle *& pHandle, unsigne
|
|||||||
|
|
||||||
HandleError HandleSystem::FreeHandle(QHandle *pHandle, unsigned int index)
|
HandleError HandleSystem::FreeHandle(QHandle *pHandle, unsigned int index)
|
||||||
{
|
{
|
||||||
if (pHandle->is_destroying)
|
|
||||||
{
|
|
||||||
/* Someone tried to free this recursively.
|
|
||||||
* We'll just ignore this safely.
|
|
||||||
*/
|
|
||||||
return HandleError_None;
|
|
||||||
}
|
|
||||||
|
|
||||||
QHandleType *pType = &m_Types[pHandle->type];
|
QHandleType *pType = &m_Types[pHandle->type];
|
||||||
|
|
||||||
if (pHandle->clone)
|
if (pHandle->clone)
|
||||||
@@ -682,7 +673,6 @@ HandleError HandleSystem::FreeHandle(QHandle *pHandle, unsigned int index)
|
|||||||
pMaster = &m_Handles[master];
|
pMaster = &m_Handles[master];
|
||||||
|
|
||||||
/* Release the clone now */
|
/* Release the clone now */
|
||||||
pHandle->is_destroying = true;
|
|
||||||
ReleasePrimHandle(index);
|
ReleasePrimHandle(index);
|
||||||
|
|
||||||
/* Decrement the master's reference count */
|
/* Decrement the master's reference count */
|
||||||
@@ -691,27 +681,20 @@ HandleError HandleSystem::FreeHandle(QHandle *pHandle, unsigned int index)
|
|||||||
/* Type should be the same but do this anyway... */
|
/* Type should be the same but do this anyway... */
|
||||||
pType = &m_Types[pMaster->type];
|
pType = &m_Types[pMaster->type];
|
||||||
pMaster->is_destroying = true;
|
pMaster->is_destroying = true;
|
||||||
if (pMaster->object)
|
pType->dispatch->OnHandleDestroy(pMaster->type, pMaster->object);
|
||||||
{
|
|
||||||
pType->dispatch->OnHandleDestroy(pMaster->type, pMaster->object);
|
|
||||||
}
|
|
||||||
ReleasePrimHandle(master);
|
ReleasePrimHandle(master);
|
||||||
}
|
}
|
||||||
} else if (pHandle->set == HandleSet_Identity) {
|
} else if (pHandle->set == HandleSet_Identity) {
|
||||||
/* If we're an identity, skip all this stuff!
|
/* If we're an identity, skip all this stuff!
|
||||||
* NOTE: SHARESYS DOES NOT CARE ABOUT THE DESTRUCTOR
|
* NOTE: SHARESYS DOES NOT CARE ABOUT THE DESTRUCTOR
|
||||||
*/
|
*/
|
||||||
pHandle->is_destroying = true;
|
|
||||||
ReleasePrimHandle(index);
|
ReleasePrimHandle(index);
|
||||||
} else {
|
} else {
|
||||||
/* Decrement, free if necessary */
|
/* Decrement, free if necessary */
|
||||||
if (--pHandle->refcount == 0)
|
if (--pHandle->refcount == 0)
|
||||||
{
|
{
|
||||||
pHandle->is_destroying = true;
|
pHandle->is_destroying = true;
|
||||||
if (pHandle->object)
|
pType->dispatch->OnHandleDestroy(pHandle->type, pHandle->object);
|
||||||
{
|
|
||||||
pType->dispatch->OnHandleDestroy(pHandle->type, pHandle->object);
|
|
||||||
}
|
|
||||||
ReleasePrimHandle(index);
|
ReleasePrimHandle(index);
|
||||||
} else {
|
} else {
|
||||||
/* We must be cloned, so mark ourselves as freed */
|
/* We must be cloned, so mark ourselves as freed */
|
||||||
@@ -744,6 +727,14 @@ HandleError HandleSystem::FreeHandle(Handle_t handle, const HandleSecurity *pSec
|
|||||||
return HandleError_Access;
|
return HandleError_Access;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pHandle->is_destroying)
|
||||||
|
{
|
||||||
|
/* Someone tried to free this recursively.
|
||||||
|
* We'll just ignore this safely.
|
||||||
|
*/
|
||||||
|
return HandleError_None;
|
||||||
|
}
|
||||||
|
|
||||||
return FreeHandle(pHandle, index);
|
return FreeHandle(pHandle, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -802,9 +793,6 @@ void HandleSystem::UnlinkHandleFromOwner(QHandle *pHandle, unsigned int index)
|
|||||||
assert(pHandle->owner == 0);
|
assert(pHandle->owner == 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pHandle->owner = NULL;
|
|
||||||
|
|
||||||
/* Note that since 0 is an invalid handle, if any of these links are 0,
|
/* Note that since 0 is an invalid handle, if any of these links are 0,
|
||||||
* the data can still be set.
|
* the data can still be set.
|
||||||
*/
|
*/
|
||||||
@@ -929,9 +917,29 @@ bool HandleSystem::RemoveType(HandleType_t type, IdentityToken_t *ident)
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (pHandle->clone)
|
||||||
FreeHandle(pHandle, i);
|
{
|
||||||
|
/* Get parent */
|
||||||
|
QHandle *pOther = &m_Handles[pHandle->clone];
|
||||||
|
if (--pOther->refcount == 0)
|
||||||
|
{
|
||||||
|
/* Free! */
|
||||||
|
dispatch->OnHandleDestroy(type, pOther->object);
|
||||||
|
ReleasePrimHandle(pHandle->clone);
|
||||||
|
}
|
||||||
|
/* Unlink ourselves since we don't have a reference count */
|
||||||
|
ReleasePrimHandle(i);
|
||||||
|
} else {
|
||||||
|
/* If it's not a clone, we still have to check the reference count.
|
||||||
|
* Either way, we'll be destroyed eventually because the handle types do not change.
|
||||||
|
*/
|
||||||
|
if (--pHandle->refcount == 0)
|
||||||
|
{
|
||||||
|
/* Free! */
|
||||||
|
dispatch->OnHandleDestroy(type, pHandle->object);
|
||||||
|
ReleasePrimHandle(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (pType->opened == 0)
|
if (pType->opened == 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@@ -985,11 +993,12 @@ bool HandleSystem::InitAccessDefaults(TypeAccess *pTypeAccess, HandleAccess *pHa
|
|||||||
|
|
||||||
bool HandleSystem::TryAndFreeSomeHandles()
|
bool HandleSystem::TryAndFreeSomeHandles()
|
||||||
{
|
{
|
||||||
|
IPluginIterator *pl_iter = g_PluginSys.GetPluginIterator();
|
||||||
IPlugin *highest_owner = NULL;
|
IPlugin *highest_owner = NULL;
|
||||||
unsigned int highest_handle_count = 0;
|
unsigned int highest_handle_count = 0;
|
||||||
|
|
||||||
/* Search all plugins */
|
/* Search all plugins */
|
||||||
for (IPluginIterator *pl_iter = g_PluginSys.GetPluginIterator(); pl_iter->MorePlugins(); pl_iter->NextPlugin())
|
while (pl_iter->MorePlugins())
|
||||||
{
|
{
|
||||||
IPlugin *plugin = pl_iter->GetPlugin();
|
IPlugin *plugin = pl_iter->GetPlugin();
|
||||||
IdentityToken_t *identity = plugin->GetIdentity();
|
IdentityToken_t *identity = plugin->GetIdentity();
|
||||||
@@ -1018,6 +1027,8 @@ bool HandleSystem::TryAndFreeSomeHandles()
|
|||||||
highest_owner = plugin;
|
highest_owner = plugin;
|
||||||
highest_handle_count = handle_count;
|
highest_handle_count = handle_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pl_iter->NextPlugin();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (highest_owner == NULL || highest_handle_count == 0)
|
if (highest_owner == NULL || highest_handle_count == 0)
|
||||||
@@ -1084,32 +1095,12 @@ void HandleSystem::Dump(HANDLE_REPORTER rep)
|
|||||||
const char *type = "ANON";
|
const char *type = "ANON";
|
||||||
QHandleType *pType = &m_Types[m_Handles[i].type];
|
QHandleType *pType = &m_Types[m_Handles[i].type];
|
||||||
unsigned int size = 0;
|
unsigned int size = 0;
|
||||||
unsigned int parentIdx;
|
|
||||||
bool bresult;
|
|
||||||
if (pType->nameIdx != -1)
|
if (pType->nameIdx != -1)
|
||||||
{
|
{
|
||||||
type = m_strtab->GetString(pType->nameIdx);
|
type = m_strtab->GetString(pType->nameIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((parentIdx = m_Handles[i].clone) != 0)
|
|
||||||
{
|
|
||||||
if (m_Handles[parentIdx].refcount > 0)
|
|
||||||
{
|
|
||||||
size = 0;
|
|
||||||
bresult = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bresult = pType->dispatch->GetHandleApproxSize(m_Handles[parentIdx].type, m_Handles[parentIdx].object, &size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bresult = pType->dispatch->GetHandleApproxSize(m_Handles[i].type, m_Handles[i].object, &size);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pType->dispatch->GetDispatchVersion() < HANDLESYS_MEMUSAGE_MIN_VERSION
|
if (pType->dispatch->GetDispatchVersion() < HANDLESYS_MEMUSAGE_MIN_VERSION
|
||||||
|| !bresult)
|
|| !pType->dispatch->GetHandleApproxSize(m_Handles[i].type, m_Handles[i].object, &size))
|
||||||
{
|
{
|
||||||
rep("0x%08x\t%-20.20s\t%-20.20s\t%-10.10s", index, owner, type, "-1");
|
rep("0x%08x\t%-20.20s\t%-20.20s\t%-10.10s", index, owner, type, "-1");
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -149,7 +149,7 @@ void Logger::_NewMapFile()
|
|||||||
} else {
|
} else {
|
||||||
char date[32];
|
char date[32];
|
||||||
strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime);
|
strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime);
|
||||||
fprintf(fp, "L %s: SourceMod log file started (file \"L%02d%02d%03d.log\") (Version \"%s\")\n", date, curtime->tm_mon + 1, curtime->tm_mday, i, SM_VERSION_STRING);
|
fprintf(fp, "L %s: SourceMod log file started (file \"L%02d%02d%03d.log\") (Version \"%s\")\n", date, curtime->tm_mon + 1, curtime->tm_mday, i, SM_FULL_VERSION);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -362,7 +362,7 @@ void Logger::LogMessage(const char *vafmt, ...)
|
|||||||
char date[32];
|
char date[32];
|
||||||
m_DailyPrintHdr = false;
|
m_DailyPrintHdr = false;
|
||||||
strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime);
|
strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime);
|
||||||
fprintf(fp, "L %s: SourceMod log file session started (file \"L%04d%02d%02d.log\") (Version \"%s\")\n", date, curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday, SM_VERSION_STRING);
|
fprintf(fp, "L %s: SourceMod log file session started (file \"L%04d%02d%02d.log\") (Version \"%s\")\n", date, curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday, SM_FULL_VERSION);
|
||||||
}
|
}
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, vafmt);
|
va_start(ap, vafmt);
|
||||||
|
|||||||
+14
-45
@@ -4,11 +4,9 @@
|
|||||||
SMSDK = ..
|
SMSDK = ..
|
||||||
HL2SDK_ORIG = ../../hl2sdk
|
HL2SDK_ORIG = ../../hl2sdk
|
||||||
HL2SDK_OB = ../../hl2sdk-ob
|
HL2SDK_OB = ../../hl2sdk-ob
|
||||||
HL2SDK_CSS = ../../hl2sdk-css
|
|
||||||
HL2SDK_OB_VALVE = ../../hl2sdk-ob-valve
|
HL2SDK_OB_VALVE = ../../hl2sdk-ob-valve
|
||||||
HL2SDK_L4D = ../../hl2sdk-l4d
|
HL2SDK_L4D = ../../hl2sdk-l4d
|
||||||
HL2SDK_L4D2 = ../../hl2sdk-l4d2
|
HL2SDK_L4D2 = ../../hl2sdk-l4d2
|
||||||
HL2SDK_CSGO = ../../hl2sdk-csgo
|
|
||||||
MMSOURCE = ../../mmsource-central
|
MMSOURCE = ../../mmsource-central
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
@@ -24,8 +22,8 @@ OBJECTS = AdminCache.cpp CDataPack.cpp ConCmdManager.cpp ConVarManager.cpp CoreC
|
|||||||
frame_hooks.cpp concmd_cleaner.cpp NextMap.cpp \
|
frame_hooks.cpp concmd_cleaner.cpp NextMap.cpp \
|
||||||
NativeOwner.cpp logic_bridge.cpp ConsoleDetours.cpp
|
NativeOwner.cpp logic_bridge.cpp ConsoleDetours.cpp
|
||||||
OBJECTS += smn_bitbuffer.cpp smn_console.cpp smn_core.cpp \
|
OBJECTS += smn_bitbuffer.cpp smn_console.cpp smn_core.cpp \
|
||||||
smn_database.cpp smn_entities.cpp smn_events.cpp \
|
smn_entities.cpp smn_events.cpp smn_fakenatives.cpp \
|
||||||
smn_fakenatives.cpp smn_filesystem.cpp smn_halflife.cpp \
|
smn_filesystem.cpp smn_halflife.cpp \
|
||||||
smn_keyvalues.cpp smn_player.cpp \
|
smn_keyvalues.cpp smn_player.cpp \
|
||||||
smn_usermsgs.cpp smn_menus.cpp smn_vector.cpp \
|
smn_usermsgs.cpp smn_menus.cpp smn_vector.cpp \
|
||||||
smn_hudtext.cpp smn_nextmap.cpp
|
smn_hudtext.cpp smn_nextmap.cpp
|
||||||
@@ -50,7 +48,7 @@ CPP = gcc
|
|||||||
|
|
||||||
override ENGSET = false
|
override ENGSET = false
|
||||||
|
|
||||||
ifneq (,$(filter original orangebox css orangeboxvalve left4dead left4dead2 csgo,$(ENGINE)))
|
ifneq (,$(filter original orangebox orangeboxvalve left4dead left4dead2,$(ENGINE)))
|
||||||
override ENGSET = true
|
override ENGSET = true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -70,26 +68,19 @@ ifeq "$(ENGINE)" "orangebox"
|
|||||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||||
BINARY = sourcemod.2.ep2.so
|
BINARY = sourcemod.2.ep2.so
|
||||||
endif
|
endif
|
||||||
ifeq "$(ENGINE)" "css"
|
ifeq "$(ENGINE)" "orangeboxvalve"
|
||||||
HL2SDK = $(HL2SDK_CSS)
|
HL2SDK = $(HL2SDK_OB_VALVE)
|
||||||
HL2LIB = $(HL2SDK)/lib/linux
|
HL2LIB = $(HL2SDK)/lib/linux
|
||||||
CFLAGS += -DSOURCE_ENGINE=6
|
CFLAGS += -DSOURCE_ENGINE=6
|
||||||
METAMOD = $(MMSOURCE)/core
|
METAMOD = $(MMSOURCE)/core
|
||||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||||
BINARY = sourcemod.2.css.so
|
#-I$(HL2SDK)/common
|
||||||
endif
|
|
||||||
ifeq "$(ENGINE)" "orangeboxvalve"
|
|
||||||
HL2SDK = $(HL2SDK_OB_VALVE)
|
|
||||||
HL2LIB = $(HL2SDK)/lib/linux
|
|
||||||
CFLAGS += -DSOURCE_ENGINE=7
|
|
||||||
METAMOD = $(MMSOURCE)/core
|
|
||||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
|
||||||
BINARY = sourcemod.2.ep2v.so
|
BINARY = sourcemod.2.ep2v.so
|
||||||
endif
|
endif
|
||||||
ifeq "$(ENGINE)" "left4dead"
|
ifeq "$(ENGINE)" "left4dead"
|
||||||
HL2SDK = $(HL2SDK_L4D)
|
HL2SDK = $(HL2SDK_L4D)
|
||||||
HL2LIB = $(HL2SDK)/lib/linux
|
HL2LIB = $(HL2SDK)/lib/linux
|
||||||
CFLAGS += -DSOURCE_ENGINE=8
|
CFLAGS += -DSOURCE_ENGINE=7
|
||||||
METAMOD = $(MMSOURCE)/core
|
METAMOD = $(MMSOURCE)/core
|
||||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||||
BINARY = sourcemod.2.l4d.so
|
BINARY = sourcemod.2.l4d.so
|
||||||
@@ -97,19 +88,11 @@ endif
|
|||||||
ifeq "$(ENGINE)" "left4dead2"
|
ifeq "$(ENGINE)" "left4dead2"
|
||||||
HL2SDK = $(HL2SDK_L4D2)
|
HL2SDK = $(HL2SDK_L4D2)
|
||||||
HL2LIB = $(HL2SDK)/lib/linux
|
HL2LIB = $(HL2SDK)/lib/linux
|
||||||
CFLAGS += -DSOURCE_ENGINE=9
|
CFLAGS += -DSOURCE_ENGINE=8
|
||||||
METAMOD = $(MMSOURCE)/core
|
METAMOD = $(MMSOURCE)/core
|
||||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||||
BINARY = sourcemod.2.l4d2.so
|
BINARY = sourcemod.2.l4d2.so
|
||||||
endif
|
endif
|
||||||
ifeq "$(ENGINE)" "csgo"
|
|
||||||
HL2SDK = $(HL2SDK_CSGO)
|
|
||||||
HL2LIB = $(HL2SDK)/lib/linux
|
|
||||||
CFLAGS += -DSOURCE_ENGINE=12
|
|
||||||
METAMOD = $(MMSOURCE)/core
|
|
||||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
|
||||||
BINARY = sourcemod.2.csgo.so
|
|
||||||
endif
|
|
||||||
|
|
||||||
HL2PUB = $(HL2SDK)/public
|
HL2PUB = $(HL2SDK)/public
|
||||||
|
|
||||||
@@ -131,37 +114,23 @@ ifneq (,$(filter original orangebox left4dead,$(ENGINE)))
|
|||||||
LIB_SUFFIX = _i486.$(LIB_EXT)
|
LIB_SUFFIX = _i486.$(LIB_EXT)
|
||||||
else
|
else
|
||||||
LIB_PREFIX = lib
|
LIB_PREFIX = lib
|
||||||
ifneq (,$(filter orangeboxvalve css,$(ENGINE)))
|
LIB_SUFFIX = .$(LIB_EXT)
|
||||||
ifneq "$(OS)" "Darwin"
|
|
||||||
LIB_SUFFIX = _srv.$(LIB_EXT)
|
|
||||||
else
|
|
||||||
LIB_SUFFIX = .$(LIB_EXT)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
LIB_SUFFIX = .$(LIB_EXT)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 \
|
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 \
|
||||||
-DSE_CSS=6 -DSE_ORANGEBOXVALVE=7 -DSE_LEFT4DEAD=8 -DSE_LEFT4DEAD2=9 -DSE_ALIENSWARM=10 \
|
-DSE_ORANGEBOXVALVE=6 -DSE_LEFT4DEAD=7 -DSE_LEFT4DEAD2=8 -DSE_ALIENSWARM=9
|
||||||
-DSE_PORTAL2=11 -DSE_CSGO=12
|
|
||||||
|
|
||||||
LINK += $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a $(LIB_PREFIX)vstdlib$(LIB_SUFFIX) \
|
LINK += $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a $(LIB_PREFIX)vstdlib$(LIB_SUFFIX) \
|
||||||
$(LIB_PREFIX)tier0$(LIB_SUFFIX) -static-libgcc
|
$(LIB_PREFIX)tier0$(LIB_SUFFIX) -static-libgcc
|
||||||
|
|
||||||
ifeq "$(ENGINE)" "csgo"
|
|
||||||
LINK += $(HL2LIB)/interfaces_i486.a
|
|
||||||
endif
|
|
||||||
|
|
||||||
INCLUDE += -I. -I.. -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/mathlib -I$(HL2PUB)/vstdlib \
|
INCLUDE += -I. -I.. -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/mathlib -I$(HL2PUB)/vstdlib \
|
||||||
-I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 -I$(METAMOD) -I$(METAMOD)/sourcehook \
|
-I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 -I$(METAMOD) -I$(METAMOD)/sourcehook \
|
||||||
-I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
|
-I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
|
||||||
|
|
||||||
CFLAGS += -D_LINUX -DPOSIX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
|
CFLAGS += -D_LINUX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
|
||||||
-D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror \
|
-D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror \
|
||||||
-Wno-uninitialized -Wno-unused -Wno-switch -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H \
|
-Wno-uninitialized -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -DSM_DEFAULT_THREADER -m32
|
||||||
-DSM_DEFAULT_THREADER -m32 -DCOMPILER_GCC
|
CPPFLAGS += -Wno-non-virtual-dtor -fno-exceptions -fno-rtti
|
||||||
CPPFLAGS += -Wno-non-virtual-dtor -Wno-overloaded-virtual -fno-threadsafe-statics -fno-exceptions -fno-rtti
|
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
|
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
|
||||||
@@ -199,7 +168,7 @@ all: check
|
|||||||
check:
|
check:
|
||||||
if [ "$(ENGSET)" = "false" ]; then \
|
if [ "$(ENGSET)" = "false" ]; then \
|
||||||
echo "You must supply one of the following values for ENGINE:"; \
|
echo "You must supply one of the following values for ENGINE:"; \
|
||||||
echo "csgo, left4dead2, left4dead, orangeboxvalve, css, orangebox, or original"; \
|
echo "left4dead2, left4dead, orangeboxvalve, orangebox, or original"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -322,23 +322,17 @@ void BaseMenuStyle::ClientPressedKey(int client, unsigned int key_press)
|
|||||||
if (pCollideable)
|
if (pCollideable)
|
||||||
{
|
{
|
||||||
const Vector & pos = pCollideable->GetCollisionOrigin();
|
const Vector & pos = pCollideable->GetCollisionOrigin();
|
||||||
|
|
||||||
enginesound->EmitSound(filter,
|
enginesound->EmitSound(filter,
|
||||||
client,
|
client,
|
||||||
CHAN_AUTO,
|
CHAN_AUTO,
|
||||||
#if SOURCE_ENGINE >= SE_PORTAL2
|
|
||||||
sound,
|
|
||||||
-1,
|
|
||||||
#endif
|
|
||||||
sound,
|
sound,
|
||||||
VOL_NORM,
|
VOL_NORM,
|
||||||
ATTN_NORM,
|
ATTN_NORM,
|
||||||
#if SOURCE_ENGINE >= SE_PORTAL2
|
|
||||||
0,
|
|
||||||
#endif
|
|
||||||
0,
|
0,
|
||||||
PITCH_NORM,
|
PITCH_NORM,
|
||||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
0,
|
0,
|
||||||
#endif
|
#endif
|
||||||
&pos);
|
&pos);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,28 +39,12 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "logic_bridge.h"
|
#include "logic_bridge.h"
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
#include <google/protobuf/descriptor.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
#include <game/shared/csgo/protobuf/cstrike15_usermessages.pb.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern const char *g_RadioNumTable[];
|
extern const char *g_RadioNumTable[];
|
||||||
CRadioStyle g_RadioMenuStyle;
|
CRadioStyle g_RadioMenuStyle;
|
||||||
int g_ShowMenuId = -1;
|
int g_ShowMenuId = -1;
|
||||||
bool g_bRadioInit = false;
|
bool g_bRadioInit = false;
|
||||||
unsigned int g_RadioMenuTimeout = 0;
|
unsigned int g_RadioMenuTimeout = 0;
|
||||||
|
|
||||||
// back, next, exit
|
|
||||||
#define MAX_PAGINATION_OPTIONS 3
|
|
||||||
|
|
||||||
#define MAX_MENUSLOT_KEYS 10
|
|
||||||
|
|
||||||
static unsigned int s_RadioMaxPageItems = MAX_MENUSLOT_KEYS;
|
|
||||||
|
|
||||||
|
|
||||||
CRadioStyle::CRadioStyle()
|
CRadioStyle::CRadioStyle()
|
||||||
{
|
{
|
||||||
m_players = new CRadioMenuPlayer[256+1];
|
m_players = new CRadioMenuPlayer[256+1];
|
||||||
@@ -106,18 +90,6 @@ void CRadioStyle::OnSourceModLevelChange(const char *mapName)
|
|||||||
g_RadioMenuTimeout = 0;
|
g_RadioMenuTimeout = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *items = g_pGameConf->GetKeyValue("RadioMenuMaxPageItems");
|
|
||||||
if (items != NULL)
|
|
||||||
{
|
|
||||||
int value = atoi(items);
|
|
||||||
|
|
||||||
// Only override the mostly-safe default if it's a sane value
|
|
||||||
if (value > MAX_PAGINATION_OPTIONS && value <= MAX_MENUSLOT_KEYS)
|
|
||||||
{
|
|
||||||
s_RadioMaxPageItems = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_Menus.AddStyle(this);
|
g_Menus.AddStyle(this);
|
||||||
g_Menus.SetDefaultStyle(this);
|
g_Menus.SetDefaultStyle(this);
|
||||||
|
|
||||||
@@ -163,22 +135,13 @@ static unsigned int g_last_holdtime = 0;
|
|||||||
static unsigned int g_last_client_count = 0;
|
static unsigned int g_last_client_count = 0;
|
||||||
static int g_last_clients[256];
|
static int g_last_clients[256];
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
void CRadioStyle::OnUserMessage(int msg_id, protobuf::Message &msg, IRecipientFilter *pFilter)
|
|
||||||
#else
|
|
||||||
void CRadioStyle::OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter)
|
void CRadioStyle::OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int count = pFilter->GetRecipientCount();
|
int count = pFilter->GetRecipientCount();
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
int c = ((CCSUsrMsg_ShowMenu &)msg).display_time();
|
|
||||||
#else
|
|
||||||
bf_read br(bf->GetBasePointer(), 3);
|
bf_read br(bf->GetBasePointer(), 3);
|
||||||
|
|
||||||
br.ReadWord();
|
br.ReadWord();
|
||||||
int c = br.ReadChar();
|
int c = br.ReadChar();
|
||||||
#endif
|
|
||||||
|
|
||||||
g_last_holdtime = (c == -1) ? 0 : (unsigned)c;
|
g_last_holdtime = (c == -1) ? 0 : (unsigned)c;
|
||||||
|
|
||||||
@@ -226,7 +189,7 @@ IBaseMenu *CRadioStyle::CreateMenu(IMenuHandler *pHandler, IdentityToken_t *pOwn
|
|||||||
|
|
||||||
unsigned int CRadioStyle::GetMaxPageItems()
|
unsigned int CRadioStyle::GetMaxPageItems()
|
||||||
{
|
{
|
||||||
return s_RadioMaxPageItems;
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CRadioStyle::GetStyleName()
|
const char *CRadioStyle::GetStyleName()
|
||||||
@@ -344,7 +307,7 @@ unsigned int CRadioDisplay::GetCurrentKey()
|
|||||||
|
|
||||||
bool CRadioDisplay::SetCurrentKey(unsigned int key)
|
bool CRadioDisplay::SetCurrentKey(unsigned int key)
|
||||||
{
|
{
|
||||||
if (key < m_NextPos || m_NextPos > s_RadioMaxPageItems)
|
if (key < m_NextPos || m_NextPos > 10)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -380,7 +343,7 @@ void CRadioDisplay::DrawTitle(const char *text, bool onlyIfEmpty/* =false */)
|
|||||||
|
|
||||||
unsigned int CRadioDisplay::DrawItem(const ItemDrawInfo &item)
|
unsigned int CRadioDisplay::DrawItem(const ItemDrawInfo &item)
|
||||||
{
|
{
|
||||||
if (m_NextPos > s_RadioMaxPageItems || !CanDrawItem(item.style))
|
if (m_NextPos > 10 || !CanDrawItem(item.style))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -489,15 +452,6 @@ void CRadioMenuPlayer::Radio_Refresh()
|
|||||||
time = menuHoldTime - (unsigned int)(gpGlobals->curtime - menuStartTime);
|
time = menuHoldTime - (unsigned int)(gpGlobals->curtime - menuStartTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
// If or when we need to support multiple games per engine with this, we can switch to reflection
|
|
||||||
// TODO: find what happens past 240 on CS:GO
|
|
||||||
CCSUsrMsg_ShowMenu *msg = (CCSUsrMsg_ShowMenu *)g_UserMsgs.StartProtobufMessage(g_ShowMenuId, players, 1, USERMSG_BLOCKHOOKS);
|
|
||||||
msg->set_bits_valid_slots(display_keys);
|
|
||||||
msg->set_display_time(time);
|
|
||||||
msg->set_menu_string(ptr);
|
|
||||||
g_UserMsgs.EndMessage();
|
|
||||||
#else
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (len > 240)
|
if (len > 240)
|
||||||
@@ -505,8 +459,7 @@ void CRadioMenuPlayer::Radio_Refresh()
|
|||||||
save = ptr[240];
|
save = ptr[240];
|
||||||
ptr[240] = '\0';
|
ptr[240] = '\0';
|
||||||
}
|
}
|
||||||
|
bf_write *buffer = g_UserMsgs.StartMessage(g_ShowMenuId, players, 1, USERMSG_BLOCKHOOKS);
|
||||||
bf_write *buffer = g_UserMsgs.StartBitBufMessage(g_ShowMenuId, players, 1, USERMSG_BLOCKHOOKS);
|
|
||||||
buffer->WriteWord(display_keys);
|
buffer->WriteWord(display_keys);
|
||||||
buffer->WriteChar(time ? time : -1);
|
buffer->WriteChar(time ? time : -1);
|
||||||
buffer->WriteByte( (len > 240) ? 1 : 0 );
|
buffer->WriteByte( (len > 240) ? 1 : 0 );
|
||||||
@@ -523,7 +476,6 @@ void CRadioMenuPlayer::Radio_Refresh()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
display_last_refresh = gpGlobals->curtime;
|
display_last_refresh = gpGlobals->curtime;
|
||||||
}
|
}
|
||||||
@@ -559,7 +511,6 @@ unsigned int CRadioDisplay::GetApproxMemUsage()
|
|||||||
CRadioMenu::CRadioMenu(IMenuHandler *pHandler, IdentityToken_t *pOwner) :
|
CRadioMenu::CRadioMenu(IMenuHandler *pHandler, IdentityToken_t *pOwner) :
|
||||||
CBaseMenu(pHandler, &g_RadioMenuStyle, pOwner)
|
CBaseMenu(pHandler, &g_RadioMenuStyle, pOwner)
|
||||||
{
|
{
|
||||||
m_Pagination = s_RadioMaxPageItems - MAX_PAGINATION_OPTIONS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CRadioMenu::SetExtOption(MenuOption option, const void *valuePtr)
|
bool CRadioMenu::SetExtOption(MenuOption option, const void *valuePtr)
|
||||||
@@ -600,17 +551,6 @@ bool CRadioMenu::DisplayAtItem(int client,
|
|||||||
time);
|
time);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CRadioMenu::SetPagination(unsigned int itemsPerPage)
|
|
||||||
{
|
|
||||||
const unsigned int maxPerPage = s_RadioMaxPageItems - MAX_PAGINATION_OPTIONS;
|
|
||||||
if (itemsPerPage > maxPerPage)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CBaseMenu::SetPagination(itemsPerPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CRadioMenu::Cancel_Finally()
|
void CRadioMenu::Cancel_Finally()
|
||||||
{
|
{
|
||||||
g_RadioMenuStyle.CancelMenu(this);
|
g_RadioMenuStyle.CancelMenu(this);
|
||||||
|
|||||||
+2
-11
@@ -37,7 +37,7 @@
|
|||||||
#include "MenuStyle_Base.h"
|
#include "MenuStyle_Base.h"
|
||||||
#include "sourcemm_api.h"
|
#include "sourcemm_api.h"
|
||||||
#include <IPlayerHelpers.h>
|
#include <IPlayerHelpers.h>
|
||||||
#include "UserMessages.h"
|
#include <IUserMessages.h>
|
||||||
#include "sm_fastlink.h"
|
#include "sm_fastlink.h"
|
||||||
#include <sh_stack.h>
|
#include <sh_stack.h>
|
||||||
#include <compat_wrappers.h>
|
#include <compat_wrappers.h>
|
||||||
@@ -65,11 +65,7 @@ private:
|
|||||||
class CRadioStyle :
|
class CRadioStyle :
|
||||||
public BaseMenuStyle,
|
public BaseMenuStyle,
|
||||||
public SMGlobalClass,
|
public SMGlobalClass,
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
public IUserMessageListener
|
||||||
public IProtobufUserMessageListener
|
|
||||||
#else
|
|
||||||
public IBitBufUserMessageListener
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CRadioStyle();
|
CRadioStyle();
|
||||||
@@ -88,11 +84,7 @@ public: //IMenuStyle
|
|||||||
unsigned int GetMaxPageItems();
|
unsigned int GetMaxPageItems();
|
||||||
unsigned int GetApproxMemUsage();
|
unsigned int GetApproxMemUsage();
|
||||||
public: //IUserMessageListener
|
public: //IUserMessageListener
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
void OnUserMessage(int msg_id, protobuf::Message &msg, IRecipientFilter *pFilter);
|
|
||||||
#else
|
|
||||||
void OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter);
|
void OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter);
|
||||||
#endif
|
|
||||||
void OnUserMessageSent(int msg_id);
|
void OnUserMessageSent(int msg_id);
|
||||||
public:
|
public:
|
||||||
bool IsSupported();
|
bool IsSupported();
|
||||||
@@ -150,7 +142,6 @@ public:
|
|||||||
unsigned int time,
|
unsigned int time,
|
||||||
unsigned int start_item,
|
unsigned int start_item,
|
||||||
IMenuHandler *alt_handler/* =NULL */);
|
IMenuHandler *alt_handler/* =NULL */);
|
||||||
bool SetPagination(unsigned int itemsPerPage);
|
|
||||||
void Cancel_Finally();
|
void Cancel_Finally();
|
||||||
unsigned int GetApproxMemUsage();
|
unsigned int GetApproxMemUsage();
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-3
@@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
#include "NextMap.h"
|
#include "NextMap.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
#include "HalfLife2.h"
|
|
||||||
#include "sourcemm_api.h"
|
#include "sourcemm_api.h"
|
||||||
#include "sm_stringutil.h"
|
#include "sm_stringutil.h"
|
||||||
#include "sourcehook.h"
|
#include "sourcehook.h"
|
||||||
@@ -110,7 +109,7 @@ const char *NextMapManager::GetNextMap()
|
|||||||
|
|
||||||
bool NextMapManager::SetNextMap(const char *map)
|
bool NextMapManager::SetNextMap(const char *map)
|
||||||
{
|
{
|
||||||
if (!g_HL2.IsMapValid(map))
|
if (!engine->IsMapValid(map))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -134,7 +133,7 @@ void NextMapManager::HookChangeLevel(const char *map, const char *unknown, const
|
|||||||
|
|
||||||
const char *newmap = sm_nextmap.GetString();
|
const char *newmap = sm_nextmap.GetString();
|
||||||
|
|
||||||
if (newmap[0] == 0 || !g_HL2.IsMapValid(newmap))
|
if (newmap[0] == 0 || !engine->IsMapValid(newmap))
|
||||||
{
|
{
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-129
@@ -116,8 +116,6 @@ PlayerManager::PlayerManager()
|
|||||||
m_SourceTVUserId = -1;
|
m_SourceTVUserId = -1;
|
||||||
m_ReplayUserId = -1;
|
m_ReplayUserId = -1;
|
||||||
|
|
||||||
m_bAuthstringValidation = false; // don't use steam auth by default... yet
|
|
||||||
|
|
||||||
m_UserIdLookUp = new int[USHRT_MAX+1];
|
m_UserIdLookUp = new int[USHRT_MAX+1];
|
||||||
memset(m_UserIdLookUp, 0, sizeof(int) * (USHRT_MAX+1));
|
memset(m_UserIdLookUp, 0, sizeof(int) * (USHRT_MAX+1));
|
||||||
}
|
}
|
||||||
@@ -231,17 +229,6 @@ ConfigResult PlayerManager::OnSourceModConfigChanged(const char *key,
|
|||||||
return ConfigResult_Reject;
|
return ConfigResult_Reject;
|
||||||
}
|
}
|
||||||
return ConfigResult_Accept;
|
return ConfigResult_Accept;
|
||||||
} else if (strcmp( key, "SteamAuthstringValidation" ) == 0) {
|
|
||||||
if (strcasecmp(value, "yes") == 0)
|
|
||||||
{
|
|
||||||
m_bAuthstringValidation = true;
|
|
||||||
} else if ( strcasecmp(value, "no") == 0) {
|
|
||||||
m_bAuthstringValidation = false;
|
|
||||||
} else {
|
|
||||||
UTIL_Format(error, maxlength, "Invalid value: must be \"yes\" or \"no\"");
|
|
||||||
return ConfigResult_Reject;
|
|
||||||
}
|
|
||||||
return ConfigResult_Accept;
|
|
||||||
}
|
}
|
||||||
return ConfigResult_Ignore;
|
return ConfigResult_Ignore;
|
||||||
}
|
}
|
||||||
@@ -249,7 +236,7 @@ ConfigResult PlayerManager::OnSourceModConfigChanged(const char *key,
|
|||||||
void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
||||||
{
|
{
|
||||||
static ConVar *tv_enable = icvar->FindVar("tv_enable");
|
static ConVar *tv_enable = icvar->FindVar("tv_enable");
|
||||||
#if SOURCE_ENGINE == SE_TF2
|
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
static ConVar *replay_enable = icvar->FindVar("replay_enable");
|
static ConVar *replay_enable = icvar->FindVar("replay_enable");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -259,7 +246,7 @@ void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int cl
|
|||||||
ICommandLine *commandLine = g_HL2.GetValveCommandLine();
|
ICommandLine *commandLine = g_HL2.GetValveCommandLine();
|
||||||
m_bIsSourceTVActive = (tv_enable && tv_enable->GetBool() && (!commandLine || commandLine->FindParm("-nohltv") == 0));
|
m_bIsSourceTVActive = (tv_enable && tv_enable->GetBool() && (!commandLine || commandLine->FindParm("-nohltv") == 0));
|
||||||
m_bIsReplayActive = false;
|
m_bIsReplayActive = false;
|
||||||
#if SOURCE_ENGINE == SE_TF2
|
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
m_bIsReplayActive = (replay_enable && replay_enable->GetBool());
|
m_bIsReplayActive = (replay_enable && replay_enable->GetBool());
|
||||||
#endif
|
#endif
|
||||||
m_PlayersSinceActive = 0;
|
m_PlayersSinceActive = 0;
|
||||||
@@ -367,18 +354,11 @@ void PlayerManager::RunAuthChecks()
|
|||||||
{
|
{
|
||||||
pPlayer = &m_Players[m_AuthQueue[i]];
|
pPlayer = &m_Players[m_AuthQueue[i]];
|
||||||
authstr = engine->GetPlayerNetworkIDString(pPlayer->m_pEdict);
|
authstr = engine->GetPlayerNetworkIDString(pPlayer->m_pEdict);
|
||||||
pPlayer->SetAuthString(authstr);
|
|
||||||
|
|
||||||
if (!pPlayer->IsAuthStringValidated())
|
|
||||||
{
|
|
||||||
continue; // we're using steam auth, and steam doesn't know about this player yet so we can't do anything about them for now
|
|
||||||
}
|
|
||||||
|
|
||||||
if (authstr && authstr[0] != '\0'
|
if (authstr && authstr[0] != '\0'
|
||||||
&& (strcmp(authstr, "STEAM_ID_PENDING") != 0))
|
&& (strcmp(authstr, "STEAM_ID_PENDING") != 0))
|
||||||
{
|
{
|
||||||
/* Set authorization */
|
/* Set authorization */
|
||||||
pPlayer->Authorize();
|
pPlayer->Authorize(authstr);
|
||||||
|
|
||||||
/* Mark as removed from queue */
|
/* Mark as removed from queue */
|
||||||
unsigned int client = m_AuthQueue[i];
|
unsigned int client = m_AuthQueue[i];
|
||||||
@@ -553,8 +533,7 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
|||||||
/* Run manual connection routines */
|
/* Run manual connection routines */
|
||||||
char error[255];
|
char error[255];
|
||||||
const char *authid = engine->GetPlayerNetworkIDString(pEntity);
|
const char *authid = engine->GetPlayerNetworkIDString(pEntity);
|
||||||
pPlayer->SetAuthString(authid);
|
pPlayer->Authorize(authid);
|
||||||
pPlayer->Authorize();
|
|
||||||
pPlayer->m_bFakeClient = true;
|
pPlayer->m_bFakeClient = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -565,34 +544,15 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
|||||||
* Checking playerinfo's IsHLTV and IsReplay would be better and less
|
* Checking playerinfo's IsHLTV and IsReplay would be better and less
|
||||||
* error-prone but will always show false until later in the frame,
|
* error-prone but will always show false until later in the frame,
|
||||||
* after PutInServer and Activate, and we want it now!
|
* after PutInServer and Activate, and we want it now!
|
||||||
*
|
|
||||||
* These checks are hairy as hell due to differences between engines and games.
|
|
||||||
*
|
|
||||||
* Most engines use "Replay" and "SourceTV" as bot names for these when they're
|
|
||||||
* created. EP2V, CSS and Nuclear Dawn (but not L4D2) differ from this by now using
|
|
||||||
* replay_/tv_name directly when creating the bot(s). To complicate it slightly
|
|
||||||
* further, the cvar can be empty and the engine's fallback to "unnamed" will be used.
|
|
||||||
* We can maybe just rip out the name checks at some point and rely solely on whether
|
|
||||||
* they're enabled and the join order.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This doesn't actually get incremented until OnClientConnect. Fake it to check.
|
// This doesn't actually get incremented until OnClientConnect. Fake it to check.
|
||||||
int newCount = m_PlayersSinceActive + 1;
|
int newCount = m_PlayersSinceActive + 1;
|
||||||
|
|
||||||
int userId = engine->GetPlayerUserId(pEntity);
|
int userId = engine->GetPlayerUserId(pEntity);
|
||||||
#if (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2)
|
|
||||||
static ConVar *tv_name = icvar->FindVar("tv_name");
|
|
||||||
#endif
|
|
||||||
#if SOURCE_ENGINE == SE_TF2
|
|
||||||
static ConVar *replay_name = icvar->FindVar("replay_name");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_TF2
|
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
if (m_bIsReplayActive && newCount == 1
|
if (m_bIsReplayActive && newCount == 1
|
||||||
&& (m_ReplayUserId == userId
|
&& (m_ReplayUserId == userId || strcmp(playername, "Replay") == 0))
|
||||||
|| (replay_name && strcmp(playername, replay_name->GetString()) == 0) || (replay_name && replay_name->GetString()[0] == 0 && strcmp(playername, "unnamed") == 0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
pPlayer->m_bIsReplay = true;
|
pPlayer->m_bIsReplay = true;
|
||||||
m_ReplayUserId = userId;
|
m_ReplayUserId = userId;
|
||||||
@@ -602,15 +562,7 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
|||||||
if (m_bIsSourceTVActive
|
if (m_bIsSourceTVActive
|
||||||
&& ((!m_bIsReplayActive && newCount == 1)
|
&& ((!m_bIsReplayActive && newCount == 1)
|
||||||
|| (m_bIsReplayActive && newCount == 2))
|
|| (m_bIsReplayActive && newCount == 2))
|
||||||
&& (m_SourceTVUserId == userId
|
&& (m_SourceTVUserId == userId || strcmp(playername, "SourceTV") == 0)
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
|| strcmp(playername, "GOTV") == 0
|
|
||||||
#elif (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_NUCLEARDAWN)
|
|
||||||
|| (tv_name && strcmp(playername, tv_name->GetString()) == 0) || (tv_name && tv_name->GetString()[0] == 0 && strcmp(playername, "unnamed") == 0)
|
|
||||||
#else
|
|
||||||
|| strcmp(playername, "SourceTV") == 0
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
pPlayer->m_bIsSourceTV = true;
|
pPlayer->m_bIsSourceTV = true;
|
||||||
@@ -800,23 +752,21 @@ void PlayerManager::OnClientCommand(edict_t *pEntity)
|
|||||||
}
|
}
|
||||||
else if (args.ArgC() > 1 && strcmp(args.Arg(1), "credits") == 0)
|
else if (args.ArgC() > 1 && strcmp(args.Arg(1), "credits") == 0)
|
||||||
{
|
{
|
||||||
ClientConsolePrint(pEntity,
|
|
||||||
"SourceMod would not be possible without:");
|
|
||||||
ClientConsolePrint(pEntity,
|
|
||||||
" David \"BAILOPAN\" Anderson, Matt \"pRED\" Woodrow");
|
|
||||||
ClientConsolePrint(pEntity,
|
|
||||||
" Scott \"DS\" Ehlert, Fyren");
|
|
||||||
ClientConsolePrint(pEntity,
|
|
||||||
" Nicholas \"psychonic\" Hastings, Asher \"asherkin\" Baker");
|
|
||||||
ClientConsolePrint(pEntity,
|
ClientConsolePrint(pEntity,
|
||||||
" Borja \"faluco\" Ferrer, Pavol \"PM OnoTo\" Marko");
|
"SourceMod would not be possible without:");
|
||||||
|
ClientConsolePrint(pEntity,
|
||||||
|
" David \"BAILOPAN\" Anderson, Borja \"faluco\" Ferrer");
|
||||||
|
ClientConsolePrint(pEntity,
|
||||||
|
" Scott \"DS\" Ehlert, Matt \"pRED\" Woodrow");
|
||||||
|
ClientConsolePrint(pEntity,
|
||||||
|
" Michael \"ferret\" McKoy, Pavol \"PM OnoTo\" Marko");
|
||||||
ClientConsolePrint(pEntity,
|
ClientConsolePrint(pEntity,
|
||||||
"SourceMod is open source under the GNU General Public License.");
|
"SourceMod is open source under the GNU General Public License.");
|
||||||
RETURN_META(MRES_SUPERCEDE);
|
RETURN_META(MRES_SUPERCEDE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientConsolePrint(pEntity,
|
ClientConsolePrint(pEntity,
|
||||||
"SourceMod %s, by AlliedModders LLC", SM_VERSION_STRING);
|
"SourceMod %s, by AlliedModders LLC", SM_FULL_VERSION);
|
||||||
ClientConsolePrint(pEntity,
|
ClientConsolePrint(pEntity,
|
||||||
"To see running plugins, type \"sm plugins\"");
|
"To see running plugins, type \"sm plugins\"");
|
||||||
ClientConsolePrint(pEntity,
|
ClientConsolePrint(pEntity,
|
||||||
@@ -913,7 +863,8 @@ void PlayerManager::OnClientSettingsChanged(edict_t *pEntity)
|
|||||||
const char *networkid_force;
|
const char *networkid_force;
|
||||||
if ((networkid_force = engine->GetClientConVarValue(client, "networkid_force")) && networkid_force[0] != '\0')
|
if ((networkid_force = engine->GetClientConVarValue(client, "networkid_force")) && networkid_force[0] != '\0')
|
||||||
{
|
{
|
||||||
unsigned int accountId = pPlayer->GetSteamAccountID();
|
unsigned long long *steamId = (unsigned long long *)engine->GetClientSteamID(pEntity);
|
||||||
|
unsigned int accountId = steamId ? (*steamId & 0xFFFFFFFF) : 0;
|
||||||
g_Logger.LogMessage("\"%s<%d><STEAM_1:%d:%d><>\" has bad networkid (id \"%s\") (ip \"%s\")",
|
g_Logger.LogMessage("\"%s<%d><STEAM_1:%d:%d><>\" has bad networkid (id \"%s\") (ip \"%s\")",
|
||||||
new_name, pPlayer->GetUserId(), accountId & 1, accountId >> 1, networkid_force, pPlayer->GetIPAddress());
|
new_name, pPlayer->GetUserId(), accountId & 1, accountId >> 1, networkid_force, pPlayer->GetIPAddress());
|
||||||
|
|
||||||
@@ -929,9 +880,7 @@ void PlayerManager::OnClientSettingsChanged(edict_t *pEntity)
|
|||||||
{
|
{
|
||||||
if (!CheckSetAdminName(client, pPlayer, id))
|
if (!CheckSetAdminName(client, pPlayer, id))
|
||||||
{
|
{
|
||||||
char kickMsg[128];
|
pPlayer->Kick("Your name is reserved by SourceMod; set your password to use it.");
|
||||||
logicore.CoreTranslate(kickMsg, sizeof(kickMsg), "%T", 2, NULL, "Name Reserved", &client);
|
|
||||||
pPlayer->Kick(kickMsg);
|
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
} else if ((id = g_Admins.FindAdminByIdentity("name", old_name)) != INVALID_ADMIN_ID) {
|
} else if ((id = g_Admins.FindAdminByIdentity("name", old_name)) != INVALID_ADMIN_ID) {
|
||||||
@@ -1259,12 +1208,11 @@ void PlayerManager::ProcessCommandTarget(cmd_target_info_t *info)
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!pTarget->IsConnected())
|
if (!pTarget->IsConnected() || !pTarget->IsAuthorized())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const char *authstr = pTarget->GetAuthString(false); // We want to make it easy for people to be kicked/banned, so don't require validation for command targets.
|
if (strcmp(pTarget->GetAuthString(), new_pattern) == 0)
|
||||||
if (authstr && strcmp(authstr, new_pattern) == 0)
|
|
||||||
{
|
{
|
||||||
if ((info->reason = FilterCommandTarget(pAdmin, pTarget, info->flags))
|
if ((info->reason = FilterCommandTarget(pAdmin, pTarget, info->flags))
|
||||||
== COMMAND_TARGET_VALID)
|
== COMMAND_TARGET_VALID)
|
||||||
@@ -1374,7 +1322,7 @@ void PlayerManager::ProcessCommandTarget(cmd_target_info_t *info)
|
|||||||
if ((info->flags & COMMAND_FILTER_NO_BOTS) == COMMAND_FILTER_NO_BOTS)
|
if ((info->flags & COMMAND_FILTER_NO_BOTS) == COMMAND_FILTER_NO_BOTS)
|
||||||
{
|
{
|
||||||
info->num_targets = 0;
|
info->num_targets = 0;
|
||||||
info->reason = COMMAND_TARGET_NOT_HUMAN;
|
info->reason = COMMAND_FILTER_NO_BOTS;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
strncopy(info->target_name, "all bots", info->target_name_maxlength);
|
strncopy(info->target_name, "all bots", info->target_name_maxlength);
|
||||||
@@ -1577,7 +1525,6 @@ CPlayer::CPlayer()
|
|||||||
m_bIsSourceTV = false;
|
m_bIsSourceTV = false;
|
||||||
m_bIsReplay = false;
|
m_bIsReplay = false;
|
||||||
m_Serial.value = -1;
|
m_Serial.value = -1;
|
||||||
m_SteamAccountID = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::Initialize(const char *name, const char *ip, edict_t *pEntity)
|
void CPlayer::Initialize(const char *name, const char *ip, edict_t *pEntity)
|
||||||
@@ -1623,20 +1570,15 @@ void CPlayer::Connect()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::SetAuthString(const char *steamid)
|
void CPlayer::Authorize(const char *steamid)
|
||||||
{
|
{
|
||||||
if (m_IsAuthorized)
|
if (m_IsAuthorized)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_AuthID.assign(steamid);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure a valid AuthString is set before calling.
|
|
||||||
void CPlayer::Authorize()
|
|
||||||
{
|
|
||||||
m_IsAuthorized = true;
|
m_IsAuthorized = true;
|
||||||
|
m_AuthID.assign(steamid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::Disconnect()
|
void CPlayer::Disconnect()
|
||||||
@@ -1657,7 +1599,6 @@ void CPlayer::Disconnect()
|
|||||||
m_bIsSourceTV = false;
|
m_bIsSourceTV = false;
|
||||||
m_bIsReplay = false;
|
m_bIsReplay = false;
|
||||||
m_Serial.value = -1;
|
m_Serial.value = -1;
|
||||||
m_SteamAccountID = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::SetName(const char *name)
|
void CPlayer::SetName(const char *name)
|
||||||
@@ -1680,45 +1621,11 @@ const char *CPlayer::GetIPAddress()
|
|||||||
return m_Ip.c_str();
|
return m_Ip.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CPlayer::GetAuthString(bool validated)
|
const char *CPlayer::GetAuthString()
|
||||||
{
|
{
|
||||||
if (validated && !IsAuthStringValidated())
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return m_AuthID.c_str();
|
return m_AuthID.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CPlayer::GetSteamAccountID(bool validated)
|
|
||||||
{
|
|
||||||
if (IsFakeClient() || (validated && !IsAuthStringValidated()))
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_SteamAccountID != 0)
|
|
||||||
{
|
|
||||||
return m_SteamAccountID;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE < SE_ORANGEBOX
|
|
||||||
const char * pAuth = GetAuthString();
|
|
||||||
/* STEAM_0:1:123123 | STEAM_ID_LAN | STEAM_ID_PENDING */
|
|
||||||
if (pAuth && (strlen(pAuth) > 10) && pAuth[8] != '_')
|
|
||||||
{
|
|
||||||
m_SteamAccountID = (atoi(&pAuth[8]) | (atoi(&pAuth[10]) << 1));
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
unsigned long long *steamId = (unsigned long long *)engine->GetClientSteamID(m_pEdict);
|
|
||||||
if (steamId)
|
|
||||||
{
|
|
||||||
m_SteamAccountID = (*steamId & 0xFFFFFFFF);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return m_SteamAccountID;
|
|
||||||
}
|
|
||||||
|
|
||||||
edict_t *CPlayer::GetEdict()
|
edict_t *CPlayer::GetEdict()
|
||||||
{
|
{
|
||||||
return m_pEdict;
|
return m_pEdict;
|
||||||
@@ -1744,18 +1651,6 @@ bool CPlayer::IsAuthorized()
|
|||||||
return m_IsAuthorized;
|
return m_IsAuthorized;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPlayer::IsAuthStringValidated()
|
|
||||||
{
|
|
||||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
|
||||||
if (g_Players.m_bAuthstringValidation && !g_HL2.IsLANServer())
|
|
||||||
{
|
|
||||||
return engine->IsClientFullyAuthenticated(m_pEdict);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
IPlayerInfo *CPlayer::GetPlayerInfo()
|
IPlayerInfo *CPlayer::GetPlayerInfo()
|
||||||
{
|
{
|
||||||
if (m_pEdict->GetUnknown())
|
if (m_pEdict->GetUnknown())
|
||||||
|
|||||||
@@ -69,8 +69,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
const char *GetName();
|
const char *GetName();
|
||||||
const char *GetIPAddress();
|
const char *GetIPAddress();
|
||||||
const char *GetAuthString(bool validated = true);
|
const char *GetAuthString();
|
||||||
unsigned int GetSteamAccountID(bool validated = true);
|
|
||||||
edict_t *GetEdict();
|
edict_t *GetEdict();
|
||||||
bool IsInGame();
|
bool IsInGame();
|
||||||
bool WasCountedAsInGame();
|
bool WasCountedAsInGame();
|
||||||
@@ -100,11 +99,9 @@ private:
|
|||||||
void Disconnect();
|
void Disconnect();
|
||||||
void SetName(const char *name);
|
void SetName(const char *name);
|
||||||
void DumpAdmin(bool deleting);
|
void DumpAdmin(bool deleting);
|
||||||
void SetAuthString(const char *auth);
|
void Authorize(const char *auth);
|
||||||
void Authorize();
|
|
||||||
void Authorize_Post();
|
void Authorize_Post();
|
||||||
void DoPostConnectAuthorization();
|
void DoPostConnectAuthorization();
|
||||||
bool IsAuthStringValidated();
|
|
||||||
private:
|
private:
|
||||||
bool m_IsConnected;
|
bool m_IsConnected;
|
||||||
bool m_IsInGame;
|
bool m_IsInGame;
|
||||||
@@ -127,7 +124,6 @@ private:
|
|||||||
bool m_bIsSourceTV;
|
bool m_bIsSourceTV;
|
||||||
bool m_bIsReplay;
|
bool m_bIsReplay;
|
||||||
serial_t m_Serial;
|
serial_t m_Serial;
|
||||||
unsigned int m_SteamAccountID;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PlayerManager :
|
class PlayerManager :
|
||||||
@@ -221,7 +217,6 @@ private:
|
|||||||
unsigned int *m_AuthQueue;
|
unsigned int *m_AuthQueue;
|
||||||
String m_PassInfoVar;
|
String m_PassInfoVar;
|
||||||
bool m_QueryLang;
|
bool m_QueryLang;
|
||||||
bool m_bAuthstringValidation; // are we validating admins with steam before authorizing?
|
|
||||||
bool m_bIsListenServer;
|
bool m_bIsListenServer;
|
||||||
int m_ListenClient;
|
int m_ListenClient;
|
||||||
bool m_bIsSourceTVActive;
|
bool m_bIsSourceTVActive;
|
||||||
|
|||||||
+83
-25
@@ -501,14 +501,14 @@ void CPlugin::SetSilentlyFailed(bool sf)
|
|||||||
m_bSilentlyFailed = sf;
|
m_bSilentlyFailed = sf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlugin::LibraryActions(LibraryAction action)
|
void CPlugin::LibraryActions(bool dropping)
|
||||||
{
|
{
|
||||||
List<String>::iterator iter;
|
List<String>::iterator iter;
|
||||||
for (iter = m_Libraries.begin();
|
for (iter = m_Libraries.begin();
|
||||||
iter != m_Libraries.end();
|
iter != m_Libraries.end();
|
||||||
iter++)
|
iter++)
|
||||||
{
|
{
|
||||||
g_PluginSys.OnLibraryAction((*iter).c_str(), action);
|
g_PluginSys.OnLibraryAction((*iter).c_str(), true, dropping);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -523,7 +523,7 @@ bool CPlugin::SetPauseState(bool paused)
|
|||||||
|
|
||||||
if (paused)
|
if (paused)
|
||||||
{
|
{
|
||||||
LibraryActions(LibraryAction_Removed);
|
LibraryActions(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPluginFunction *pFunction = m_pRuntime->GetFunctionByName("OnPluginPauseChange");
|
IPluginFunction *pFunction = m_pRuntime->GetFunctionByName("OnPluginPauseChange");
|
||||||
@@ -547,7 +547,7 @@ bool CPlugin::SetPauseState(bool paused)
|
|||||||
|
|
||||||
if (!paused)
|
if (!paused)
|
||||||
{
|
{
|
||||||
LibraryActions(LibraryAction_Added);
|
LibraryActions(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -1495,7 +1495,7 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng
|
|||||||
s_iter != pPlugin->m_Libraries.end();
|
s_iter != pPlugin->m_Libraries.end();
|
||||||
s_iter++)
|
s_iter++)
|
||||||
{
|
{
|
||||||
OnLibraryAction((*s_iter).c_str(), LibraryAction_Added);
|
OnLibraryAction((*s_iter).c_str(), true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* :TODO: optimize? does this even matter? */
|
/* :TODO: optimize? does this even matter? */
|
||||||
@@ -1597,7 +1597,7 @@ bool CPluginManager::UnloadPlugin(IPlugin *plugin)
|
|||||||
s_iter != pPlugin->m_Libraries.end();
|
s_iter != pPlugin->m_Libraries.end();
|
||||||
s_iter++)
|
s_iter++)
|
||||||
{
|
{
|
||||||
OnLibraryAction((*s_iter).c_str(), LibraryAction_Removed);
|
OnLibraryAction((*s_iter).c_str(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<IPluginsListener *>::iterator iter;
|
List<IPluginsListener *>::iterator iter;
|
||||||
@@ -1605,15 +1605,14 @@ bool CPluginManager::UnloadPlugin(IPlugin *plugin)
|
|||||||
|
|
||||||
if (pPlugin->GetStatus() <= Plugin_Error)
|
if (pPlugin->GetStatus() <= Plugin_Error)
|
||||||
{
|
{
|
||||||
/* Notify plugin */
|
|
||||||
pPlugin->Call_OnPluginEnd();
|
|
||||||
|
|
||||||
/* Notify listeners of unloading */
|
/* Notify listeners of unloading */
|
||||||
for (iter=m_listeners.begin(); iter!=m_listeners.end(); iter++)
|
for (iter=m_listeners.begin(); iter!=m_listeners.end(); iter++)
|
||||||
{
|
{
|
||||||
pListener = (*iter);
|
pListener = (*iter);
|
||||||
pListener->OnPluginUnloaded(pPlugin);
|
pListener->OnPluginUnloaded(pPlugin);
|
||||||
}
|
}
|
||||||
|
/* Notify plugin */
|
||||||
|
pPlugin->Call_OnPluginEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
pPlugin->DropEverything();
|
pPlugin->DropEverything();
|
||||||
@@ -1914,9 +1913,6 @@ void CPluginManager::OnSourceModAllInitialized()
|
|||||||
g_RootMenu.AddRootConsoleCommand("plugins", "Manage Plugins", this);
|
g_RootMenu.AddRootConsoleCommand("plugins", "Manage Plugins", this);
|
||||||
|
|
||||||
g_ShareSys.AddInterface(NULL, this);
|
g_ShareSys.AddInterface(NULL, this);
|
||||||
|
|
||||||
m_pOnLibraryAdded = g_Forwards.CreateForward("OnLibraryAdded", ET_Ignore, 1, NULL, Param_String);
|
|
||||||
m_pOnLibraryRemoved = g_Forwards.CreateForward("OnLibraryRemoved", ET_Ignore, 1, NULL, Param_String);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginManager::OnSourceModShutdown()
|
void CPluginManager::OnSourceModShutdown()
|
||||||
@@ -1928,9 +1924,6 @@ void CPluginManager::OnSourceModShutdown()
|
|||||||
g_HandleSys.RemoveType(g_PluginType, m_MyIdent);
|
g_HandleSys.RemoveType(g_PluginType, m_MyIdent);
|
||||||
g_ShareSys.DestroyIdentType(g_PluginIdent);
|
g_ShareSys.DestroyIdentType(g_PluginIdent);
|
||||||
g_ShareSys.DestroyIdentity(m_MyIdent);
|
g_ShareSys.DestroyIdentity(m_MyIdent);
|
||||||
|
|
||||||
g_Forwards.ReleaseForward(m_pOnLibraryAdded);
|
|
||||||
g_Forwards.ReleaseForward(m_pOnLibraryRemoved);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigResult CPluginManager::OnSourceModConfigChanged(const char *key,
|
ConfigResult CPluginManager::OnSourceModConfigChanged(const char *key,
|
||||||
@@ -2557,18 +2550,83 @@ CPlugin *CPluginManager::GetPluginFromIdentity(IdentityToken_t *pToken)
|
|||||||
return (CPlugin *)(pToken->ptr);
|
return (CPlugin *)(pToken->ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginManager::OnLibraryAction(const char *lib, LibraryAction action)
|
void CPluginManager::OnLibraryAction(const char *lib, bool is_a_plugin, bool drop)
|
||||||
{
|
{
|
||||||
switch (action)
|
List<CPlugin *>::iterator iter;
|
||||||
|
|
||||||
|
struct _pl
|
||||||
{
|
{
|
||||||
case LibraryAction_Removed:
|
cell_t name;
|
||||||
m_pOnLibraryRemoved->PushString(lib);
|
cell_t file;
|
||||||
m_pOnLibraryRemoved->Execute(NULL);
|
cell_t required;
|
||||||
break;
|
} *plc;
|
||||||
case LibraryAction_Added:
|
|
||||||
m_pOnLibraryAdded->PushString(lib);
|
struct _ext
|
||||||
m_pOnLibraryAdded->Execute(NULL);
|
{
|
||||||
break;
|
cell_t name;
|
||||||
|
cell_t file;
|
||||||
|
cell_t autoload;
|
||||||
|
cell_t required;
|
||||||
|
} *ext;
|
||||||
|
|
||||||
|
const char *name = drop ? "OnLibraryRemoved" : "OnLibraryAdded";
|
||||||
|
|
||||||
|
for (iter=m_plugins.begin();
|
||||||
|
iter!=m_plugins.end();
|
||||||
|
iter++)
|
||||||
|
{
|
||||||
|
CPlugin *pl = (*iter);
|
||||||
|
if (pl->GetStatus() != Plugin_Running)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
IPluginContext *pContext = pl->GetBaseContext();
|
||||||
|
IPluginFunction *pf = pContext->GetFunctionByName(name);
|
||||||
|
if (!pf)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
uint32_t num_vars = pContext->GetPubVarsNum();
|
||||||
|
for (uint32_t i=0; i<num_vars; i++)
|
||||||
|
{
|
||||||
|
sp_pubvar_t *pubvar;
|
||||||
|
if (pContext->GetPubvarByIndex(i, &pubvar) != SP_ERROR_NONE)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (is_a_plugin && strncmp(pubvar->name, "__pl_", 5) == 0)
|
||||||
|
{
|
||||||
|
plc = (_pl *)pubvar->offs;
|
||||||
|
if (plc->required)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
char *str;
|
||||||
|
pContext->LocalToString(plc->name, &str);
|
||||||
|
if (strcmp(str, lib) != 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
pf->PushString(lib);
|
||||||
|
pf->Execute(NULL);
|
||||||
|
}
|
||||||
|
else if (!is_a_plugin && strncmp(pubvar->name, "__ext_", 6) == 0)
|
||||||
|
{
|
||||||
|
ext = (_ext *)pubvar->offs;
|
||||||
|
if (ext->required)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
char *str;
|
||||||
|
pContext->LocalToString(ext->name, &str);
|
||||||
|
if (strcmp(str, lib) != 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
pf->PushString(lib);
|
||||||
|
pf->Execute(NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-15
@@ -47,11 +47,11 @@
|
|||||||
#include "sm_trie.h"
|
#include "sm_trie.h"
|
||||||
#include "sourcemod.h"
|
#include "sourcemod.h"
|
||||||
#include <IRootConsoleMenu.h>
|
#include <IRootConsoleMenu.h>
|
||||||
#if SOURCE_ENGINE >= SE_ALIENSWARM
|
#if SOURCE_ENGINE == SE_ALIENSWARM
|
||||||
#include "convar_sm_swarm.h"
|
#include "convar_sm_swarm.h"
|
||||||
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
|
#elif (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||||
#include "convar_sm_l4d.h"
|
#include "convar_sm_l4d.h"
|
||||||
#elif SOURCE_ENGINE >= SE_ORANGEBOX
|
#elif (SOURCE_ENGINE == SE_ORANGEBOX) || (SOURCE_ENGINE == SE_BLOODYGOODTIME) || (SOURCE_ENGINE == SE_EYE) || (SOURCE_ENGINE == SE_ORANGEBOXVALVE)
|
||||||
#include "convar_sm_ob.h"
|
#include "convar_sm_ob.h"
|
||||||
#else
|
#else
|
||||||
#include "convar_sm.h"
|
#include "convar_sm.h"
|
||||||
@@ -131,12 +131,6 @@ enum APLRes
|
|||||||
APLRes_SilentFailure
|
APLRes_SilentFailure
|
||||||
};
|
};
|
||||||
|
|
||||||
enum LibraryAction
|
|
||||||
{
|
|
||||||
LibraryAction_Removed,
|
|
||||||
LibraryAction_Added
|
|
||||||
};
|
|
||||||
|
|
||||||
struct AutoConfig
|
struct AutoConfig
|
||||||
{
|
{
|
||||||
String autocfg;
|
String autocfg;
|
||||||
@@ -256,7 +250,7 @@ public:
|
|||||||
{
|
{
|
||||||
m_Libraries.push_back(name);
|
m_Libraries.push_back(name);
|
||||||
}
|
}
|
||||||
void LibraryActions(LibraryAction action);
|
void LibraryActions(bool dropping);
|
||||||
void SyncMaxClients(int max_clients);
|
void SyncMaxClients(int max_clients);
|
||||||
protected:
|
protected:
|
||||||
bool UpdateInfo();
|
bool UpdateInfo();
|
||||||
@@ -409,7 +403,7 @@ public:
|
|||||||
|
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
|
||||||
void OnLibraryAction(const char *lib, LibraryAction action);
|
void OnLibraryAction(const char *lib, bool is_a_plugin, bool drop);
|
||||||
|
|
||||||
bool LibraryExists(const char *lib);
|
bool LibraryExists(const char *lib);
|
||||||
|
|
||||||
@@ -481,10 +475,6 @@ private:
|
|||||||
|
|
||||||
// Config
|
// Config
|
||||||
bool m_bBlockBadPlugins;
|
bool m_bBlockBadPlugins;
|
||||||
|
|
||||||
// Forwards
|
|
||||||
IForward *m_pOnLibraryAdded;
|
|
||||||
IForward *m_pOnLibraryRemoved;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CPluginManager g_PluginSys;
|
extern CPluginManager g_PluginSys;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+32
-298
@@ -32,32 +32,18 @@
|
|||||||
#include "UserMessages.h"
|
#include "UserMessages.h"
|
||||||
#include "sm_stringutil.h"
|
#include "sm_stringutil.h"
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
#include <cstrike15_usermessage_helpers.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UserMessages g_UserMsgs;
|
UserMessages g_UserMsgs;
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
SH_DECL_HOOK3_void(IVEngineServer, SendUserMessage, SH_NOATTRIB, 0, IRecipientFilter &, int, const protobuf::Message &);
|
|
||||||
#else
|
|
||||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||||
SH_DECL_HOOK3(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int, const char *);
|
SH_DECL_HOOK3(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int, const char *);
|
||||||
#else
|
#else
|
||||||
SH_DECL_HOOK2(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int);
|
SH_DECL_HOOK2(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int);
|
||||||
#endif
|
#endif
|
||||||
SH_DECL_HOOK0_void(IVEngineServer, MessageEnd, SH_NOATTRIB, 0);
|
SH_DECL_HOOK0_void(IVEngineServer, MessageEnd, SH_NOATTRIB, 0);
|
||||||
#endif // ==SE_CSGO
|
|
||||||
|
|
||||||
UserMessages::UserMessages()
|
UserMessages::UserMessages() : m_InterceptBuffer(m_pBase, 2500)
|
||||||
#ifndef USE_PROTOBUF_USERMESSAGES
|
|
||||||
: m_InterceptBuffer(m_pBase, 2500)
|
|
||||||
{
|
{
|
||||||
m_Names = sm_trie_create();
|
m_Names = sm_trie_create();
|
||||||
#else
|
|
||||||
: m_InterceptBuffer(NULL)
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
m_HookCount = 0;
|
m_HookCount = 0;
|
||||||
m_InExec = false;
|
m_InExec = false;
|
||||||
m_InHook = false;
|
m_InHook = false;
|
||||||
@@ -67,9 +53,7 @@ UserMessages::UserMessages()
|
|||||||
|
|
||||||
UserMessages::~UserMessages()
|
UserMessages::~UserMessages()
|
||||||
{
|
{
|
||||||
#ifndef USE_PROTOBUF_USERMESSAGES
|
|
||||||
sm_trie_destroy(m_Names);
|
sm_trie_destroy(m_Names);
|
||||||
#endif
|
|
||||||
|
|
||||||
CStack<ListenerInfo *>::iterator iter;
|
CStack<ListenerInfo *>::iterator iter;
|
||||||
for (iter=m_FreeListeners.begin(); iter!=m_FreeListeners.end(); iter++)
|
for (iter=m_FreeListeners.begin(); iter!=m_FreeListeners.end(); iter++)
|
||||||
@@ -81,10 +65,8 @@ UserMessages::~UserMessages()
|
|||||||
|
|
||||||
void UserMessages::OnSourceModStartup(bool late)
|
void UserMessages::OnSourceModStartup(bool late)
|
||||||
{
|
{
|
||||||
#ifndef USE_PROTOBUF_USERMESSAGES
|
|
||||||
/* -1 means SourceMM was unable to get the user message list */
|
/* -1 means SourceMM was unable to get the user message list */
|
||||||
m_FallbackSearch = (g_SMAPI->GetUserMessageCount() == -1);
|
m_FallbackSearch = (g_SMAPI->GetUserMessageCount() == -1);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserMessages::OnSourceModAllInitialized()
|
void UserMessages::OnSourceModAllInitialized()
|
||||||
@@ -96,25 +78,16 @@ void UserMessages::OnSourceModAllShutdown()
|
|||||||
{
|
{
|
||||||
if (m_HookCount)
|
if (m_HookCount)
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, SendUserMessage, engine, this, &UserMessages::OnSendUserMessage_Pre, false);
|
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, SendUserMessage, engine, this, &UserMessages::OnSendUserMessage_Post, true);
|
|
||||||
#else
|
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
m_HookCount = 0;
|
m_HookCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int UserMessages::GetMessageIndex(const char *msg)
|
int UserMessages::GetMessageIndex(const char *msg)
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
// Can split this per engine and/or game later
|
|
||||||
return g_Cstrike15UsermessageHelpers.GetIndex(msg);
|
|
||||||
#else
|
|
||||||
int msgid;
|
int msgid;
|
||||||
|
|
||||||
if (!sm_trie_retrieve(m_Names, msg, reinterpret_cast<void **>(&msgid)))
|
if (!sm_trie_retrieve(m_Names, msg, reinterpret_cast<void **>(&msgid)))
|
||||||
@@ -145,19 +118,10 @@ int UserMessages::GetMessageIndex(const char *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return msgid;
|
return msgid;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UserMessages::GetMessageName(int msgid, char *buffer, size_t maxlength) const
|
bool UserMessages::GetMessageName(int msgid, char *buffer, size_t maxlength) const
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
const char *pszName = g_Cstrike15UsermessageHelpers.GetName(msgid);
|
|
||||||
if (!pszName)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
strncopy(buffer, pszName, maxlength);
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
if (m_FallbackSearch)
|
if (m_FallbackSearch)
|
||||||
{
|
{
|
||||||
int size;
|
int size;
|
||||||
@@ -173,14 +137,10 @@ bool UserMessages::GetMessageName(int msgid, char *buffer, size_t maxlength) con
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bf_write *UserMessages::StartBitBufMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags)
|
bf_write *UserMessages::StartMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags)
|
||||||
{
|
{
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
return NULL;
|
|
||||||
#else
|
|
||||||
bf_write *buffer;
|
bf_write *buffer;
|
||||||
|
|
||||||
if (m_InExec || m_InHook)
|
if (m_InExec || m_InHook)
|
||||||
@@ -222,75 +182,6 @@ bf_write *UserMessages::StartBitBufMessage(int msg_id, const cell_t players[], u
|
|||||||
}
|
}
|
||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
#endif // USE_PROTOBUF_USERMESSAGES
|
|
||||||
}
|
|
||||||
|
|
||||||
google::protobuf::Message *UserMessages::StartProtobufMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags)
|
|
||||||
{
|
|
||||||
#ifndef USE_PROTOBUF_USERMESSAGES
|
|
||||||
return NULL;
|
|
||||||
#else
|
|
||||||
protobuf::Message *buffer;
|
|
||||||
|
|
||||||
if (m_InExec || m_InHook)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if (msg_id < 0 || msg_id >= 255)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_CurId = msg_id;
|
|
||||||
m_CellRecFilter.Initialize(players, playersNum);
|
|
||||||
|
|
||||||
m_CurFlags = flags;
|
|
||||||
if (m_CurFlags & USERMSG_INITMSG)
|
|
||||||
{
|
|
||||||
m_CellRecFilter.SetToInit(true);
|
|
||||||
}
|
|
||||||
if (m_CurFlags & USERMSG_RELIABLE)
|
|
||||||
{
|
|
||||||
m_CellRecFilter.SetToReliable(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_InExec = true;
|
|
||||||
|
|
||||||
if (m_CurFlags & USERMSG_BLOCKHOOKS)
|
|
||||||
{
|
|
||||||
// direct message creation, return buffer "from engine". keep track
|
|
||||||
m_FakeEngineBuffer = g_Cstrike15UsermessageHelpers.GetPrototype(msg_id)->New();
|
|
||||||
buffer = m_FakeEngineBuffer;
|
|
||||||
} else {
|
|
||||||
char messageName[32];
|
|
||||||
if (!GetMessageName(msg_id, messageName, sizeof(messageName)))
|
|
||||||
{
|
|
||||||
m_InExec = false;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
protobuf::Message *msg = OnStartMessage_Pre(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, messageName);
|
|
||||||
switch (m_FakeMetaRes)
|
|
||||||
{
|
|
||||||
case MRES_IGNORED:
|
|
||||||
case MRES_HANDLED:
|
|
||||||
m_FakeEngineBuffer = g_Cstrike15UsermessageHelpers.GetPrototype(msg_id)->New();
|
|
||||||
buffer = m_FakeEngineBuffer;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MRES_OVERRIDE:
|
|
||||||
m_FakeEngineBuffer = g_Cstrike15UsermessageHelpers.GetPrototype(msg_id)->New();
|
|
||||||
// fallthrough
|
|
||||||
case MRES_SUPERCEDE:
|
|
||||||
buffer = msg;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
OnStartMessage_Post(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, messageName);
|
|
||||||
}
|
|
||||||
|
|
||||||
return buffer;
|
|
||||||
#endif // USE_PROTOBUF_USERMESSAGES
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UserMessages::EndMessage()
|
bool UserMessages::EndMessage()
|
||||||
@@ -300,37 +191,12 @@ bool UserMessages::EndMessage()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
if (m_CurFlags & USERMSG_BLOCKHOOKS)
|
|
||||||
{
|
|
||||||
ENGINE_CALL(SendUserMessage)(static_cast<IRecipientFilter &>(m_CellRecFilter), m_CurId, *m_FakeEngineBuffer);
|
|
||||||
delete m_FakeEngineBuffer;
|
|
||||||
m_FakeEngineBuffer = NULL;
|
|
||||||
} else {
|
|
||||||
OnMessageEnd_Pre();
|
|
||||||
|
|
||||||
switch (m_FakeMetaRes)
|
|
||||||
{
|
|
||||||
case MRES_IGNORED:
|
|
||||||
case MRES_HANDLED:
|
|
||||||
case MRES_OVERRIDE:
|
|
||||||
engine->SendUserMessage(static_cast<IRecipientFilter &>(m_CellRecFilter), m_CurId, *m_FakeEngineBuffer);
|
|
||||||
delete m_FakeEngineBuffer;
|
|
||||||
m_FakeEngineBuffer = NULL;
|
|
||||||
break;
|
|
||||||
//case MRES_SUPERCEDE:
|
|
||||||
}
|
|
||||||
|
|
||||||
OnMessageEnd_Post();
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (m_CurFlags & USERMSG_BLOCKHOOKS)
|
if (m_CurFlags & USERMSG_BLOCKHOOKS)
|
||||||
{
|
{
|
||||||
ENGINE_CALL(MessageEnd)();
|
ENGINE_CALL(MessageEnd)();
|
||||||
} else {
|
} else {
|
||||||
engine->MessageEnd();
|
engine->MessageEnd();
|
||||||
}
|
}
|
||||||
#endif // SE_CSGO
|
|
||||||
|
|
||||||
m_InExec = false;
|
m_InExec = false;
|
||||||
m_CurFlags = 0;
|
m_CurFlags = 0;
|
||||||
@@ -339,60 +205,31 @@ bool UserMessages::EndMessage()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserMessageType UserMessages::GetUserMessageType() const
|
|
||||||
{
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
return UM_Protobuf;
|
|
||||||
#else
|
|
||||||
return UM_BitBuf;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool UserMessages::HookUserMessage2(int msg_id,
|
bool UserMessages::HookUserMessage2(int msg_id,
|
||||||
IUserMessageListener *pListener,
|
IUserMessageListener *pListener,
|
||||||
bool intercept)
|
bool intercept)
|
||||||
{
|
{
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
return InternalHook(msg_id, pListener, intercept, true);
|
||||||
return InternalHook(msg_id, (IProtobufUserMessageListener *)pListener, intercept, true);
|
|
||||||
#else
|
|
||||||
return InternalHook(msg_id, (IBitBufUserMessageListener *)pListener, intercept, true);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UserMessages::UnhookUserMessage2(int msg_id,
|
bool UserMessages::UnhookUserMessage2(int msg_id,
|
||||||
IUserMessageListener *pListener,
|
IUserMessageListener *pListener,
|
||||||
bool intercept)
|
bool intercept)
|
||||||
{
|
{
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
return InternalUnhook(msg_id, pListener, intercept, true);
|
||||||
return InternalUnhook(msg_id, (IProtobufUserMessageListener *)pListener, intercept, true);
|
|
||||||
#else
|
|
||||||
return InternalUnhook(msg_id, (IBitBufUserMessageListener *)pListener, intercept, true);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UserMessages::HookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept)
|
bool UserMessages::HookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept)
|
||||||
{
|
{
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
return InternalHook(msg_id, pListener, intercept, false);
|
||||||
return InternalHook(msg_id, (IProtobufUserMessageListener *)pListener, intercept, false);
|
|
||||||
#else
|
|
||||||
return InternalHook(msg_id, (IBitBufUserMessageListener *)pListener, intercept, false);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UserMessages::UnhookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept)
|
bool UserMessages::UnhookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept)
|
||||||
{
|
{
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
return InternalUnhook(msg_id, pListener, intercept, false);
|
||||||
return InternalUnhook(msg_id, (IProtobufUserMessageListener *)pListener, intercept, false);
|
|
||||||
#else
|
|
||||||
return InternalUnhook(msg_id, (IBitBufUserMessageListener *)pListener, intercept, false);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
bool UserMessages::InternalHook(int msg_id, IUserMessageListener *pListener, bool intercept, bool isNew)
|
||||||
bool UserMessages::InternalHook(int msg_id, IProtobufUserMessageListener *pListener, bool intercept, bool isNew)
|
|
||||||
#else
|
|
||||||
bool UserMessages::InternalHook(int msg_id, IBitBufUserMessageListener *pListener, bool intercept, bool isNew)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (msg_id < 0 || msg_id >= 255)
|
if (msg_id < 0 || msg_id >= 255)
|
||||||
{
|
{
|
||||||
@@ -415,15 +252,10 @@ bool UserMessages::InternalHook(int msg_id, IBitBufUserMessageListener *pListene
|
|||||||
|
|
||||||
if (!m_HookCount++)
|
if (!m_HookCount++)
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
SH_ADD_HOOK_MEMFUNC(IVEngineServer, SendUserMessage, engine, this, &UserMessages::OnSendUserMessage_Pre, false);
|
|
||||||
SH_ADD_HOOK_MEMFUNC(IVEngineServer, SendUserMessage, engine, this, &UserMessages::OnSendUserMessage_Post, true);
|
|
||||||
#else
|
|
||||||
SH_ADD_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
|
SH_ADD_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
|
||||||
SH_ADD_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
|
SH_ADD_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
|
||||||
SH_ADD_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
|
SH_ADD_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
|
||||||
SH_ADD_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
|
SH_ADD_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intercept)
|
if (intercept)
|
||||||
@@ -436,11 +268,7 @@ bool UserMessages::InternalHook(int msg_id, IBitBufUserMessageListener *pListene
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
bool UserMessages::InternalUnhook(int msg_id, IUserMessageListener *pListener, bool intercept, bool isNew)
|
||||||
bool UserMessages::InternalUnhook(int msg_id, IProtobufUserMessageListener *pListener, bool intercept, bool isNew)
|
|
||||||
#else
|
|
||||||
bool UserMessages::InternalUnhook(int msg_id, IBitBufUserMessageListener *pListener, bool intercept, bool isNew)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
MsgList *pList;
|
MsgList *pList;
|
||||||
MsgIter iter;
|
MsgIter iter;
|
||||||
@@ -481,69 +309,14 @@ void UserMessages::_DecRefCounter()
|
|||||||
{
|
{
|
||||||
if (--m_HookCount == 0)
|
if (--m_HookCount == 0)
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, SendUserMessage, engine, this, &UserMessages::OnSendUserMessage_Pre, false);
|
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, SendUserMessage, engine, this, &UserMessages::OnSendUserMessage_Post, true);
|
|
||||||
#else
|
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||||
void UserMessages::OnSendUserMessage_Pre(IRecipientFilter &filter, int msg_type, const protobuf::Message &msg)
|
|
||||||
{
|
|
||||||
OnStartMessage_Pre(&filter, msg_type, g_Cstrike15UsermessageHelpers.GetName(msg_type));
|
|
||||||
if (m_FakeMetaRes == MRES_SUPERCEDE)
|
|
||||||
{
|
|
||||||
int size = msg.ByteSize();
|
|
||||||
uint8 *data = (uint8 *)stackalloc(size);
|
|
||||||
msg.SerializePartialToArray(data, size);
|
|
||||||
m_InterceptBuffer->ParsePartialFromArray(data, size);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_FakeEngineBuffer = &const_cast<protobuf::Message &>(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
OnStartMessage_Post(&filter, msg_type, g_Cstrike15UsermessageHelpers.GetName(msg_type));
|
|
||||||
|
|
||||||
OnMessageEnd_Pre();
|
|
||||||
if (m_FakeMetaRes == MRES_SUPERCEDE)
|
|
||||||
RETURN_META(MRES_SUPERCEDE);
|
|
||||||
|
|
||||||
RETURN_META(MRES_IGNORED);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UserMessages::OnSendUserMessage_Post(IRecipientFilter &filter, int msg_type, const protobuf::Message &msg)
|
|
||||||
{
|
|
||||||
OnMessageEnd_Post();
|
|
||||||
RETURN_META(MRES_IGNORED);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
#define UM_RETURN_META_VALUE(res, val) \
|
|
||||||
m_FakeMetaRes = res; \
|
|
||||||
return val;
|
|
||||||
|
|
||||||
#define UM_RETURN_META(res) \
|
|
||||||
m_FakeMetaRes = res; \
|
|
||||||
return;
|
|
||||||
#else
|
|
||||||
#define UM_RETURN_META_VALUE(res, val) \
|
|
||||||
RETURN_META_VALUE(res, val)
|
|
||||||
|
|
||||||
#define UM_RETURN_META(res) \
|
|
||||||
RETURN_META(res)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
protobuf::Message *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name)
|
|
||||||
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
|
|
||||||
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name)
|
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name)
|
||||||
#else
|
#else
|
||||||
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type)
|
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type)
|
||||||
@@ -556,7 +329,7 @@ bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_typ
|
|||||||
|| (m_InExec && (m_CurFlags & USERMSG_BLOCKHOOKS)))
|
|| (m_InExec && (m_CurFlags & USERMSG_BLOCKHOOKS)))
|
||||||
{
|
{
|
||||||
m_InHook = false;
|
m_InHook = false;
|
||||||
UM_RETURN_META_VALUE(MRES_IGNORED, NULL);
|
RETURN_META_VALUE(MRES_IGNORED, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_CurId = msg_type;
|
m_CurId = msg_type;
|
||||||
@@ -566,23 +339,14 @@ bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_typ
|
|||||||
|
|
||||||
if (!is_intercept_empty)
|
if (!is_intercept_empty)
|
||||||
{
|
{
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
if (m_InterceptBuffer)
|
|
||||||
delete m_InterceptBuffer;
|
|
||||||
m_InterceptBuffer = g_Cstrike15UsermessageHelpers.GetPrototype(msg_type)->New();
|
|
||||||
UM_RETURN_META_VALUE(MRES_SUPERCEDE, m_InterceptBuffer);
|
|
||||||
#else
|
|
||||||
m_InterceptBuffer.Reset();
|
m_InterceptBuffer.Reset();
|
||||||
UM_RETURN_META_VALUE(MRES_SUPERCEDE, &m_InterceptBuffer);
|
RETURN_META_VALUE(MRES_SUPERCEDE, &m_InterceptBuffer);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UM_RETURN_META_VALUE(MRES_IGNORED, NULL);
|
RETURN_META_VALUE(MRES_IGNORED, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||||
protobuf::Message *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name)
|
|
||||||
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
|
|
||||||
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name)
|
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name)
|
||||||
#else
|
#else
|
||||||
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type)
|
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type)
|
||||||
@@ -590,26 +354,19 @@ bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_ty
|
|||||||
{
|
{
|
||||||
if (!m_InHook)
|
if (!m_InHook)
|
||||||
{
|
{
|
||||||
UM_RETURN_META_VALUE(MRES_IGNORED, NULL);
|
RETURN_META_VALUE(MRES_IGNORED, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
if (m_FakeMetaRes == MRES_SUPERCEDE)
|
|
||||||
m_OrigBuffer = m_InterceptBuffer;
|
|
||||||
else
|
|
||||||
m_OrigBuffer = m_FakeEngineBuffer;
|
|
||||||
#else
|
|
||||||
m_OrigBuffer = META_RESULT_ORIG_RET(bf_write *);
|
m_OrigBuffer = META_RESULT_ORIG_RET(bf_write *);
|
||||||
#endif
|
|
||||||
|
|
||||||
UM_RETURN_META_VALUE(MRES_IGNORED, NULL);
|
RETURN_META_VALUE(MRES_IGNORED, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserMessages::OnMessageEnd_Post()
|
void UserMessages::OnMessageEnd_Post()
|
||||||
{
|
{
|
||||||
if (!m_InHook)
|
if (!m_InHook)
|
||||||
{
|
{
|
||||||
UM_RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
MsgList *pList;
|
MsgList *pList;
|
||||||
@@ -677,7 +434,7 @@ void UserMessages::OnMessageEnd_Pre()
|
|||||||
{
|
{
|
||||||
if (!m_InHook)
|
if (!m_InHook)
|
||||||
{
|
{
|
||||||
UM_RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
MsgList *pList;
|
MsgList *pList;
|
||||||
@@ -693,11 +450,7 @@ void UserMessages::OnMessageEnd_Pre()
|
|||||||
{
|
{
|
||||||
pInfo = (*iter);
|
pInfo = (*iter);
|
||||||
pInfo->IsHooked = true;
|
pInfo->IsHooked = true;
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
res = pInfo->Callback->InterceptUserMessage(m_CurId, m_InterceptBuffer, m_CurRecFilter);
|
|
||||||
#else
|
|
||||||
res = pInfo->Callback->InterceptUserMessage(m_CurId, &m_InterceptBuffer, m_CurRecFilter);
|
res = pInfo->Callback->InterceptUserMessage(m_CurId, &m_InterceptBuffer, m_CurRecFilter);
|
||||||
#endif
|
|
||||||
|
|
||||||
intercepted = true;
|
intercepted = true;
|
||||||
|
|
||||||
@@ -745,10 +498,8 @@ void UserMessages::OnMessageEnd_Pre()
|
|||||||
|
|
||||||
if (!handled && intercepted)
|
if (!handled && intercepted)
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
ENGINE_CALL(SendUserMessage)(static_cast<IRecipientFilter &>(*m_CurRecFilter), m_CurId, *m_InterceptBuffer);
|
|
||||||
#else
|
|
||||||
bf_write *engine_bfw;
|
bf_write *engine_bfw;
|
||||||
|
|
||||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||||
engine_bfw = ENGINE_CALL(UserMessageBegin)(m_CurRecFilter, m_CurId, g_SMAPI->GetUserMessage(m_CurId));
|
engine_bfw = ENGINE_CALL(UserMessageBegin)(m_CurRecFilter, m_CurId, g_SMAPI->GetUserMessage(m_CurId));
|
||||||
#else
|
#else
|
||||||
@@ -757,46 +508,29 @@ void UserMessages::OnMessageEnd_Pre()
|
|||||||
m_ReadBuffer.StartReading(m_InterceptBuffer.GetBasePointer(), m_InterceptBuffer.GetNumBytesWritten());
|
m_ReadBuffer.StartReading(m_InterceptBuffer.GetBasePointer(), m_InterceptBuffer.GetNumBytesWritten());
|
||||||
engine_bfw->WriteBitsFromBuffer(&m_ReadBuffer, m_InterceptBuffer.GetNumBitsWritten());
|
engine_bfw->WriteBitsFromBuffer(&m_ReadBuffer, m_InterceptBuffer.GetNumBitsWritten());
|
||||||
ENGINE_CALL(MessageEnd)();
|
ENGINE_CALL(MessageEnd)();
|
||||||
#endif // SE_CSGO
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pList = &m_msgHooks[m_CurId];
|
||||||
|
for (iter=pList->begin(); iter!=pList->end(); )
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
pInfo = (*iter);
|
||||||
int size = m_OrigBuffer->ByteSize();
|
pInfo->IsHooked = true;
|
||||||
uint8 *data = (uint8 *)stackalloc(size);
|
pInfo->Callback->OnUserMessage(m_CurId, m_OrigBuffer, m_CurRecFilter);
|
||||||
m_OrigBuffer->SerializePartialToArray(data, size);
|
|
||||||
protobuf::Message *pTempMsg = g_Cstrike15UsermessageHelpers.GetPrototype(m_CurId)->New();
|
|
||||||
pTempMsg->ParsePartialFromArray(data, size);
|
|
||||||
#else
|
|
||||||
bf_write *pTempMsg = m_OrigBuffer;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pList = &m_msgHooks[m_CurId];
|
if (pInfo->KillMe)
|
||||||
for (iter=pList->begin(); iter!=pList->end(); )
|
|
||||||
{
|
{
|
||||||
pInfo = (*iter);
|
iter = pList->erase(iter);
|
||||||
pInfo->IsHooked = true;
|
m_FreeListeners.push(pInfo);
|
||||||
pInfo->Callback->OnUserMessage(m_CurId, pTempMsg, m_CurRecFilter);
|
_DecRefCounter();
|
||||||
|
continue;
|
||||||
if (pInfo->KillMe)
|
|
||||||
{
|
|
||||||
iter = pList->erase(iter);
|
|
||||||
m_FreeListeners.push(pInfo);
|
|
||||||
_DecRefCounter();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
pInfo->IsHooked = false;
|
|
||||||
iter++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
pInfo->IsHooked = false;
|
||||||
delete pTempMsg;
|
iter++;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UM_RETURN_META((intercepted) ? MRES_SUPERCEDE : MRES_IGNORED);
|
RETURN_META((intercepted) ? MRES_SUPERCEDE : MRES_IGNORED);
|
||||||
supercede:
|
supercede:
|
||||||
m_BlockEndPost = true;
|
m_BlockEndPost = true;
|
||||||
UM_RETURN_META(MRES_SUPERCEDE);
|
RETURN_META(MRES_SUPERCEDE);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-51
@@ -36,35 +36,16 @@
|
|||||||
#include <IUserMessages.h>
|
#include <IUserMessages.h>
|
||||||
#include "sourcemm_api.h"
|
#include "sourcemm_api.h"
|
||||||
#include "sm_trie.h"
|
#include "sm_trie.h"
|
||||||
#include "sm_stringutil.h"
|
|
||||||
#include "CellRecipientFilter.h"
|
#include "CellRecipientFilter.h"
|
||||||
|
|
||||||
using namespace SourceHook;
|
using namespace SourceHook;
|
||||||
using namespace SourceMod;
|
using namespace SourceMod;
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
#define USE_PROTOBUF_USERMESSAGES
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
#include <google/protobuf/message.h>
|
|
||||||
#include <google/protobuf/descriptor.h>
|
|
||||||
#include <netmessages.pb.h>
|
|
||||||
|
|
||||||
using namespace google;
|
|
||||||
#else
|
|
||||||
#include <bitbuf.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define INVALID_MESSAGE_ID -1
|
#define INVALID_MESSAGE_ID -1
|
||||||
|
|
||||||
struct ListenerInfo
|
struct ListenerInfo
|
||||||
{
|
{
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
IUserMessageListener *Callback;
|
||||||
IProtobufUserMessageListener *Callback;
|
|
||||||
#else
|
|
||||||
IBitBufUserMessageListener *Callback;
|
|
||||||
#endif
|
|
||||||
bool IsHooked;
|
bool IsHooked;
|
||||||
bool KillMe;
|
bool KillMe;
|
||||||
bool IsNew;
|
bool IsNew;
|
||||||
@@ -89,8 +70,7 @@ public: //IUserMessages
|
|||||||
bool GetMessageName(int msgid, char *buffer, size_t maxlength) const;
|
bool GetMessageName(int msgid, char *buffer, size_t maxlength) const;
|
||||||
bool HookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept=false);
|
bool HookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept=false);
|
||||||
bool UnhookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept=false);
|
bool UnhookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept=false);
|
||||||
bf_write *StartBitBufMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags);
|
bf_write *StartMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags);
|
||||||
google::protobuf::Message *StartProtobufMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags);
|
|
||||||
bool EndMessage();
|
bool EndMessage();
|
||||||
bool HookUserMessage2(int msg_id,
|
bool HookUserMessage2(int msg_id,
|
||||||
IUserMessageListener *pListener,
|
IUserMessageListener *pListener,
|
||||||
@@ -98,17 +78,8 @@ public: //IUserMessages
|
|||||||
bool UnhookUserMessage2(int msg_id,
|
bool UnhookUserMessage2(int msg_id,
|
||||||
IUserMessageListener *pListener,
|
IUserMessageListener *pListener,
|
||||||
bool intercept=false);
|
bool intercept=false);
|
||||||
UserMessageType GetUserMessageType() const;
|
|
||||||
public:
|
public:
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||||
void OnSendUserMessage_Pre(IRecipientFilter &filter, int msg_type, const protobuf::Message &msg);
|
|
||||||
void OnSendUserMessage_Post(IRecipientFilter &filter, int msg_type, const protobuf::Message &msg);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
protobuf::Message *OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name);
|
|
||||||
protobuf::Message *OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name);
|
|
||||||
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
|
|
||||||
bf_write *OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name);
|
bf_write *OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name);
|
||||||
bf_write *OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name);
|
bf_write *OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name);
|
||||||
#else
|
#else
|
||||||
@@ -118,40 +89,24 @@ public:
|
|||||||
void OnMessageEnd_Pre();
|
void OnMessageEnd_Pre();
|
||||||
void OnMessageEnd_Post();
|
void OnMessageEnd_Post();
|
||||||
private:
|
private:
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
bool InternalHook(int msg_id, IUserMessageListener *pListener, bool intercept, bool isNew);
|
||||||
bool InternalHook(int msg_id, IProtobufUserMessageListener *pListener, bool intercept, bool isNew);
|
bool InternalUnhook(int msg_id, IUserMessageListener *pListener, bool intercept, bool isNew);
|
||||||
bool InternalUnhook(int msg_id, IProtobufUserMessageListener *pListener, bool intercept, bool isNew);
|
|
||||||
#else
|
|
||||||
bool InternalHook(int msg_id, IBitBufUserMessageListener *pListener, bool intercept, bool isNew);
|
|
||||||
bool InternalUnhook(int msg_id, IBitBufUserMessageListener *pListener, bool intercept, bool isNew);
|
|
||||||
#endif
|
|
||||||
void _DecRefCounter();
|
void _DecRefCounter();
|
||||||
private:
|
private:
|
||||||
List<ListenerInfo *> m_msgHooks[255];
|
List<ListenerInfo *> m_msgHooks[255];
|
||||||
List<ListenerInfo *> m_msgIntercepts[255];
|
List<ListenerInfo *> m_msgIntercepts[255];
|
||||||
CStack<ListenerInfo *> m_FreeListeners;
|
CStack<ListenerInfo *> m_FreeListeners;
|
||||||
IRecipientFilter *m_CurRecFilter;
|
|
||||||
#ifndef USE_PROTOBUF_USERMESSAGES
|
|
||||||
unsigned char m_pBase[2500];
|
unsigned char m_pBase[2500];
|
||||||
|
IRecipientFilter *m_CurRecFilter;
|
||||||
bf_write m_InterceptBuffer;
|
bf_write m_InterceptBuffer;
|
||||||
bf_write *m_OrigBuffer;
|
bf_write *m_OrigBuffer;
|
||||||
bf_read m_ReadBuffer;
|
bf_read m_ReadBuffer;
|
||||||
#else
|
|
||||||
// The engine used to provide this. Now we track it.
|
|
||||||
protobuf::Message *m_OrigBuffer;
|
|
||||||
protobuf::Message *m_FakeEngineBuffer;
|
|
||||||
META_RES m_FakeMetaRes;
|
|
||||||
|
|
||||||
protobuf::Message *m_InterceptBuffer;
|
|
||||||
#endif
|
|
||||||
size_t m_HookCount;
|
size_t m_HookCount;
|
||||||
bool m_InHook;
|
bool m_InHook;
|
||||||
bool m_BlockEndPost;
|
bool m_BlockEndPost;
|
||||||
#ifndef USE_PROTOBUF_USERMESSAGES
|
|
||||||
bool m_FallbackSearch;
|
bool m_FallbackSearch;
|
||||||
|
|
||||||
Trie *m_Names;
|
Trie *m_Names;
|
||||||
#endif
|
|
||||||
CellRecipientFilter m_CellRecFilter;
|
CellRecipientFilter m_CellRecFilter;
|
||||||
bool m_InExec;
|
bool m_InExec;
|
||||||
int m_CurFlags;
|
int m_CurFlags;
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ public:
|
|||||||
virtual void SetValue( const char *value );
|
virtual void SetValue( const char *value );
|
||||||
virtual void SetValue( float value );
|
virtual void SetValue( float value );
|
||||||
virtual void SetValue( int value );
|
virtual void SetValue( int value );
|
||||||
#if SOURCE_ENGINE >= SE_NUCLEARDAWN
|
#if SOURCE_ENGINE >= SE_LEFT4DEAD2
|
||||||
virtual void SetValue( Color value );
|
virtual void SetValue( Color value );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+1
-11
@@ -20,7 +20,7 @@
|
|||||||
#include "tier1/iconvar.h"
|
#include "tier1/iconvar.h"
|
||||||
#include "tier1/utlvector.h"
|
#include "tier1/utlvector.h"
|
||||||
#include "tier1/utlstring.h"
|
#include "tier1/utlstring.h"
|
||||||
#include "Color.h"
|
#include "color.h"
|
||||||
#include "icvar.h"
|
#include "icvar.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@@ -381,14 +381,8 @@ public:
|
|||||||
FnChangeCallback_t GetChangeCallback( int slot ) const { return m_pParent->m_fnChangeCallbacks[ slot ]; }
|
FnChangeCallback_t GetChangeCallback( int slot ) const { return m_pParent->m_fnChangeCallbacks[ slot ]; }
|
||||||
|
|
||||||
// Retrieve value
|
// Retrieve value
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
virtual float GetFloat( void ) const;
|
|
||||||
virtual int GetInt( void ) const;
|
|
||||||
#else
|
|
||||||
FORCEINLINE_CVAR float GetFloat( void ) const;
|
FORCEINLINE_CVAR float GetFloat( void ) const;
|
||||||
FORCEINLINE_CVAR int GetInt( void ) const;
|
FORCEINLINE_CVAR int GetInt( void ) const;
|
||||||
#endif
|
|
||||||
|
|
||||||
FORCEINLINE_CVAR Color GetColor( void ) const;
|
FORCEINLINE_CVAR Color GetColor( void ) const;
|
||||||
FORCEINLINE_CVAR bool GetBool() const { return !!GetInt(); }
|
FORCEINLINE_CVAR bool GetBool() const { return !!GetInt(); }
|
||||||
FORCEINLINE_CVAR char const *GetString( void ) const;
|
FORCEINLINE_CVAR char const *GetString( void ) const;
|
||||||
@@ -901,9 +895,7 @@ void ConVar_PrintDescription( const ConCommandBase *pVar );
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: Utility class to quickly allow ConCommands to call member methods
|
// Purpose: Utility class to quickly allow ConCommands to call member methods
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#ifdef _WIN32
|
|
||||||
#pragma warning (disable : 4355 )
|
#pragma warning (disable : 4355 )
|
||||||
#endif
|
|
||||||
|
|
||||||
template< class T >
|
template< class T >
|
||||||
class CConCommandMemberAccessor : public ConCommand, public ICommandCallback, public ICommandCompletionCallback
|
class CConCommandMemberAccessor : public ConCommand, public ICommandCallback, public ICommandCompletionCallback
|
||||||
@@ -950,9 +942,7 @@ private:
|
|||||||
FnMemberCommandCompletionCallback_t m_CompletionFunc;
|
FnMemberCommandCompletionCallback_t m_CompletionFunc;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#pragma warning ( default : 4355 )
|
#pragma warning ( default : 4355 )
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ compiler['CDEFINES'].append('SM_LOGIC')
|
|||||||
if AMBuild.target['platform'] == 'linux':
|
if AMBuild.target['platform'] == 'linux':
|
||||||
compiler['POSTLINKFLAGS'].append('-lpthread')
|
compiler['POSTLINKFLAGS'].append('-lpthread')
|
||||||
if AMBuild.target['platform'] == 'darwin':
|
if AMBuild.target['platform'] == 'darwin':
|
||||||
compiler['CFLAGS'].extend(['-Wno-deprecated-declarations'])
|
|
||||||
compiler['POSTLINKFLAGS'].extend(['-framework', 'CoreServices'])
|
compiler['POSTLINKFLAGS'].extend(['-framework', 'CoreServices'])
|
||||||
|
|
||||||
extension = AMBuild.AddJob('sourcemod.logic')
|
extension = AMBuild.AddJob('sourcemod.logic')
|
||||||
@@ -56,6 +55,5 @@ else:
|
|||||||
files.append('thread/PosixThreads.cpp')
|
files.append('thread/PosixThreads.cpp')
|
||||||
binary.AddSourceFiles('core/logic', files)
|
binary.AddSourceFiles('core/logic', files)
|
||||||
SM.AutoVersion('core/logic', binary)
|
SM.AutoVersion('core/logic', binary)
|
||||||
SM.ExtractDebugInfo(extension, binary)
|
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
|
|
||||||
|
|||||||
+35
-81
@@ -54,7 +54,6 @@ IGameConfig *g_pGameConf = NULL;
|
|||||||
static char g_Game[256];
|
static char g_Game[256];
|
||||||
static char g_GameDesc[256] = {'!', '\0'};
|
static char g_GameDesc[256] = {'!', '\0'};
|
||||||
static char g_GameName[256] = {'$', '\0'};
|
static char g_GameName[256] = {'$', '\0'};
|
||||||
static const char *g_pParseEngine = NULL;
|
|
||||||
|
|
||||||
#define PSTATE_NONE 0
|
#define PSTATE_NONE 0
|
||||||
#define PSTATE_GAMES 1
|
#define PSTATE_GAMES 1
|
||||||
@@ -113,10 +112,10 @@ static bool DoesGameMatch(const char *value)
|
|||||||
|
|
||||||
static bool DoesEngineMatch(const char *value)
|
static bool DoesEngineMatch(const char *value)
|
||||||
{
|
{
|
||||||
return strcmp(value, g_pParseEngine) == 0;
|
return strcmp(value, smcore.GetSourceEngineName()) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGameConfig::CGameConfig(const char *file, const char *engine)
|
CGameConfig::CGameConfig(const char *file)
|
||||||
{
|
{
|
||||||
strncopy(m_File, file, sizeof(m_File));
|
strncopy(m_File, file, sizeof(m_File));
|
||||||
m_pAddresses = new KTrie<AddressConf>();
|
m_pAddresses = new KTrie<AddressConf>();
|
||||||
@@ -125,18 +124,6 @@ CGameConfig::CGameConfig(const char *file, const char *engine)
|
|||||||
|
|
||||||
m_CustomLevel = 0;
|
m_CustomLevel = 0;
|
||||||
m_CustomHandler = NULL;
|
m_CustomHandler = NULL;
|
||||||
|
|
||||||
if (!engine)
|
|
||||||
m_pEngine = smcore.GetSourceEngineName();
|
|
||||||
else
|
|
||||||
m_pEngine = engine;
|
|
||||||
|
|
||||||
if (strcmp(m_pEngine, "css") == 0 || strcmp(m_pEngine, "dods") == 0 || strcmp(m_pEngine, "hl2dm") == 0 || strcmp(m_pEngine, "tf2") == 0)
|
|
||||||
this->SetBaseEngine("orangebox_valve");
|
|
||||||
else if (strcmp(m_pEngine, "nucleardawn") == 0)
|
|
||||||
this->SetBaseEngine("left4dead2");
|
|
||||||
else
|
|
||||||
this->SetBaseEngine(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CGameConfig::~CGameConfig()
|
CGameConfig::~CGameConfig()
|
||||||
@@ -538,16 +525,9 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states)
|
|||||||
s_TempSig.library,
|
s_TempSig.library,
|
||||||
m_CurFile);
|
m_CurFile);
|
||||||
} else {
|
} else {
|
||||||
|
#if defined PLATFORM_POSIX
|
||||||
if (s_TempSig.sig[0] == '@')
|
if (s_TempSig.sig[0] == '@')
|
||||||
{
|
{
|
||||||
#if defined PLATFORM_WINDOWS
|
|
||||||
MEMORY_BASIC_INFORMATION mem;
|
|
||||||
|
|
||||||
if (VirtualQuery(addrInBase, &mem, sizeof(mem)))
|
|
||||||
final_addr = g_MemUtils.ResolveSymbol(mem.AllocationBase, &s_TempSig.sig[1]);
|
|
||||||
else
|
|
||||||
smcore.LogError("[SM] Unable to find library \"%s\" in memory (gameconf \"%s\")", s_TempSig.library, m_File);
|
|
||||||
#elif defined PLATFORM_POSIX
|
|
||||||
Dl_info info;
|
Dl_info info;
|
||||||
/* GNU only: returns 0 on error, inconsistent! >:[ */
|
/* GNU only: returns 0 on error, inconsistent! >:[ */
|
||||||
if (dladdr(addrInBase, &info) != 0)
|
if (dladdr(addrInBase, &info) != 0)
|
||||||
@@ -570,12 +550,12 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states)
|
|||||||
s_TempSig.library,
|
s_TempSig.library,
|
||||||
m_File);
|
m_File);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (final_addr)
|
if (final_addr)
|
||||||
{
|
{
|
||||||
goto skip_find;
|
goto skip_find;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* First, preprocess the signature */
|
/* First, preprocess the signature */
|
||||||
unsigned char real_sig[511];
|
unsigned char real_sig[511];
|
||||||
size_t real_bytes;
|
size_t real_bytes;
|
||||||
@@ -592,7 +572,9 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined PLATFORM_POSIX
|
||||||
skip_find:
|
skip_find:
|
||||||
|
#endif
|
||||||
m_Sigs.replace(m_offset, final_addr);
|
m_Sigs.replace(m_offset, final_addr);
|
||||||
m_ParseState = PSTATE_GAMEDEFS_SIGNATURES;
|
m_ParseState = PSTATE_GAMEDEFS_SIGNATURES;
|
||||||
|
|
||||||
@@ -785,29 +767,19 @@ bool CGameConfig::Reparse(char *error, size_t maxlength)
|
|||||||
SMCStates state = {0, 0};
|
SMCStates state = {0, 0};
|
||||||
List<String> fileList;
|
List<String> fileList;
|
||||||
master_reader.fileList = &fileList;
|
master_reader.fileList = &fileList;
|
||||||
const char *pEngine[2] = { m_pBaseEngine, m_pEngine };
|
|
||||||
|
|
||||||
for (unsigned char iter = 0; iter < SM_ARRAYSIZE(pEngine); ++iter)
|
err = textparsers->ParseSMCFile(path, &master_reader, &state, error, maxlength);
|
||||||
|
if (err != SMCError_Okay)
|
||||||
{
|
{
|
||||||
if (pEngine[iter] == NULL)
|
const char *msg = textparsers->GetSMCErrorString(err);
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->SetParseEngine(pEngine[iter]);
|
smcore.LogError("[SM] Error parsing master gameconf file \"%s\":", path);
|
||||||
err = textparsers->ParseSMCFile(path, &master_reader, &state, error, maxlength);
|
smcore.LogError("[SM] Error %d on line %d, col %d: %s",
|
||||||
if (err != SMCError_Okay)
|
err,
|
||||||
{
|
state.line,
|
||||||
const char *msg = textparsers->GetSMCErrorString(err);
|
state.col,
|
||||||
|
msg ? msg : "Unknown error");
|
||||||
smcore.LogError("[SM] Error parsing master gameconf file \"%s\":", path);
|
return false;
|
||||||
smcore.LogError("[SM] Error %d on line %d, col %d: %s",
|
|
||||||
err,
|
|
||||||
state.line,
|
|
||||||
state.col,
|
|
||||||
msg ? msg : "Unknown error");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Go through each file we found and parse it. */
|
/* Go through each file we found and parse it. */
|
||||||
@@ -873,53 +845,35 @@ bool CGameConfig::EnterFile(const char *file, char *error, size_t maxlength)
|
|||||||
m_IgnoreLevel = 0;
|
m_IgnoreLevel = 0;
|
||||||
bShouldBeReadingDefault = true;
|
bShouldBeReadingDefault = true;
|
||||||
m_ParseState = PSTATE_NONE;
|
m_ParseState = PSTATE_NONE;
|
||||||
const char *pEngine[2] = { m_pBaseEngine, m_pEngine };
|
|
||||||
|
|
||||||
for (unsigned char iter = 0; iter < SM_ARRAYSIZE(pEngine); ++iter)
|
if ((err=textparsers->ParseSMCFile(m_CurFile, this, &state, error, maxlength))
|
||||||
|
!= SMCError_Okay)
|
||||||
{
|
{
|
||||||
if (pEngine[iter] == NULL)
|
const char *msg;
|
||||||
|
|
||||||
|
msg = textparsers->GetSMCErrorString(err);
|
||||||
|
|
||||||
|
smcore.LogError("[SM] Error parsing gameconfig file \"%s\":", m_CurFile);
|
||||||
|
smcore.LogError("[SM] Error %d on line %d, col %d: %s",
|
||||||
|
err,
|
||||||
|
state.line,
|
||||||
|
state.col,
|
||||||
|
msg ? msg : "Unknown error");
|
||||||
|
|
||||||
|
if (m_ParseState == PSTATE_GAMEDEFS_CUSTOM)
|
||||||
{
|
{
|
||||||
continue;
|
//error occurred while parsing a custom section
|
||||||
|
m_CustomHandler->ReadSMC_ParseEnd(true, true);
|
||||||
|
m_CustomHandler = NULL;
|
||||||
|
m_CustomLevel = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->SetParseEngine(pEngine[iter]);
|
return false;
|
||||||
if ((err=textparsers->ParseSMCFile(m_CurFile, this, &state, error, maxlength))
|
|
||||||
!= SMCError_Okay)
|
|
||||||
{
|
|
||||||
const char *msg = textparsers->GetSMCErrorString(err);
|
|
||||||
|
|
||||||
smcore.LogError("[SM] Error parsing gameconfig file \"%s\":", m_CurFile);
|
|
||||||
smcore.LogError("[SM] Error %d on line %d, col %d: %s",
|
|
||||||
err,
|
|
||||||
state.line,
|
|
||||||
state.col,
|
|
||||||
msg ? msg : "Unknown error");
|
|
||||||
|
|
||||||
if (m_ParseState == PSTATE_GAMEDEFS_CUSTOM)
|
|
||||||
{
|
|
||||||
//error occurred while parsing a custom section
|
|
||||||
m_CustomHandler->ReadSMC_ParseEnd(true, true);
|
|
||||||
m_CustomHandler = NULL;
|
|
||||||
m_CustomLevel = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameConfig::SetBaseEngine(const char *engine)
|
|
||||||
{
|
|
||||||
m_pBaseEngine = engine;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGameConfig::SetParseEngine(const char *engine)
|
|
||||||
{
|
|
||||||
g_pParseEngine = engine;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CGameConfig::GetOffset(const char *key, int *value)
|
bool CGameConfig::GetOffset(const char *key, int *value)
|
||||||
{
|
{
|
||||||
int *pvalue;
|
int *pvalue;
|
||||||
|
|||||||
@@ -50,13 +50,11 @@ class CGameConfig :
|
|||||||
{
|
{
|
||||||
friend class GameConfigManager;
|
friend class GameConfigManager;
|
||||||
public:
|
public:
|
||||||
CGameConfig(const char *file, const char *engine = NULL);
|
CGameConfig(const char *file);
|
||||||
~CGameConfig();
|
~CGameConfig();
|
||||||
public:
|
public:
|
||||||
bool Reparse(char *error, size_t maxlength);
|
bool Reparse(char *error, size_t maxlength);
|
||||||
bool EnterFile(const char *file, char *error, size_t maxlength);
|
bool EnterFile(const char *file, char *error, size_t maxlength);
|
||||||
void SetBaseEngine(const char *engine);
|
|
||||||
void SetParseEngine(const char *engine);
|
|
||||||
public: //ITextListener_SMC
|
public: //ITextListener_SMC
|
||||||
SMCResult ReadSMC_NewSection(const SMCStates *states, const char *name);
|
SMCResult ReadSMC_NewSection(const SMCStates *states, const char *name);
|
||||||
SMCResult ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value);
|
SMCResult ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value);
|
||||||
@@ -113,8 +111,6 @@ private:
|
|||||||
int m_AddressReadCount;
|
int m_AddressReadCount;
|
||||||
int m_AddressRead[8];
|
int m_AddressRead[8];
|
||||||
KTrie<AddressConf> *m_pAddresses;
|
KTrie<AddressConf> *m_pAddresses;
|
||||||
const char *m_pEngine;
|
|
||||||
const char *m_pBaseEngine;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class GameConfigManager :
|
class GameConfigManager :
|
||||||
|
|||||||
+1
-2
@@ -40,8 +40,7 @@ OBJECTS = \
|
|||||||
smn_datapacks.cpp \
|
smn_datapacks.cpp \
|
||||||
smn_gameconfigs.cpp \
|
smn_gameconfigs.cpp \
|
||||||
GameConfigs.cpp \
|
GameConfigs.cpp \
|
||||||
smn_players.cpp \
|
smn_players.cpp
|
||||||
smn_profiler.cpp
|
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ void *MemoryUtils::FindPattern(const void *libPtr, const char *pattern, size_t l
|
|||||||
}
|
}
|
||||||
|
|
||||||
ptr = reinterpret_cast<char *>(lib.baseAddress);
|
ptr = reinterpret_cast<char *>(lib.baseAddress);
|
||||||
end = ptr + lib.memorySize - len;
|
end = ptr + lib.memorySize - 1;
|
||||||
|
|
||||||
while (ptr < end)
|
while (ptr < end)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ public:
|
|||||||
unsigned int FindOrAddPhraseFile(const char *phrase_file);
|
unsigned int FindOrAddPhraseFile(const char *phrase_file);
|
||||||
BaseStringTable *GetStringTable();
|
BaseStringTable *GetStringTable();
|
||||||
unsigned int GetLanguageCount();
|
unsigned int GetLanguageCount();
|
||||||
|
bool GetLanguageInfo(unsigned int number, const char **code, const char **name);
|
||||||
bool GetLanguageByCode(const char *code, unsigned int *index);
|
bool GetLanguageByCode(const char *code, unsigned int *index);
|
||||||
bool GetLanguageByName(const char *name, unsigned int *index);
|
bool GetLanguageByName(const char *name, unsigned int *index);
|
||||||
CPhraseFile *GetFileByIndex(unsigned int index);
|
CPhraseFile *GetFileByIndex(unsigned int index);
|
||||||
@@ -145,7 +146,6 @@ public: //ITranslator
|
|||||||
unsigned int numparams,
|
unsigned int numparams,
|
||||||
size_t *pOutLength,
|
size_t *pOutLength,
|
||||||
const char **pFailPhrase);
|
const char **pFailPhrase);
|
||||||
bool GetLanguageInfo(unsigned int number, const char **code, const char **name);
|
|
||||||
private:
|
private:
|
||||||
bool AddLanguage(const char *langcode, const char *description);
|
bool AddLanguage(const char *langcode, const char *description);
|
||||||
private:
|
private:
|
||||||
|
|||||||
+1
-17
@@ -42,7 +42,7 @@ using namespace SourceMod;
|
|||||||
* Add 1 to the RHS of this expression to bump the intercom file
|
* Add 1 to the RHS of this expression to bump the intercom file
|
||||||
* This is to prevent mismatching core/logic binaries
|
* This is to prevent mismatching core/logic binaries
|
||||||
*/
|
*/
|
||||||
#define SM_LOGIC_MAGIC (0x0F47C0DE - 18)
|
#define SM_LOGIC_MAGIC (0x0F47C0DE - 17)
|
||||||
|
|
||||||
#if defined SM_LOGIC
|
#if defined SM_LOGIC
|
||||||
class IVEngineServer
|
class IVEngineServer
|
||||||
@@ -55,20 +55,6 @@ public:
|
|||||||
virtual void ServerCommand(const char *cmd) = 0;
|
virtual void ServerCommand(const char *cmd) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef int FileFindHandle_t;
|
|
||||||
|
|
||||||
#if defined SM_LOGIC
|
|
||||||
class IFileSystem
|
|
||||||
#else
|
|
||||||
class IFileSystem_Logic
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual const char *FindFirstEx(const char *pWildCard, const char *pPathID, FileFindHandle_t *pHandle) = 0;
|
|
||||||
virtual const char *FindNext(FileFindHandle_t handle) = 0;
|
|
||||||
virtual void FindClose(FileFindHandle_t handle) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace SourceMod
|
namespace SourceMod
|
||||||
{
|
{
|
||||||
class ISourceMod;
|
class ISourceMod;
|
||||||
@@ -88,7 +74,6 @@ namespace SourceMod
|
|||||||
}
|
}
|
||||||
|
|
||||||
class IVEngineServer;
|
class IVEngineServer;
|
||||||
class IFileSystem;
|
|
||||||
class ConVar;
|
class ConVar;
|
||||||
|
|
||||||
struct ServerGlobals
|
struct ServerGlobals
|
||||||
@@ -106,7 +91,6 @@ struct sm_core_t
|
|||||||
ISourceMod *sm;
|
ISourceMod *sm;
|
||||||
ILibrarySys *libsys;
|
ILibrarySys *libsys;
|
||||||
IVEngineServer *engine;
|
IVEngineServer *engine;
|
||||||
IFileSystem *filesystem;
|
|
||||||
IShareSys *sharesys;
|
IShareSys *sharesys;
|
||||||
IRootConsole *rootmenu;
|
IRootConsole *rootmenu;
|
||||||
IPluginManager *pluginsys;
|
IPluginManager *pluginsys;
|
||||||
|
|||||||
@@ -43,13 +43,11 @@
|
|||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">sourcemod.logic</TargetName>
|
|
||||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">sourcemod.logic</TargetName>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..;$(MMSOURCE19)\core\sourcehook;..\..\..\public;..\..\..\public\sourcepawn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;$(MMSOURCE18)\core\sourcehook;..\..\..\public;..\..\..\public\sourcepawn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JITX86_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SM_DEFAULT_THREADER;SM_LOGIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JITX86_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SM_DEFAULT_THREADER;SM_LOGIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
@@ -62,7 +60,7 @@
|
|||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
<OutputFile>$(OutDir)sourcemod.logic.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>
|
||||||
@@ -71,17 +69,11 @@
|
|||||||
</DataExecutionPrevention>
|
</DataExecutionPrevention>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<ResourceCompile>
|
|
||||||
<AdditionalIncludeDirectories>..\..\..\public</AdditionalIncludeDirectories>
|
|
||||||
</ResourceCompile>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\bin"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<AdditionalIncludeDirectories>..;$(MMSOURCE19)\core\sourcehook;..\..\..\public;..\..\..\public\sourcepawn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;$(MMSOURCE17)\core\sourcehook;..\..\..\public;..\..\..\public\sourcepawn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JITX86_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SM_LOGIC;SM_DEFAULT_THREADER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JITX86_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SM_LOGIC;SM_DEFAULT_THREADER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||||
@@ -92,7 +84,7 @@
|
|||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
<OutputFile>$(OutDir)sourcemod.logic.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>
|
||||||
@@ -103,12 +95,6 @@
|
|||||||
</DataExecutionPrevention>
|
</DataExecutionPrevention>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<ResourceCompile>
|
|
||||||
<AdditionalIncludeDirectories>..\..\..\public</AdditionalIncludeDirectories>
|
|
||||||
</ResourceCompile>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\bin"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\common_logic.cpp" />
|
<ClCompile Include="..\common_logic.cpp" />
|
||||||
@@ -143,9 +129,6 @@
|
|||||||
<ClCompile Include="..\thread\WinThreads.cpp" />
|
<ClCompile Include="..\thread\WinThreads.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\..\public\sm_platform.h" />
|
|
||||||
<ClInclude Include="..\..\..\public\sm_trie_tpl.h" />
|
|
||||||
<ClInclude Include="..\..\..\public\sourcemod_version.h" />
|
|
||||||
<ClInclude Include="..\AutoHandleRooter.h" />
|
<ClInclude Include="..\AutoHandleRooter.h" />
|
||||||
<ClInclude Include="..\CellArray.h" />
|
<ClInclude Include="..\CellArray.h" />
|
||||||
<ClInclude Include="..\common_logic.h" />
|
<ClInclude Include="..\common_logic.h" />
|
||||||
@@ -159,6 +142,7 @@
|
|||||||
<ClInclude Include="..\sm_memtable.h" />
|
<ClInclude Include="..\sm_memtable.h" />
|
||||||
<ClInclude Include="..\sm_symtable.h" />
|
<ClInclude Include="..\sm_symtable.h" />
|
||||||
<ClInclude Include="..\stringutil.h" />
|
<ClInclude Include="..\stringutil.h" />
|
||||||
|
<ClInclude Include="..\svn_version.h" />
|
||||||
<ClInclude Include="..\TextParsers.h" />
|
<ClInclude Include="..\TextParsers.h" />
|
||||||
<ClInclude Include="..\ThreadSupport.h" />
|
<ClInclude Include="..\ThreadSupport.h" />
|
||||||
<ClInclude Include="..\thread\BaseWorker.h" />
|
<ClInclude Include="..\thread\BaseWorker.h" />
|
||||||
|
|||||||
@@ -131,6 +131,9 @@
|
|||||||
<ClInclude Include="..\Profiler.h">
|
<ClInclude Include="..\Profiler.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\svn_version.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\TextParsers.h">
|
<ClInclude Include="..\TextParsers.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -176,15 +179,6 @@
|
|||||||
<ClInclude Include="..\Translator.h">
|
<ClInclude Include="..\Translator.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\..\public\sm_trie_tpl.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\sourcemod_version.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\sm_platform.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\version.rc">
|
<ResourceCompile Include="..\version.rc">
|
||||||
|
|||||||
+46
-71
@@ -33,11 +33,9 @@
|
|||||||
#include <sm_trie_tpl.h>
|
#include <sm_trie_tpl.h>
|
||||||
#include "common_logic.h"
|
#include "common_logic.h"
|
||||||
#include "CellArray.h"
|
#include "CellArray.h"
|
||||||
#include <IGameHelpers.h>
|
|
||||||
#include <ILibrarySys.h>
|
#include <ILibrarySys.h>
|
||||||
#include <ITextParsers.h>
|
#include <ITextParsers.h>
|
||||||
#include <ISourceMod.h>
|
#include <ISourceMod.h>
|
||||||
#include "stringutil.h"
|
|
||||||
|
|
||||||
using namespace SourceHook;
|
using namespace SourceHook;
|
||||||
|
|
||||||
@@ -80,47 +78,6 @@ public:
|
|||||||
{
|
{
|
||||||
DumpCache(NULL);
|
DumpCache(NULL);
|
||||||
}
|
}
|
||||||
void GetMapCycleFilePath(char *pBuffer, int maxlen)
|
|
||||||
{
|
|
||||||
const char *pEngineName = smcore.GetSourceEngineName();
|
|
||||||
const char *pMapCycleFileName = m_pMapCycleFile ? smcore.GetCvarString(m_pMapCycleFile) : "mapcycle.txt";
|
|
||||||
|
|
||||||
if (strcmp(pEngineName, "tf2") == 0 || strcmp(pEngineName, "css") == 0
|
|
||||||
|| strcmp(pEngineName, "dods") == 0 || strcmp(pEngineName, "hl2dm") == 0)
|
|
||||||
{
|
|
||||||
// These four games and Source SDK 2013 do a lookup in this order; so shall we.
|
|
||||||
g_pSM->BuildPath(Path_Game,
|
|
||||||
pBuffer,
|
|
||||||
maxlen,
|
|
||||||
"cfg/%s",
|
|
||||||
pMapCycleFileName);
|
|
||||||
|
|
||||||
if (!libsys->PathExists(pBuffer))
|
|
||||||
{
|
|
||||||
g_pSM->BuildPath(Path_Game,
|
|
||||||
pBuffer,
|
|
||||||
maxlen,
|
|
||||||
"%s",
|
|
||||||
pMapCycleFileName);
|
|
||||||
|
|
||||||
if (!libsys->PathExists(pBuffer))
|
|
||||||
{
|
|
||||||
g_pSM->BuildPath(Path_Game,
|
|
||||||
pBuffer,
|
|
||||||
maxlen,
|
|
||||||
"cfg/mapcycle_default.txt");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_pSM->BuildPath(Path_Game,
|
|
||||||
pBuffer,
|
|
||||||
maxlen,
|
|
||||||
"%s",
|
|
||||||
pMapCycleFileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void AddOrUpdateDefault(const char *name, const char *file)
|
void AddOrUpdateDefault(const char *name, const char *file)
|
||||||
{
|
{
|
||||||
char path[PLATFORM_MAX_PATH];
|
char path[PLATFORM_MAX_PATH];
|
||||||
@@ -197,9 +154,11 @@ public:
|
|||||||
|
|
||||||
pDefList->bIsPath = true;
|
pDefList->bIsPath = true;
|
||||||
smcore.strncopy(pDefList->name, "mapcyclefile", sizeof(pDefList->name));
|
smcore.strncopy(pDefList->name, "mapcyclefile", sizeof(pDefList->name));
|
||||||
|
g_pSM->BuildPath(Path_Game,
|
||||||
GetMapCycleFilePath(pDefList->path, sizeof(pDefList->path));
|
pDefList->path,
|
||||||
|
sizeof(pDefList->path),
|
||||||
|
"%s",
|
||||||
|
m_pMapCycleFile ? smcore.GetCvarString(m_pMapCycleFile) : "mapcycle.txt");
|
||||||
pDefList->last_modified_time = 0;
|
pDefList->last_modified_time = 0;
|
||||||
pDefList->pArray = NULL;
|
pDefList->pArray = NULL;
|
||||||
pDefList->serial = 0;
|
pDefList->serial = 0;
|
||||||
@@ -389,39 +348,51 @@ public:
|
|||||||
if ((success && pNewArray == NULL)
|
if ((success && pNewArray == NULL)
|
||||||
|| (!success && ((flags & MAPLIST_FLAG_MAPSFOLDER) == MAPLIST_FLAG_MAPSFOLDER)))
|
|| (!success && ((flags & MAPLIST_FLAG_MAPSFOLDER) == MAPLIST_FLAG_MAPSFOLDER)))
|
||||||
{
|
{
|
||||||
|
char path[255];
|
||||||
|
IDirectory *pDir;
|
||||||
|
|
||||||
pNewArray = new CellArray(64);
|
pNewArray = new CellArray(64);
|
||||||
free_new_array = true;
|
free_new_array = true;
|
||||||
|
g_pSM->BuildPath(Path_Game, path, sizeof(path), "maps");
|
||||||
|
|
||||||
cell_t *blk;
|
if ((pDir = libsys->OpenDirectory(path)) != NULL)
|
||||||
|
|
||||||
FileFindHandle_t findHandle;
|
|
||||||
const char *fileName = smcore.filesystem->FindFirstEx("maps/*.bsp", "GAME", &findHandle);
|
|
||||||
|
|
||||||
while (fileName)
|
|
||||||
{
|
{
|
||||||
|
char *ptr;
|
||||||
|
cell_t *blk;
|
||||||
char buffer[PLATFORM_MAX_PATH];
|
char buffer[PLATFORM_MAX_PATH];
|
||||||
|
|
||||||
UTIL_StripExtension(fileName, buffer, sizeof(buffer));
|
while (pDir->MoreFiles())
|
||||||
|
|
||||||
if (!engine->IsMapValid(buffer))
|
|
||||||
{
|
{
|
||||||
fileName = smcore.filesystem->FindNext(findHandle);
|
if (!pDir->IsEntryFile()
|
||||||
continue;
|
|| strcmp(pDir->GetEntryName(), ".") == 0
|
||||||
|
|| strcmp(pDir->GetEntryName(), "..") == 0)
|
||||||
|
{
|
||||||
|
pDir->NextEntry();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
smcore.strncopy(buffer, pDir->GetEntryName(), sizeof(buffer));
|
||||||
|
if ((ptr = strstr(buffer, ".bsp")) == NULL || ptr[4] != '\0')
|
||||||
|
{
|
||||||
|
pDir->NextEntry();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
*ptr = '\0';
|
||||||
|
if (!engine->IsMapValid(buffer))
|
||||||
|
{
|
||||||
|
pDir->NextEntry();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ((blk = pNewArray->push()) == NULL)
|
||||||
|
{
|
||||||
|
pDir->NextEntry();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
smcore.strncopy((char *)blk, buffer, 255);
|
||||||
|
pDir->NextEntry();
|
||||||
}
|
}
|
||||||
|
libsys->CloseDirectory(pDir);
|
||||||
if ((blk = pNewArray->push()) == NULL)
|
|
||||||
{
|
|
||||||
fileName = smcore.filesystem->FindNext(findHandle);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
smcore.strncopy((char *)blk, buffer, 255);
|
|
||||||
|
|
||||||
fileName = smcore.filesystem->FindNext(findHandle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
smcore.filesystem->FindClose(findHandle);
|
|
||||||
|
|
||||||
/* Remove the array if there were no items. */
|
/* Remove the array if there were no items. */
|
||||||
if (pNewArray->size() == 0)
|
if (pNewArray->size() == 0)
|
||||||
{
|
{
|
||||||
@@ -514,7 +485,11 @@ private:
|
|||||||
if (m_pMapCycleFile != NULL && strcmp(name, "mapcyclefile") == 0)
|
if (m_pMapCycleFile != NULL && strcmp(name, "mapcyclefile") == 0)
|
||||||
{
|
{
|
||||||
char path[PLATFORM_MAX_PATH];
|
char path[PLATFORM_MAX_PATH];
|
||||||
GetMapCycleFilePath(path, sizeof(path));
|
g_pSM->BuildPath(Path_Game,
|
||||||
|
path,
|
||||||
|
sizeof(path),
|
||||||
|
"%s",
|
||||||
|
m_pMapCycleFile ? smcore.GetCvarString(m_pMapCycleFile) : "mapcycle.txt");
|
||||||
|
|
||||||
if (strcmp(path, pMapList->path) != 0)
|
if (strcmp(path, pMapList->path) != 0)
|
||||||
{
|
{
|
||||||
@@ -549,7 +524,7 @@ private:
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!gamehelpers->IsMapValid(ptr))
|
if (!engine->IsMapValid(ptr))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,11 +35,6 @@
|
|||||||
#include <sm_platform.h>
|
#include <sm_platform.h>
|
||||||
#include "stringutil.h"
|
#include "stringutil.h"
|
||||||
|
|
||||||
// We're in logic so we don't have this from the SDK.
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *stristr(const char *str, const char *substr)
|
const char *stristr(const char *str, const char *substr)
|
||||||
{
|
{
|
||||||
if (!*substr)
|
if (!*substr)
|
||||||
@@ -308,35 +303,3 @@ size_t UTIL_DecodeHexString(unsigned char *buffer, size_t maxlength, const char
|
|||||||
return written;
|
return written;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PATHSEPARATOR(c) ((c) == '\\' || (c) == '/')
|
|
||||||
|
|
||||||
void UTIL_StripExtension(const char *in, char *out, int outSize)
|
|
||||||
{
|
|
||||||
// Find the last dot. If it's followed by a dot or a slash, then it's part of a
|
|
||||||
// directory specifier like ../../somedir/./blah.
|
|
||||||
|
|
||||||
// scan backward for '.'
|
|
||||||
int end = strlen(in) - 1;
|
|
||||||
while (end > 0 && in[end] != '.' && !PATHSEPARATOR(in[end]))
|
|
||||||
{
|
|
||||||
--end;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (end > 0 && !PATHSEPARATOR(in[end]) && end < outSize)
|
|
||||||
{
|
|
||||||
int nChars = MIN(end, outSize-1);
|
|
||||||
if (out != in)
|
|
||||||
{
|
|
||||||
memcpy(out, in, nChars);
|
|
||||||
}
|
|
||||||
out[nChars] = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// nothing found
|
|
||||||
if (out != in)
|
|
||||||
{
|
|
||||||
strncopy(out, in, outSize);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -40,7 +40,5 @@ char *UTIL_ReplaceEx(char *subject, size_t maxLen, const char *search, size_t se
|
|||||||
const char *replace, size_t replaceLen, bool caseSensitive = true);
|
const char *replace, size_t replaceLen, bool caseSensitive = true);
|
||||||
size_t UTIL_DecodeHexString(unsigned char *buffer, size_t maxlength, const char *hexstr);
|
size_t UTIL_DecodeHexString(unsigned char *buffer, size_t maxlength, const char *hexstr);
|
||||||
|
|
||||||
void UTIL_StripExtension(const char *in, char *out, int outSize);
|
|
||||||
|
|
||||||
#endif /* _INCLUDE_SOURCEMOD_COMMON_STRINGUTIL_H_ */
|
#endif /* _INCLUDE_SOURCEMOD_COMMON_STRINGUTIL_H_ */
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,11 @@ void BaseWorker::AddThreadToQueue(SWThreadHandle *pHandle)
|
|||||||
m_ThreadQueue.push_back(pHandle);
|
m_ThreadQueue.push_back(pHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int BaseWorker::GetMaxThreadsPerFrame()
|
||||||
|
{
|
||||||
|
return m_perFrame;
|
||||||
|
}
|
||||||
|
|
||||||
WorkerState BaseWorker::GetStatus(unsigned int *threads)
|
WorkerState BaseWorker::GetStatus(unsigned int *threads)
|
||||||
{
|
{
|
||||||
if (threads)
|
if (threads)
|
||||||
@@ -135,7 +140,7 @@ WorkerState BaseWorker::GetStatus(unsigned int *threads)
|
|||||||
unsigned int BaseWorker::RunFrame()
|
unsigned int BaseWorker::RunFrame()
|
||||||
{
|
{
|
||||||
unsigned int done = 0;
|
unsigned int done = 0;
|
||||||
unsigned int max = m_perFrame;
|
unsigned int max = GetMaxThreadsPerFrame();
|
||||||
SWThreadHandle *swt = NULL;
|
SWThreadHandle *swt = NULL;
|
||||||
IThread *pThread = NULL;
|
IThread *pThread = NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -84,8 +84,6 @@ public: //IWorker
|
|||||||
virtual unsigned int Flush(bool flush_cancel);
|
virtual unsigned int Flush(bool flush_cancel);
|
||||||
//returns status and number of threads in queue
|
//returns status and number of threads in queue
|
||||||
virtual WorkerState GetStatus(unsigned int *numThreads);
|
virtual WorkerState GetStatus(unsigned int *numThreads);
|
||||||
virtual void SetMaxThreadsPerFrame(unsigned int threads);
|
|
||||||
virtual void SetThinkTimePerFrame(unsigned int thinktime) {}
|
|
||||||
public: //IThreadCreator
|
public: //IThreadCreator
|
||||||
virtual void MakeThread(IThread *pThread);
|
virtual void MakeThread(IThread *pThread);
|
||||||
virtual IThreadHandle *MakeThread(IThread *pThread, ThreadFlags flags);
|
virtual IThreadHandle *MakeThread(IThread *pThread, ThreadFlags flags);
|
||||||
@@ -94,6 +92,8 @@ public: //IThreadCreator
|
|||||||
public: //BaseWorker
|
public: //BaseWorker
|
||||||
virtual void AddThreadToQueue(SWThreadHandle *pHandle);
|
virtual void AddThreadToQueue(SWThreadHandle *pHandle);
|
||||||
virtual SWThreadHandle *PopThreadFromQueue();
|
virtual SWThreadHandle *PopThreadFromQueue();
|
||||||
|
virtual void SetMaxThreadsPerFrame(unsigned int threads);
|
||||||
|
virtual unsigned int GetMaxThreadsPerFrame();
|
||||||
protected:
|
protected:
|
||||||
SourceHook::List<SWThreadHandle *> m_ThreadQueue;
|
SourceHook::List<SWThreadHandle *> m_ThreadQueue;
|
||||||
unsigned int m_perFrame;
|
unsigned int m_perFrame;
|
||||||
|
|||||||
@@ -209,11 +209,6 @@ WorkerState ThreadWorker::GetStatus(unsigned int *threads)
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadWorker::SetThinkTimePerFrame(unsigned int thinktime)
|
|
||||||
{
|
|
||||||
m_think_time = thinktime;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ThreadWorker::Start()
|
bool ThreadWorker::Start()
|
||||||
{
|
{
|
||||||
if (m_state == Worker_Invalid)
|
if (m_state == Worker_Invalid)
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ public: //IWorker
|
|||||||
virtual bool Stop(bool flush_cancel);
|
virtual bool Stop(bool flush_cancel);
|
||||||
//returns status and number of threads in queue
|
//returns status and number of threads in queue
|
||||||
virtual WorkerState GetStatus(unsigned int *numThreads);
|
virtual WorkerState GetStatus(unsigned int *numThreads);
|
||||||
//virtual void SetMaxThreadsPerFrame(unsigned int threads);
|
|
||||||
virtual void SetThinkTimePerFrame(unsigned int thinktime);
|
|
||||||
public: //BaseWorker
|
public: //BaseWorker
|
||||||
virtual void AddThreadToQueue(SWThreadHandle *pHandle);
|
virtual void AddThreadToQueue(SWThreadHandle *pHandle);
|
||||||
virtual SWThreadHandle *PopThreadFromQueue();
|
virtual SWThreadHandle *PopThreadFromQueue();
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION SM_VERSION_FILE
|
FILEVERSION SM_FILE_VERSION
|
||||||
PRODUCTVERSION SM_VERSION_FILE
|
PRODUCTVERSION SM_FILE_VERSION
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -47,12 +47,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Comments", "SourceMod"
|
VALUE "Comments", "SourceMod"
|
||||||
VALUE "FileDescription", "SourceMod Core Logic"
|
VALUE "FileDescription", "SourceMod Core Logic"
|
||||||
VALUE "FileVersion", SM_VERSION_STRING
|
VALUE "FileVersion", SM_FULL_VERSION
|
||||||
VALUE "InternalName", "sourcemod"
|
VALUE "InternalName", "sourcemod"
|
||||||
VALUE "LegalCopyright", "Copyright (c) 2004-2009, AlliedModders LLC"
|
VALUE "LegalCopyright", "Copyright (c) 2004-2009, AlliedModders LLC"
|
||||||
VALUE "OriginalFilename", "sourcemod.logic.dll"
|
VALUE "OriginalFilename", "sourcemod.logic.dll"
|
||||||
VALUE "ProductName", "SourceMod"
|
VALUE "ProductName", "SourceMod"
|
||||||
VALUE "ProductVersion", SM_VERSION_STRING
|
VALUE "ProductVersion", SM_FULL_VERSION
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
+3
-35
@@ -90,25 +90,6 @@ public:
|
|||||||
|
|
||||||
static VEngineServer_Logic logic_engine;
|
static VEngineServer_Logic logic_engine;
|
||||||
|
|
||||||
class VFileSystem_Logic : public IFileSystem_Logic
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
const char *FindFirstEx(const char *pWildCard, const char *pPathID, FileFindHandle_t *pHandle)
|
|
||||||
{
|
|
||||||
return filesystem->FindFirstEx(pWildCard, pPathID, pHandle);
|
|
||||||
}
|
|
||||||
const char *FindNext(FileFindHandle_t handle)
|
|
||||||
{
|
|
||||||
return filesystem->FindNext(handle);
|
|
||||||
}
|
|
||||||
void FindClose(FileFindHandle_t handle)
|
|
||||||
{
|
|
||||||
filesystem->FindClose(handle);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static VFileSystem_Logic logic_filesystem;
|
|
||||||
|
|
||||||
static void add_natives(sp_nativeinfo_t *natives)
|
static void add_natives(sp_nativeinfo_t *natives)
|
||||||
{
|
{
|
||||||
g_pCoreNatives->AddNatives(natives);
|
g_pCoreNatives->AddNatives(natives);
|
||||||
@@ -178,32 +159,20 @@ static const char *get_source_engine_name()
|
|||||||
return "bloodygoodtime";
|
return "bloodygoodtime";
|
||||||
#elif SOURCE_ENGINE == SE_EYE
|
#elif SOURCE_ENGINE == SE_EYE
|
||||||
return "eye";
|
return "eye";
|
||||||
#elif SOURCE_ENGINE == SE_CSS
|
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
return "css";
|
return "orangebox_valve";
|
||||||
#elif SOURCE_ENGINE == SE_HL2DM
|
|
||||||
return "hl2dm";
|
|
||||||
#elif SOURCE_ENGINE == SE_DODS
|
|
||||||
return "dods";
|
|
||||||
#elif SOURCE_ENGINE == SE_TF2
|
|
||||||
return "tf2";
|
|
||||||
#elif SOURCE_ENGINE == SE_LEFT4DEAD
|
#elif SOURCE_ENGINE == SE_LEFT4DEAD
|
||||||
return "left4dead";
|
return "left4dead";
|
||||||
#elif SOURCE_ENGINE == SE_NUCLEARDAWN
|
|
||||||
return "nucleardawn";
|
|
||||||
#elif SOURCE_ENGINE == SE_LEFT4DEAD2
|
#elif SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||||
return "left4dead2";
|
return "left4dead2";
|
||||||
#elif SOURCE_ENGINE == SE_ALIENSWARM
|
#elif SOURCE_ENGINE == SE_ALIENSWARM
|
||||||
return "alienswarm";
|
return "alienswarm";
|
||||||
#elif SOURCE_ENGINE == SE_PORTAL2
|
|
||||||
return "portal2";
|
|
||||||
#elif SOURCE_ENGINE == SE_CSGO
|
|
||||||
return "csgo";
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool symbols_are_hidden()
|
static bool symbols_are_hidden()
|
||||||
{
|
{
|
||||||
#if (SOURCE_ENGINE == SE_CSS) || (SOURCE_ENGINE == SE_HL2DM) || (SOURCE_ENGINE == SE_DODS) || (SOURCE_ENGINE == SE_TF2) || (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_NUCLEARDAWN) || (SOURCE_ENGINE == SE_LEFT4DEAD2) || (SOURCE_ENGINE == SE_CSGO)
|
#if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
@@ -225,7 +194,6 @@ static sm_core_t core_bridge =
|
|||||||
&g_SourceMod,
|
&g_SourceMod,
|
||||||
&g_LibSys,
|
&g_LibSys,
|
||||||
reinterpret_cast<IVEngineServer*>(&logic_engine),
|
reinterpret_cast<IVEngineServer*>(&logic_engine),
|
||||||
reinterpret_cast<IFileSystem*>(&logic_filesystem),
|
|
||||||
&g_ShareSys,
|
&g_ShareSys,
|
||||||
&g_RootMenu,
|
&g_RootMenu,
|
||||||
&g_PluginSys,
|
&g_PluginSys,
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sourcemod_mm", "sourcemod_m
|
|||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
CrazyDebug - Alien Swarm|Win32 = CrazyDebug - Alien Swarm|Win32
|
|
||||||
CrazyDebug - CS GO|Win32 = CrazyDebug - CS GO|Win32
|
|
||||||
CrazyDebug - Dark Messiah|Win32 = CrazyDebug - Dark Messiah|Win32
|
CrazyDebug - Dark Messiah|Win32 = CrazyDebug - Dark Messiah|Win32
|
||||||
CrazyDebug - Episode 1|Win32 = CrazyDebug - Episode 1|Win32
|
CrazyDebug - Episode 1|Win32 = CrazyDebug - Episode 1|Win32
|
||||||
CrazyDebug - Left 4 Dead 2|Win32 = CrazyDebug - Left 4 Dead 2|Win32
|
CrazyDebug - Left 4 Dead 2|Win32 = CrazyDebug - Left 4 Dead 2|Win32
|
||||||
@@ -14,8 +12,6 @@ Global
|
|||||||
CrazyDebug - Old Metamod|Win32 = CrazyDebug - Old Metamod|Win32
|
CrazyDebug - Old Metamod|Win32 = CrazyDebug - Old Metamod|Win32
|
||||||
CrazyDebug - Orange Box Valve|Win32 = CrazyDebug - Orange Box Valve|Win32
|
CrazyDebug - Orange Box Valve|Win32 = CrazyDebug - Orange Box Valve|Win32
|
||||||
CrazyDebug - Orange Box|Win32 = CrazyDebug - Orange Box|Win32
|
CrazyDebug - Orange Box|Win32 = CrazyDebug - Orange Box|Win32
|
||||||
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 - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
|
||||||
Debug - Episode 1|Win32 = Debug - Episode 1|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 2|Win32 = Debug - Left 4 Dead 2|Win32
|
||||||
@@ -23,8 +19,6 @@ Global
|
|||||||
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
|
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
|
||||||
Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32
|
Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32
|
||||||
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
|
Debug - Orange Box|Win32 = Debug - Orange Box|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 - Dark Messiah|Win32 = Release - Dark Messiah|Win32
|
||||||
Release - Episode 1|Win32 = Release - Episode 1|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 2|Win32 = Release - Left 4 Dead 2|Win32
|
||||||
@@ -34,10 +28,6 @@ Global
|
|||||||
Release - Orange Box|Win32 = Release - Orange Box|Win32
|
Release - Orange Box|Win32 = Release - Orange Box|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Alien Swarm|Win32.ActiveCfg = CrazyDebug - Alien Swarm|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Alien Swarm|Win32.Build.0 = CrazyDebug - Alien Swarm|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - CS GO|Win32.ActiveCfg = CrazyDebug - CS GO|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - CS GO|Win32.Build.0 = CrazyDebug - CS GO|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Dark Messiah|Win32.ActiveCfg = CrazyDebug - Dark Messiah|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Dark Messiah|Win32.ActiveCfg = CrazyDebug - Dark Messiah|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Dark Messiah|Win32.Build.0 = CrazyDebug - Dark Messiah|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Dark Messiah|Win32.Build.0 = CrazyDebug - Dark Messiah|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Episode 1|Win32.ActiveCfg = CrazyDebug - Episode 1|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Episode 1|Win32.ActiveCfg = CrazyDebug - Episode 1|Win32
|
||||||
@@ -52,10 +42,6 @@ Global
|
|||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Orange Box Valve|Win32.Build.0 = CrazyDebug - Orange Box Valve|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Orange Box Valve|Win32.Build.0 = CrazyDebug - Orange Box Valve|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Orange Box|Win32.ActiveCfg = CrazyDebug - Orange Box|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Orange Box|Win32.ActiveCfg = CrazyDebug - Orange Box|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Orange Box|Win32.Build.0 = CrazyDebug - Orange Box|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Orange Box|Win32.Build.0 = CrazyDebug - Orange Box|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Alien Swarm|Win32.ActiveCfg = Debug - Alien Swarm|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Alien Swarm|Win32.Build.0 = Debug - Alien Swarm|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - CS GO|Win32.ActiveCfg = Debug - CS GO|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - CS GO|Win32.Build.0 = Debug - CS GO|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32
|
||||||
@@ -70,10 +56,6 @@ Global
|
|||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Alien Swarm|Win32.ActiveCfg = Release - Alien Swarm|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Alien Swarm|Win32.Build.0 = Release - Alien Swarm|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - CS GO|Win32.ActiveCfg = Release - CS GO|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - CS GO|Win32.Build.0 = Release - CS GO|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+282
-1128
File diff suppressed because it is too large
Load Diff
@@ -25,12 +25,6 @@
|
|||||||
<UniqueIdentifier>{2A750240-7C10-455f-A900-B9A9D362356C}</UniqueIdentifier>
|
<UniqueIdentifier>{2A750240-7C10-455f-A900-B9A9D362356C}</UniqueIdentifier>
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="HL2SDK\Protobuf">
|
|
||||||
<UniqueIdentifier>{28cf0347-3553-4d24-b9ad-476ba5197680}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="HL2SDK\Protobuf\CSGO">
|
|
||||||
<UniqueIdentifier>{0e62c72e-57b1-40d2-9a94-059f535ce719}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\AdminCache.cpp">
|
<ClCompile Include="..\AdminCache.cpp">
|
||||||
@@ -204,18 +198,6 @@
|
|||||||
<ClCompile Include="..\smn_vector.cpp">
|
<ClCompile Include="..\smn_vector.cpp">
|
||||||
<Filter>Natives</Filter>
|
<Filter>Natives</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\..\hl2sdks\hl2sdk-csgo\public\game\shared\csgo\protobuf\cstrike15_usermessage_helpers.cpp">
|
|
||||||
<Filter>HL2SDK\Protobuf\CSGO</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\hl2sdks\hl2sdk-csgo\public\game\shared\csgo\protobuf\cstrike15_usermessages.pb.cc">
|
|
||||||
<Filter>HL2SDK\Protobuf\CSGO</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\hl2sdks\hl2sdk-csgo\public\engine\protobuf\netmessages.pb.cc">
|
|
||||||
<Filter>HL2SDK\Protobuf</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\smn_protobuf.cpp">
|
|
||||||
<Filter>Natives</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\AdminCache.h">
|
<ClInclude Include="..\AdminCache.h">
|
||||||
@@ -227,6 +209,9 @@
|
|||||||
<ClInclude Include="..\CDataPack.h">
|
<ClInclude Include="..\CDataPack.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\CellArray.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\CellRecipientFilter.h">
|
<ClInclude Include="..\CellRecipientFilter.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -272,6 +257,9 @@
|
|||||||
<ClInclude Include="..\frame_hooks.h">
|
<ClInclude Include="..\frame_hooks.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\GameConfigs.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\HalfLife2.h">
|
<ClInclude Include="..\HalfLife2.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -287,6 +275,9 @@
|
|||||||
<ClInclude Include="..\logic_bridge.h">
|
<ClInclude Include="..\logic_bridge.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\MemoryUtils.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\MenuManager.h">
|
<ClInclude Include="..\MenuManager.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -311,6 +302,9 @@
|
|||||||
<ClInclude Include="..\NextMap.h">
|
<ClInclude Include="..\NextMap.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\PhraseCollection.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\PlayerManager.h">
|
<ClInclude Include="..\PlayerManager.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -335,6 +329,9 @@
|
|||||||
<ClInclude Include="..\sm_memtable.h">
|
<ClInclude Include="..\sm_memtable.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\public\sm_platform.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\sm_queue.h">
|
<ClInclude Include="..\sm_queue.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -347,12 +344,18 @@
|
|||||||
<ClInclude Include="..\sm_stringutil.h">
|
<ClInclude Include="..\sm_stringutil.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\sm_symtable.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\sm_trie.h">
|
<ClInclude Include="..\sm_trie.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\public\sm_trie_tpl.h">
|
<ClInclude Include="..\..\public\sm_trie_tpl.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\sm_version.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\smn_usermsgs.h">
|
<ClInclude Include="..\smn_usermsgs.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -365,6 +368,9 @@
|
|||||||
<ClInclude Include="..\TimerSys.h">
|
<ClInclude Include="..\TimerSys.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Translator.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\UserMessages.h">
|
<ClInclude Include="..\UserMessages.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -452,42 +458,10 @@
|
|||||||
<ClInclude Include="..\convar_sm.h">
|
<ClInclude Include="..\convar_sm.h">
|
||||||
<Filter>HL2SDK</Filter>
|
<Filter>HL2SDK</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\public\sm_platform.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\public\sourcemod_version.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\convar_sm_l4d.h">
|
|
||||||
<Filter>HL2SDK</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\convar_sm_ob.h">
|
|
||||||
<Filter>HL2SDK</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\convar_sm_swarm.h">
|
|
||||||
<Filter>HL2SDK</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\hl2sdks\hl2sdk-csgo\public\game\shared\csgo\protobuf\cstrike15_usermessage_helpers.h">
|
|
||||||
<Filter>HL2SDK\Protobuf\CSGO</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\hl2sdks\hl2sdk-csgo\public\game\shared\csgo\protobuf\cstrike15_usermessages.pb.h">
|
|
||||||
<Filter>HL2SDK\Protobuf\CSGO</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\hl2sdks\hl2sdk-csgo\public\engine\protobuf\netmessages.pb.h">
|
|
||||||
<Filter>HL2SDK\Protobuf</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\version.rc">
|
<ResourceCompile Include="..\version.rc">
|
||||||
<Filter>Resources</Filter>
|
<Filter>Resources</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Library Include="..\..\..\hl2sdks\hl2sdk-csgo\lib\win32\release\vs2010\libprotobuf.lib">
|
|
||||||
<Filter>HL2SDK\Protobuf</Filter>
|
|
||||||
</Library>
|
|
||||||
<Library Include="..\..\..\hl2sdks\hl2sdk-csgo\lib\win32\debug\vs2010\libprotobuf.lib">
|
|
||||||
<Filter>HL2SDK\Protobuf</Filter>
|
|
||||||
</Library>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
+3
-4
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
RootConsoleMenu g_RootMenu;
|
RootConsoleMenu g_RootMenu;
|
||||||
|
|
||||||
ConVar sourcemod_version("sourcemod_version", SM_VERSION_STRING, FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY, "SourceMod Version");
|
ConVar sourcemod_version("sourcemod_version", SM_FULL_VERSION, FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY, "SourceMod Version");
|
||||||
|
|
||||||
RootConsoleMenu::RootConsoleMenu()
|
RootConsoleMenu::RootConsoleMenu()
|
||||||
{
|
{
|
||||||
@@ -329,17 +329,16 @@ void RootConsoleMenu::OnRootConsoleCommand(const char *cmdname, const CCommand &
|
|||||||
ConsolePrint(" Scott \"DS\" Ehlert");
|
ConsolePrint(" Scott \"DS\" Ehlert");
|
||||||
ConsolePrint(" Fyren");
|
ConsolePrint(" Fyren");
|
||||||
ConsolePrint(" Nicholas \"psychonic\" Hastings");
|
ConsolePrint(" Nicholas \"psychonic\" Hastings");
|
||||||
ConsolePrint(" Asher \"asherkin\" Baker");
|
|
||||||
ConsolePrint(" Borja \"faluco\" Ferrer");
|
ConsolePrint(" Borja \"faluco\" Ferrer");
|
||||||
ConsolePrint(" Pavol \"PM OnoTo\" Marko");
|
ConsolePrint(" Pavol \"PM OnoTo\" Marko");
|
||||||
ConsolePrint(" Special thanks to Liam, ferret, and Mani");
|
ConsolePrint(" Special thanks to asherkin, Liam, ferret, and Mani");
|
||||||
ConsolePrint(" Special thanks to Viper and SteamFriends");
|
ConsolePrint(" Special thanks to Viper and SteamFriends");
|
||||||
ConsolePrint(" http://www.sourcemod.net/");
|
ConsolePrint(" http://www.sourcemod.net/");
|
||||||
}
|
}
|
||||||
else if (strcmp(cmdname, "version") == 0)
|
else if (strcmp(cmdname, "version") == 0)
|
||||||
{
|
{
|
||||||
ConsolePrint(" SourceMod Version Information:");
|
ConsolePrint(" SourceMod Version Information:");
|
||||||
ConsolePrint(" SourceMod Version: %s", SM_VERSION_STRING);
|
ConsolePrint(" SourceMod Version: %s", SM_FULL_VERSION);
|
||||||
ConsolePrint(" SourcePawn Engine: %s (build %s)", g_pSourcePawn2->GetEngineName(), g_pSourcePawn2->GetVersionString());
|
ConsolePrint(" SourcePawn Engine: %s (build %s)", g_pSourcePawn2->GetEngineName(), g_pSourcePawn2->GetVersionString());
|
||||||
ConsolePrint(" SourcePawn API: v1 = %d, v2 = %d", g_pSourcePawn->GetEngineAPIVersion(), g_pSourcePawn2->GetAPIVersion());
|
ConsolePrint(" SourcePawn API: v1 = %d, v2 = %d", g_pSourcePawn->GetEngineAPIVersion(), g_pSourcePawn2->GetAPIVersion());
|
||||||
ConsolePrint(" Compiled on: %s %s", __DATE__, __TIME__);
|
ConsolePrint(" Compiled on: %s %s", __DATE__, __TIME__);
|
||||||
|
|||||||
@@ -29,16 +29,11 @@
|
|||||||
* Version: $Id$
|
* Version: $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "UserMessages.h"
|
|
||||||
|
|
||||||
#ifndef USE_PROTOBUF_USERMESSAGES
|
|
||||||
|
|
||||||
#include "sourcemod.h"
|
#include "sourcemod.h"
|
||||||
#include "HandleSys.h"
|
#include "HandleSys.h"
|
||||||
#include <bitbuf.h>
|
#include <bitbuf.h>
|
||||||
#include <vector.h>
|
#include <vector.h>
|
||||||
#include <HalfLife2.h>
|
#include <HalfLife2.h>
|
||||||
#include "smn_usermsgs.h"
|
|
||||||
|
|
||||||
static cell_t smn_BfWriteBool(IPluginContext *pCtx, const cell_t *params)
|
static cell_t smn_BfWriteBool(IPluginContext *pCtx, const cell_t *params)
|
||||||
{
|
{
|
||||||
@@ -718,5 +713,3 @@ REGISTER_NATIVES(bitbufnatives)
|
|||||||
{"BfGetNumBytesLeft", smn_BfGetNumBytesLeft},
|
{"BfGetNumBytesLeft", smn_BfGetNumBytesLeft},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
+6
-29
@@ -48,10 +48,6 @@
|
|||||||
#include "ConsoleDetours.h"
|
#include "ConsoleDetours.h"
|
||||||
#include "ConCommandBaseIterator.h"
|
#include "ConCommandBaseIterator.h"
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
#include <netmessages.pb.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE >= SE_EYE
|
#if SOURCE_ENGINE >= SE_EYE
|
||||||
#define NETMSG_BITS 6
|
#define NETMSG_BITS 6
|
||||||
#else
|
#else
|
||||||
@@ -726,9 +722,7 @@ static cell_t sm_RegConsoleCmd(IPluginContext *pContext, const cell_t *params)
|
|||||||
return pContext->ThrowNativeError("Invalid function id (%X)", params[2]);
|
return pContext->ThrowNativeError("Invalid function id (%X)", params[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
CPlugin *pPlugin = g_PluginSys.GetPluginByCtx(pContext->GetContext());
|
if (!g_ConCmds.AddConsoleCommand(pFunction, name, help, params[4]))
|
||||||
const char *group = pPlugin->GetFilename();
|
|
||||||
if (!g_ConCmds.AddAdminCommand(pFunction, name, group, 0, help, params[4]))
|
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Command \"%s\" could not be created. A convar with the same name already exists.", name);
|
return pContext->ThrowNativeError("Command \"%s\" could not be created. A convar with the same name already exists.", name);
|
||||||
}
|
}
|
||||||
@@ -913,7 +907,7 @@ cell_t g_ServerCommandBufferLength;
|
|||||||
|
|
||||||
bool g_ShouldCatchSpew = false;
|
bool g_ShouldCatchSpew = false;
|
||||||
|
|
||||||
#if SOURCE_ENGINE < SE_NUCLEARDAWN
|
#if SOURCE_ENGINE < SE_LEFT4DEAD2
|
||||||
SpewOutputFunc_t g_OriginalSpewOutputFunc = NULL;
|
SpewOutputFunc_t g_OriginalSpewOutputFunc = NULL;
|
||||||
|
|
||||||
SpewRetval_t SourcemodSpewOutputFunc(SpewType_t spewType, tchar const *pMsg)
|
SpewRetval_t SourcemodSpewOutputFunc(SpewType_t spewType, tchar const *pMsg)
|
||||||
@@ -952,7 +946,7 @@ CON_COMMAND(sm_conhook_start, "")
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE < SE_NUCLEARDAWN
|
#if SOURCE_ENGINE < SE_LEFT4DEAD2
|
||||||
g_OriginalSpewOutputFunc = GetSpewOutputFunc();
|
g_OriginalSpewOutputFunc = GetSpewOutputFunc();
|
||||||
SpewOutputFunc(SourcemodSpewOutputFunc);
|
SpewOutputFunc(SourcemodSpewOutputFunc);
|
||||||
#else
|
#else
|
||||||
@@ -973,7 +967,7 @@ CON_COMMAND(sm_conhook_stop, "")
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE < SE_NUCLEARDAWN
|
#if SOURCE_ENGINE < SE_LEFT4DEAD2
|
||||||
SpewOutputFunc(g_OriginalSpewOutputFunc);
|
SpewOutputFunc(g_OriginalSpewOutputFunc);
|
||||||
#else
|
#else
|
||||||
LoggingSystem_PopLoggingState(false);
|
LoggingSystem_PopLoggingState(false);
|
||||||
@@ -1097,8 +1091,6 @@ static cell_t FakeClientCommand(IPluginContext *pContext, const cell_t *params)
|
|||||||
return pContext->ThrowNativeError("Client %d is not connected", params[1]);
|
return pContext->ThrowNativeError("Client %d is not connected", params[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_SourceMod.SetGlobalTarget(params[1]);
|
|
||||||
|
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
|
g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
|
||||||
|
|
||||||
@@ -1126,8 +1118,6 @@ static cell_t FakeClientCommandEx(IPluginContext *pContext, const cell_t *params
|
|||||||
return pContext->ThrowNativeError("Client %d is not connected", params[1]);
|
return pContext->ThrowNativeError("Client %d is not connected", params[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_SourceMod.SetGlobalTarget(params[1]);
|
|
||||||
|
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
|
g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
|
||||||
|
|
||||||
@@ -1176,6 +1166,8 @@ static cell_t ReplyToCommand(IPluginContext *pContext, const cell_t *params)
|
|||||||
return pContext->ThrowNativeError("Client %d is not connected", params[1]);
|
return pContext->ThrowNativeError("Client %d is not connected", params[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_SourceMod.SetGlobalTarget(params[1]);
|
||||||
|
|
||||||
unsigned int replyto = g_ChatTriggers.GetReplyTo();
|
unsigned int replyto = g_ChatTriggers.GetReplyTo();
|
||||||
if (replyto == SM_REPLY_CONSOLE)
|
if (replyto == SM_REPLY_CONSOLE)
|
||||||
{
|
{
|
||||||
@@ -1433,25 +1425,10 @@ static cell_t SendConVarValue(IPluginContext *pContext, const cell_t *params)
|
|||||||
char data[256];
|
char data[256];
|
||||||
bf_write buffer(data, sizeof(data));
|
bf_write buffer(data, sizeof(data));
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
CNETMsg_SetConVar msg;
|
|
||||||
CMsg_CVars_CVar *cvar = msg.mutable_convars()->add_cvars();
|
|
||||||
|
|
||||||
cvar->set_name(pConVar->GetName());
|
|
||||||
cvar->set_value(value);
|
|
||||||
|
|
||||||
int msgsize = msg.ByteSize();
|
|
||||||
|
|
||||||
buffer.WriteVarInt32(net_SetConVar);
|
|
||||||
buffer.WriteVarInt32(msgsize);
|
|
||||||
msg.SerializeWithCachedSizesToArray( (uint8 *)( buffer.GetBasePointer() + buffer.GetNumBytesWritten() ) );
|
|
||||||
buffer.SeekToBit( ( buffer.GetNumBytesWritten() + msgsize ) * 8 );
|
|
||||||
#else
|
|
||||||
buffer.WriteUBitLong(NET_SETCONVAR, NETMSG_BITS);
|
buffer.WriteUBitLong(NET_SETCONVAR, NETMSG_BITS);
|
||||||
buffer.WriteByte(1);
|
buffer.WriteByte(1);
|
||||||
buffer.WriteString(pConVar->GetName());
|
buffer.WriteString(pConVar->GetName());
|
||||||
buffer.WriteString(value);
|
buffer.WriteString(value);
|
||||||
#endif
|
|
||||||
|
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(params[1]);
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(params[1]);
|
||||||
|
|
||||||
|
|||||||
+4
-15
@@ -1208,7 +1208,7 @@ static cell_t GetEntProp(IPluginContext *pContext, const cell_t *params)
|
|||||||
is_unsigned = ((pProp->GetFlags() & SPROP_UNSIGNED) == SPROP_UNSIGNED);
|
is_unsigned = ((pProp->GetFlags() & SPROP_UNSIGNED) == SPROP_UNSIGNED);
|
||||||
|
|
||||||
// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
|
// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
|
||||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
if (pProp->GetFlags() & SPROP_VARINT)
|
if (pProp->GetFlags() & SPROP_VARINT)
|
||||||
{
|
{
|
||||||
bit_count = sizeof(int) * 8;
|
bit_count = sizeof(int) * 8;
|
||||||
@@ -1306,7 +1306,7 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params)
|
|||||||
FIND_PROP_SEND(DPT_Int, "integer");
|
FIND_PROP_SEND(DPT_Int, "integer");
|
||||||
|
|
||||||
// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
|
// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
|
||||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
if (pProp->GetFlags() & SPROP_VARINT)
|
if (pProp->GetFlags() & SPROP_VARINT)
|
||||||
{
|
{
|
||||||
bit_count = sizeof(int) * 8;
|
bit_count = sizeof(int) * 8;
|
||||||
@@ -2030,7 +2030,7 @@ static int32_t SDKEntFlagToSMEntFlag(int flag)
|
|||||||
#if SOURCE_ENGINE == SE_ALIENSWARM
|
#if SOURCE_ENGINE == SE_ALIENSWARM
|
||||||
case FL_FREEZING:
|
case FL_FREEZING:
|
||||||
return ENTFLAG_FREEZING;
|
return ENTFLAG_FREEZING;
|
||||||
#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
|
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
case FL_EP2V_UNKNOWN:
|
case FL_EP2V_UNKNOWN:
|
||||||
return ENTFLAG_EP2V_UNKNOWN1;
|
return ENTFLAG_EP2V_UNKNOWN1;
|
||||||
#endif
|
#endif
|
||||||
@@ -2108,7 +2108,7 @@ static int32_t SMEntFlagToSDKEntFlag(int32_t flag)
|
|||||||
#if SOURCE_ENGINE == SE_ALIENSWARM
|
#if SOURCE_ENGINE == SE_ALIENSWARM
|
||||||
case ENTFLAG_FREEZING:
|
case ENTFLAG_FREEZING:
|
||||||
return FL_FREEZING;
|
return FL_FREEZING;
|
||||||
#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
|
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||||
case ENTFLAG_EP2V_UNKNOWN1:
|
case ENTFLAG_EP2V_UNKNOWN1:
|
||||||
return FL_EP2V_UNKNOWN;
|
return FL_EP2V_UNKNOWN;
|
||||||
#endif
|
#endif
|
||||||
@@ -2209,16 +2209,6 @@ static cell_t SetEntityFlags(IPluginContext *pContext, const cell_t *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t GetEntityAddress(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
CBaseEntity * pEntity = GetEntity(params[1]);
|
|
||||||
if (!pEntity)
|
|
||||||
{
|
|
||||||
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
|
|
||||||
}
|
|
||||||
return reinterpret_cast<cell_t>(pEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
REGISTER_NATIVES(entityNatives)
|
REGISTER_NATIVES(entityNatives)
|
||||||
{
|
{
|
||||||
{"ChangeEdictState", ChangeEdictState},
|
{"ChangeEdictState", ChangeEdictState},
|
||||||
@@ -2261,6 +2251,5 @@ REGISTER_NATIVES(entityNatives)
|
|||||||
{"SetEntPropFloat", SetEntPropFloat},
|
{"SetEntPropFloat", SetEntPropFloat},
|
||||||
{"SetEntPropString", SetEntPropString},
|
{"SetEntPropString", SetEntPropString},
|
||||||
{"SetEntPropVector", SetEntPropVector},
|
{"SetEntPropVector", SetEntPropVector},
|
||||||
{"GetEntityAddress", GetEntityAddress},
|
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ cell_t FakeNativeRouter(IPluginContext *pContext, const cell_t *params, void *pD
|
|||||||
/* Check if too many parameters were passed */
|
/* Check if too many parameters were passed */
|
||||||
if (params[0] > SP_MAX_EXEC_PARAMS)
|
if (params[0] > SP_MAX_EXEC_PARAMS)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Called native with too many parameters (%d>%d)", params[0], SP_MAX_EXEC_PARAMS);
|
return pContext->ThrowNativeError("Called native with too many parameters (%d>%d)", params[9], SP_MAX_EXEC_PARAMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if the native is paused */
|
/* Check if the native is paused */
|
||||||
|
|||||||
+7
-18
@@ -63,7 +63,7 @@ static cell_t IsMapValid(IPluginContext *pContext, const cell_t *params)
|
|||||||
char *map;
|
char *map;
|
||||||
pContext->LocalToString(params[1], &map);
|
pContext->LocalToString(params[1], &map);
|
||||||
|
|
||||||
return g_HL2.IsMapValid(map);
|
return engine->IsMapValid(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t IsDedicatedServer(IPluginContext *pContext, const cell_t *params)
|
static cell_t IsDedicatedServer(IPluginContext *pContext, const cell_t *params)
|
||||||
@@ -73,7 +73,7 @@ static cell_t IsDedicatedServer(IPluginContext *pContext, const cell_t *params)
|
|||||||
|
|
||||||
static cell_t GetEngineTime(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetEngineTime(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE >= SE_NUCLEARDAWN
|
#if SOURCE_ENGINE >= SE_LEFT4DEAD2
|
||||||
float fTime = Plat_FloatTime();
|
float fTime = Plat_FloatTime();
|
||||||
#else
|
#else
|
||||||
float fTime = engine->Time();
|
float fTime = engine->Time();
|
||||||
@@ -451,6 +451,10 @@ static cell_t smn_IsPlayerAlive(IPluginContext *pContext, const cell_t *params)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SOURCE_ENGINE_CSS
|
||||||
|
#define SOURCE_ENGINE_CSS 13
|
||||||
|
#endif
|
||||||
|
|
||||||
static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
|
static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
|
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
|
||||||
@@ -474,23 +478,14 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
|
|||||||
case SOURCE_ENGINE_EYE:
|
case SOURCE_ENGINE_EYE:
|
||||||
return 33;
|
return 33;
|
||||||
case SOURCE_ENGINE_CSS:
|
case SOURCE_ENGINE_CSS:
|
||||||
return 34;
|
case SOURCE_ENGINE_ORANGEBOXVALVE:
|
||||||
case SOURCE_ENGINE_ORANGEBOXVALVE_DEPRECATED:
|
|
||||||
case SOURCE_ENGINE_HL2DM:
|
|
||||||
case SOURCE_ENGINE_DODS:
|
|
||||||
case SOURCE_ENGINE_TF2:
|
|
||||||
return 35;
|
return 35;
|
||||||
case SOURCE_ENGINE_LEFT4DEAD:
|
case SOURCE_ENGINE_LEFT4DEAD:
|
||||||
return 40;
|
return 40;
|
||||||
case SOURCE_ENGINE_NUCLEARDAWN:
|
|
||||||
case SOURCE_ENGINE_LEFT4DEAD2:
|
case SOURCE_ENGINE_LEFT4DEAD2:
|
||||||
return 50;
|
return 50;
|
||||||
case SOURCE_ENGINE_ALIENSWARM:
|
case SOURCE_ENGINE_ALIENSWARM:
|
||||||
return 60;
|
return 60;
|
||||||
case SOURCE_ENGINE_PORTAL2:
|
|
||||||
return 70;
|
|
||||||
case SOURCE_ENGINE_CSGO:
|
|
||||||
return 80;
|
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -507,11 +502,6 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t GetEngineVersion(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
return g_SMAPI->GetSourceEngineBuild();
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t IndexToReference(IPluginContext *pContext, const cell_t *params)
|
static cell_t IndexToReference(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
if (params[1] >= NUM_ENT_ENTRIES || params[1] < 0)
|
if (params[1] >= NUM_ENT_ENTRIES || params[1] < 0)
|
||||||
@@ -563,7 +553,6 @@ REGISTER_NATIVES(halflifeNatives)
|
|||||||
{"ShowVGUIPanel", ShowVGUIPanel},
|
{"ShowVGUIPanel", ShowVGUIPanel},
|
||||||
{"IsPlayerAlive", smn_IsPlayerAlive},
|
{"IsPlayerAlive", smn_IsPlayerAlive},
|
||||||
{"GuessSDKVersion", GuessSDKVersion},
|
{"GuessSDKVersion", GuessSDKVersion},
|
||||||
{"GetEngineVersion", GetEngineVersion},
|
|
||||||
{"EntIndexToEntRef", IndexToReference},
|
{"EntIndexToEntRef", IndexToReference},
|
||||||
{"EntRefToEntIndex", ReferenceToIndex},
|
{"EntRefToEntIndex", ReferenceToIndex},
|
||||||
{"MakeCompatEntRef", ReferenceToBCompatRef},
|
{"MakeCompatEntRef", ReferenceToBCompatRef},
|
||||||
|
|||||||
+2
-36
@@ -37,10 +37,6 @@
|
|||||||
#include "HandleSys.h"
|
#include "HandleSys.h"
|
||||||
#include "logic_bridge.h"
|
#include "logic_bridge.h"
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
#include <game/shared/csgo/protobuf/cstrike15_usermessages.pb.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAX_HUD_CHANNELS 6
|
#define MAX_HUD_CHANNELS 6
|
||||||
|
|
||||||
int g_HudMsgNum = -1;
|
int g_HudMsgNum = -1;
|
||||||
@@ -312,39 +308,12 @@ static cell_t SetHudTextParamsEx(IPluginContext *pContext, const cell_t *params)
|
|||||||
|
|
||||||
void UTIL_SendHudText(int client, const hud_text_parms &textparms, const char *pMessage)
|
void UTIL_SendHudText(int client, const hud_text_parms &textparms, const char *pMessage)
|
||||||
{
|
{
|
||||||
|
bf_write *bf;
|
||||||
cell_t players[1];
|
cell_t players[1];
|
||||||
|
|
||||||
players[0] = client;
|
players[0] = client;
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
bf = g_UserMsgs.StartMessage(g_HudMsgNum, players, 1, 0);
|
||||||
// If or when we need to support multiple games per engine with this, we can switch to reflection
|
|
||||||
CCSUsrMsg_HudMsg *msg = (CCSUsrMsg_HudMsg *)g_UserMsgs.StartProtobufMessage(g_HudMsgNum, players, 1, 0);
|
|
||||||
msg->set_channel(textparms.channel & 0xFF);
|
|
||||||
|
|
||||||
CMsgVector2D *pos = msg->mutable_pos();
|
|
||||||
pos->set_x(textparms.x);
|
|
||||||
pos->set_y(textparms.y);
|
|
||||||
|
|
||||||
CMsgRGBA *color1 = msg->mutable_clr1();
|
|
||||||
color1->set_r(textparms.r1);
|
|
||||||
color1->set_g(textparms.g1);
|
|
||||||
color1->set_b(textparms.b1);
|
|
||||||
color1->set_a(textparms.a1);
|
|
||||||
|
|
||||||
CMsgRGBA *color2 = msg->mutable_clr2();
|
|
||||||
color2->set_r(textparms.r2);
|
|
||||||
color2->set_g(textparms.g2);
|
|
||||||
color2->set_b(textparms.b2);
|
|
||||||
color2->set_a(textparms.a2);
|
|
||||||
|
|
||||||
msg->set_effect(textparms.effect);
|
|
||||||
msg->set_fade_in_time(textparms.fadeinTime);
|
|
||||||
msg->set_fade_out_time(textparms.fadeoutTime);
|
|
||||||
msg->set_hold_time(textparms.holdTime);
|
|
||||||
msg->set_fx_time(textparms.fxTime);
|
|
||||||
msg->set_text(pMessage);
|
|
||||||
#else
|
|
||||||
bf_write *bf = g_UserMsgs.StartBitBufMessage(g_HudMsgNum, players, 1, 0);
|
|
||||||
bf->WriteByte(textparms.channel & 0xFF );
|
bf->WriteByte(textparms.channel & 0xFF );
|
||||||
bf->WriteFloat(textparms.x);
|
bf->WriteFloat(textparms.x);
|
||||||
bf->WriteFloat(textparms.y);
|
bf->WriteFloat(textparms.y);
|
||||||
@@ -362,7 +331,6 @@ void UTIL_SendHudText(int client, const hud_text_parms &textparms, const char *p
|
|||||||
bf->WriteFloat(textparms.holdTime);
|
bf->WriteFloat(textparms.holdTime);
|
||||||
bf->WriteFloat(textparms.fxTime);
|
bf->WriteFloat(textparms.fxTime);
|
||||||
bf->WriteString(pMessage);
|
bf->WriteString(pMessage);
|
||||||
#endif
|
|
||||||
g_UserMsgs.EndMessage();
|
g_UserMsgs.EndMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,7 +362,6 @@ static cell_t ShowSyncHudText(IPluginContext *pContext, const cell_t *params)
|
|||||||
return pContext->ThrowNativeError("Client %d is not in-game", client);
|
return pContext->ThrowNativeError("Client %d is not in-game", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_SourceMod.SetGlobalTarget(client);
|
|
||||||
g_SourceMod.FormatString(message_buffer, sizeof(message_buffer), pContext, params, 3);
|
g_SourceMod.FormatString(message_buffer, sizeof(message_buffer), pContext, params, 3);
|
||||||
if (pContext->GetLastNativeError() != SP_ERROR_NONE)
|
if (pContext->GetLastNativeError() != SP_ERROR_NONE)
|
||||||
{
|
{
|
||||||
@@ -467,7 +434,6 @@ static cell_t ShowHudText(IPluginContext *pContext, const cell_t *params)
|
|||||||
return pContext->ThrowNativeError("Client %d is not in-game", client);
|
return pContext->ThrowNativeError("Client %d is not in-game", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_SourceMod.SetGlobalTarget(client);
|
|
||||||
g_SourceMod.FormatString(message_buffer, sizeof(message_buffer), pContext, params, 3);
|
g_SourceMod.FormatString(message_buffer, sizeof(message_buffer), pContext, params, 3);
|
||||||
if (pContext->GetLastNativeError() != SP_ERROR_NONE)
|
if (pContext->GetLastNativeError() != SP_ERROR_NONE)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -844,6 +844,8 @@ static cell_t SetMenuTitle(IPluginContext *pContext, const cell_t *params)
|
|||||||
return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
|
return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_SourceMod.SetGlobalTarget(SOURCEMOD_SERVER_LANGUAGE);
|
||||||
|
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
|
g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
|
||||||
|
|
||||||
|
|||||||
+3
-45
@@ -66,22 +66,6 @@ static cell_t sm_GetMaxClients(IPluginContext *pCtx, const cell_t *params)
|
|||||||
return g_Players.MaxClients();
|
return g_Players.MaxClients();
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t sm_GetMaxHumanPlayers(IPluginContext *pCtx, const cell_t *params)
|
|
||||||
{
|
|
||||||
int maxHumans = -1;
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
|
||||||
maxHumans = serverClients->GetMaxHumanPlayers();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if( maxHumans == -1 )
|
|
||||||
{
|
|
||||||
return g_Players.MaxClients();
|
|
||||||
}
|
|
||||||
|
|
||||||
return maxHumans;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t sm_GetClientName(IPluginContext *pCtx, const cell_t *params)
|
static cell_t sm_GetClientName(IPluginContext *pCtx, const cell_t *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
@@ -156,41 +140,16 @@ static cell_t sm_GetClientAuthStr(IPluginContext *pCtx, const cell_t *params)
|
|||||||
return pCtx->ThrowNativeError("Client %d is not connected", index);
|
return pCtx->ThrowNativeError("Client %d is not connected", index);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool validate = true;
|
if (!pPlayer->IsAuthorized())
|
||||||
if (params[0] > 3)
|
|
||||||
{
|
|
||||||
validate = !!params[4];
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *authstr = pPlayer->GetAuthString(validate);
|
|
||||||
|
|
||||||
if (!authstr || authstr[0] == '\0')
|
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pCtx->StringToLocal(params[2], static_cast<size_t>(params[3]), authstr);
|
pCtx->StringToLocal(params[2], static_cast<size_t>(params[3]), pPlayer->GetAuthString());
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t sm_GetSteamAccountID(IPluginContext *pCtx, const cell_t *params)
|
|
||||||
{
|
|
||||||
int index = params[1];
|
|
||||||
if ((index < 1) || (index > g_Players.GetMaxClients()))
|
|
||||||
{
|
|
||||||
return pCtx->ThrowNativeError("Client index %d is invalid", index);
|
|
||||||
}
|
|
||||||
|
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
|
|
||||||
if (!pPlayer->IsConnected())
|
|
||||||
{
|
|
||||||
return pCtx->ThrowNativeError("Client %d is not connected", index);
|
|
||||||
}
|
|
||||||
|
|
||||||
return pPlayer->GetSteamAccountID(!!params[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t sm_IsClientConnected(IPluginContext *pCtx, const cell_t *params)
|
static cell_t sm_IsClientConnected(IPluginContext *pCtx, const cell_t *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
@@ -1400,6 +1359,7 @@ static cell_t KickClient(IPluginContext *pContext, const cell_t *params)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pPlayer->MarkAsBeingKicked();
|
||||||
g_HL2.AddDelayedKick(client, pPlayer->GetUserId(), buffer);
|
g_HL2.AddDelayedKick(client, pPlayer->GetUserId(), buffer);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@@ -1667,7 +1627,6 @@ REGISTER_NATIVES(playernatives)
|
|||||||
{"CanUserTarget", CanUserTarget},
|
{"CanUserTarget", CanUserTarget},
|
||||||
{"ChangeClientTeam", ChangeClientTeam},
|
{"ChangeClientTeam", ChangeClientTeam},
|
||||||
{"GetClientAuthString", sm_GetClientAuthStr},
|
{"GetClientAuthString", sm_GetClientAuthStr},
|
||||||
{"GetSteamAccountID", sm_GetSteamAccountID},
|
|
||||||
{"GetClientCount", sm_GetClientCount},
|
{"GetClientCount", sm_GetClientCount},
|
||||||
{"GetClientInfo", sm_GetClientInfo},
|
{"GetClientInfo", sm_GetClientInfo},
|
||||||
{"GetClientIP", sm_GetClientIP},
|
{"GetClientIP", sm_GetClientIP},
|
||||||
@@ -1675,7 +1634,6 @@ REGISTER_NATIVES(playernatives)
|
|||||||
{"GetClientTeam", GetClientTeam},
|
{"GetClientTeam", GetClientTeam},
|
||||||
{"GetClientUserId", GetClientUserId},
|
{"GetClientUserId", GetClientUserId},
|
||||||
{"GetMaxClients", sm_GetMaxClients},
|
{"GetMaxClients", sm_GetMaxClients},
|
||||||
{"GetMaxHumanPlayers", sm_GetMaxHumanPlayers},
|
|
||||||
{"GetUserAdmin", GetUserAdmin},
|
{"GetUserAdmin", GetUserAdmin},
|
||||||
{"GetUserFlagBits", GetUserFlagBits},
|
{"GetUserFlagBits", GetUserFlagBits},
|
||||||
{"IsClientAuthorized", sm_IsClientAuthorized},
|
{"IsClientAuthorized", sm_IsClientAuthorized},
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+9
-91
@@ -31,22 +31,15 @@
|
|||||||
|
|
||||||
#include "HandleSys.h"
|
#include "HandleSys.h"
|
||||||
#include "PluginSys.h"
|
#include "PluginSys.h"
|
||||||
|
#include "UserMessages.h"
|
||||||
#include "PlayerManager.h"
|
#include "PlayerManager.h"
|
||||||
#include "smn_usermsgs.h"
|
#include "smn_usermsgs.h"
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
#include "UserMessagePBHelpers.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HandleType_t g_ProtobufType = NO_HANDLE_TYPE;
|
|
||||||
HandleType_t g_WrBitBufType = NO_HANDLE_TYPE;
|
|
||||||
HandleType_t g_RdBitBufType = NO_HANDLE_TYPE;
|
|
||||||
|
|
||||||
|
HandleType_t g_WrBitBufType;
|
||||||
|
HandleType_t g_RdBitBufType;
|
||||||
Handle_t g_CurMsgHandle;
|
Handle_t g_CurMsgHandle;
|
||||||
|
|
||||||
#ifndef USE_PROTOBUF_USERMESSAGES
|
|
||||||
Handle_t g_ReadBufHandle;
|
Handle_t g_ReadBufHandle;
|
||||||
bf_read g_ReadBitBuf;
|
bf_read g_ReadBitBuf;
|
||||||
#endif
|
|
||||||
|
|
||||||
int g_MsgPlayers[256];
|
int g_MsgPlayers[256];
|
||||||
bool g_IsMsgInExec = false;
|
bool g_IsMsgInExec = false;
|
||||||
@@ -92,14 +85,10 @@ void UsrMessageNatives::OnSourceModAllInitialized()
|
|||||||
g_HandleSys.InitAccessDefaults(NULL, &sec);
|
g_HandleSys.InitAccessDefaults(NULL, &sec);
|
||||||
sec.access[HandleAccess_Delete] = HANDLE_RESTRICT_IDENTITY;
|
sec.access[HandleAccess_Delete] = HANDLE_RESTRICT_IDENTITY;
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
g_ProtobufType = g_HandleSys.CreateType("ProtobufUM", this, 0, NULL, NULL, g_pCoreIdent, NULL);
|
|
||||||
#else
|
|
||||||
g_WrBitBufType = g_HandleSys.CreateType("BitBufWriter", this, 0, NULL, NULL, g_pCoreIdent, NULL);
|
g_WrBitBufType = g_HandleSys.CreateType("BitBufWriter", this, 0, NULL, NULL, g_pCoreIdent, NULL);
|
||||||
g_RdBitBufType = g_HandleSys.CreateType("BitBufReader", this, 0, NULL, &sec, g_pCoreIdent, NULL);
|
g_RdBitBufType = g_HandleSys.CreateType("BitBufReader", this, 0, NULL, &sec, g_pCoreIdent, NULL);
|
||||||
|
|
||||||
g_ReadBufHandle = g_HandleSys.CreateHandle(g_RdBitBufType, &g_ReadBitBuf, NULL, g_pCoreIdent, NULL);
|
g_ReadBufHandle = g_HandleSys.CreateHandle(g_RdBitBufType, &g_ReadBitBuf, NULL, g_pCoreIdent, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
g_PluginSys.AddPluginsListener(this);
|
g_PluginSys.AddPluginsListener(this);
|
||||||
}
|
}
|
||||||
@@ -109,11 +98,6 @@ void UsrMessageNatives::OnSourceModShutdown()
|
|||||||
HandleSecurity sec;
|
HandleSecurity sec;
|
||||||
sec.pIdentity = g_pCoreIdent;
|
sec.pIdentity = g_pCoreIdent;
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
g_HandleSys.RemoveType(g_ProtobufType, g_pCoreIdent);
|
|
||||||
|
|
||||||
g_ProtobufType = 0;
|
|
||||||
#else
|
|
||||||
g_HandleSys.FreeHandle(g_ReadBufHandle, &sec);
|
g_HandleSys.FreeHandle(g_ReadBufHandle, &sec);
|
||||||
|
|
||||||
g_HandleSys.RemoveType(g_WrBitBufType, g_pCoreIdent);
|
g_HandleSys.RemoveType(g_WrBitBufType, g_pCoreIdent);
|
||||||
@@ -121,24 +105,15 @@ void UsrMessageNatives::OnSourceModShutdown()
|
|||||||
|
|
||||||
g_WrBitBufType = 0;
|
g_WrBitBufType = 0;
|
||||||
g_RdBitBufType = 0;
|
g_RdBitBufType = 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UsrMessageNatives::OnHandleDestroy(HandleType_t type, void *object)
|
void UsrMessageNatives::OnHandleDestroy(HandleType_t type, void *object)
|
||||||
{
|
{
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
delete (SMProtobufMessage *)object;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UsrMessageNatives::GetHandleApproxSize(HandleType_t type, void *object, unsigned int *pSize)
|
bool UsrMessageNatives::GetHandleApproxSize(HandleType_t type, void *object, unsigned int *pSize)
|
||||||
{
|
{
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
// Different messages have different sizes, but this works as an approximate
|
|
||||||
*pSize = sizeof(protobuf::Message) + sizeof(SMProtobufMessage);
|
|
||||||
#else
|
|
||||||
*pSize = sizeof(bf_read);
|
*pSize = sizeof(bf_read);
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -300,69 +275,37 @@ IPluginFunction *MsgListenerWrapper::GetNotifyFunction() const
|
|||||||
return m_Notify;
|
return m_Notify;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
void MsgListenerWrapper::OnUserMessage(int msg_id, protobuf::Message *msg, IRecipientFilter *pFilter)
|
|
||||||
#else
|
|
||||||
void MsgListenerWrapper::OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter)
|
void MsgListenerWrapper::OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
cell_t res;
|
cell_t res;
|
||||||
Handle_t hndl;
|
|
||||||
size_t size = _FillInPlayers(g_MsgPlayers, pFilter);
|
size_t size = _FillInPlayers(g_MsgPlayers, pFilter);
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
hndl = g_HandleSys.CreateHandle(g_ProtobufType, new SMProtobufMessage(msg), NULL, g_pCoreIdent, NULL);
|
|
||||||
#else
|
|
||||||
g_ReadBitBuf.StartReading(bf->GetBasePointer(), bf->GetNumBytesWritten());
|
g_ReadBitBuf.StartReading(bf->GetBasePointer(), bf->GetNumBytesWritten());
|
||||||
hndl = g_ReadBufHandle;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_Hook->PushCell(msg_id);
|
m_Hook->PushCell(msg_id);
|
||||||
m_Hook->PushCell(hndl);
|
m_Hook->PushCell(g_ReadBufHandle);
|
||||||
m_Hook->PushArray(g_MsgPlayers, size);
|
m_Hook->PushArray(g_MsgPlayers, size);
|
||||||
m_Hook->PushCell(size);
|
m_Hook->PushCell(size);
|
||||||
m_Hook->PushCell(pFilter->IsReliable());
|
m_Hook->PushCell(pFilter->IsReliable());
|
||||||
m_Hook->PushCell(pFilter->IsInitMessage());
|
m_Hook->PushCell(pFilter->IsInitMessage());
|
||||||
m_Hook->Execute(&res);
|
m_Hook->Execute(&res);
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
HandleSecurity sec;
|
|
||||||
sec.pIdentity = g_pCoreIdent;
|
|
||||||
g_HandleSys.FreeHandle(hndl, &sec);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
ResultType MsgListenerWrapper::InterceptUserMessage(int msg_id, protobuf::Message *msg, IRecipientFilter *pFilter)
|
|
||||||
#else
|
|
||||||
ResultType MsgListenerWrapper::InterceptUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter)
|
ResultType MsgListenerWrapper::InterceptUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Handle_t hndl;
|
|
||||||
cell_t res = static_cast<cell_t>(Pl_Continue);
|
cell_t res = static_cast<cell_t>(Pl_Continue);
|
||||||
size_t size = _FillInPlayers(g_MsgPlayers, pFilter);
|
size_t size = _FillInPlayers(g_MsgPlayers, pFilter);
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
hndl = g_HandleSys.CreateHandle(g_ProtobufType, new SMProtobufMessage(msg), NULL, g_pCoreIdent, NULL);
|
|
||||||
#else
|
|
||||||
g_ReadBitBuf.StartReading(bf->GetBasePointer(), bf->GetNumBytesWritten());
|
g_ReadBitBuf.StartReading(bf->GetBasePointer(), bf->GetNumBytesWritten());
|
||||||
hndl = g_ReadBufHandle;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_Intercept->PushCell(msg_id);
|
m_Intercept->PushCell(msg_id);
|
||||||
m_Intercept->PushCell(hndl);
|
m_Intercept->PushCell(g_ReadBufHandle);
|
||||||
m_Intercept->PushArray(g_MsgPlayers, size);
|
m_Intercept->PushArray(g_MsgPlayers, size);
|
||||||
m_Intercept->PushCell(size);
|
m_Intercept->PushCell(size);
|
||||||
m_Intercept->PushCell(pFilter->IsReliable());
|
m_Intercept->PushCell(pFilter->IsReliable());
|
||||||
m_Intercept->PushCell(pFilter->IsInitMessage());
|
m_Intercept->PushCell(pFilter->IsInitMessage());
|
||||||
m_Intercept->Execute(&res);
|
m_Intercept->Execute(&res);
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
HandleSecurity sec;
|
|
||||||
sec.pIdentity = g_pCoreIdent;
|
|
||||||
g_HandleSys.FreeHandle(hndl, &sec);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return static_cast<ResultType>(res);
|
return static_cast<ResultType>(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,11 +330,6 @@ void MsgListenerWrapper::OnPostUserMessage(int msg_id, bool sent)
|
|||||||
|
|
||||||
static UsrMessageNatives s_UsrMessageNatives;
|
static UsrMessageNatives s_UsrMessageNatives;
|
||||||
|
|
||||||
static cell_t smn_GetUserMessageType(IPluginContext *pCtx, const cell_t *params)
|
|
||||||
{
|
|
||||||
return g_UserMsgs.GetUserMessageType();
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t smn_GetUserMessageId(IPluginContext *pCtx, const cell_t *params)
|
static cell_t smn_GetUserMessageId(IPluginContext *pCtx, const cell_t *params)
|
||||||
{
|
{
|
||||||
char *msgname;
|
char *msgname;
|
||||||
@@ -415,6 +353,7 @@ static cell_t smn_StartMessage(IPluginContext *pCtx, const cell_t *params)
|
|||||||
cell_t *cl_array;
|
cell_t *cl_array;
|
||||||
unsigned int numClients;
|
unsigned int numClients;
|
||||||
int msgid;
|
int msgid;
|
||||||
|
bf_write *pBitBuf;
|
||||||
int client;
|
int client;
|
||||||
CPlayer *pPlayer = NULL;
|
CPlayer *pPlayer = NULL;
|
||||||
|
|
||||||
@@ -448,24 +387,13 @@ static cell_t smn_StartMessage(IPluginContext *pCtx, const cell_t *params)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
pBitBuf = g_UserMsgs.StartMessage(msgid, cl_array, numClients, params[4]);
|
||||||
protobuf::Message *msg = g_UserMsgs.StartProtobufMessage(msgid, cl_array, numClients, params[4]);
|
|
||||||
if (!msg)
|
|
||||||
{
|
|
||||||
return pCtx->ThrowNativeError("Unable to execute a new message while in hook");
|
|
||||||
}
|
|
||||||
|
|
||||||
g_CurMsgHandle = g_HandleSys.CreateHandle(g_ProtobufType, new SMProtobufMessage(msg), pCtx->GetIdentity(), g_pCoreIdent, NULL);
|
|
||||||
#else
|
|
||||||
bf_write *pBitBuf = g_UserMsgs.StartBitBufMessage(msgid, cl_array, numClients, params[4]);
|
|
||||||
if (!pBitBuf)
|
if (!pBitBuf)
|
||||||
{
|
{
|
||||||
return pCtx->ThrowNativeError("Unable to execute a new message while in hook");
|
return pCtx->ThrowNativeError("Unable to execute a new message while in hook");
|
||||||
}
|
}
|
||||||
|
|
||||||
g_CurMsgHandle = g_HandleSys.CreateHandle(g_WrBitBufType, pBitBuf, pCtx->GetIdentity(), g_pCoreIdent, NULL);
|
g_CurMsgHandle = g_HandleSys.CreateHandle(g_WrBitBufType, pBitBuf, pCtx->GetIdentity(), g_pCoreIdent, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
g_IsMsgInExec = true;
|
g_IsMsgInExec = true;
|
||||||
|
|
||||||
return g_CurMsgHandle;
|
return g_CurMsgHandle;
|
||||||
@@ -475,6 +403,7 @@ static cell_t smn_StartMessageEx(IPluginContext *pCtx, const cell_t *params)
|
|||||||
{
|
{
|
||||||
cell_t *cl_array;
|
cell_t *cl_array;
|
||||||
unsigned int numClients;
|
unsigned int numClients;
|
||||||
|
bf_write *pBitBuf;
|
||||||
int client;
|
int client;
|
||||||
CPlayer *pPlayer = NULL;
|
CPlayer *pPlayer = NULL;
|
||||||
int msgid = params[1];
|
int msgid = params[1];
|
||||||
@@ -507,23 +436,13 @@ static cell_t smn_StartMessageEx(IPluginContext *pCtx, const cell_t *params)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
pBitBuf = g_UserMsgs.StartMessage(msgid, cl_array, numClients, params[4]);
|
||||||
protobuf::Message *msg = g_UserMsgs.StartProtobufMessage(msgid, cl_array, numClients, params[4]);
|
|
||||||
if (!msg)
|
|
||||||
{
|
|
||||||
return pCtx->ThrowNativeError("Unable to execute a new message while in hook");
|
|
||||||
}
|
|
||||||
|
|
||||||
g_CurMsgHandle = g_HandleSys.CreateHandle(g_ProtobufType, new SMProtobufMessage(msg), pCtx->GetIdentity(), g_pCoreIdent, NULL);
|
|
||||||
#else
|
|
||||||
bf_write *pBitBuf = g_UserMsgs.StartBitBufMessage(msgid, cl_array, numClients, params[4]);
|
|
||||||
if (!pBitBuf)
|
if (!pBitBuf)
|
||||||
{
|
{
|
||||||
return pCtx->ThrowNativeError("Unable to execute a new message while in hook");
|
return pCtx->ThrowNativeError("Unable to execute a new message while in hook");
|
||||||
}
|
}
|
||||||
|
|
||||||
g_CurMsgHandle = g_HandleSys.CreateHandle(g_WrBitBufType, pBitBuf, pCtx->GetIdentity(), g_pCoreIdent, NULL);
|
g_CurMsgHandle = g_HandleSys.CreateHandle(g_WrBitBufType, pBitBuf, pCtx->GetIdentity(), g_pCoreIdent, NULL);
|
||||||
#endif
|
|
||||||
g_IsMsgInExec = true;
|
g_IsMsgInExec = true;
|
||||||
|
|
||||||
return g_CurMsgHandle;
|
return g_CurMsgHandle;
|
||||||
@@ -615,7 +534,6 @@ static cell_t smn_UnhookUserMessage(IPluginContext *pCtx, const cell_t *params)
|
|||||||
|
|
||||||
REGISTER_NATIVES(usrmsgnatives)
|
REGISTER_NATIVES(usrmsgnatives)
|
||||||
{
|
{
|
||||||
{"GetUserMessageType", smn_GetUserMessageType},
|
|
||||||
{"GetUserMessageId", smn_GetUserMessageId},
|
{"GetUserMessageId", smn_GetUserMessageId},
|
||||||
{"GetUserMessageName", smn_GetUserMessageName},
|
{"GetUserMessageName", smn_GetUserMessageName},
|
||||||
{"StartMessage", smn_StartMessage},
|
{"StartMessage", smn_StartMessage},
|
||||||
|
|||||||
+2
-16
@@ -32,14 +32,9 @@
|
|||||||
#ifndef _INCLUDE_SOURCEMOD_CMSGLISTENERWRAPPER_H_
|
#ifndef _INCLUDE_SOURCEMOD_CMSGLISTENERWRAPPER_H_
|
||||||
#define _INCLUDE_SOURCEMOD_CMSGLISTENERWRAPPER_H_
|
#define _INCLUDE_SOURCEMOD_CMSGLISTENERWRAPPER_H_
|
||||||
|
|
||||||
#include "UserMessages.h"
|
extern int g_MsgPlayers[256];
|
||||||
|
|
||||||
class MsgListenerWrapper
|
class MsgListenerWrapper : public IUserMessageListener
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
: public IProtobufUserMessageListener
|
|
||||||
#else
|
|
||||||
: public IBitBufUserMessageListener
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void Initialize(int msgid, IPluginFunction *hook, IPluginFunction *notify, bool intercept);
|
void Initialize(int msgid, IPluginFunction *hook, IPluginFunction *notify, bool intercept);
|
||||||
@@ -48,13 +43,8 @@ public:
|
|||||||
IPluginFunction *GetHookedFunction() const;
|
IPluginFunction *GetHookedFunction() const;
|
||||||
IPluginFunction *GetNotifyFunction() const;
|
IPluginFunction *GetNotifyFunction() const;
|
||||||
public: //IUserMessageListener
|
public: //IUserMessageListener
|
||||||
#ifdef USE_PROTOBUF_USERMESSAGES
|
|
||||||
void OnUserMessage(int msg_id, protobuf::Message *msg, IRecipientFilter *pFilter);
|
|
||||||
ResultType InterceptUserMessage(int msg_id, protobuf::Message *msg, IRecipientFilter *pFilter);
|
|
||||||
#else
|
|
||||||
void OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter);
|
void OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter);
|
||||||
ResultType InterceptUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter);
|
ResultType InterceptUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter);
|
||||||
#endif
|
|
||||||
void OnPostUserMessage(int msg_id, bool sent);
|
void OnPostUserMessage(int msg_id, bool sent);
|
||||||
private:
|
private:
|
||||||
size_t _FillInPlayers(int *pl_array, IRecipientFilter *pFilter);
|
size_t _FillInPlayers(int *pl_array, IRecipientFilter *pFilter);
|
||||||
@@ -66,8 +56,4 @@ private:
|
|||||||
int m_MsgId;
|
int m_MsgId;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern HandleType_t g_WrBitBufType;
|
|
||||||
extern HandleType_t g_RdBitBufType;
|
|
||||||
extern HandleType_t g_ProtobufType;
|
|
||||||
|
|
||||||
#endif //_INCLUDE_SOURCEMOD_CMSGLISTENERWRAPPER_H_
|
#endif //_INCLUDE_SOURCEMOD_CMSGLISTENERWRAPPER_H_
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ CallClass<IVEngineServer> *enginePatch = NULL;
|
|||||||
CallClass<IServerGameDLL> *gamedllPatch = NULL;
|
CallClass<IServerGameDLL> *gamedllPatch = NULL;
|
||||||
IPlayerInfoManager *playerinfo = NULL;
|
IPlayerInfoManager *playerinfo = NULL;
|
||||||
IBaseFileSystem *basefilesystem = NULL;
|
IBaseFileSystem *basefilesystem = NULL;
|
||||||
IFileSystem *filesystem = NULL;
|
|
||||||
IEngineSound *enginesound = NULL;
|
IEngineSound *enginesound = NULL;
|
||||||
IServerPluginHelpers *serverpluginhelpers = NULL;
|
IServerPluginHelpers *serverpluginhelpers = NULL;
|
||||||
IServerPluginCallbacks *vsp_interface = NULL;
|
IServerPluginCallbacks *vsp_interface = NULL;
|
||||||
@@ -69,7 +68,6 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen
|
|||||||
GET_V_IFACE_CURRENT(GetEngineFactory, gameevents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2);
|
GET_V_IFACE_CURRENT(GetEngineFactory, gameevents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2);
|
||||||
GET_V_IFACE_CURRENT(GetEngineFactory, engrandom, IUniformRandomStream, VENGINE_SERVER_RANDOM_INTERFACE_VERSION);
|
GET_V_IFACE_CURRENT(GetEngineFactory, engrandom, IUniformRandomStream, VENGINE_SERVER_RANDOM_INTERFACE_VERSION);
|
||||||
GET_V_IFACE_CURRENT(GetFileSystemFactory, basefilesystem, IBaseFileSystem, BASEFILESYSTEM_INTERFACE_VERSION);
|
GET_V_IFACE_CURRENT(GetFileSystemFactory, basefilesystem, IBaseFileSystem, BASEFILESYSTEM_INTERFACE_VERSION);
|
||||||
GET_V_IFACE_CURRENT(GetFileSystemFactory, filesystem, IFileSystem, FILESYSTEM_INTERFACE_VERSION);
|
|
||||||
GET_V_IFACE_CURRENT(GetEngineFactory, enginesound, IEngineSound, IENGINESOUND_SERVER_INTERFACE_VERSION);
|
GET_V_IFACE_CURRENT(GetEngineFactory, enginesound, IEngineSound, IENGINESOUND_SERVER_INTERFACE_VERSION);
|
||||||
GET_V_IFACE_CURRENT(GetEngineFactory, serverpluginhelpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS);
|
GET_V_IFACE_CURRENT(GetEngineFactory, serverpluginhelpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS);
|
||||||
|
|
||||||
@@ -147,7 +145,7 @@ const char *SourceMod_Core::GetLicense()
|
|||||||
|
|
||||||
const char *SourceMod_Core::GetVersion()
|
const char *SourceMod_Core::GetVersion()
|
||||||
{
|
{
|
||||||
return SM_VERSION_STRING;
|
return SM_FULL_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *SourceMod_Core::GetDate()
|
const char *SourceMod_Core::GetDate()
|
||||||
|
|||||||
+3
-4
@@ -32,11 +32,11 @@
|
|||||||
#ifndef _INCLUDE_SOURCEMOD_MM_API_H_
|
#ifndef _INCLUDE_SOURCEMOD_MM_API_H_
|
||||||
#define _INCLUDE_SOURCEMOD_MM_API_H_
|
#define _INCLUDE_SOURCEMOD_MM_API_H_
|
||||||
|
|
||||||
#if SOURCE_ENGINE >= SE_ALIENSWARM
|
#if SOURCE_ENGINE == SE_ALIENSWARM
|
||||||
#include "convar_sm_swarm.h"
|
#include "convar_sm_swarm.h"
|
||||||
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
|
#elif (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||||
#include "convar_sm_l4d.h"
|
#include "convar_sm_l4d.h"
|
||||||
#elif SOURCE_ENGINE >= SE_ORANGEBOX
|
#elif (SOURCE_ENGINE == SE_ORANGEBOX) || (SOURCE_ENGINE == SE_BLOODYGOODTIME) || (SOURCE_ENGINE == SE_EYE) || (SOURCE_ENGINE == SE_ORANGEBOXVALVE)
|
||||||
#include "convar_sm_ob.h"
|
#include "convar_sm_ob.h"
|
||||||
#else
|
#else
|
||||||
#include "convar_sm.h"
|
#include "convar_sm.h"
|
||||||
@@ -99,7 +99,6 @@ extern SourceHook::CallClass<IServerGameDLL> *gamedllPatch;
|
|||||||
extern IUniformRandomStream *engrandom;
|
extern IUniformRandomStream *engrandom;
|
||||||
extern IPlayerInfoManager *playerinfo;
|
extern IPlayerInfoManager *playerinfo;
|
||||||
extern IBaseFileSystem *basefilesystem;
|
extern IBaseFileSystem *basefilesystem;
|
||||||
extern IFileSystem *filesystem;
|
|
||||||
extern IEngineSound *enginesound;
|
extern IEngineSound *enginesound;
|
||||||
extern IServerPluginHelpers *serverpluginhelpers;
|
extern IServerPluginHelpers *serverpluginhelpers;
|
||||||
extern IServerPluginCallbacks *vsp_interface;
|
extern IServerPluginCallbacks *vsp_interface;
|
||||||
|
|||||||
@@ -152,5 +152,7 @@ private:
|
|||||||
extern bool g_Loaded;
|
extern bool g_Loaded;
|
||||||
extern bool sm_show_debug_spew;
|
extern bool sm_show_debug_spew;
|
||||||
extern SourceModBase g_SourceMod;
|
extern SourceModBase g_SourceMod;
|
||||||
|
extern HandleType_t g_WrBitBufType; //:TODO: find a better place for this
|
||||||
|
extern HandleType_t g_RdBitBufType; //:TODO: find a better place for this
|
||||||
|
|
||||||
#endif //_INCLUDE_SOURCEMOD_GLOBALHEADER_H_
|
#endif //_INCLUDE_SOURCEMOD_GLOBALHEADER_H_
|
||||||
|
|||||||
+4
-4
@@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION SM_VERSION_FILE
|
FILEVERSION SM_FILE_VERSION
|
||||||
PRODUCTVERSION SM_VERSION_FILE
|
PRODUCTVERSION SM_FILE_VERSION
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -47,12 +47,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Comments", "SourceMod"
|
VALUE "Comments", "SourceMod"
|
||||||
VALUE "FileDescription", "SourceMod Core"
|
VALUE "FileDescription", "SourceMod Core"
|
||||||
VALUE "FileVersion", SM_VERSION_STRING
|
VALUE "FileVersion", SM_FULL_VERSION
|
||||||
VALUE "InternalName", "sourcemod"
|
VALUE "InternalName", "sourcemod"
|
||||||
VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC"
|
VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC"
|
||||||
VALUE "OriginalFilename", BINARY_NAME
|
VALUE "OriginalFilename", BINARY_NAME
|
||||||
VALUE "ProductName", "SourceMod"
|
VALUE "ProductName", "SourceMod"
|
||||||
VALUE "ProductVersion", SM_VERSION_STRING
|
VALUE "ProductVersion", SM_FULL_VERSION
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ binary.AddSourceFiles('extensions/bintools', [
|
|||||||
'sdk/smsdk_ext.cpp'
|
'sdk/smsdk_ext.cpp'
|
||||||
])
|
])
|
||||||
SM.AutoVersion('extensions/bintools', binary)
|
SM.AutoVersion('extensions/bintools', binary)
|
||||||
SM.ExtractDebugInfo(extension, binary)
|
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ bool BinTools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|||||||
|
|
||||||
const char *BinTools::GetExtensionVerString()
|
const char *BinTools::GetExtensionVerString()
|
||||||
{
|
{
|
||||||
return SM_VERSION_STRING;
|
return SM_FULL_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *BinTools::GetExtensionDateString()
|
const char *BinTools::GetExtensionDateString()
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
|
||||||
# Visual Studio 2010
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bintools", "bintools.vcxproj", "{E38F65D9-74B2-4373-B46A-DBB76F579F98}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
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
|
|
||||||
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
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Old Metamod|Win32.Build.0 = Debug - Old Metamod|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Old Metamod|Win32.Build.0 = Release - Old Metamod|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
|
|
||||||
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -1,154 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{E38F65D9-74B2-4373-B46A-DBB76F579F98}</ProjectGuid>
|
|
||||||
<RootNamespace>bintools</RootNamespace>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<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" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<TargetName>bintools.ext</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<TargetName>bintools.ext</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<AdditionalOptions>
|
|
||||||
</AdditionalOptions>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\jit;..\..\..\public\jit\x86;..\..\..\public\extensions;..\..\..\public\sourcepawn;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BINTOOLS_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;ORANGEBOX_BUILD;HOOKING_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="\"$(TargetFileName)\"";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<IgnoreStandardIncludePath>
|
|
||||||
</IgnoreStandardIncludePath>
|
|
||||||
<AdditionalIncludeDirectories>..\..\..\public</AdditionalIncludeDirectories>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<AdditionalOptions>
|
|
||||||
</AdditionalOptions>
|
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\jit;..\..\..\public\jit\x86;..\..\..\public\extensions;..\..\..\public\sourcepawn;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BINTOOLS_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;HOOKING_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="\"$(TargetFileName)\"";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<IgnoreStandardIncludePath>
|
|
||||||
</IgnoreStandardIncludePath>
|
|
||||||
<AdditionalIncludeDirectories>..\..\..\public</AdditionalIncludeDirectories>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\extension.cpp" />
|
|
||||||
<ClCompile Include="..\CallMaker.cpp" />
|
|
||||||
<ClCompile Include="..\CallWrapper.cpp" />
|
|
||||||
<ClCompile Include="..\HookWrapper.cpp" />
|
|
||||||
<ClCompile Include="..\jit_call.cpp" />
|
|
||||||
<ClCompile Include="..\jit_hook.cpp" />
|
|
||||||
<ClCompile Include="..\sdk\smsdk_ext.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\extension.h" />
|
|
||||||
<ClInclude Include="..\..\..\public\extensions\IBinTools.h" />
|
|
||||||
<ClInclude Include="..\CallMaker.h" />
|
|
||||||
<ClInclude Include="..\CallWrapper.h" />
|
|
||||||
<ClInclude Include="..\HookWrapper.h" />
|
|
||||||
<ClInclude Include="..\jit_compile.h" />
|
|
||||||
<ClInclude Include="..\sdk\smsdk_config.h" />
|
|
||||||
<ClInclude Include="..\sdk\smsdk_ext.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="..\version.rc" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{0318D835-E129-4fe0-9B9C-C810AC179F31}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{9021A2EF-600E-4028-AE3E-9DDA4C94264C}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{C06F7BFF-18EE-4994-8572-D6383011354B}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="BinTools">
|
|
||||||
<UniqueIdentifier>{7BD12831-E179-4961-A3B0-BA9FCF311C7E}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="BinTools\Header Files">
|
|
||||||
<UniqueIdentifier>{2B033553-ECC7-42cc-AD11-D1D985D8BC5A}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="BinTools\Source Files">
|
|
||||||
<UniqueIdentifier>{F70EA5AC-224C-448f-A72D-11C2D06208B3}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="SourceMod SDK">
|
|
||||||
<UniqueIdentifier>{6183251D-B1E4-4cc6-93B2-A0111B2115BA}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Interfaces">
|
|
||||||
<UniqueIdentifier>{7DE81EA3-99D9-4f34-823A-B314791F3514}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\extension.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\CallMaker.cpp">
|
|
||||||
<Filter>BinTools\Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\CallWrapper.cpp">
|
|
||||||
<Filter>BinTools\Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\HookWrapper.cpp">
|
|
||||||
<Filter>BinTools\Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\jit_call.cpp">
|
|
||||||
<Filter>BinTools\Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\jit_hook.cpp">
|
|
||||||
<Filter>BinTools\Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\sdk\smsdk_ext.cpp">
|
|
||||||
<Filter>SourceMod SDK</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\extension.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\extensions\IBinTools.h">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\CallMaker.h">
|
|
||||||
<Filter>BinTools\Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\CallWrapper.h">
|
|
||||||
<Filter>BinTools\Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\HookWrapper.h">
|
|
||||||
<Filter>BinTools\Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\jit_compile.h">
|
|
||||||
<Filter>BinTools\Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\sdk\smsdk_config.h">
|
|
||||||
<Filter>SourceMod SDK</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\sdk\smsdk_ext.h">
|
|
||||||
<Filter>SourceMod SDK</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="..\version.rc">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</ResourceCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION SM_VERSION_FILE
|
FILEVERSION SM_FILE_VERSION
|
||||||
PRODUCTVERSION SM_VERSION_FILE
|
PRODUCTVERSION SM_FILE_VERSION
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -47,12 +47,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Comments", "BinTools Extension"
|
VALUE "Comments", "BinTools Extension"
|
||||||
VALUE "FileDescription", "SourceMod BinTools Extension"
|
VALUE "FileDescription", "SourceMod BinTools Extension"
|
||||||
VALUE "FileVersion", SM_VERSION_STRING
|
VALUE "FileVersion", SM_FULL_VERSION
|
||||||
VALUE "InternalName", "SourceMod BinTools Extension"
|
VALUE "InternalName", "SourceMod BinTools Extension"
|
||||||
VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC"
|
VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC"
|
||||||
VALUE "OriginalFilename", BINARY_NAME
|
VALUE "OriginalFilename", BINARY_NAME
|
||||||
VALUE "ProductName", "SourceMod BinTools Extension"
|
VALUE "ProductName", "SourceMod BinTools Extension"
|
||||||
VALUE "ProductVersion", SM_VERSION_STRING
|
VALUE "ProductVersion", SM_FULL_VERSION
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
@@ -15,6 +15,5 @@ binary.AddSourceFiles('extensions/clientprefs', [
|
|||||||
'sdk/smsdk_ext.cpp'
|
'sdk/smsdk_ext.cpp'
|
||||||
])
|
])
|
||||||
SM.AutoVersion('extensions/clientprefs', binary)
|
SM.AutoVersion('extensions/clientprefs', binary)
|
||||||
SM.ExtractDebugInfo(extension, binary)
|
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
|
|
||||||
|
|||||||
@@ -215,35 +215,53 @@ void CookieManager::OnClientDisconnecting(int client)
|
|||||||
SourceHook::List<CookieData *>::iterator _iter;
|
SourceHook::List<CookieData *>::iterator _iter;
|
||||||
|
|
||||||
CookieData *current;
|
CookieData *current;
|
||||||
|
|
||||||
IGamePlayer *player = playerhelpers->GetGamePlayer(client);
|
|
||||||
const char *pAuth = player ? player->GetAuthString() : NULL;
|
|
||||||
int dbId;
|
|
||||||
|
|
||||||
for (SourceHook::List<CookieData *>::iterator _iter = clientData[client].begin(); _iter != clientData[client].end(); _iter++)
|
_iter = clientData[client].begin();
|
||||||
|
|
||||||
|
while (_iter != clientData[client].end())
|
||||||
{
|
{
|
||||||
current = (CookieData *)*_iter;
|
current = (CookieData *)*_iter;
|
||||||
dbId = current->parent->dbid;
|
|
||||||
|
|
||||||
if (player == NULL || pAuth == NULL || !current->changed || dbId == -1)
|
if (!current->changed)
|
||||||
{
|
{
|
||||||
current->parent->data[client] = NULL;
|
current->parent->data[client] = NULL;
|
||||||
delete current;
|
delete current;
|
||||||
|
_iter = clientData[client].erase(_iter);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Save this cookie to the database */
|
||||||
|
IGamePlayer *player = playerhelpers->GetGamePlayer(client);
|
||||||
|
|
||||||
|
if (player == NULL)
|
||||||
|
{
|
||||||
|
/* panic! */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int dbId = current->parent->dbid;
|
||||||
|
|
||||||
|
if (dbId == -1)
|
||||||
|
{
|
||||||
|
/* Insert/Find Query must be still running or failed. */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TQueryOp *op = new TQueryOp(Query_InsertData, client);
|
TQueryOp *op = new TQueryOp(Query_InsertData, client);
|
||||||
|
|
||||||
strcpy(op->m_params.steamId, pAuth);
|
strcpy(op->m_params.steamId, player->GetAuthString());
|
||||||
op->m_params.cookieId = dbId;
|
op->m_params.cookieId = dbId;
|
||||||
op->m_params.data = current;
|
op->m_params.data = current;
|
||||||
|
|
||||||
g_ClientPrefs.AddQueryToQueue(op);
|
g_ClientPrefs.AddQueryToQueue(op);
|
||||||
|
|
||||||
current->parent->data[client] = NULL;
|
current->parent->data[client] = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
/* We don't delete here, it will be removed when the query is completed */
|
||||||
|
|
||||||
|
_iter = clientData[client].erase(_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
clientData[client].clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CookieManager::ClientConnectCallback(int serial, IQuery *data)
|
void CookieManager::ClientConnectCallback(int serial, IQuery *data)
|
||||||
|
|||||||
@@ -201,6 +201,8 @@ void ClientPrefs::SDK_OnUnload()
|
|||||||
|
|
||||||
phrases->Destroy();
|
phrases->Destroy();
|
||||||
|
|
||||||
|
sharesys->DestroyIdentity( identity );
|
||||||
|
|
||||||
plsys->RemovePluginsListener(&g_CookieManager);
|
plsys->RemovePluginsListener(&g_CookieManager);
|
||||||
playerhelpers->RemoveClientListener(&g_CookieManager);
|
playerhelpers->RemoveClientListener(&g_CookieManager);
|
||||||
|
|
||||||
@@ -483,7 +485,7 @@ IdentityToken_t *ClientPrefs::GetIdentity() const
|
|||||||
|
|
||||||
const char *ClientPrefs::GetExtensionVerString()
|
const char *ClientPrefs::GetExtensionVerString()
|
||||||
{
|
{
|
||||||
return SM_VERSION_STRING;
|
return SM_FULL_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *ClientPrefs::GetExtensionDateString()
|
const char *ClientPrefs::GetExtensionDateString()
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
|
||||||
# Visual Studio 2010
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clientprefs", "clientprefs.vcxproj", "{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Win32 = Debug|Win32
|
|
||||||
Release|Win32 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{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}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -1,141 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{B3E797CF-4E77-4C9D-B8A8-7589B6902206}</ProjectGuid>
|
|
||||||
<RootNamespace>clientprefs</RootNamespace>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<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" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<TargetName>clientprefs.ext</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<TargetName>clientprefs.ext</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="\"$(TargetFileName)\"";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>..\..\..\public</AdditionalIncludeDirectories>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions\"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;$(MMSOURCE19)\core\sourcehook;%(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>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="\"$(TargetFileName)\"";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>..\..\..\public</AdditionalIncludeDirectories>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions\"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\cookie.cpp" />
|
|
||||||
<ClCompile Include="..\extension.cpp" />
|
|
||||||
<ClCompile Include="..\menus.cpp" />
|
|
||||||
<ClCompile Include="..\natives.cpp" />
|
|
||||||
<ClCompile Include="..\query.cpp" />
|
|
||||||
<ClCompile Include="..\sdk\smsdk_ext.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\cookie.h" />
|
|
||||||
<ClInclude Include="..\extension.h" />
|
|
||||||
<ClInclude Include="..\menus.h" />
|
|
||||||
<ClInclude Include="..\query.h" />
|
|
||||||
<ClInclude Include="..\sdk\smsdk_config.h" />
|
|
||||||
<ClInclude Include="..\sdk\smsdk_ext.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="..\version.rc" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="SourceMod SDK">
|
|
||||||
<UniqueIdentifier>{31958233-BB2D-4e41-A8F9-CE8A4684F436}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\cookie.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\extension.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\menus.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\natives.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\query.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\sdk\smsdk_ext.cpp">
|
|
||||||
<Filter>SourceMod SDK</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\cookie.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\extension.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\menus.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\query.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\sdk\smsdk_config.h">
|
|
||||||
<Filter>SourceMod SDK</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\sdk\smsdk_ext.h">
|
|
||||||
<Filter>SourceMod SDK</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="..\version.rc">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</ResourceCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION SM_VERSION_FILE
|
FILEVERSION SM_FILE_VERSION
|
||||||
PRODUCTVERSION SM_VERSION_FILE
|
PRODUCTVERSION SM_FILE_VERSION
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -47,12 +47,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Comments", "Client Preferences Extension"
|
VALUE "Comments", "Client Preferences Extension"
|
||||||
VALUE "FileDescription", "SourceMod Client Preferences Extension"
|
VALUE "FileDescription", "SourceMod Client Preferences Extension"
|
||||||
VALUE "FileVersion", SM_VERSION_STRING
|
VALUE "FileVersion", SM_FULL_VERSION
|
||||||
VALUE "InternalName", "SourceMod Client Preferences Extension"
|
VALUE "InternalName", "SourceMod Client Preferences Extension"
|
||||||
VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC"
|
VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC"
|
||||||
VALUE "OriginalFilename", BINARY_NAME
|
VALUE "OriginalFilename", BINARY_NAME
|
||||||
VALUE "ProductName", "SourceMod Client Preferences Extension"
|
VALUE "ProductName", "SourceMod Client Preferences Extension"
|
||||||
VALUE "ProductVersion", SM_VERSION_STRING
|
VALUE "ProductVersion", SM_FULL_VERSION
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
@@ -1,33 +1,25 @@
|
|||||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for i in SM.sdkInfo:
|
sdk = SM.sdkInfo['ep2v']
|
||||||
if i != 'css' and i != 'csgo':
|
|
||||||
continue
|
if AMBuild.target['platform'] in sdk['platform']:
|
||||||
|
compiler = SM.DefaultHL2Compiler('extensions/cstrike', 'ep2v')
|
||||||
sdk = SM.sdkInfo[i]
|
|
||||||
|
|
||||||
if AMBuild.target['platform'] not in sdk['platform']:
|
|
||||||
continue
|
|
||||||
|
|
||||||
compiler = SM.DefaultHL2Compiler('extensions/cstrike', i)
|
|
||||||
|
|
||||||
name = 'game.cstrike.ext.' + sdk['ext']
|
name = 'game.cstrike.ext.' + sdk['ext']
|
||||||
extension = AMBuild.AddJob(name)
|
extension = AMBuild.AddJob(name)
|
||||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||||
SM.PreSetupHL2Job(extension, binary, i)
|
SM.PreSetupHL2Job(extension, binary, 'ep2v')
|
||||||
binary.AddSourceFiles('extensions/cstrike', [
|
binary.AddSourceFiles('extensions/cstrike', [
|
||||||
'extension.cpp',
|
'extension.cpp',
|
||||||
'natives.cpp',
|
'natives.cpp',
|
||||||
'RegNatives.cpp',
|
'RegNatives.cpp',
|
||||||
'timeleft.cpp',
|
'timeleft.cpp',
|
||||||
'forwards.cpp',
|
'forwards.cpp',
|
||||||
'util_cstrike.cpp',
|
|
||||||
'sdk/smsdk_ext.cpp',
|
'sdk/smsdk_ext.cpp',
|
||||||
'CDetour/detours.cpp',
|
'CDetour/detours.cpp',
|
||||||
'asm/asm.c'
|
'asm/asm.c'
|
||||||
])
|
])
|
||||||
SM.PostSetupHL2Job(extension, binary, i)
|
SM.PostSetupHL2Job(extension, binary, 'ep2v')
|
||||||
SM.AutoVersion('extensions/cstrike', binary)
|
SM.AutoVersion('extensions/cstrike', binary)
|
||||||
SM.ExtractDebugInfo(extension, binary)
|
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
@@ -34,9 +34,7 @@
|
|||||||
|
|
||||||
#if defined PLATFORM_POSIX
|
#if defined PLATFORM_POSIX
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#ifndef PAGE_SIZE
|
|
||||||
#define PAGE_SIZE 4096
|
#define PAGE_SIZE 4096
|
||||||
#endif
|
|
||||||
#define ALIGN(ar) ((long)ar & ~(PAGE_SIZE-1))
|
#define ALIGN(ar) ((long)ar & ~(PAGE_SIZE-1))
|
||||||
#define PAGE_EXECUTE_READWRITE PROT_READ|PROT_WRITE|PROT_EXEC
|
#define PAGE_EXECUTE_READWRITE PROT_READ|PROT_WRITE|PROT_EXEC
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+10
-22
@@ -4,12 +4,10 @@
|
|||||||
SMSDK = ../..
|
SMSDK = ../..
|
||||||
HL2SDK_ORIG = ../../../hl2sdk
|
HL2SDK_ORIG = ../../../hl2sdk
|
||||||
HL2SDK_OB = ../../../hl2sdk-ob
|
HL2SDK_OB = ../../../hl2sdk-ob
|
||||||
HL2SDK_CSS = ../../../hl2sdk-css
|
|
||||||
HL2SDK_OB_VALVE = ../../../hl2sdk-ob-valve
|
HL2SDK_OB_VALVE = ../../../hl2sdk-ob-valve
|
||||||
HL2SDK_L4D = ../../../hl2sdk-l4d
|
HL2SDK_L4D = ../../../hl2sdk-l4d
|
||||||
HL2SDK_L4D2 = ../../../hl2sdk-l4d2
|
HL2SDK_L4D2 = ../../../hl2sdk-l4d2
|
||||||
HL2SDK_CSGO = ../../../hl2sdk-csgo
|
MMSOURCE17 = ../../../mmsource-1.7
|
||||||
MMSOURCE19 = ../../../mmsource-1.9
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
@@ -35,7 +33,7 @@ CPP = gcc
|
|||||||
override ENGSET = false
|
override ENGSET = false
|
||||||
|
|
||||||
# Check for valid list of engines
|
# Check for valid list of engines
|
||||||
ifneq (,$(filter original orangebox css orangeboxvalve left4dead left4dead2,$(ENGINE)))
|
ifneq (,$(filter original orangebox orangeboxvalve left4dead left4dead2,$(ENGINE)))
|
||||||
override ENGSET = true
|
override ENGSET = true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -49,40 +47,30 @@ ifeq "$(ENGINE)" "orangebox"
|
|||||||
CFLAGS += -DSOURCE_ENGINE=3
|
CFLAGS += -DSOURCE_ENGINE=3
|
||||||
GAMEFIX = 2.ep2
|
GAMEFIX = 2.ep2
|
||||||
endif
|
endif
|
||||||
ifeq "$(ENGINE)" "css"
|
|
||||||
HL2SDK = $(HL2SDK_CSS)
|
|
||||||
CFLAGS += -DSOURCE_ENGINE=4
|
|
||||||
GAMEFIX = 2.css
|
|
||||||
endif
|
|
||||||
ifeq "$(ENGINE)" "orangeboxvalve"
|
ifeq "$(ENGINE)" "orangeboxvalve"
|
||||||
HL2SDK = $(HL2SDK_OB_VALVE)
|
HL2SDK = $(HL2SDK_OB_VALVE)
|
||||||
CFLAGS += -DSOURCE_ENGINE=5
|
CFLAGS += -DSOURCE_ENGINE=4
|
||||||
GAMEFIX = 2.ep2v
|
GAMEFIX = 2.ep2v
|
||||||
endif
|
endif
|
||||||
ifeq "$(ENGINE)" "left4dead"
|
ifeq "$(ENGINE)" "left4dead"
|
||||||
HL2SDK = $(HL2SDK_L4D)
|
HL2SDK = $(HL2SDK_L4D)
|
||||||
CFLAGS += -DSOURCE_ENGINE=6
|
CFLAGS += -DSOURCE_ENGINE=5
|
||||||
GAMEFIX = 2.l4d
|
GAMEFIX = 2.l4d
|
||||||
endif
|
endif
|
||||||
ifeq "$(ENGINE)" "left4dead2"
|
ifeq "$(ENGINE)" "left4dead2"
|
||||||
HL2SDK = $(HL2SDK_L4D2)
|
HL2SDK = $(HL2SDK_L4D2)
|
||||||
CFLAGS += -DSOURCE_ENGINE=7
|
CFLAGS += -DSOURCE_ENGINE=6
|
||||||
GAMEFIX = 2.l4d2
|
GAMEFIX = 2.l4d2
|
||||||
endif
|
endif
|
||||||
ifeq "$(ENGINE)" "csgo"
|
|
||||||
HL2SDK = $(HL2SDK_CSGO)
|
|
||||||
CFLAGS += -DSOURCE_ENGINE=8
|
|
||||||
GAMEFIX = 2.csgo
|
|
||||||
endif
|
|
||||||
|
|
||||||
HL2PUB = $(HL2SDK)/public
|
HL2PUB = $(HL2SDK)/public
|
||||||
|
|
||||||
ifeq "$(ENGINE)" "original"
|
ifeq "$(ENGINE)" "original"
|
||||||
INCLUDE += -I$(HL2SDK)/public/dlls
|
INCLUDE += -I$(HL2SDK)/public/dlls
|
||||||
METAMOD = $(MMSOURCE19)/core-legacy
|
METAMOD = $(MMSOURCE17)/core-legacy
|
||||||
else
|
else
|
||||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||||
METAMOD = $(MMSOURCE19)/core
|
METAMOD = $(MMSOURCE17)/core
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OS := $(shell uname -s)
|
OS := $(shell uname -s)
|
||||||
@@ -115,8 +103,8 @@ ifeq "$(USEMETA)" "true"
|
|||||||
INCLUDE += -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
|
INCLUDE += -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
|
||||||
-I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/extensions \
|
-I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/extensions \
|
||||||
-I$(SMSDK)/public/sourcepawn
|
-I$(SMSDK)/public/sourcepawn
|
||||||
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_CSS=4 -DSE_ORANGEBOXVALVE=5 \
|
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 \
|
||||||
-DSE_LEFT4DEAD=6 -DSE_LEFT4DEAD2=7 -DSE_CSGO=8
|
-DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6
|
||||||
else
|
else
|
||||||
INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
|
INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
|
||||||
endif
|
endif
|
||||||
@@ -180,7 +168,7 @@ all: check
|
|||||||
check:
|
check:
|
||||||
if [ "$(USEMETA)" = "true" ] && [ "$(ENGSET)" = "false" ]; then \
|
if [ "$(USEMETA)" = "true" ] && [ "$(ENGSET)" = "false" ]; then \
|
||||||
echo "You must supply one of the following values for ENGINE:"; \
|
echo "You must supply one of the following values for ENGINE:"; \
|
||||||
echo "left4dead2, left4dead, orangeboxvalve, css, orangebox, or original"; \
|
echo "left4dead2, left4dead, orangeboxvalve, orangebox, or original"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ ISDKTools *g_pSDKTools = NULL;
|
|||||||
|
|
||||||
bool CStrike::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
bool CStrike::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||||
{
|
{
|
||||||
if (strcmp(g_pSM->GetGameFolderName(), "cstrike") != 0 && strcmp(g_pSM->GetGameFolderName(), "csgo") != 0)
|
if (strcmp(g_pSM->GetGameFolderName(), "cstrike") != 0)
|
||||||
{
|
{
|
||||||
snprintf(error, maxlength, "Cannot Load Cstrike Extension on mods other than CS:S and CS:GO");
|
snprintf(error, maxlength, "Cannot Load Cstrike Extension on mods other than CS:S");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ bool CStrike::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|||||||
{
|
{
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
snprintf(error, maxlength, "Could not read sm-cstrike.games: %s", conf_error);
|
snprintf(error, maxlength, "Could not read sm-cstrike.games.txt: %s", conf_error);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -283,7 +283,7 @@ bool CStrike::ProcessCommandTarget(cmd_target_info_t *info)
|
|||||||
|
|
||||||
const char *CStrike::GetExtensionVerString()
|
const char *CStrike::GetExtensionVerString()
|
||||||
{
|
{
|
||||||
return SM_VERSION_STRING;
|
return SM_FULL_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CStrike::GetExtensionDateString()
|
const char *CStrike::GetExtensionDateString()
|
||||||
|
|||||||
@@ -44,22 +44,12 @@
|
|||||||
|
|
||||||
int CallPriceForward(int client, const char *weapon_name, int price);
|
int CallPriceForward(int client, const char *weapon_name, int price);
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
#define WEAPON_C4 49
|
|
||||||
#define WEAPON_KNIFE 42
|
|
||||||
#define WEAPON_KNIFE_GG 41
|
|
||||||
#define WEAPON_KEVLAR 50
|
|
||||||
#define WEAPON_ASSAULTSUIT 51
|
|
||||||
#define WEAPON_NIGHTVISION 52
|
|
||||||
#define WEAPON_DEFUSER 53
|
|
||||||
#else
|
|
||||||
#define WEAPON_C4 6
|
#define WEAPON_C4 6
|
||||||
#define WEAPON_KNIFE 28
|
#define WEAPON_KNIFE 28
|
||||||
#define WEAPON_SHIELD 30
|
#define WEAPON_SHIELD 30
|
||||||
#define WEAPON_KEVLAR 31
|
#define WEAPON_KEVLAR 31
|
||||||
#define WEAPON_ASSAULTSUIT 32
|
#define WEAPON_ASSAULTSUIT 32
|
||||||
#define WEAPON_NIGHTVISION 33
|
#define WEAPON_NIGHTVISION 33
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sample implementation of the SDK Extension.
|
* @brief Sample implementation of the SDK Extension.
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "extension.h"
|
#include "extension.h"
|
||||||
#include "forwards.h"
|
#include "forwards.h"
|
||||||
#include "util_cstrike.h"
|
|
||||||
|
|
||||||
bool g_pTerminateRoundDetoured = false;
|
bool g_pTerminateRoundDetoured = false;
|
||||||
bool g_pCSWeaponDropDetoured = false;
|
bool g_pCSWeaponDropDetoured = false;
|
||||||
@@ -21,11 +20,7 @@ CDetour *DCSWeaponDrop = NULL;
|
|||||||
|
|
||||||
int weaponNameOffset = -1;
|
int weaponNameOffset = -1;
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
DETOUR_DECL_MEMBER3(DetourHandleBuy, int, const char *, weapon, int, iUnknown, bool, bRebuy)
|
|
||||||
#else
|
|
||||||
DETOUR_DECL_MEMBER1(DetourHandleBuy, int, const char *, weapon)
|
DETOUR_DECL_MEMBER1(DetourHandleBuy, int, const char *, weapon)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int client = gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseEntity *>(this));
|
int client = gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseEntity *>(this));
|
||||||
|
|
||||||
@@ -42,17 +37,11 @@ DETOUR_DECL_MEMBER1(DetourHandleBuy, int, const char *, weapon)
|
|||||||
lastclient = -1;
|
lastclient = -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
int val = DETOUR_MEMBER_CALL(DetourHandleBuy)(weapon, iUnknown, bRebuy);
|
|
||||||
#else
|
|
||||||
int val = DETOUR_MEMBER_CALL(DetourHandleBuy)(weapon);
|
int val = DETOUR_MEMBER_CALL(DetourHandleBuy)(weapon);
|
||||||
#endif
|
|
||||||
lastclient = -1;
|
lastclient = -1;
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE != SE_CSGO
|
|
||||||
DETOUR_DECL_MEMBER0(DetourWeaponPrice, int)
|
DETOUR_DECL_MEMBER0(DetourWeaponPrice, int)
|
||||||
{
|
{
|
||||||
int price = DETOUR_MEMBER_CALL(DetourWeaponPrice)();
|
int price = DETOUR_MEMBER_CALL(DetourWeaponPrice)();
|
||||||
@@ -64,19 +53,6 @@ DETOUR_DECL_MEMBER0(DetourWeaponPrice, int)
|
|||||||
|
|
||||||
return CallPriceForward(lastclient, weapon_name, price);
|
return CallPriceForward(lastclient, weapon_name, price);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
DETOUR_DECL_MEMBER2(DetourWeaponPrice, int, const char *, szAttribute, CEconItemView *, pEconItem)
|
|
||||||
{
|
|
||||||
int price = DETOUR_MEMBER_CALL(DetourWeaponPrice)(szAttribute, pEconItem);
|
|
||||||
|
|
||||||
if(lastclient == -1 || strcmp(szAttribute, "in_game_price") != 0)
|
|
||||||
return price;
|
|
||||||
|
|
||||||
const char *weapon_name = reinterpret_cast<char *>(this+weaponNameOffset);
|
|
||||||
|
|
||||||
return CallPriceForward(lastclient, weapon_name, price);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
||||||
{
|
{
|
||||||
@@ -103,7 +79,6 @@ DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
|||||||
|
|
||||||
return DETOUR_MEMBER_CALL(DetourTerminateRound)(orgdelay, orgreason);
|
return DETOUR_MEMBER_CALL(DetourTerminateRound)(orgdelay, orgreason);
|
||||||
}
|
}
|
||||||
|
|
||||||
DETOUR_DECL_MEMBER3(DetourCSWeaponDrop, void, CBaseEntity *, weapon, bool, something, bool, toss)
|
DETOUR_DECL_MEMBER3(DetourCSWeaponDrop, void, CBaseEntity *, weapon, bool, something, bool, toss)
|
||||||
{
|
{
|
||||||
if (g_pIgnoreCSWeaponDropDetour)
|
if (g_pIgnoreCSWeaponDropDetour)
|
||||||
@@ -127,7 +102,6 @@ DETOUR_DECL_MEMBER3(DetourCSWeaponDrop, void, CBaseEntity *, weapon, bool, somet
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CreateWeaponPriceDetour()
|
bool CreateWeaponPriceDetour()
|
||||||
{
|
{
|
||||||
if (weaponNameOffset == -1)
|
if (weaponNameOffset == -1)
|
||||||
@@ -138,12 +112,8 @@ bool CreateWeaponPriceDetour()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
DWeaponPrice = DETOUR_CREATE_MEMBER(DetourWeaponPrice, "GetAttributeInt");
|
|
||||||
#else
|
|
||||||
DWeaponPrice = DETOUR_CREATE_MEMBER(DetourWeaponPrice, "GetWeaponPrice");
|
DWeaponPrice = DETOUR_CREATE_MEMBER(DetourWeaponPrice, "GetWeaponPrice");
|
||||||
#endif
|
|
||||||
if (DWeaponPrice != NULL)
|
if (DWeaponPrice != NULL)
|
||||||
{
|
{
|
||||||
if (!CreateHandleBuyDetour())
|
if (!CreateHandleBuyDetour())
|
||||||
@@ -215,6 +185,7 @@ void RemoveWeaponPriceDetour()
|
|||||||
DWeaponPrice = NULL;
|
DWeaponPrice = NULL;
|
||||||
}
|
}
|
||||||
g_PriceDetoured = false;
|
g_PriceDetoured = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveHandleBuyDetour()
|
void RemoveHandleBuyDetour()
|
||||||
|
|||||||
@@ -1,662 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug - CS GO|Win32">
|
|
||||||
<Configuration>Debug - CS GO</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug - CSS|Win32">
|
|
||||||
<Configuration>Debug - CSS</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug - Episode1|Win32">
|
|
||||||
<Configuration>Debug - Episode1</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="Release - CS GO|Win32">
|
|
||||||
<Configuration>Release - CS GO</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release - CSS|Win32">
|
|
||||||
<Configuration>Release - CSS</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release - Episode 1|Win32">
|
|
||||||
<Configuration>Release - Episode 1</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>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{18B5ED38-DBB7-47B2-8500-5648B8C1263B}</ProjectGuid>
|
|
||||||
<RootNamespace>cstrike</RootNamespace>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Episode 1|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Episode1|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - CS GO|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - CS GO|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box Valve|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - CSS|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box Valve|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - CSS|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Old Metamod|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Old Metamod|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</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 - Episode1|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 - 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 - CSS|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)'=='Debug - CSS|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 - 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>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Old Metamod|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug - Old Metamod|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Old Metamod|Win32'">true</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Old Metamod|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release - Old Metamod|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Old Metamod|Win32'">false</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box|Win32'">true</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box|Win32'">false</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box Valve|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - CSS|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box Valve|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug - CSS|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box Valve|Win32'">true</LinkIncremental>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - CSS|Win32'">true</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box Valve|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - CSS|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box Valve|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release - CSS|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box Valve|Win32'">false</LinkIncremental>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - CSS|Win32'">false</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - CS GO|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug - CS GO|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - CS GO|Win32'">true</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - CS GO|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release - CS GO|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - CS GO|Win32'">false</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Episode1|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug - Episode1|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Episode1|Win32'">true</LinkIncremental>
|
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Episode 1|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release - Episode 1|Win32'">$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Episode 1|Win32'">false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - CS GO|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.2.csgo</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Episode1|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.2.ep1</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Old Metamod|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.1.ep1</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.2.ep2</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Orange Box Valve|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.2.ep2v</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - CSS|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.2.css</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - CS GO|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.2.csgo</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Episode 1|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.2.ep1</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Old Metamod|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.1.ep1</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.2.ep2</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Orange Box Valve|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.2.ep2v</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - CSS|Win32'">
|
|
||||||
<TargetName>game.cstrike.ext.2.css</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(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;CSTRIKE_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>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - 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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(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;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(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;CSTRIKE_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>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDKOB)\lib\public\tier0.lib;$(HL2SDKOB)\lib\public\tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - 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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(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;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=3;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDKOB)\lib\public\tier0.lib;$(HL2SDKOB)\lib\public\tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDKOBVALVE)\public;$(HL2SDKOBVALVE)\public\game\server;$(HL2SDKOBVALVE)\public\engine;$(HL2SDKOBVALVE)\public\tier0;$(HL2SDKOBVALVE)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_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>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDKOBVALVE)\lib\public\tier0.lib;$(HL2SDKOBVALVE)\lib\public\tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - CSS|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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDKCSS)\public;$(HL2SDKCSS)\public\game\server;$(HL2SDKCSS)\public\engine;$(HL2SDKCSS)\public\tier0;$(HL2SDKCSS)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_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>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDKCSS)\lib\public\tier0.lib;$(HL2SDKCSS)\lib\public\tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - 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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDKOBVALVE)\public;$(HL2SDKOBVALVE)\public\game\server;$(HL2SDKOBVALVE)\public\engine;$(HL2SDKOBVALVE)\public\tier0;$(HL2SDKOBVALVE)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=7;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDKOBVALVE)\lib\public\tier0.lib;$(HL2SDKOBVALVE)\lib\public\tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - CSS|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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDKCSS)\public;$(HL2SDKCSS)\public\game\server;$(HL2SDKCSS)\public\engine;$(HL2SDKCSS)\public\tier0;$(HL2SDKCSS)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=6;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDKCSS)\lib\public\tier0.lib;$(HL2SDKCSS)\lib\public\tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDKCSGO)\public;$(HL2SDKCSGO)\public\game\server;$(HL2SDKCSGO)\public\engine;$(HL2SDKCSGO)\public\tier0;$(HL2SDKCSGO)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=12;COMPILER_MSVC;COMPILER_MSVC32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDKCSGO)\lib\public\tier0.lib;$(HL2SDKCSGO)\lib\public\tier1.lib;$(HL2SDKCSGO)\lib\public\interfaces.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - 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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDKCSGO)\public;$(HL2SDKCSGO)\public\game\server;$(HL2SDKCSGO)\public\engine;$(HL2SDKCSGO)\public\tier0;$(HL2SDKCSGO)\public\tier1;$(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=12;COMPILER_MSVC;COMPILER_MSVC32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDKCSGO)\lib\public\tier0.lib;$(HL2SDKCSGO)\lib\public\tier1.lib;$(HL2SDKCSGO)\lib\public\interfaces.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Episode1|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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(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;CSTRIKE_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>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - 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_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=11 /D SE_CSGO=12</AdditionalOptions>
|
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
<AdditionalIncludeDirectories>..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(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;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
||||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
<ResourceCompile>
|
|
||||||
<PreprocessorDefinitions>BINARY_NAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ResourceCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetFileName)</OutputFile>
|
|
||||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>IF NOT "%SMOUTDIR%"=="" copy /Y "$(TargetDir)$(TargetFileName)" "%SMOUTDIR%\extensions"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\extension.cpp" />
|
|
||||||
<ClCompile Include="..\forwards.cpp" />
|
|
||||||
<ClCompile Include="..\natives.cpp" />
|
|
||||||
<ClCompile Include="..\RegNatives.cpp" />
|
|
||||||
<ClCompile Include="..\timeleft.cpp" />
|
|
||||||
<ClCompile Include="..\util_cstrike.cpp" />
|
|
||||||
<ClCompile Include="..\sdk\smsdk_ext.cpp" />
|
|
||||||
<ClCompile Include="..\asm\asm.c" />
|
|
||||||
<ClCompile Include="..\CDetour\detours.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\extension.h" />
|
|
||||||
<ClInclude Include="..\forwards.h" />
|
|
||||||
<ClInclude Include="..\RegNatives.h" />
|
|
||||||
<ClInclude Include="..\timeleft.h" />
|
|
||||||
<ClInclude Include="..\util_cstrike.h" />
|
|
||||||
<ClInclude Include="..\sdk\smsdk_config.h" />
|
|
||||||
<ClInclude Include="..\sdk\smsdk_ext.h" />
|
|
||||||
<ClInclude Include="..\asm\asm.h" />
|
|
||||||
<ClInclude Include="..\CDetour\detourhelpers.h" />
|
|
||||||
<ClInclude Include="..\CDetour\detours.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="SourceMod SDK">
|
|
||||||
<UniqueIdentifier>{31958233-BB2D-4e41-A8F9-CE8A4684F436}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="asm">
|
|
||||||
<UniqueIdentifier>{bed40a0d-9cf0-408e-b407-b40d3e72ccd5}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="CDetour">
|
|
||||||
<UniqueIdentifier>{e6b64c8f-79f3-48fe-a66f-caaafc86710c}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\extension.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\forwards.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\natives.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\RegNatives.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\timeleft.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\util_cstrike.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\sdk\smsdk_ext.cpp">
|
|
||||||
<Filter>SourceMod SDK</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\asm\asm.c">
|
|
||||||
<Filter>asm</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\CDetour\detours.cpp">
|
|
||||||
<Filter>CDetour</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\extension.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\forwards.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\RegNatives.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\timeleft.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\util_cstrike.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\sdk\smsdk_config.h">
|
|
||||||
<Filter>SourceMod SDK</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\sdk\smsdk_ext.h">
|
|
||||||
<Filter>SourceMod SDK</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\asm\asm.h">
|
|
||||||
<Filter>asm</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\CDetour\detourhelpers.h">
|
|
||||||
<Filter>CDetour</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\CDetour\detours.h">
|
|
||||||
<Filter>CDetour</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
|
# Visual Studio 2005
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cstrike", "cstrike.vcproj", "{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug - Episode1|Win32 = Debug - Episode1|Win32
|
||||||
|
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
|
||||||
|
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
|
||||||
|
Release - Episode 1|Win32 = Release - Episode 1|Win32
|
||||||
|
Release - Old Metamod|Win32 = Release - Old Metamod|Win32
|
||||||
|
Release - Orange Box|Win32 = Release - Orange Box|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode1|Win32.ActiveCfg = Debug - Episode1|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode1|Win32.Build.0 = Debug - Episode1|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|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}.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 - 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|Win32.ActiveCfg = Release - Orange Box|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,617 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8.00"
|
||||||
|
Name="cstrike"
|
||||||
|
ProjectGUID="{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
|
||||||
|
RootNamespace="cstrike"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug - Old Metamod|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core-legacy";"$(MMSOURCE17)\core-legacy\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDK)\lib\public\tier0.lib" "$(HL2SDK)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release - Old Metamod|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core-legacy";"$(MMSOURCE17)\core-legacy\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDK)\lib\public\tier0.lib" "$(HL2SDK)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug - Orange Box|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDKOB)\public";"$(HL2SDKOB)\public\engine";"$(HL2SDKOB)\public\game\server";"$(HL2SDKOB)\public\tier0";"$(HL2SDKOB)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDKOB)\lib\public\tier0.lib" "$(HL2SDKOB)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release - Orange Box|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDKOB)\public";"$(HL2SDKOB)\public\engine";"$(HL2SDKOB)\public\game\server";"$(HL2SDKOB)\public\tier0";"$(HL2SDKOB)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDKOB)\lib\public\tier0.lib" "$(HL2SDKOB)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug - Episode1|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDK)\lib\public\tier0.lib" "$(HL2SDK)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release - Episode 1|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDK)\lib\public\tier0.lib" "$(HL2SDK)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\extension.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\forwards.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\natives.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\RegNatives.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\timeleft.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\extension.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\forwards.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\RegNatives.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\timeleft.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\version.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="SourceMod SDK"
|
||||||
|
UniqueIdentifier="{31958233-BB2D-4e41-A8F9-CE8A4684F436}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\sdk\smsdk_config.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\sdk\smsdk_ext.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\sdk\smsdk_ext.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="asm"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\asm\asm.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\asm\asm.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="CDetour"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\CDetour\detourhelpers.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\CDetour\detours.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\CDetour\detours.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
@@ -1,39 +1,36 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
# Visual Studio 2010
|
# Visual Studio 2008
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cstrike", "cstrike.vcxproj", "{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cstrike", "cstrike.vcproj", "{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug - Episode1|Win32 = Debug - Episode1|Win32
|
Debug - Episode1|Win32 = Debug - Episode1|Win32
|
||||||
Debug - Old Metamod|Win32 = Debug - Old Metamod|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 - Orange Box|Win32 = Debug - Orange Box|Win32
|
||||||
Release - CS GO|Win32 = Release - CS GO|Win32
|
Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32
|
||||||
Release - Episode 1|Win32 = Release - Episode 1|Win32
|
Release - Episode 1|Win32 = Release - Episode 1|Win32
|
||||||
Release - Old Metamod|Win32 = Release - Old Metamod|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 - Orange Box|Win32 = Release - Orange Box|Win32
|
||||||
|
Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode1|Win32.ActiveCfg = Debug - Episode1|Win32
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode1|Win32.ActiveCfg = Debug - Episode1|Win32
|
||||||
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode1|Win32.Build.0 = Debug - Episode1|Win32
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode1|Win32.Build.0 = Debug - Episode1|Win32
|
||||||
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|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 - 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.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 - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
|
||||||
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - CS GO|Win32.ActiveCfg = Release - CS GO|Win32
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32
|
||||||
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - CS GO|Win32.Build.0 = Release - CS GO|Win32
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32
|
||||||
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|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 - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
|
||||||
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|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 - 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.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 - Orange Box|Win32.Build.0 = Release - Orange Box|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
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -0,0 +1,781 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="cstrike"
|
||||||
|
ProjectGUID="{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
|
||||||
|
RootNamespace="cstrike"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug - Old Metamod|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core-legacy";"$(MMSOURCE17)\core-legacy\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="0"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="BINARY_NAME=\"$(TargetFileName)\""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDK)\lib\public\tier0.lib" "$(HL2SDK)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.1.ep1.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release - Old Metamod|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core-legacy";"$(MMSOURCE17)\core-legacy\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="0"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="BINARY_NAME=\"$(TargetFileName)\""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDK)\lib\public\tier0.lib" "$(HL2SDK)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.1.ep1.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug - Orange Box|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDKOB)\public";"$(HL2SDKOB)\public\engine";"$(HL2SDKOB)\public\game\server";"$(HL2SDKOB)\public\tier0";"$(HL2SDKOB)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="0"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="BINARY_NAME=\"$(TargetFileName)\""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDKOB)\lib\public\tier0.lib" "$(HL2SDKOB)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.2.ep2.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release - Orange Box|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDKOB)\public";"$(HL2SDKOB)\public\engine";"$(HL2SDKOB)\public\game\server";"$(HL2SDKOB)\public\tier0";"$(HL2SDKOB)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="0"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="BINARY_NAME=\"$(TargetFileName)\""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDKOB)\lib\public\tier0.lib" "$(HL2SDKOB)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.2.ep2.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug - Orange Box Valve|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDKOBVALVE)\public";"$(HL2SDKOBVALVE)\public\game\server";"$(HL2SDKOBVALVE)\public\engine";"$(HL2SDKOBVALVE)\public\tier0";"$(HL2SDKOBVALVE)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="0"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="BINARY_NAME=\"$(TargetFileName)\""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDKOBVALVE)\lib\public\tier0.lib" "$(HL2SDKOBVALVE)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.2.ep2v.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release - Orange Box Valve|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDKOBVALVE)\public";"$(HL2SDKOBVALVE)\public\game\server";"$(HL2SDKOBVALVE)\public\engine";"$(HL2SDKOBVALVE)\public\tier0";"$(HL2SDKOBVALVE)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="0"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="BINARY_NAME=\"$(TargetFileName)\""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDKOBVALVE)\lib\public\tier0.lib" "$(HL2SDKOBVALVE)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.2.ep2v.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug - Episode1|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="0"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="BINARY_NAME=\"$(TargetFileName)\""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDK)\lib\public\tier0.lib" "$(HL2SDK)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.1.ep1.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release - Episode 1|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook""
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="0"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="BINARY_NAME=\"$(TargetFileName)\""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""$(HL2SDK)\lib\public\tier0.lib" "$(HL2SDK)\lib\public\tier1.lib""
|
||||||
|
OutputFile="$(OutDir)\game.cstrike.ext.1.ep1.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\extension.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\forwards.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\natives.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\RegNatives.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\timeleft.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\extension.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\forwards.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\RegNatives.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\timeleft.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\version.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="SourceMod SDK"
|
||||||
|
UniqueIdentifier="{31958233-BB2D-4e41-A8F9-CE8A4684F436}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\sdk\smsdk_config.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\sdk\smsdk_ext.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\sdk\smsdk_ext.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="asm"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\asm\asm.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\asm\asm.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="CDetour"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\CDetour\detourhelpers.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\CDetour\detours.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\CDetour\detours.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
+57
-389
@@ -31,12 +31,8 @@
|
|||||||
|
|
||||||
#include "extension.h"
|
#include "extension.h"
|
||||||
#include "RegNatives.h"
|
#include "RegNatives.h"
|
||||||
#include "forwards.h"
|
|
||||||
#include "util_cstrike.h"
|
|
||||||
#include <server_class.h>
|
#include <server_class.h>
|
||||||
|
|
||||||
int g_iPriceOffset = -1;
|
|
||||||
|
|
||||||
#define REGISTER_NATIVE_ADDR(name, code) \
|
#define REGISTER_NATIVE_ADDR(name, code) \
|
||||||
void *addr; \
|
void *addr; \
|
||||||
if (!g_pGameConf->GetMemSig(name, &addr) || !addr) \
|
if (!g_pGameConf->GetMemSig(name, &addr) || !addr) \
|
||||||
@@ -48,7 +44,7 @@ int g_iPriceOffset = -1;
|
|||||||
|
|
||||||
inline CBaseEntity *GetCBaseEntity(int num, bool isplayer)
|
inline CBaseEntity *GetCBaseEntity(int num, bool isplayer)
|
||||||
{
|
{
|
||||||
edict_t *pEdict = gamehelpers->EdictOfIndex(num);
|
edict_t *pEdict = engine->PEntityOfEntIndex(num);
|
||||||
if (!pEdict || pEdict->IsFree())
|
if (!pEdict || pEdict->IsFree())
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -294,34 +290,37 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t CS_WeaponIDToAlias(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
if (!IsValidWeaponID(params[1]))
|
|
||||||
return pContext->ThrowNativeError("Invalid WeaponID passed for this game");
|
|
||||||
|
|
||||||
char *dest;
|
|
||||||
|
|
||||||
pContext->LocalToString(params[2], &dest);
|
|
||||||
|
|
||||||
const char *ret = WeaponIDToAlias(params[1]);
|
|
||||||
|
|
||||||
if (ret == NULL)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return strncopy(dest, ret, params[3]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t CS_GetTranslatedWeaponAlias(IPluginContext *pContext, const cell_t *params)
|
static cell_t CS_GetTranslatedWeaponAlias(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
char *weapon;
|
static ICallWrapper *pWrapper = NULL;
|
||||||
char *dest;
|
|
||||||
|
if (!pWrapper)
|
||||||
|
{
|
||||||
|
REGISTER_NATIVE_ADDR("GetTranslatedWeaponAlias",
|
||||||
|
PassInfo pass[1]; \
|
||||||
|
PassInfo retpass[1]; \
|
||||||
|
pass[0].flags = PASSFLAG_BYVAL; \
|
||||||
|
pass[0].type = PassType_Basic; \
|
||||||
|
pass[0].size = sizeof(char *); \
|
||||||
|
retpass[0].flags = PASSFLAG_BYVAL; \
|
||||||
|
retpass[0].type = PassType_Basic; \
|
||||||
|
retpass[0].size = sizeof(char *); \
|
||||||
|
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retpass[0], pass, 1))
|
||||||
|
}
|
||||||
|
char *dest, *weapon;
|
||||||
|
|
||||||
pContext->LocalToString(params[2], &dest);
|
pContext->LocalToString(params[2], &dest);
|
||||||
pContext->LocalToString(params[1], &weapon);
|
pContext->LocalToString(params[1], &weapon);
|
||||||
|
|
||||||
const char *ret = GetTranslatedWeaponAlias(weapon);
|
char *ret = NULL;
|
||||||
|
|
||||||
|
unsigned char vstk[sizeof(char *)];
|
||||||
|
unsigned char *vptr = vstk;
|
||||||
|
|
||||||
|
*(char **)vptr = weapon;
|
||||||
|
|
||||||
|
pWrapper->Execute(vstk, &ret);
|
||||||
|
|
||||||
strncopy(dest, ret, params[3]);
|
strncopy(dest, ret, params[3]);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@@ -329,87 +328,59 @@ static cell_t CS_GetTranslatedWeaponAlias(IPluginContext *pContext, const cell_t
|
|||||||
|
|
||||||
static cell_t CS_GetWeaponPrice(IPluginContext *pContext, const cell_t *params)
|
static cell_t CS_GetWeaponPrice(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
if (!IsValidWeaponID(params[2]))
|
|
||||||
return pContext->ThrowNativeError("Invalid WeaponID passed for this game");
|
|
||||||
|
|
||||||
int id = GetRealWeaponID(params[2]);
|
|
||||||
|
|
||||||
//Hard code return values for weapons that dont call GetWeaponPrice and always use default value.
|
//Hard code return values for weapons that dont call GetWeaponPrice and always use default value.
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
if (params[2] == WEAPON_C4 || params[2] == WEAPON_KNIFE || params[2] == WEAPON_SHIELD)
|
||||||
if (id == WEAPON_C4 || id == WEAPON_KNIFE || id == WEAPON_KNIFE_GG)
|
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
if (params[2] == WEAPON_KEVLAR)
|
||||||
if (id == WEAPON_C4 || id == WEAPON_KNIFE || id == WEAPON_SHIELD)
|
|
||||||
return 0;
|
|
||||||
else if (id == WEAPON_KEVLAR)
|
|
||||||
return 650;
|
return 650;
|
||||||
else if (id == WEAPON_ASSAULTSUIT)
|
if (params[2] == WEAPON_ASSAULTSUIT)
|
||||||
return 1000;
|
return 1000;
|
||||||
#endif
|
if (params[2] == WEAPON_NIGHTVISION)
|
||||||
else if (id == WEAPON_NIGHTVISION)
|
|
||||||
return 1250;
|
return 1250;
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
else if (id == WEAPON_DEFUSER)
|
|
||||||
return 400;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void *info = GetWeaponInfo(id);
|
|
||||||
|
|
||||||
if (!info)
|
|
||||||
{
|
|
||||||
return pContext->ThrowNativeError("Failed to get weaponinfo");
|
|
||||||
}
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
static ICallWrapper *pWrapper = NULL;
|
static ICallWrapper *pWrapper = NULL;
|
||||||
|
static int priceOffset = -1;
|
||||||
if (!pWrapper)
|
if (!pWrapper)
|
||||||
{
|
{
|
||||||
REGISTER_NATIVE_ADDR("GetAttributeInt",
|
REGISTER_NATIVE_ADDR("GetWeaponInfo",
|
||||||
PassInfo pass[2]; \
|
PassInfo pass[1]; \
|
||||||
PassInfo ret; \
|
PassInfo retpass[1]; \
|
||||||
pass[0].flags = PASSFLAG_BYVAL; \
|
pass[0].flags = PASSFLAG_BYVAL; \
|
||||||
pass[0].type = PassType_Basic; \
|
pass[0].type = PassType_Basic; \
|
||||||
pass[0].size = sizeof(char *); \
|
pass[0].size = sizeof(int); \
|
||||||
pass[1].flags = PASSFLAG_BYVAL; \
|
retpass[0].flags = PASSFLAG_BYVAL; \
|
||||||
pass[1].type = PassType_Basic; \
|
retpass[0].type = PassType_Basic; \
|
||||||
pass[1].size = sizeof(CEconItemView *); \
|
retpass[0].size = sizeof(void *); \
|
||||||
ret.flags = PASSFLAG_BYVAL; \
|
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retpass[0], pass, 1))
|
||||||
ret.type = PassType_Basic; \
|
|
||||||
ret.size = sizeof(int); \
|
|
||||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, &ret, pass, 2))
|
|
||||||
}
|
}
|
||||||
|
if (priceOffset == -1)
|
||||||
unsigned char vstk[sizeof(void *) * 2 + sizeof(char *)];
|
|
||||||
unsigned char *vptr = vstk;
|
|
||||||
|
|
||||||
*(void **)vptr = info;
|
|
||||||
vptr += sizeof(void *);
|
|
||||||
*(const char **)vptr = "in_game_price";
|
|
||||||
vptr += sizeof(const char **);
|
|
||||||
*(CEconItemView **)vptr = NULL;
|
|
||||||
|
|
||||||
int price = 0;
|
|
||||||
pWrapper->Execute(vstk, &price);
|
|
||||||
#else
|
|
||||||
if (g_iPriceOffset == -1)
|
|
||||||
{
|
{
|
||||||
if (!g_pGameConf->GetOffset("WeaponPrice", &g_iPriceOffset))
|
if (!g_pGameConf->GetOffset("WeaponPrice", &priceOffset))
|
||||||
{
|
{
|
||||||
g_iPriceOffset = -1;
|
|
||||||
return pContext->ThrowNativeError("Failed to get WeaponPrice offset");
|
return pContext->ThrowNativeError("Failed to get WeaponPrice offset");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int price = *(int *)((intptr_t)info + g_iPriceOffset);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CBaseEntity *pEntity;
|
CBaseEntity *pEntity;
|
||||||
if (!(pEntity = GetCBaseEntity(params[1], true)))
|
if (!(pEntity = GetCBaseEntity(params[1], true)))
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *info;
|
||||||
|
|
||||||
|
unsigned char vstk[sizeof(int)];
|
||||||
|
unsigned char *vptr = vstk;
|
||||||
|
|
||||||
|
*(int *)vptr = params[2];
|
||||||
|
|
||||||
|
pWrapper->Execute(vstk, &info);
|
||||||
|
|
||||||
|
if (!info)
|
||||||
|
return pContext->ThrowNativeError("Failed to get weaponinfo");
|
||||||
|
|
||||||
|
int price = *(int *)((intptr_t)info + priceOffset);
|
||||||
|
|
||||||
if (params[3] || weaponNameOffset == -1)
|
if (params[3] || weaponNameOffset == -1)
|
||||||
return price;
|
return price;
|
||||||
|
|
||||||
@@ -495,298 +466,6 @@ static cell_t CS_SetClientClanTag(IPluginContext *pContext, const cell_t *params
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t CS_AliasToWeaponID(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
char *weapon;
|
|
||||||
|
|
||||||
pContext->LocalToString(params[1], &weapon);
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
if (strstr(weapon, "usp_silencer") != NULL)
|
|
||||||
{
|
|
||||||
return SMCSWeapon_HKP2000;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int id = GetFakeWeaponID(AliasToWeaponID(weapon));
|
|
||||||
|
|
||||||
if (!IsValidWeaponID(id))
|
|
||||||
return SMCSWeapon_NONE;
|
|
||||||
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t CS_SetTeamScore(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
if (g_pSDKTools == NULL)
|
|
||||||
{
|
|
||||||
smutils->LogError(myself, "SDKTools interface not found. CS_SetTeamScore native disabled.");
|
|
||||||
}
|
|
||||||
else if (g_pSDKTools->GetInterfaceVersion() < 2)
|
|
||||||
{
|
|
||||||
//<psychonic> THIS ISN'T DA LIMBO STICK. LOW IS BAD
|
|
||||||
return pContext->ThrowNativeError("SDKTools interface is outdated. CS_SetTeamScore native disabled.");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *addr;
|
|
||||||
if (!addr)
|
|
||||||
{
|
|
||||||
if (!g_pGameConf->GetMemSig("CheckWinLimit", &addr) || !addr)
|
|
||||||
{
|
|
||||||
return pContext->ThrowNativeError("Failed to locate CheckWinLimit function");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ctTeamOffsetOffset = -1;
|
|
||||||
static int ctTeamOffset;
|
|
||||||
|
|
||||||
static int tTeamOffsetOffset = -1;
|
|
||||||
static int tTeamOffset;
|
|
||||||
|
|
||||||
if (ctTeamOffsetOffset == -1)
|
|
||||||
{
|
|
||||||
if (!g_pGameConf->GetOffset("CTTeamScoreOffset", &ctTeamOffsetOffset))
|
|
||||||
{
|
|
||||||
ctTeamOffsetOffset = -1;
|
|
||||||
return pContext->ThrowNativeError("Unable to find CTTeamOffset gamedata");
|
|
||||||
}
|
|
||||||
|
|
||||||
ctTeamOffset = *(int *)((intptr_t)addr + ctTeamOffsetOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tTeamOffsetOffset == -1)
|
|
||||||
{
|
|
||||||
if (!g_pGameConf->GetOffset("TTeamScoreOffset", &tTeamOffsetOffset))
|
|
||||||
{
|
|
||||||
tTeamOffsetOffset = -1;
|
|
||||||
return pContext->ThrowNativeError("Unable to find CTTeamOffset gamedata");
|
|
||||||
}
|
|
||||||
|
|
||||||
tTeamOffset = *(int *)((intptr_t)addr + tTeamOffsetOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *gamerules = g_pSDKTools->GetGameRules();
|
|
||||||
if (gamerules == NULL)
|
|
||||||
{
|
|
||||||
return pContext->ThrowNativeError("GameRules not available. CS_SetTeamScore native disabled.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params[1] == 3)
|
|
||||||
{
|
|
||||||
*(int16_t *)((intptr_t)gamerules+ctTeamOffset) = params[2];
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else if (params[1] == 2)
|
|
||||||
{
|
|
||||||
*(int16_t *)((intptr_t)gamerules+tTeamOffset) = params[2];
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return pContext->ThrowNativeError("Invalid team index passed (%i).", params[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t CS_GetTeamScore(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
if (g_pSDKTools == NULL)
|
|
||||||
{
|
|
||||||
smutils->LogError(myself, "SDKTools interface not found. CS_GetTeamScore native disabled.");
|
|
||||||
}
|
|
||||||
else if (g_pSDKTools->GetInterfaceVersion() < 2)
|
|
||||||
{
|
|
||||||
//<psychonic> THIS ISN'T DA LIMBO STICK. LOW IS BAD
|
|
||||||
return pContext->ThrowNativeError("SDKTools interface is outdated. CS_GetTeamScore native disabled.");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *addr;
|
|
||||||
if (!addr)
|
|
||||||
{
|
|
||||||
if (!g_pGameConf->GetMemSig("CheckWinLimit", &addr) || !addr)
|
|
||||||
{
|
|
||||||
return pContext->ThrowNativeError("Failed to locate CheckWinLimit function");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ctTeamOffsetOffset = -1;
|
|
||||||
static int ctTeamOffset;
|
|
||||||
|
|
||||||
static int tTeamOffsetOffset = -1;
|
|
||||||
static int tTeamOffset;
|
|
||||||
|
|
||||||
if (ctTeamOffsetOffset == -1)
|
|
||||||
{
|
|
||||||
if (!g_pGameConf->GetOffset("CTTeamScoreOffset", &ctTeamOffsetOffset))
|
|
||||||
{
|
|
||||||
ctTeamOffsetOffset = -1;
|
|
||||||
return pContext->ThrowNativeError("Unable to find CTTeamOffset gamedata");
|
|
||||||
}
|
|
||||||
|
|
||||||
ctTeamOffset = *(int *)((intptr_t)addr + ctTeamOffsetOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tTeamOffsetOffset == -1)
|
|
||||||
{
|
|
||||||
if (!g_pGameConf->GetOffset("TTeamScoreOffset", &tTeamOffsetOffset))
|
|
||||||
{
|
|
||||||
tTeamOffsetOffset = -1;
|
|
||||||
return pContext->ThrowNativeError("Unable to find CTTeamOffset gamedata");
|
|
||||||
}
|
|
||||||
|
|
||||||
tTeamOffset = *(int *)((intptr_t)addr + tTeamOffsetOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *gamerules = g_pSDKTools->GetGameRules();
|
|
||||||
if (gamerules == NULL)
|
|
||||||
{
|
|
||||||
return pContext->ThrowNativeError("GameRules not available. CS_GetTeamScore native disabled.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params[1] == 3)
|
|
||||||
{
|
|
||||||
return *(int16_t *)((intptr_t)gamerules+ctTeamOffset);
|
|
||||||
}
|
|
||||||
else if (params[1] == 2)
|
|
||||||
{
|
|
||||||
return *(int16_t *)((intptr_t)gamerules+tTeamOffset);
|
|
||||||
}
|
|
||||||
return pContext->ThrowNativeError("Invalid team index passed (%i).", params[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t CS_IsValidWeaponID(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
return IsValidWeaponID(params[1]) ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static inline T *GetPlayerVarAddressOrError(const char *pszGamedataName, IPluginContext *pContext, CBaseEntity *pPlayerEntity)
|
|
||||||
{
|
|
||||||
char szBaseName[128];
|
|
||||||
g_pSM->Format(szBaseName, sizeof(szBaseName), "%sBase", pszGamedataName);
|
|
||||||
|
|
||||||
const char *pszBaseVar = g_pGameConf->GetKeyValue(szBaseName);
|
|
||||||
if (pszBaseVar == NULL)
|
|
||||||
{
|
|
||||||
pContext->ThrowNativeError("Failed to locate %s key in gamedata", szBaseName);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int interimOffset = 0;
|
|
||||||
sm_sendprop_info_t info;
|
|
||||||
if (gamehelpers->FindSendPropInfo("CCSPlayer", pszBaseVar, &info))
|
|
||||||
{
|
|
||||||
interimOffset = info.actual_offset;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
datamap_t *pMap = gamehelpers->GetDataMap(pPlayerEntity);
|
|
||||||
typedescription_t *td = gamehelpers->FindInDataMap(pMap, pszBaseVar);
|
|
||||||
if (td)
|
|
||||||
{
|
|
||||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
|
||||||
interimOffset = td->fieldOffset;
|
|
||||||
#else
|
|
||||||
interimOffset = td->fieldOffset[TD_OFFSET_NORMAL];
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interimOffset == 0)
|
|
||||||
{
|
|
||||||
pContext->ThrowNativeError("Failed to find property \"%s\" on player.", pszBaseVar);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int tempOffset;
|
|
||||||
if (!g_pGameConf->GetOffset(pszGamedataName, &tempOffset))
|
|
||||||
{
|
|
||||||
pContext->ThrowNativeError("Failed to locate %s offset in gamedata", pszGamedataName);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (T *)((intptr_t)pPlayerEntity + interimOffset + tempOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static inline cell_t GetPlayerVar(IPluginContext *pContext, const cell_t *params, const char *varName)
|
|
||||||
{
|
|
||||||
CBaseEntity *pPlayer = GetCBaseEntity(params[1], true);
|
|
||||||
if (!pPlayer)
|
|
||||||
{
|
|
||||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
T *pVar = GetPlayerVarAddressOrError<T>(varName, pContext, pPlayer);
|
|
||||||
if (pVar)
|
|
||||||
{
|
|
||||||
return (cell_t)*pVar;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static inline cell_t SetPlayerVar(IPluginContext *pContext, const cell_t *params, const char *varName)
|
|
||||||
{
|
|
||||||
CBaseEntity *pPlayer = GetCBaseEntity(params[1], true);
|
|
||||||
if (!pPlayer)
|
|
||||||
{
|
|
||||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
T *pVar = GetPlayerVarAddressOrError<T>(varName, pContext, pPlayer);
|
|
||||||
if (pVar)
|
|
||||||
{
|
|
||||||
*pVar = (T)params[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t CS_SetMVPCount(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
return SetPlayerVar<int>(pContext, params, "MVPs");
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t CS_GetMVPCount(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
return GetPlayerVar<int>(pContext, params, "MVPs");
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t CS_SetClientContributionScore(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
return SetPlayerVar<int>(pContext, params, "CScore");
|
|
||||||
#else
|
|
||||||
return pContext->ThrowNativeError("SetClientContributionScore is not supported on this game");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t CS_GetClientContributionScore(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
return GetPlayerVar<int>(pContext, params, "CScore");
|
|
||||||
#else
|
|
||||||
return pContext->ThrowNativeError("GetClientContributionScore is not supported on this game");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t CS_SetClientAssists(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
return SetPlayerVar<int>(pContext, params, "Assists");
|
|
||||||
#else
|
|
||||||
return pContext->ThrowNativeError("SetClientAssists is not supported on this game");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t CS_GetClientAssists(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
return GetPlayerVar<int>(pContext, params, "Assists");
|
|
||||||
#else
|
|
||||||
return pContext->ThrowNativeError("GetClientAssists is not supported on this game");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
sp_nativeinfo_t g_CSNatives[] =
|
sp_nativeinfo_t g_CSNatives[] =
|
||||||
{
|
{
|
||||||
{"CS_RespawnPlayer", CS_RespawnPlayer},
|
{"CS_RespawnPlayer", CS_RespawnPlayer},
|
||||||
@@ -797,17 +476,6 @@ sp_nativeinfo_t g_CSNatives[] =
|
|||||||
{"CS_GetWeaponPrice", CS_GetWeaponPrice},
|
{"CS_GetWeaponPrice", CS_GetWeaponPrice},
|
||||||
{"CS_GetClientClanTag", CS_GetClientClanTag},
|
{"CS_GetClientClanTag", CS_GetClientClanTag},
|
||||||
{"CS_SetClientClanTag", CS_SetClientClanTag},
|
{"CS_SetClientClanTag", CS_SetClientClanTag},
|
||||||
{"CS_AliasToWeaponID", CS_AliasToWeaponID},
|
|
||||||
{"CS_GetTeamScore", CS_GetTeamScore},
|
|
||||||
{"CS_SetTeamScore", CS_SetTeamScore},
|
|
||||||
{"CS_GetMVPCount", CS_GetMVPCount},
|
|
||||||
{"CS_SetMVPCount", CS_SetMVPCount},
|
|
||||||
{"CS_WeaponIDToAlias", CS_WeaponIDToAlias},
|
|
||||||
{"CS_GetClientContributionScore", CS_GetClientContributionScore},
|
|
||||||
{"CS_SetClientContributionScore", CS_SetClientContributionScore},
|
|
||||||
{"CS_GetClientAssists", CS_GetClientAssists},
|
|
||||||
{"CS_SetClientAssists", CS_SetClientAssists},
|
|
||||||
{"CS_IsValidWeaponID", CS_IsValidWeaponID},
|
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Basic information exposed publicly */
|
/* Basic information exposed publicly */
|
||||||
#define SMEXT_CONF_NAME "CS Tools"
|
#define SMEXT_CONF_NAME "CS:S Tools"
|
||||||
#define SMEXT_CONF_DESCRIPTION "CS extended functionality"
|
#define SMEXT_CONF_DESCRIPTION "CS:S extended functionality"
|
||||||
#define SMEXT_CONF_VERSION ""
|
#define SMEXT_CONF_VERSION ""
|
||||||
#define SMEXT_CONF_AUTHOR "AlliedModders LLC"
|
#define SMEXT_CONF_AUTHOR "AlliedModders LLC"
|
||||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ class TimeLeftEvents : public IGameEventListener2
|
|||||||
public:
|
public:
|
||||||
bool LevelInit(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background);
|
bool LevelInit(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background);
|
||||||
virtual void FireGameEvent(IGameEvent *event);
|
virtual void FireGameEvent(IGameEvent *event);
|
||||||
#if SOURCE_ENGINE >= SE_ALIENSWARM
|
|
||||||
virtual int GetEventDebugID( void ) { return 42; }
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern TimeLeftEvents g_TimeLeftEvents;
|
extern TimeLeftEvents g_TimeLeftEvents;
|
||||||
|
|||||||
@@ -1,423 +0,0 @@
|
|||||||
/**
|
|
||||||
* vim: set ts=4 :
|
|
||||||
* =============================================================================
|
|
||||||
* SourceMod Counter-Strike:Source Extension
|
|
||||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
|
||||||
* =============================================================================
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
|
||||||
* Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
|
||||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
|
||||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
|
||||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
|
||||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
|
||||||
* this exception to all derivative works. AlliedModders LLC defines further
|
|
||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
|
||||||
*
|
|
||||||
* Version: $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "util_cstrike.h"
|
|
||||||
|
|
||||||
#include "extension.h"
|
|
||||||
#include "RegNatives.h"
|
|
||||||
|
|
||||||
#define REGISTER_ADDR(name, defaultret, code) \
|
|
||||||
void *addr; \
|
|
||||||
if (!g_pGameConf->GetMemSig(name, &addr) || !addr) \
|
|
||||||
{ \
|
|
||||||
g_pSM->LogError(myself, "Failed to locate function."); \
|
|
||||||
return defaultret; \
|
|
||||||
} \
|
|
||||||
code; \
|
|
||||||
g_RegNatives.Register(pWrapper);
|
|
||||||
|
|
||||||
void *GetWeaponInfo(int weaponID)
|
|
||||||
{
|
|
||||||
static ICallWrapper *pWrapper = NULL;
|
|
||||||
if (!pWrapper)
|
|
||||||
{
|
|
||||||
REGISTER_ADDR("GetWeaponInfo", NULL,
|
|
||||||
PassInfo pass[1]; \
|
|
||||||
PassInfo retpass; \
|
|
||||||
pass[0].flags = PASSFLAG_BYVAL; \
|
|
||||||
pass[0].type = PassType_Basic; \
|
|
||||||
pass[0].size = sizeof(int); \
|
|
||||||
retpass.flags = PASSFLAG_BYVAL; \
|
|
||||||
retpass.type = PassType_Basic; \
|
|
||||||
retpass.size = sizeof(void *); \
|
|
||||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retpass, pass, 1))
|
|
||||||
}
|
|
||||||
|
|
||||||
void *info;
|
|
||||||
|
|
||||||
unsigned char vstk[sizeof(int)];
|
|
||||||
unsigned char *vptr = vstk;
|
|
||||||
|
|
||||||
*(int *)vptr = weaponID;
|
|
||||||
|
|
||||||
pWrapper->Execute(vstk, &info);
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *GetTranslatedWeaponAlias(const char *weapon)
|
|
||||||
{
|
|
||||||
static ICallWrapper *pWrapper = NULL;
|
|
||||||
|
|
||||||
if (!pWrapper)
|
|
||||||
{
|
|
||||||
REGISTER_ADDR("GetTranslatedWeaponAlias", weapon,
|
|
||||||
PassInfo pass[1]; \
|
|
||||||
PassInfo retpass; \
|
|
||||||
pass[0].flags = PASSFLAG_BYVAL; \
|
|
||||||
pass[0].type = PassType_Basic; \
|
|
||||||
pass[0].size = sizeof(const char *); \
|
|
||||||
retpass.flags = PASSFLAG_BYVAL; \
|
|
||||||
retpass.type = PassType_Basic; \
|
|
||||||
retpass.size = sizeof(const char *); \
|
|
||||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retpass, pass, 1))
|
|
||||||
}
|
|
||||||
const char *ret = NULL;
|
|
||||||
|
|
||||||
unsigned char vstk[sizeof(const char *)];
|
|
||||||
unsigned char *vptr = vstk;
|
|
||||||
|
|
||||||
*(const char **)vptr = weapon;
|
|
||||||
|
|
||||||
pWrapper->Execute(vstk, &ret);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
int AliasToWeaponID(const char *weapon)
|
|
||||||
{
|
|
||||||
static ICallWrapper *pWrapper = NULL;
|
|
||||||
|
|
||||||
if (!pWrapper)
|
|
||||||
{
|
|
||||||
REGISTER_ADDR("AliasToWeaponID", 0,
|
|
||||||
PassInfo pass[1]; \
|
|
||||||
PassInfo retpass; \
|
|
||||||
pass[0].flags = PASSFLAG_BYVAL; \
|
|
||||||
pass[0].type = PassType_Basic; \
|
|
||||||
pass[0].size = sizeof(const char *); \
|
|
||||||
retpass.flags = PASSFLAG_BYVAL; \
|
|
||||||
retpass.type = PassType_Basic; \
|
|
||||||
retpass.size = sizeof(int); \
|
|
||||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retpass, pass, 1))
|
|
||||||
}
|
|
||||||
int weaponID = 0;
|
|
||||||
|
|
||||||
unsigned char vstk[sizeof(const char *)];
|
|
||||||
unsigned char *vptr = vstk;
|
|
||||||
|
|
||||||
*(const char **)vptr = weapon;
|
|
||||||
|
|
||||||
pWrapper->Execute(vstk, &weaponID);
|
|
||||||
|
|
||||||
return weaponID;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *WeaponIDToAlias(int weaponID)
|
|
||||||
{
|
|
||||||
static ICallWrapper *pWrapper = NULL;
|
|
||||||
|
|
||||||
if (!pWrapper)
|
|
||||||
{
|
|
||||||
REGISTER_ADDR("WeaponIDToAlias", 0,
|
|
||||||
PassInfo pass[1]; \
|
|
||||||
PassInfo retpass; \
|
|
||||||
pass[0].flags = PASSFLAG_BYVAL; \
|
|
||||||
pass[0].type = PassType_Basic; \
|
|
||||||
pass[0].size = sizeof(int); \
|
|
||||||
retpass.flags = PASSFLAG_BYVAL; \
|
|
||||||
retpass.type = PassType_Basic; \
|
|
||||||
retpass.size = sizeof(const char *); \
|
|
||||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retpass, pass, 1))
|
|
||||||
}
|
|
||||||
const char *ret = NULL;
|
|
||||||
|
|
||||||
unsigned char vstk[sizeof(int)];
|
|
||||||
unsigned char *vptr = vstk;
|
|
||||||
|
|
||||||
*(int *)vptr = GetRealWeaponID(weaponID);
|
|
||||||
|
|
||||||
pWrapper->Execute(vstk, &ret);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
int GetRealWeaponID(int weaponId)
|
|
||||||
{
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
switch((SMCSWeapon)weaponId)
|
|
||||||
{
|
|
||||||
case SMCSWeapon_NONE:
|
|
||||||
return (int)CSGOWeapon_NONE;
|
|
||||||
case SMCSWeapon_DEAGLE:
|
|
||||||
return (int)CSGOWeapon_DEAGLE;
|
|
||||||
case SMCSWeapon_ELITE:
|
|
||||||
return (int)CSGOWeapon_ELITE;
|
|
||||||
case SMCSWeapon_FIVESEVEN:
|
|
||||||
return (int)CSGOWeapon_FIVESEVEN;
|
|
||||||
case SMCSWeapon_GLOCK:
|
|
||||||
return (int)CSGOWeapon_GLOCK;
|
|
||||||
case SMCSWeapon_P228:
|
|
||||||
return (int)CSGOWeapon_P228;
|
|
||||||
case SMCSWeapon_USP:
|
|
||||||
return (int)CSGOWeapon_USP;
|
|
||||||
case SMCSWeapon_AK47:
|
|
||||||
return (int)CSGOWeapon_AK47;
|
|
||||||
case SMCSWeapon_AUG:
|
|
||||||
return (int)CSGOWeapon_AUG;
|
|
||||||
case SMCSWeapon_AWP:
|
|
||||||
return (int)CSGOWeapon_AWP;
|
|
||||||
case SMCSWeapon_FAMAS:
|
|
||||||
return (int)CSGOWeapon_FAMAS;
|
|
||||||
case SMCSWeapon_G3SG1:
|
|
||||||
return (int)CSGOWeapon_G3SG1;
|
|
||||||
case SMCSWeapon_GALIL:
|
|
||||||
return (int)CSGOWeapon_GALIL;
|
|
||||||
case SMCSWeapon_GALILAR:
|
|
||||||
return (int)CSGOWeapon_GALILAR;
|
|
||||||
case SMCSWeapon_M249:
|
|
||||||
return (int)CSGOWeapon_M249;
|
|
||||||
case SMCSWeapon_M3:
|
|
||||||
return (int)CSGOWeapon_M3;
|
|
||||||
case SMCSWeapon_M4A1:
|
|
||||||
return (int)CSGOWeapon_M4A1;
|
|
||||||
case SMCSWeapon_MAC10:
|
|
||||||
return (int)CSGOWeapon_MAC10;
|
|
||||||
case SMCSWeapon_MP5NAVY:
|
|
||||||
return (int)CSGOWeapon_MP5NAVY;
|
|
||||||
case SMCSWeapon_P90:
|
|
||||||
return (int)CSGOWeapon_P90;
|
|
||||||
case SMCSWeapon_SCOUT:
|
|
||||||
return (int)CSGOWeapon_SCOUT;
|
|
||||||
case SMCSWeapon_SG550:
|
|
||||||
return (int)CSGOWeapon_SG550;
|
|
||||||
case SMCSWeapon_SG552:
|
|
||||||
return (int)CSGOWeapon_SG552;
|
|
||||||
case SMCSWeapon_TMP:
|
|
||||||
return (int)CSGOWeapon_TMP;
|
|
||||||
case SMCSWeapon_UMP45:
|
|
||||||
return (int)CSGOWeapon_UMP45;
|
|
||||||
case SMCSWeapon_XM1014:
|
|
||||||
return (int)CSGOWeapon_XM1014;
|
|
||||||
case SMCSWeapon_BIZON:
|
|
||||||
return (int)CSGOWeapon_BIZON;
|
|
||||||
case SMCSWeapon_MAG7:
|
|
||||||
return (int)CSGOWeapon_MAG7;
|
|
||||||
case SMCSWeapon_NEGEV:
|
|
||||||
return (int)CSGOWeapon_NEGEV;
|
|
||||||
case SMCSWeapon_SAWEDOFF:
|
|
||||||
return (int)CSGOWeapon_SAWEDOFF;
|
|
||||||
case SMCSWeapon_TEC9:
|
|
||||||
return (int)CSGOWeapon_TEC9;
|
|
||||||
case SMCSWeapon_TASER:
|
|
||||||
return (int)CSGOWeapon_TASER;
|
|
||||||
case SMCSWeapon_HKP2000:
|
|
||||||
return (int)CSGOWeapon_HKP2000;
|
|
||||||
case SMCSWeapon_MP7:
|
|
||||||
return (int)CSGOWeapon_MP7;
|
|
||||||
case SMCSWeapon_MP9:
|
|
||||||
return (int)CSGOWeapon_MP9;
|
|
||||||
case SMCSWeapon_NOVA:
|
|
||||||
return (int)CSGOWeapon_NOVA;
|
|
||||||
case SMCSWeapon_P250:
|
|
||||||
return (int)CSGOWeapon_P250;
|
|
||||||
case SMCSWeapon_SCAR17:
|
|
||||||
return (int)CSGOWeapon_SCAR17;
|
|
||||||
case SMCSWeapon_SCAR20:
|
|
||||||
return (int)CSGOWeapon_SCAR20;
|
|
||||||
case SMCSWeapon_SG556:
|
|
||||||
return (int)CSGOWeapon_SG556;
|
|
||||||
case SMCSWeapon_SSG08:
|
|
||||||
return (int)CSGOWeapon_SSG08;
|
|
||||||
case SMCSWeapon_KNIFE_GG:
|
|
||||||
return (int)CSGOWeapon_KNIFE_GG;
|
|
||||||
case SMCSWeapon_KNIFE:
|
|
||||||
return (int)CSGOWeapon_KNIFE;
|
|
||||||
case SMCSWeapon_FLASHBANG:
|
|
||||||
return (int)CSGOWeapon_FLASHBANG;
|
|
||||||
case SMCSWeapon_HEGRENADE:
|
|
||||||
return (int)CSGOWeapon_HEGRENADE;
|
|
||||||
case SMCSWeapon_SMOKEGRENADE:
|
|
||||||
return (int)CSGOWeapon_SMOKEGRENADE;
|
|
||||||
case SMCSWeapon_MOLOTOV:
|
|
||||||
return (int)CSGOWeapon_MOLOTOV;
|
|
||||||
case SMCSWeapon_DECOY:
|
|
||||||
return (int)CSGOWeapon_DECOY;
|
|
||||||
case SMCSWeapon_INCGRENADE:
|
|
||||||
return (int)CSGOWeapon_INCGRENADE;
|
|
||||||
case SMCSWeapon_C4:
|
|
||||||
return (int)CSGOWeapon_C4;
|
|
||||||
case SMCSWeapon_KEVLAR:
|
|
||||||
return (int)CSGOWeapon_KEVLAR;
|
|
||||||
case SMCSWeapon_ASSAULTSUIT:
|
|
||||||
return (int)CSGOWeapon_ASSAULTSUIT;
|
|
||||||
case SMCSWeapon_NIGHTVISION:
|
|
||||||
return (int)CSGOWeapon_NVG;
|
|
||||||
case SMCSWeapon_DEFUSER:
|
|
||||||
return (int)CSGOWeapon_DEFUSER;
|
|
||||||
default:
|
|
||||||
return (int)CSGOWeapon_NONE;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (weaponId > (int)SMCSWeapon_NIGHTVISION || weaponId < (int)SMCSWeapon_NONE)
|
|
||||||
return (int)SMCSWeapon_NONE;
|
|
||||||
else
|
|
||||||
return weaponId;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
int GetFakeWeaponID(int weaponId)
|
|
||||||
{
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
switch((CSGOWeapon)weaponId)
|
|
||||||
{
|
|
||||||
case CSGOWeapon_NONE:
|
|
||||||
return (int)SMCSWeapon_NONE;
|
|
||||||
case CSGOWeapon_DEAGLE:
|
|
||||||
return (int)SMCSWeapon_DEAGLE;
|
|
||||||
case CSGOWeapon_ELITE:
|
|
||||||
return (int)SMCSWeapon_ELITE;
|
|
||||||
case CSGOWeapon_FIVESEVEN:
|
|
||||||
return (int)SMCSWeapon_FIVESEVEN;
|
|
||||||
case CSGOWeapon_GLOCK:
|
|
||||||
return (int)SMCSWeapon_GLOCK;
|
|
||||||
case CSGOWeapon_P228:
|
|
||||||
return (int)SMCSWeapon_P228;
|
|
||||||
case CSGOWeapon_USP:
|
|
||||||
return (int)SMCSWeapon_USP;
|
|
||||||
case CSGOWeapon_AK47:
|
|
||||||
return (int)SMCSWeapon_AK47;
|
|
||||||
case CSGOWeapon_AUG:
|
|
||||||
return (int)SMCSWeapon_AUG;
|
|
||||||
case CSGOWeapon_AWP:
|
|
||||||
return (int)SMCSWeapon_AWP;
|
|
||||||
case CSGOWeapon_FAMAS:
|
|
||||||
return (int)SMCSWeapon_FAMAS;
|
|
||||||
case CSGOWeapon_G3SG1:
|
|
||||||
return (int)SMCSWeapon_G3SG1;
|
|
||||||
case CSGOWeapon_GALIL:
|
|
||||||
return (int)SMCSWeapon_GALIL;
|
|
||||||
case CSGOWeapon_GALILAR:
|
|
||||||
return (int)SMCSWeapon_GALILAR;
|
|
||||||
case CSGOWeapon_M249:
|
|
||||||
return (int)SMCSWeapon_M249;
|
|
||||||
case CSGOWeapon_M3:
|
|
||||||
return (int)SMCSWeapon_M3;
|
|
||||||
case CSGOWeapon_M4A1:
|
|
||||||
return (int)SMCSWeapon_M4A1;
|
|
||||||
case CSGOWeapon_MAC10:
|
|
||||||
return (int)SMCSWeapon_MAC10;
|
|
||||||
case CSGOWeapon_MP5NAVY:
|
|
||||||
return (int)SMCSWeapon_MP5NAVY;
|
|
||||||
case CSGOWeapon_P90:
|
|
||||||
return (int)SMCSWeapon_P90;
|
|
||||||
case CSGOWeapon_SCOUT:
|
|
||||||
return (int)SMCSWeapon_SCOUT;
|
|
||||||
case CSGOWeapon_SG550:
|
|
||||||
return (int)SMCSWeapon_SG550;
|
|
||||||
case CSGOWeapon_SG552:
|
|
||||||
return (int)SMCSWeapon_SG552;
|
|
||||||
case CSGOWeapon_TMP:
|
|
||||||
return (int)SMCSWeapon_TMP;
|
|
||||||
case CSGOWeapon_UMP45:
|
|
||||||
return (int)SMCSWeapon_UMP45;
|
|
||||||
case CSGOWeapon_XM1014:
|
|
||||||
return (int)SMCSWeapon_XM1014;
|
|
||||||
case CSGOWeapon_BIZON:
|
|
||||||
return (int)SMCSWeapon_BIZON;
|
|
||||||
case CSGOWeapon_MAG7:
|
|
||||||
return (int)SMCSWeapon_MAG7;
|
|
||||||
case CSGOWeapon_NEGEV:
|
|
||||||
return (int)SMCSWeapon_NEGEV;
|
|
||||||
case CSGOWeapon_SAWEDOFF:
|
|
||||||
return (int)SMCSWeapon_SAWEDOFF;
|
|
||||||
case CSGOWeapon_TEC9:
|
|
||||||
return (int)SMCSWeapon_TEC9;
|
|
||||||
case CSGOWeapon_TASER:
|
|
||||||
return (int)SMCSWeapon_TASER;
|
|
||||||
case CSGOWeapon_HKP2000:
|
|
||||||
return (int)SMCSWeapon_HKP2000;
|
|
||||||
case CSGOWeapon_MP7:
|
|
||||||
return (int)SMCSWeapon_MP7;
|
|
||||||
case CSGOWeapon_MP9:
|
|
||||||
return (int)SMCSWeapon_MP9;
|
|
||||||
case CSGOWeapon_NOVA:
|
|
||||||
return (int)SMCSWeapon_NOVA;
|
|
||||||
case CSGOWeapon_P250:
|
|
||||||
return (int)SMCSWeapon_P250;
|
|
||||||
case CSGOWeapon_SCAR17:
|
|
||||||
return (int)SMCSWeapon_SCAR17;
|
|
||||||
case CSGOWeapon_SCAR20:
|
|
||||||
return (int)SMCSWeapon_SCAR20;
|
|
||||||
case CSGOWeapon_SG556:
|
|
||||||
return (int)SMCSWeapon_SG556;
|
|
||||||
case CSGOWeapon_SSG08:
|
|
||||||
return (int)SMCSWeapon_SSG08;
|
|
||||||
case CSGOWeapon_KNIFE_GG:
|
|
||||||
return (int)SMCSWeapon_KNIFE_GG;
|
|
||||||
case CSGOWeapon_KNIFE:
|
|
||||||
return (int)SMCSWeapon_KNIFE;
|
|
||||||
case CSGOWeapon_FLASHBANG:
|
|
||||||
return (int)SMCSWeapon_FLASHBANG;
|
|
||||||
case CSGOWeapon_HEGRENADE:
|
|
||||||
return (int)SMCSWeapon_HEGRENADE;
|
|
||||||
case CSGOWeapon_SMOKEGRENADE:
|
|
||||||
return (int)SMCSWeapon_SMOKEGRENADE;
|
|
||||||
case CSGOWeapon_MOLOTOV:
|
|
||||||
return (int)SMCSWeapon_MOLOTOV;
|
|
||||||
case CSGOWeapon_DECOY:
|
|
||||||
return (int)SMCSWeapon_DECOY;
|
|
||||||
case CSGOWeapon_INCGRENADE:
|
|
||||||
return (int)SMCSWeapon_INCGRENADE;
|
|
||||||
case CSGOWeapon_C4:
|
|
||||||
return (int)SMCSWeapon_C4;
|
|
||||||
case CSGOWeapon_KEVLAR:
|
|
||||||
return (int)SMCSWeapon_KEVLAR;
|
|
||||||
case CSGOWeapon_ASSAULTSUIT:
|
|
||||||
return (int)SMCSWeapon_ASSAULTSUIT;
|
|
||||||
case CSGOWeapon_NVG:
|
|
||||||
return (int)SMCSWeapon_NIGHTVISION;
|
|
||||||
case CSGOWeapon_DEFUSER:
|
|
||||||
return (int)SMCSWeapon_DEFUSER;
|
|
||||||
default:
|
|
||||||
return (int)SMCSWeapon_NONE;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (weaponId > (int)SMCSWeapon_NIGHTVISION || weaponId < (int)SMCSWeapon_NONE)
|
|
||||||
return (int)SMCSWeapon_NONE;
|
|
||||||
else
|
|
||||||
return weaponId;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
bool IsValidWeaponID(int id)
|
|
||||||
{
|
|
||||||
if (id <= (int)SMCSWeapon_NONE)
|
|
||||||
return false;
|
|
||||||
//Why are these even HERE!?! They dont exist in CS:GO but have valid ID's still
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
else if (id > (int)SMCSWeapon_DEFUSER || id == (int)SMCSWeapon_P228 || id == (int)SMCSWeapon_SCOUT || id == (int)SMCSWeapon_SG550 || id == (int)SMCSWeapon_GALIL ||
|
|
||||||
id == (int)SMCSWeapon_SCAR17 || id == (int)SMCSWeapon_USP || id == (int)SMCSWeapon_M3 || id == (int)SMCSWeapon_MP5NAVY || id == (int)SMCSWeapon_TMP || id == (int)SMCSWeapon_SG552)
|
|
||||||
return false;
|
|
||||||
#else
|
|
||||||
else if (id > (int)SMCSWeapon_NIGHTVISION)
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
/**
|
|
||||||
* vim: set ts=4 :
|
|
||||||
* =============================================================================
|
|
||||||
* SourceMod Counter-Strike:Source Extension
|
|
||||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
|
||||||
* =============================================================================
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
|
||||||
* Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
|
||||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
|
||||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
|
||||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
|
||||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
|
||||||
* this exception to all derivative works. AlliedModders LLC defines further
|
|
||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
|
||||||
*
|
|
||||||
* Version: $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _INCLUDE_CSTRIKE_UTIL_H_
|
|
||||||
#define _INCLUDE_CSTRIKE_UTIL_H_
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
class CEconItemView;
|
|
||||||
|
|
||||||
enum CSGOWeapon
|
|
||||||
{
|
|
||||||
CSGOWeapon_NONE,
|
|
||||||
CSGOWeapon_DEAGLE,
|
|
||||||
CSGOWeapon_ELITE,
|
|
||||||
CSGOWeapon_FIVESEVEN,
|
|
||||||
CSGOWeapon_GLOCK,
|
|
||||||
CSGOWeapon_P228,
|
|
||||||
CSGOWeapon_USP,
|
|
||||||
CSGOWeapon_AK47,
|
|
||||||
CSGOWeapon_AUG,
|
|
||||||
CSGOWeapon_AWP,
|
|
||||||
CSGOWeapon_FAMAS,
|
|
||||||
CSGOWeapon_G3SG1,
|
|
||||||
CSGOWeapon_GALIL,
|
|
||||||
CSGOWeapon_GALILAR,
|
|
||||||
CSGOWeapon_M249,
|
|
||||||
CSGOWeapon_M3,
|
|
||||||
CSGOWeapon_M4A1,
|
|
||||||
CSGOWeapon_MAC10,
|
|
||||||
CSGOWeapon_MP5NAVY,
|
|
||||||
CSGOWeapon_P90,
|
|
||||||
CSGOWeapon_SCOUT,
|
|
||||||
CSGOWeapon_SG550,
|
|
||||||
CSGOWeapon_SG552,
|
|
||||||
CSGOWeapon_TMP,
|
|
||||||
CSGOWeapon_UMP45,
|
|
||||||
CSGOWeapon_XM1014,
|
|
||||||
CSGOWeapon_BIZON,
|
|
||||||
CSGOWeapon_MAG7,
|
|
||||||
CSGOWeapon_NEGEV,
|
|
||||||
CSGOWeapon_SAWEDOFF,
|
|
||||||
CSGOWeapon_TEC9,
|
|
||||||
CSGOWeapon_TASER,
|
|
||||||
CSGOWeapon_HKP2000,
|
|
||||||
CSGOWeapon_MP7,
|
|
||||||
CSGOWeapon_MP9,
|
|
||||||
CSGOWeapon_NOVA,
|
|
||||||
CSGOWeapon_P250,
|
|
||||||
CSGOWeapon_SCAR17,
|
|
||||||
CSGOWeapon_SCAR20,
|
|
||||||
CSGOWeapon_SG556,
|
|
||||||
CSGOWeapon_SSG08,
|
|
||||||
CSGOWeapon_KNIFE_GG,
|
|
||||||
CSGOWeapon_KNIFE,
|
|
||||||
CSGOWeapon_FLASHBANG,
|
|
||||||
CSGOWeapon_HEGRENADE,
|
|
||||||
CSGOWeapon_SMOKEGRENADE,
|
|
||||||
CSGOWeapon_MOLOTOV,
|
|
||||||
CSGOWeapon_DECOY,
|
|
||||||
CSGOWeapon_INCGRENADE,
|
|
||||||
CSGOWeapon_C4, //49
|
|
||||||
CSGOWeapon_KEVLAR = 50,
|
|
||||||
CSGOWeapon_ASSAULTSUIT,
|
|
||||||
CSGOWeapon_NVG,
|
|
||||||
CSGOWeapon_DEFUSER
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
enum SMCSWeapon
|
|
||||||
{
|
|
||||||
SMCSWeapon_NONE = 0,
|
|
||||||
SMCSWeapon_P228,
|
|
||||||
SMCSWeapon_GLOCK,
|
|
||||||
SMCSWeapon_SCOUT,
|
|
||||||
SMCSWeapon_HEGRENADE,
|
|
||||||
SMCSWeapon_XM1014,
|
|
||||||
SMCSWeapon_C4,
|
|
||||||
SMCSWeapon_MAC10,
|
|
||||||
SMCSWeapon_AUG,
|
|
||||||
SMCSWeapon_SMOKEGRENADE,
|
|
||||||
SMCSWeapon_ELITE,
|
|
||||||
SMCSWeapon_FIVESEVEN,
|
|
||||||
SMCSWeapon_UMP45,
|
|
||||||
SMCSWeapon_SG550,
|
|
||||||
SMCSWeapon_GALIL,
|
|
||||||
SMCSWeapon_FAMAS,
|
|
||||||
SMCSWeapon_USP,
|
|
||||||
SMCSWeapon_AWP,
|
|
||||||
SMCSWeapon_MP5NAVY,
|
|
||||||
SMCSWeapon_M249,
|
|
||||||
SMCSWeapon_M3,
|
|
||||||
SMCSWeapon_M4A1,
|
|
||||||
SMCSWeapon_TMP,
|
|
||||||
SMCSWeapon_G3SG1,
|
|
||||||
SMCSWeapon_FLASHBANG,
|
|
||||||
SMCSWeapon_DEAGLE,
|
|
||||||
SMCSWeapon_SG552,
|
|
||||||
SMCSWeapon_AK47,
|
|
||||||
SMCSWeapon_KNIFE,
|
|
||||||
SMCSWeapon_P90,
|
|
||||||
SMCSWeapon_SHIELD,
|
|
||||||
SMCSWeapon_KEVLAR,
|
|
||||||
SMCSWeapon_ASSAULTSUIT,
|
|
||||||
SMCSWeapon_NIGHTVISION,
|
|
||||||
SMCSWeapon_GALILAR,
|
|
||||||
SMCSWeapon_BIZON,
|
|
||||||
SMCSWeapon_MAG7,
|
|
||||||
SMCSWeapon_NEGEV,
|
|
||||||
SMCSWeapon_SAWEDOFF,
|
|
||||||
SMCSWeapon_TEC9,
|
|
||||||
SMCSWeapon_TASER,
|
|
||||||
SMCSWeapon_HKP2000,
|
|
||||||
SMCSWeapon_MP7,
|
|
||||||
SMCSWeapon_MP9,
|
|
||||||
SMCSWeapon_NOVA,
|
|
||||||
SMCSWeapon_P250,
|
|
||||||
SMCSWeapon_SCAR17,
|
|
||||||
SMCSWeapon_SCAR20,
|
|
||||||
SMCSWeapon_SG556,
|
|
||||||
SMCSWeapon_SSG08,
|
|
||||||
SMCSWeapon_KNIFE_GG,
|
|
||||||
SMCSWeapon_MOLOTOV,
|
|
||||||
SMCSWeapon_DECOY,
|
|
||||||
SMCSWeapon_INCGRENADE,
|
|
||||||
SMCSWeapon_DEFUSER
|
|
||||||
};
|
|
||||||
void *GetWeaponInfo(int weaponID);
|
|
||||||
|
|
||||||
const char *GetTranslatedWeaponAlias(const char *weapon);
|
|
||||||
|
|
||||||
int AliasToWeaponID(const char *weapon);
|
|
||||||
|
|
||||||
const char *WeaponIDToAlias(int weaponID);
|
|
||||||
|
|
||||||
int GetRealWeaponID(int weaponId);
|
|
||||||
|
|
||||||
int GetFakeWeaponID(int weaponId);
|
|
||||||
|
|
||||||
bool IsValidWeaponID(int weaponId);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user