Compare commits
117
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ecdfae3ed | ||
|
|
af6350176d | ||
|
|
ca2e8e4675 | ||
|
|
50ace321d1 | ||
|
|
d3d700cfdc | ||
|
|
d3277ce11a | ||
|
|
9f40261c69 | ||
|
|
3b4e73cdd7 | ||
|
|
ccca0a91eb | ||
|
|
fa8bf950ac | ||
|
|
eee2108efb | ||
|
|
406b72e0a6 | ||
|
|
6c658b4f8e | ||
|
|
8a51bc6dbf | ||
|
|
3fffcdb931 | ||
|
|
5630fa67fc | ||
|
|
1a87eeead0 | ||
|
|
d1ac171e72 | ||
|
|
c6899a86f1 | ||
|
|
a2e2355101 | ||
|
|
7ca786168f | ||
|
|
d1ec331ada | ||
|
|
37658183bc | ||
|
|
aef08d1f19 | ||
|
|
b83e8e6c29 | ||
|
|
f328aecc62 | ||
|
|
4620f4cf7a | ||
|
|
80e3198b7b | ||
|
|
064aa83991 | ||
|
|
d359e5eef3 | ||
|
|
0425527b83 | ||
|
|
4f3399ae91 | ||
|
|
9223c714b3 | ||
|
|
c546e59c80 | ||
|
|
fe2383e061 | ||
|
|
cc9c5e227d | ||
|
|
53f53c64fc | ||
|
|
cd58e16d9c | ||
|
|
df6ca9b246 | ||
|
|
defa74660b | ||
|
|
3b9962f05a | ||
|
|
6151a39b7f | ||
|
|
eb0d2efa48 | ||
|
|
fb4ad7ae81 | ||
|
|
5916709430 | ||
|
|
6e40168f79 | ||
|
|
f457362f18 | ||
|
|
f801ce9542 | ||
|
|
cb489af757 | ||
|
|
dd4a02bf1f | ||
|
|
95de3a64d8 | ||
|
|
d3144079e9 | ||
|
|
fc331ad4e0 | ||
|
|
269c4c56ee | ||
|
|
965aaeb543 | ||
|
|
69c00d69dc | ||
|
|
ec5968d5aa | ||
|
|
80bfd9557e | ||
|
|
b52489f723 | ||
|
|
bada4c82eb | ||
|
|
5e3419836c | ||
|
|
e1f91a768c | ||
|
|
467d796d7a | ||
|
|
b92ad41d6d | ||
|
|
010da757da | ||
|
|
1030c9b1b3 | ||
|
|
de8157302d | ||
|
|
4d1893df4d | ||
|
|
a2baac7f5e | ||
|
|
ac4a381295 | ||
|
|
9831316aff | ||
|
|
7ec2f45708 | ||
|
|
3fd3f99c89 | ||
|
|
520a5b1bea | ||
|
|
1afc603bdf | ||
|
|
d8907b332d | ||
|
|
27b6a190f0 | ||
|
|
de9ff287a1 | ||
|
|
32fb29582e | ||
|
|
b635dace11 | ||
|
|
d990f956f9 | ||
|
|
955f1e0d3a | ||
|
|
b4cd559186 | ||
|
|
46e89891e1 | ||
|
|
080e2563c3 | ||
|
|
e1e0c33f2c | ||
|
|
0160d3cc71 | ||
|
|
81f0d82c67 | ||
|
|
b5276b435a | ||
|
|
16aecfb404 | ||
|
|
7054ef56f6 | ||
|
|
bfae78d1ec | ||
|
|
c82f2b4659 | ||
|
|
46d71790be | ||
|
|
647811f930 | ||
|
|
7ca80d1c7c | ||
|
|
8823bab3f3 | ||
|
|
b9d5b59bd1 | ||
|
|
7fc892d38b | ||
|
|
09040231a0 | ||
|
|
16541a5668 | ||
|
|
e1b3b14311 | ||
|
|
300632db86 | ||
|
|
d1776dd641 | ||
|
|
22cee6a2dd | ||
|
|
a2194df273 | ||
|
|
27e20996dd | ||
|
|
b5f16142e5 | ||
|
|
23f1f9e148 | ||
|
|
990f99af5a | ||
|
|
6ca9d86e8f | ||
|
|
fae8b4d49a | ||
|
|
7f2d9dd8eb | ||
|
|
8ae1b3e1e7 | ||
|
|
c77c853c02 | ||
|
|
2b0daba573 | ||
|
|
ba4aa4d37f |
@@ -3,3 +3,9 @@ e6ef5ecdf8d75740ca2685a709bf321f8873bc3b sourcemod-1.1.0
|
||||
e877885fac80be71822641f7a9122cebc9812521 sourcemod-1.1.1
|
||||
b3ffa8a4511c4eadaf533fc790aa6b14f7f0c6ea sourcemod-1.1.2
|
||||
3a73bbf60f34befa9b66be03fa5974b394bb3411 sourcemod-1.2.0
|
||||
78a1f1b1c6fa86fd7691c70ebf48a9fb3dfb3c11 sourcemod-1.5.0
|
||||
5574bfe07731b7dba171c1300f6022319d2dbc89 sourcemod-1.5.1
|
||||
238c41726d73d9f0d65005ff43c1ab86adb0e163 sourcemod-1.5.2
|
||||
27bf76b007d2360a9cfc7af9e14d1c9a6bddcc64 sourcemod-1.5.3
|
||||
27bf76b007d2360a9cfc7af9e14d1c9a6bddcc64 sourcemod-1.5.3
|
||||
0000000000000000000000000000000000000000 sourcemod-1.5.3
|
||||
|
||||
+480
-489
@@ -1,499 +1,490 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
import os
|
||||
import sys
|
||||
from ambuild.command import Command
|
||||
from ambuild.command import ShellCommand
|
||||
from ambuild.command import SymlinkCommand
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os, sys
|
||||
|
||||
class ExtractDebugInfoCommand(Command):
|
||||
def __init__(self, binary, outfile):
|
||||
Command.__init__(self)
|
||||
self.binary = binary
|
||||
self.outfile = outfile
|
||||
class SDK(object):
|
||||
def __init__(self, sdk, ext, aDef, name, platform, dir):
|
||||
if dir == 'ep1':
|
||||
folder = 'hl2sdk'
|
||||
else:
|
||||
folder = 'hl2sdk-' + dir
|
||||
self.envvar = sdk
|
||||
self.ext = ext
|
||||
self.code = aDef
|
||||
self.define = name
|
||||
self.platform = platform
|
||||
self.folder = folder # Default folder name.
|
||||
self.name = dir
|
||||
self.path = None # Actual path
|
||||
|
||||
def run(self, runner, job):
|
||||
if AMBuild.cache['debug']:
|
||||
return
|
||||
WinOnly = ['windows']
|
||||
WinLinux = ['windows', 'linux']
|
||||
WinLinuxMac = ['windows', 'linux', 'mac']
|
||||
|
||||
if not self.binary.NeedsRelink(self.outfile):
|
||||
return
|
||||
PossibleSDKs = {
|
||||
'ep1': SDK('HL2SDK', '1.ep1', '1', 'EPISODEONE', WinLinux, 'ep1'),
|
||||
'ep2': SDK('HL2SDKOB', '2.ep2', '3', 'ORANGEBOX', WinLinux, 'ob'),
|
||||
'css': SDK('HL2SDKCSS', '2.css', '6', 'CSS', WinLinuxMac, 'css'),
|
||||
'hl2dm': SDK('HL2SDKHL2DM', '2.hl2dm', '7', 'HL2DM', WinLinuxMac, 'hl2dm'),
|
||||
'dods': SDK('HL2SDKDODS', '2.dods', '8', 'DODS', WinLinuxMac, 'dods'),
|
||||
'tf2': SDK('HL2SDKTF2', '2.tf2', '10', 'TF2', WinLinuxMac, 'tf2'),
|
||||
'l4d': SDK('HL2SDKL4D', '2.l4d', '11', 'LEFT4DEAD', WinLinuxMac, 'l4d'),
|
||||
'nd': SDK('HL2SDKND', '2.nd', '12', 'NUCLEARDAWN', WinLinuxMac, 'nd'),
|
||||
'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '13', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'),
|
||||
'darkm': SDK('HL2SDK-DARKM', '2.darkm', '2', 'DARKMESSIAH', WinOnly, 'darkm'),
|
||||
'swarm': SDK('HL2SDK-SWARM', '2.swarm', '14', 'ALIENSWARM', WinOnly, 'swarm'),
|
||||
'bgt': SDK('HL2SDK-BGT', '2.bgt', '4', 'BLOODYGOODTIME', WinOnly, 'bgt'),
|
||||
'eye': SDK('HL2SDK-EYE', '2.eye', '5', 'EYE', WinOnly, 'eye'),
|
||||
'csgo': SDK('HL2SDKCSGO', '2.csgo', '18', 'CSGO', WinLinuxMac, 'csgo'),
|
||||
'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '15', 'PORTAL2', [], 'portal2'),
|
||||
|
||||
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:
|
||||
def __init__(self):
|
||||
self.compiler = Cpp.Compiler()
|
||||
|
||||
#Build SDK info
|
||||
self.possibleSdks = { }
|
||||
self.possibleSdks['ep1'] = {'sdk': 'HL2SDK', 'ext': '1.ep1', 'def': '1',
|
||||
'name': 'EPISODEONE', 'platform': ['windows', 'linux'],
|
||||
'dir': 'hl2sdk'}
|
||||
self.possibleSdks['ep2'] = {'sdk': 'HL2SDKOB', 'ext': '2.ep2', 'def': '3',
|
||||
'name': 'ORANGEBOX', 'platform': ['windows', 'linux'],
|
||||
'dir': 'hl2sdk-ob'}
|
||||
self.possibleSdks['css'] = {'sdk': 'HL2SDKCSS', 'ext': '2.css', 'def': '6',
|
||||
'name': 'CSS', 'platform': ['windows', 'linux', 'darwin'],
|
||||
'dir': 'hl2sdk-css'}
|
||||
self.possibleSdks['hl2dm'] = {'sdk': 'HL2SDKHL2DM', 'ext': '2.hl2dm', 'def': '7',
|
||||
'name': 'HL2DM', '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',
|
||||
'name': 'DARKMESSIAH', 'platform': ['windows'],
|
||||
'dir': 'hl2sdk-darkm'}
|
||||
self.possibleSdks['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '13',
|
||||
'name': 'ALIENSWARM', 'platform': ['windows'],
|
||||
'dir': 'hl2sdk-swarm'}
|
||||
self.possibleSdks['bgt'] = {'sdk': 'HL2SDK-BGT', 'ext': '2.bgt', 'def': '4',
|
||||
'name': 'BLOODYGOODTIME', '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 = { }
|
||||
|
||||
if AMBuild.mode == 'config':
|
||||
#Detect compilers
|
||||
self.compiler.DetectAll(AMBuild)
|
||||
|
||||
self.hasMySql = AMBuild.options.hasMySql
|
||||
AMBuild.cache.CacheVariable('hasMySql', self.hasMySql)
|
||||
|
||||
AMBuild.cache.CacheVariable('debug', AMBuild.options.debug)
|
||||
|
||||
#Environment variable paths to external headers
|
||||
envvars = { 'MMSOURCE110': 'mmsource-1.10', 'MYSQL5': 'mysql-5.0' }
|
||||
|
||||
#Look for Metamod:Source and MySQL if not disabled
|
||||
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'] in info['platform']:
|
||||
env = info['sdk']
|
||||
dir = info['dir']
|
||||
sdkPath = self.ResolveEnvPath(env, dir)
|
||||
if sdkPath == None:
|
||||
if useAll or sdk in sdkList:
|
||||
raise Exception('Could not find a valid path for {0}'.format(env))
|
||||
else:
|
||||
continue
|
||||
if useAll or usePresent or sdk in sdkList:
|
||||
self.sdkInfo[sdk] = info
|
||||
AMBuild.cache.CacheVariable(env, sdkPath)
|
||||
|
||||
if len(self.sdkInfo) < 1:
|
||||
raise Exception('At least one SDK must be available.')
|
||||
|
||||
AMBuild.cache.CacheVariable('sdkInfo', self.sdkInfo)
|
||||
|
||||
#Set up defines
|
||||
cxx = self.compiler.cxx
|
||||
if isinstance(cxx, Cpp.CompatGCC):
|
||||
if isinstance(cxx, Cpp.GCC):
|
||||
self.vendor = 'gcc'
|
||||
elif isinstance(cxx, Cpp.Clang):
|
||||
self.vendor = 'clang'
|
||||
self.compiler.AddToListVar('CDEFINES', 'stricmp=strcasecmp')
|
||||
self.compiler.AddToListVar('CDEFINES', '_stricmp=strcasecmp')
|
||||
self.compiler.AddToListVar('CDEFINES', '_snprintf=snprintf')
|
||||
self.compiler.AddToListVar('CDEFINES', '_vsnprintf=vsnprintf')
|
||||
self.compiler.AddToListVar('CFLAGS', '-pipe')
|
||||
self.compiler.AddToListVar('CFLAGS', '-fno-strict-aliasing')
|
||||
if (self.vendor == 'gcc' and cxx.majorVersion >= 4) or self.vendor == 'clang':
|
||||
self.compiler.AddToListVar('CFLAGS', '-fvisibility=hidden')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-fvisibility-inlines-hidden')
|
||||
self.compiler.AddToListVar('CFLAGS', '-Wall')
|
||||
self.compiler.AddToListVar('CFLAGS', '-Werror')
|
||||
self.compiler.AddToListVar('CFLAGS', '-Wno-uninitialized')
|
||||
self.compiler.AddToListVar('CFLAGS', '-Wno-unused')
|
||||
self.compiler.AddToListVar('CFLAGS', '-Wno-switch')
|
||||
self.compiler.AddToListVar('CFLAGS', '-msse')
|
||||
self.compiler.AddToListVar('CFLAGS', '-g3')
|
||||
self.compiler.AddToListVar('CFLAGS', '-m32')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-m32')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-fno-exceptions')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-fno-threadsafe-statics')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-Wno-non-virtual-dtor')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-Wno-overloaded-virtual')
|
||||
if (self.vendor == 'gcc' and cxx.majorVersion >= 4 and cxx.minorVersion >= 7) or \
|
||||
(self.vendor == 'clang' and cxx.majorVersion >= 3):
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-Wno-delete-non-virtual-dtor')
|
||||
self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H')
|
||||
self.compiler.AddToListVar('CDEFINES', 'GNUC')
|
||||
if self.vendor == 'gcc':
|
||||
self.compiler.AddToListVar('CFLAGS', '-mfpmath=sse')
|
||||
elif isinstance(cxx, Cpp.MSVC):
|
||||
self.vendor = 'msvc'
|
||||
if AMBuild.options.debug == '1':
|
||||
self.compiler.AddToListVar('CFLAGS', '/MTd')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '/NODEFAULTLIB:libcmt')
|
||||
else:
|
||||
self.compiler.AddToListVar('CFLAGS', '/MT')
|
||||
self.compiler.AddToListVar('CDEFINES', '_CRT_SECURE_NO_DEPRECATE')
|
||||
self.compiler.AddToListVar('CDEFINES', '_CRT_SECURE_NO_WARNINGS')
|
||||
self.compiler.AddToListVar('CDEFINES', '_CRT_NONSTDC_NO_DEPRECATE')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '/EHsc')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '/GR-')
|
||||
self.compiler.AddToListVar('CFLAGS', '/W3')
|
||||
self.compiler.AddToListVar('CFLAGS', '/nologo')
|
||||
self.compiler.AddToListVar('CFLAGS', '/Zi')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '/TP')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '/DEBUG')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '/MACHINE:X86')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '/SUBSYSTEM:WINDOWS')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'kernel32.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'user32.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'gdi32.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'winspool.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'comdlg32.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'advapi32.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'shell32.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'ole32.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'oleaut32.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'uuid.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'odbc32.lib')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', 'odbccp32.lib')
|
||||
|
||||
#Optimization
|
||||
if AMBuild.options.opt == '1':
|
||||
self.compiler.AddToListVar('CDEFINES', 'NDEBUG')
|
||||
if self.vendor == 'gcc' or self.vendor == 'clang':
|
||||
self.compiler.AddToListVar('CFLAGS', '-O3')
|
||||
elif self.vendor == 'msvc':
|
||||
self.compiler.AddToListVar('CFLAGS', '/Ox')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '/OPT:ICF')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '/OPT:REF')
|
||||
|
||||
#Debugging
|
||||
if AMBuild.options.debug == '1':
|
||||
self.compiler.AddToListVar('CDEFINES', 'DEBUG')
|
||||
self.compiler.AddToListVar('CDEFINES', '_DEBUG')
|
||||
if self.vendor == 'msvc':
|
||||
self.compiler.AddToListVar('CFLAGS', '/Od')
|
||||
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
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
self.compiler.AddToListVar('CDEFINES', '_LINUX')
|
||||
self.compiler.AddToListVar('CDEFINES', 'POSIX')
|
||||
if self.vendor == 'gcc':
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-static-libgcc')
|
||||
if self.vendor == 'clang':
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-lgcc_eh')
|
||||
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', ['-arch', 'i386'])
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++')
|
||||
|
||||
# For OS X dylib versioning
|
||||
import re
|
||||
productFile = open(os.path.join(AMBuild.sourceFolder, 'product.version'), 'r')
|
||||
productContents = productFile.read()
|
||||
productFile.close()
|
||||
m = re.match('(\d+)\.(\d+)\.(\d+).*', productContents)
|
||||
if m == None:
|
||||
self.version = '1.0.0'
|
||||
else:
|
||||
major, minor, release = m.groups()
|
||||
self.version = '{0}.{1}.{2}'.format(major, minor, release)
|
||||
AMBuild.cache.CacheVariable('version', self.version)
|
||||
elif AMBuild.target['platform'] == 'windows':
|
||||
self.compiler.AddToListVar('CDEFINES', 'WIN32')
|
||||
self.compiler.AddToListVar('CDEFINES', '_WINDOWS')
|
||||
|
||||
#Finish up
|
||||
self.compiler.AddToListVar('CDEFINES', 'SOURCEMOD_BUILD')
|
||||
self.compiler.AddToListVar('CDEFINES', 'SM_GENERATED_BUILD')
|
||||
self.compiler.AddToListVar('CINCLUDES',
|
||||
os.path.join(AMBuild.outputFolder, 'includes'))
|
||||
self.compiler.ToConfig(AMBuild, 'compiler')
|
||||
AMBuild.cache.CacheVariable('vendor', self.vendor)
|
||||
self.targetMap = { }
|
||||
AMBuild.cache.CacheVariable('targetMap', self.targetMap)
|
||||
else:
|
||||
self.sdkInfo = AMBuild.cache['sdkInfo']
|
||||
self.compiler.FromConfig(AMBuild, 'compiler')
|
||||
self.targetMap = AMBuild.cache['targetMap']
|
||||
self.hasMySql = AMBuild.cache['hasMySql']
|
||||
|
||||
if AMBuild.target['platform'] == 'windows':
|
||||
self.compiler.AddToListVar('RCINCLUDES', os.path.join(AMBuild.sourceFolder, 'public'))
|
||||
self.compiler.AddToListVar('RCINCLUDES',
|
||||
os.path.join(AMBuild.outputFolder, 'includes'))
|
||||
self.mmsPath = AMBuild.cache['MMSOURCE110']
|
||||
|
||||
def DefaultCompiler(self):
|
||||
return self.compiler.Clone()
|
||||
|
||||
def JobMatters(self, jobname):
|
||||
file = sys._getframe().f_code.co_filename
|
||||
if AMBuild.mode == 'config':
|
||||
self.targetMap[jobname] = file
|
||||
return True
|
||||
if len(AMBuild.args) == 0:
|
||||
return True
|
||||
if not jobname in AMBuild.args:
|
||||
return False
|
||||
|
||||
def DefaultExtCompiler(self, path):
|
||||
compiler = self.DefaultCompiler()
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, path))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, path, 'sdk'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'extensions'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'sourcepawn'))
|
||||
return compiler
|
||||
|
||||
def AutoVersion(self, folder, binary):
|
||||
if AMBuild.target['platform'] == 'windows':
|
||||
env = {'RCDEFINES': ['BINARY_NAME="' + binary.binaryFile + '"', 'SM_GENERATED_BUILD']}
|
||||
binary.AddResourceFile(os.path.join(folder, 'version.rc' ), env)
|
||||
elif AMBuild.target['platform'] == 'darwin' and isinstance(binary, Cpp.LibraryBuilder):
|
||||
binary.compiler['POSTLINKFLAGS'].extend(['-compatibility_version', '1.0.0'])
|
||||
binary.compiler['POSTLINKFLAGS'].extend(['-current_version', AMBuild.cache['version']])
|
||||
else:
|
||||
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):
|
||||
info = self.sdkInfo[sdk]
|
||||
sdkPath = AMBuild.cache[info['sdk']]
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
if sdk == 'ep1':
|
||||
staticLibs = os.path.join(sdkPath, 'linux_sdk')
|
||||
else:
|
||||
staticLibs = os.path.join(sdkPath, 'lib', 'linux')
|
||||
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
|
||||
if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'l4d2']:
|
||||
libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib_srv.so', 'libtier0_srv.so']
|
||||
for lib in libs:
|
||||
link = os.path.join(workFolder, lib)
|
||||
target = os.path.join(staticLibs, lib)
|
||||
try:
|
||||
os.lstat(link)
|
||||
except:
|
||||
job.AddCommand(SymlinkCommand(link, target))
|
||||
elif sdk in ['l4d', 'nd', 'csgo']:
|
||||
libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.so', 'libtier0.so']
|
||||
if sdk == 'csgo':
|
||||
libs.append('interfaces_i486.a')
|
||||
for lib in libs:
|
||||
link = os.path.join(workFolder, lib)
|
||||
target = os.path.join(staticLibs, lib)
|
||||
try:
|
||||
os.lstat(link)
|
||||
except:
|
||||
job.AddCommand(SymlinkCommand(link, target))
|
||||
else:
|
||||
libs = ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_i486.so', 'tier0_i486.so']
|
||||
for lib in libs:
|
||||
link = os.path.join(workFolder, lib)
|
||||
target = os.path.join(staticLibs, lib)
|
||||
try:
|
||||
os.lstat(link)
|
||||
except:
|
||||
job.AddCommand(SymlinkCommand(link, target))
|
||||
elif AMBuild.target['platform'] == 'darwin':
|
||||
staticLibs = os.path.join(sdkPath, 'lib', 'mac')
|
||||
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
|
||||
libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.dylib', 'libtier0.dylib']
|
||||
if sdk == 'csgo':
|
||||
libs.append('interfaces_i486.a')
|
||||
for lib in libs:
|
||||
link = os.path.join(workFolder, lib)
|
||||
target = os.path.join(staticLibs, lib)
|
||||
try:
|
||||
os.lstat(link)
|
||||
except:
|
||||
job.AddCommand(SymlinkCommand(link, target))
|
||||
elif AMBuild.target['platform'] == 'windows':
|
||||
libs = ['tier0', 'tier1', 'vstdlib', 'mathlib']
|
||||
if sdk in ['swarm', 'csgo']:
|
||||
libs.append('interfaces')
|
||||
for lib in libs:
|
||||
libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
|
||||
builder.RebuildIfNewer(libPath)
|
||||
builder['POSTLINKFLAGS'].append(libPath)
|
||||
|
||||
def PostSetupHL2Job(self, job, builder, sdk):
|
||||
if AMBuild.target['platform'] in ['linux', 'darwin']:
|
||||
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'):
|
||||
compiler = self.DefaultExtCompiler(path)
|
||||
|
||||
mms = 'core'
|
||||
if sdk == 'ep1':
|
||||
mms += oldMms
|
||||
|
||||
compiler['CXXINCLUDES'].append(os.path.join(self.mmsPath, mms))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(self.mmsPath, mms, 'sourcehook'))
|
||||
|
||||
info = self.possibleSdks
|
||||
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'],
|
||||
['public', 'tier0'], ['public', 'tier1']]
|
||||
if sdk == 'ep1' or sdk == 'darkm':
|
||||
paths.append(['public', 'dlls'])
|
||||
paths.append(['game_shared'])
|
||||
else:
|
||||
paths.append(['public', 'game', 'server'])
|
||||
paths.append(['public', 'toolframework'])
|
||||
paths.append(['game', 'shared'])
|
||||
paths.append(['common'])
|
||||
|
||||
info = self.sdkInfo[sdk]
|
||||
sdkPath = AMBuild.cache[info['sdk']]
|
||||
|
||||
compiler['CDEFINES'].append('SOURCE_ENGINE=' + info['def'])
|
||||
|
||||
if sdk in ['swarm','csgo']:
|
||||
if AMBuild.target['platform'] == 'windows':
|
||||
compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
|
||||
else:
|
||||
compiler['CDEFINES'].extend(['COMPILER_GCC'])
|
||||
|
||||
if sdk == 'ep1':
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
staticLibs = os.path.join(sdkPath, 'linux_sdk')
|
||||
else:
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
staticLibs = os.path.join(sdkPath, 'lib', 'linux')
|
||||
elif AMBuild.target['platform'] == 'darwin':
|
||||
staticLibs = os.path.join(sdkPath, 'lib', 'mac')
|
||||
|
||||
for i in paths:
|
||||
compiler['CXXINCLUDES'].append(os.path.join(sdkPath, *i))
|
||||
|
||||
if not noLink:
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['-lm']
|
||||
if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'l4d2']:
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['libtier0_srv.so']
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib_srv.so']
|
||||
elif sdk in ['l4d', 'nd', 'csgo']:
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so']
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so']
|
||||
else:
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['tier0_i486.so']
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['vstdlib_i486.so']
|
||||
elif AMBuild.target['platform'] == 'darwin':
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['libtier0.dylib']
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.dylib']
|
||||
|
||||
return compiler
|
||||
|
||||
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()
|
||||
globals = {
|
||||
'SM': sm
|
||||
# These engines are only supported on SourceMod 1.6.
|
||||
# 'blade': SDK('HL2SDKBLADE', '2.blade', '16', 'BLADE', WinLinux, 'blade'),
|
||||
# 'dota': SDK('HL2SDKDOTA', '2.dota', '19', 'DOTA', WinOnly, 'dota'),
|
||||
# 'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '17', 'INSURGENCY', WinLinuxMac, 'insurgency'),
|
||||
# 'sdk2013': SDK('HL2SDK2013', '2.sdk2013', '9', 'SDK2013', WinLinuxMac, '2013'),
|
||||
}
|
||||
|
||||
AMBuild.Include(os.path.join('tools', 'buildbot', 'Versioning'), globals)
|
||||
def ResolveEnvPath(env, folder):
|
||||
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, folder)
|
||||
if os.path.isdir(path):
|
||||
return path
|
||||
oldhead = head
|
||||
head, tail = os.path.split(head)
|
||||
return None
|
||||
|
||||
FileList = [
|
||||
['loader', 'AMBuilder'],
|
||||
['core', 'AMBuilder'],
|
||||
['core', 'logic', 'AMBuilder'],
|
||||
['extensions', 'bintools', 'AMBuilder'],
|
||||
['extensions', 'clientprefs', 'AMBuilder'],
|
||||
['extensions', 'cstrike', 'AMBuilder'],
|
||||
['extensions', 'curl', 'AMBuilder'],
|
||||
['extensions', 'geoip', 'AMBuilder'],
|
||||
['extensions', 'mysql', 'AMBuilder'],
|
||||
['extensions', 'sdkhooks', 'AMBuilder'],
|
||||
['extensions', 'sdktools', 'AMBuilder'],
|
||||
['extensions', 'topmenus', 'AMBuilder'],
|
||||
['extensions', 'updater', 'AMBuilder'],
|
||||
['extensions', 'sqlite', 'AMBuilder'],
|
||||
['extensions', 'regex', 'AMBuilder'],
|
||||
['extensions', 'tf2', 'AMBuilder'],
|
||||
['sourcepawn', 'jit', 'AMBuilder'],
|
||||
['sourcepawn', 'compiler', 'AMBuilder'],
|
||||
['plugins', 'AMBuilder'],
|
||||
['tools', 'buildbot', 'PackageScript'],
|
||||
['tools', 'buildbot', 'BreakpadSymbols']
|
||||
]
|
||||
class SMConfig(object):
|
||||
def __init__(self):
|
||||
self.sdks = {}
|
||||
self.binaries = []
|
||||
self.extensions = []
|
||||
self.generated_headers = None
|
||||
self.mms_root = None
|
||||
self.mysql_root = None
|
||||
self.spcomp = None
|
||||
self.smx_files = {}
|
||||
self.versionlib = None
|
||||
|
||||
if not sm.hasMySql:
|
||||
FileList.remove(['extensions', 'mysql', 'AMBuilder'])
|
||||
def detectProductVersion(self):
|
||||
builder.AddConfigureFile('product.version')
|
||||
|
||||
for parts in FileList:
|
||||
AMBuild.Include(os.path.join(*parts), globals)
|
||||
# For OS X dylib versioning
|
||||
import re
|
||||
with open(os.path.join(builder.sourcePath, 'product.version'), 'r') as fp:
|
||||
productContents = fp.read()
|
||||
m = re.match('(\d+)\.(\d+)\.(\d+).*', productContents)
|
||||
if m == None:
|
||||
self.productVersion = '1.0.0'
|
||||
else:
|
||||
major, minor, release = m.groups()
|
||||
self.productVersion = '{0}.{1}.{2}'.format(major, minor, release)
|
||||
|
||||
def detectSDKs(self):
|
||||
sdk_list = builder.options.sdks.split(',')
|
||||
use_all = sdk_list[0] == 'all'
|
||||
use_present = sdk_list[0] == 'present'
|
||||
|
||||
for sdk_name in PossibleSDKs:
|
||||
sdk = PossibleSDKs[sdk_name]
|
||||
if builder.target_platform in sdk.platform:
|
||||
sdk_path = ResolveEnvPath(sdk.envvar, sdk.folder)
|
||||
if sdk_path is None:
|
||||
if use_all or sdk_name in sdk_list:
|
||||
raise Exception('Could not find a valid path for {0}'.format(sdk.envvar))
|
||||
continue
|
||||
if use_all or use_present or sdk_name in sdk_list:
|
||||
sdk.path = sdk_path
|
||||
self.sdks[sdk_name] = sdk
|
||||
|
||||
if len(self.sdks) < 1:
|
||||
raise Exception('At least one SDK must be available.')
|
||||
|
||||
self.mms_root = ResolveEnvPath('MMSOURCE110', 'mmsource-1.10')
|
||||
if not self.mms_root:
|
||||
self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'mmsource-central')
|
||||
if not self.mms_root:
|
||||
raise Exception('Could not find a source copy of Metamod:Source')
|
||||
|
||||
if builder.options.hasMySql:
|
||||
for i in range(7):
|
||||
self.mysql_root = ResolveEnvPath('MYSQL5', 'mysql-5.' + str(i))
|
||||
if self.mysql_root:
|
||||
break
|
||||
if not self.mysql_root:
|
||||
raise Exception('Could not find a path to MySQL!')
|
||||
|
||||
def configure(self):
|
||||
builder.AddConfigureFile('pushbuild.txt')
|
||||
|
||||
cfg = builder.DetectCompilers()
|
||||
cxx = cfg.cxx
|
||||
|
||||
if cxx.behavior == 'gcc':
|
||||
cfg.defines += [
|
||||
'stricmp=strcasecmp',
|
||||
'_stricmp=strcasecmp',
|
||||
'_snprintf=snprintf',
|
||||
'_vsnprintf=vsnprintf',
|
||||
'HAVE_STDINT_H',
|
||||
'GNUC',
|
||||
]
|
||||
cfg.cflags += [
|
||||
'-pipe',
|
||||
'-fno-strict-aliasing',
|
||||
'-Wall',
|
||||
'-Werror',
|
||||
'-Wno-uninitialized',
|
||||
'-Wno-unused',
|
||||
'-Wno-switch',
|
||||
'-msse',
|
||||
'-m32',
|
||||
]
|
||||
|
||||
have_gcc = cxx.name == 'gcc'
|
||||
have_clang = cxx.name == 'clang'
|
||||
if have_clang or (have_gcc and cxx.majorVersion >= 4):
|
||||
cfg.cflags += ['-fvisibility=hidden']
|
||||
cfg.cxxflags += ['-fvisibility-inlines-hidden']
|
||||
if have_clang or (have_gcc and cxx.minorVersion >= 6):
|
||||
cfg.cflags += ['-Wno-narrowing']
|
||||
if (have_gcc and cxx.minorVersion >= 7) or (have_clang and cxx.majorVersion >= 3):
|
||||
cfg.cxxflags += ['-Wno-delete-non-virtual-dtor']
|
||||
|
||||
if have_gcc:
|
||||
cfg.cflags += ['-Wno-parentheses']
|
||||
elif have_clang:
|
||||
cfg.cflags += ['-Wno-logical-op-parentheses']
|
||||
|
||||
cfg.linkflags += ['-m32']
|
||||
cfg.cxxflags += [
|
||||
'-fno-exceptions',
|
||||
'-fno-threadsafe-statics',
|
||||
'-Wno-non-virtual-dtor',
|
||||
'-Wno-overloaded-virtual',
|
||||
]
|
||||
|
||||
if have_gcc:
|
||||
cfg.cflags += ['-mfpmath=sse']
|
||||
elif cxx.name == 'msvc':
|
||||
if builder.options.debug == '1':
|
||||
cfg.cflags += ['/MTd']
|
||||
cfg.linkflags += ['/NODEFAULTLIB:libcmt']
|
||||
else:
|
||||
cfg.cflags += ['/MT']
|
||||
cfg.defines += [
|
||||
'_CRT_SECURE_NO_DEPRECATE',
|
||||
'_CRT_SECURE_NO_WARNINGS',
|
||||
'_CRT_NONSTDC_NO_DEPRECATE',
|
||||
'_ITERATOR_DEBUG_LEVEL=0',
|
||||
]
|
||||
cfg.cflags += [
|
||||
'/W3',
|
||||
]
|
||||
cfg.cxxflags += [
|
||||
'/EHsc',
|
||||
'/GR-',
|
||||
'/TP',
|
||||
]
|
||||
cfg.linkflags += [
|
||||
'/MACHINE:X86',
|
||||
'/SUBSYSTEM:WINDOWS',
|
||||
'kernel32.lib',
|
||||
'user32.lib',
|
||||
'gdi32.lib',
|
||||
'winspool.lib',
|
||||
'comdlg32.lib',
|
||||
'advapi32.lib',
|
||||
'shell32.lib',
|
||||
'ole32.lib',
|
||||
'oleaut32.lib',
|
||||
'uuid.lib',
|
||||
'odbc32.lib',
|
||||
'odbccp32.lib',
|
||||
]
|
||||
|
||||
# Optimization
|
||||
if builder.options.opt == '1':
|
||||
cfg.defines += ['NDEBUG']
|
||||
if cxx.behavior == 'gcc':
|
||||
cfg.cflags += ['-O3']
|
||||
elif cxx.behavior == 'msvc':
|
||||
cfg.cflags += ['/Ox']
|
||||
cfg.linkflags += ['/OPT:ICF', '/OPT:REF']
|
||||
|
||||
# Debugging
|
||||
if builder.options.debug == '1':
|
||||
cfg.defines += ['DEBUG', '_DEBUG']
|
||||
if cxx.behavior == 'msvc':
|
||||
cfg.cflags += ['/Od', '/RTC1']
|
||||
if int(cxx.version) >= 1600:
|
||||
cfg.cflags += ['/d2Zi+']
|
||||
|
||||
# This needs to be after our optimization flags which could otherwise disable it.
|
||||
if cxx.name == 'msvc':
|
||||
# Don't omit the frame pointer.
|
||||
cfg.cflags += ['/Oy-']
|
||||
|
||||
# Platform-specifics
|
||||
if builder.target_platform == 'linux':
|
||||
cfg.defines += ['_LINUX', 'POSIX']
|
||||
if cxx.name == 'gcc':
|
||||
cfg.linkflags += ['-static-libgcc']
|
||||
elif cxx.name == 'clang':
|
||||
cfg.linkflags += ['-lgcc_eh']
|
||||
elif builder.target_platform == 'mac':
|
||||
cfg.defines += ['OSX', '_OSX', 'POSIX']
|
||||
cfg.cflags += ['-mmacosx-version-min=10.5']
|
||||
cfg.linkflags += [
|
||||
'-mmacosx-version-min=10.5',
|
||||
'-arch', 'i386',
|
||||
'-lstdc++',
|
||||
'-stdlib=libstdc++',
|
||||
]
|
||||
cfg.cxxflags += ['-stdlib=libstdc++']
|
||||
elif builder.target_platform == 'windows':
|
||||
cfg.defines += ['WIN32', '_WINDOWS']
|
||||
|
||||
# Finish up.
|
||||
cfg.defines += [
|
||||
'SOURCEMOD_BUILD',
|
||||
'SM_GENERATED_BUILD',
|
||||
'SM_USE_VERSIONLIB',
|
||||
]
|
||||
cfg.includes += [os.path.join(builder.buildPath, 'includes')]
|
||||
cfg.includes += [os.path.join(builder.sourcePath, 'versionlib')]
|
||||
|
||||
def LibraryBuilder(self, compiler, name):
|
||||
binary = compiler.Library(name)
|
||||
if builder.target_platform == 'windows':
|
||||
binary.sources += ['version.rc']
|
||||
binary.compiler.rcdefines += [
|
||||
'BINARY_NAME="{0}"'.format(binary.outputFile),
|
||||
'SM_GENERATED_BUILD',
|
||||
'RC_COMPILE',
|
||||
]
|
||||
elif builder.target_platform == 'mac':
|
||||
binary.compiler.postlink += [
|
||||
'-compatibility_version', '1.0.0',
|
||||
'-current_version', self.productVersion
|
||||
]
|
||||
binary.compiler.linkflags += [self.versionlib]
|
||||
binary.compiler.sourcedeps += SM.generated_headers
|
||||
return binary
|
||||
|
||||
def ProgramBuilder(self, compiler, name):
|
||||
binary = compiler.Program(name)
|
||||
if builder.target_platform == 'windows':
|
||||
binary.sources += ['version.rc']
|
||||
binary.compiler.rcdefines += [
|
||||
'BINARY_NAME="{0}"'.format(binary.outputFile),
|
||||
'SM_GENERATED_BUILD',
|
||||
'RC_COMPILE',
|
||||
]
|
||||
binary.compiler.linkflags += [self.versionlib]
|
||||
binary.compiler.sourcedeps += SM.generated_headers
|
||||
return binary
|
||||
|
||||
def Library(self, context, name):
|
||||
compiler = context.compiler.clone()
|
||||
return self.LibraryBuilder(compiler, name)
|
||||
|
||||
def Program(self, context, name):
|
||||
compiler = context.compiler.clone()
|
||||
return self.ProgramBuilder(compiler, name)
|
||||
|
||||
def ExtCompiler(self, context):
|
||||
compiler = context.compiler.clone()
|
||||
compiler.cxxincludes += [
|
||||
os.path.join(context.currentSourcePath),
|
||||
os.path.join(context.currentSourcePath, 'sdk'),
|
||||
os.path.join(builder.sourcePath, 'public'),
|
||||
os.path.join(builder.sourcePath, 'public', 'extensions'),
|
||||
os.path.join(builder.sourcePath, 'public', 'sourcepawn'),
|
||||
os.path.join(builder.sourcePath, 'public', 'amtl'),
|
||||
]
|
||||
return compiler
|
||||
|
||||
def HL2Compiler(self, context, sdk):
|
||||
compiler = self.ExtCompiler(context)
|
||||
|
||||
if sdk.name == 'ep1':
|
||||
mms_path = os.path.join(self.mms_root, 'core-legacy')
|
||||
else:
|
||||
mms_path = os.path.join(self.mms_root, 'core')
|
||||
|
||||
compiler.cxxincludes += [
|
||||
os.path.join(mms_path),
|
||||
os.path.join(mms_path, 'sourcehook'),
|
||||
]
|
||||
|
||||
defines = ['SE_' + PossibleSDKs[i].define + '=' + PossibleSDKs[i].code for i in PossibleSDKs]
|
||||
compiler.defines += defines
|
||||
paths = [
|
||||
['public'],
|
||||
['public', 'engine'],
|
||||
['public', 'mathlib'],
|
||||
['public', 'vstdlib'],
|
||||
['public', 'tier0'],
|
||||
['public', 'tier1']
|
||||
]
|
||||
if sdk.name == 'ep1' or sdk.name == 'darkm':
|
||||
paths.append(['public', 'dlls'])
|
||||
paths.append(['game_shared'])
|
||||
else:
|
||||
paths.append(['public', 'game', 'server'])
|
||||
paths.append(['public', 'toolframework'])
|
||||
paths.append(['game', 'shared'])
|
||||
paths.append(['common'])
|
||||
|
||||
compiler.defines += ['SOURCE_ENGINE=' + sdk.code]
|
||||
|
||||
if sdk.name == '2013' and compiler.cxx.behavior == 'gcc':
|
||||
# The 2013 SDK already has these in public/tier0/basetypes.h
|
||||
compiler.defines.remove('stricmp=strcasecmp')
|
||||
compiler.defines.remove('_stricmp=strcasecmp')
|
||||
compiler.defines.remove('_snprintf=snprintf')
|
||||
compiler.defines.remove('_vsnprintf=vsnprintf')
|
||||
|
||||
if sdk.name in ['swarm', 'blade', 'insurgency', 'csgo', 'dota']:
|
||||
if compiler.cc.behavior == 'msvc':
|
||||
compiler.defines += ['COMPILER_MSVC', 'COMPILER_MSVC32']
|
||||
else:
|
||||
compiler.defines += ['COMPILER_GCC']
|
||||
|
||||
# For everything after Swarm, this needs to be defined for entity networking
|
||||
# to work properly with sendprop value changes.
|
||||
if sdk.name in ['blade', 'insurgency', 'csgo', 'dota']:
|
||||
compiler.defines += ['NETWORK_VARS_ENABLED']
|
||||
|
||||
if sdk.name in ['css', 'hl2dm', 'dods', '2013', 'tf2', 'l4d2']:
|
||||
if builder.target_platform in ['linux', 'mac']:
|
||||
compiler.defines += ['NO_MALLOC_OVERRIDE']
|
||||
|
||||
for path in paths:
|
||||
compiler.cxxincludes += [os.path.join(sdk.path, *path)]
|
||||
|
||||
return compiler
|
||||
|
||||
def ExtLibrary(self, context, name):
|
||||
compiler = self.ExtCompiler(context)
|
||||
return self.LibraryBuilder(compiler, name)
|
||||
|
||||
def HL2Library(self, context, name, sdk):
|
||||
compiler = self.HL2Compiler(context, sdk)
|
||||
|
||||
if builder.target_platform == 'linux':
|
||||
if sdk.name == 'ep1':
|
||||
lib_folder = os.path.join(sdk.path, 'linux_sdk')
|
||||
elif sdk.name == '2013':
|
||||
lib_folder = os.path.join(sdk.path, 'lib', 'public', 'linux32')
|
||||
else:
|
||||
lib_folder = os.path.join(sdk.path, 'lib', 'linux')
|
||||
elif builder.target_platform == 'mac':
|
||||
if sdk.name == '2013':
|
||||
lib_folder = os.path.join(sdk.path, 'lib', 'public', 'osx32')
|
||||
else:
|
||||
lib_folder = os.path.join(sdk.path, 'lib', 'mac')
|
||||
|
||||
if builder.target_platform in ['linux', 'mac']:
|
||||
if sdk.name == '2013':
|
||||
compiler.postlink += [
|
||||
compiler.Dep(os.path.join(lib_folder, 'tier1.a')),
|
||||
compiler.Dep(os.path.join(lib_folder, 'mathlib.a'))
|
||||
]
|
||||
else:
|
||||
compiler.postlink += [
|
||||
compiler.Dep(os.path.join(lib_folder, 'tier1_i486.a')),
|
||||
compiler.Dep(os.path.join(lib_folder, 'mathlib_i486.a'))
|
||||
]
|
||||
|
||||
if sdk.name in ['blade', 'insurgency', 'csgo', 'dota']:
|
||||
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces_i486.a'))]
|
||||
|
||||
binary = self.LibraryBuilder(compiler, name)
|
||||
|
||||
dynamic_libs = []
|
||||
if builder.target_platform == 'linux':
|
||||
compiler.linkflags[0:0] = ['-lm']
|
||||
if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', '2013', 'l4d2']:
|
||||
dynamic_libs = ['libtier0_srv.so', 'libvstdlib_srv.so']
|
||||
elif sdk.name in ['l4d', 'nd', 'blade', 'insurgency', 'csgo']:
|
||||
dynamic_libs = ['libtier0.so', 'libvstdlib.so']
|
||||
else:
|
||||
dynamic_libs = ['tier0_i486.so', 'vstdlib_i486.so']
|
||||
elif builder.target_platform == 'mac':
|
||||
binary.compiler.linkflags.append('-liconv')
|
||||
dynamic_libs = ['libtier0.dylib', 'libvstdlib.dylib']
|
||||
elif builder.target_platform == 'windows':
|
||||
libs = ['tier0', 'tier1', 'vstdlib', 'mathlib']
|
||||
if sdk.name in ['swarm', 'blade', 'insurgency', 'csgo', 'dota']:
|
||||
libs.append('interfaces')
|
||||
for lib in libs:
|
||||
lib_path = os.path.join(sdk.path, 'lib', 'public', lib) + '.lib'
|
||||
binary.compiler.linkflags.append(binary.Dep(lib_path))
|
||||
|
||||
for library in dynamic_libs:
|
||||
source_path = os.path.join(lib_folder, library)
|
||||
output_path = os.path.join(binary.localFolder, library)
|
||||
|
||||
def make_linker(source_path, output_path):
|
||||
def link(context, binary):
|
||||
cmd_node, (output,) = context.AddSymlink(source_path, output_path)
|
||||
return output
|
||||
return link
|
||||
|
||||
linker = make_linker(source_path, output_path)
|
||||
binary.compiler.linkflags[0:0] = [binary.Dep(library, linker)]
|
||||
|
||||
return binary
|
||||
|
||||
SM = SMConfig()
|
||||
SM.detectProductVersion()
|
||||
SM.detectSDKs()
|
||||
SM.configure()
|
||||
|
||||
SM.generated_headers = builder.RunScript(
|
||||
'tools/buildbot/Versioning',
|
||||
{ 'SM': SM }
|
||||
)
|
||||
SM.versionlib = builder.RunScript(
|
||||
'versionlib/AMBuilder',
|
||||
{ 'SM': SM }
|
||||
)
|
||||
|
||||
builder.RunBuildScripts(
|
||||
[
|
||||
'loader/AMBuilder',
|
||||
'core/AMBuilder',
|
||||
'core/logic/AMBuilder',
|
||||
'extensions/bintools/AMBuilder',
|
||||
'extensions/clientprefs/AMBuilder',
|
||||
'extensions/curl/AMBuilder',
|
||||
'extensions/cstrike/AMBuilder',
|
||||
'extensions/geoip/AMBuilder',
|
||||
'extensions/mysql/AMBuilder',
|
||||
'extensions/regex/AMBuilder',
|
||||
'extensions/sdkhooks/AMBuilder',
|
||||
'extensions/sdktools/AMBuilder',
|
||||
'extensions/sqlite/AMBuilder',
|
||||
'extensions/tf2/AMBuilder',
|
||||
'extensions/topmenus/AMBuilder',
|
||||
'extensions/updater/AMBuilder',
|
||||
'sourcepawn/compiler/AMBuilder',
|
||||
'sourcepawn/jit/AMBuilder',
|
||||
'plugins/AMBuilder',
|
||||
'tools/buildbot/PackageScript',
|
||||
],
|
||||
{
|
||||
'SM': SM
|
||||
}
|
||||
)
|
||||
|
||||
if builder.options.breakpad_dump:
|
||||
builder.RunScript('tools/buildbot/BreakpadSymbols', { 'SM': SM })
|
||||
|
||||
@@ -1,5 +1,82 @@
|
||||
SourceMod Changelog
|
||||
|
||||
SourceMod 1.5.3 [2014-03-22]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.5.3_Release_Notes
|
||||
|
||||
User Changes:
|
||||
- Updated support for CS:GO after multiple breaking game updates.
|
||||
- Updated gamedata support for GoldenEye: Source (Peace-Maker).
|
||||
- Fixed crash on SDKHooks extension load in Alien Swarm (bug 6059).
|
||||
- Fixed memory leak from unmanaged forwards never being freed (bug 6025).
|
||||
- Fixed possible crash when unloading the CStrike extension.
|
||||
- Fixed crash in SDKHooks Reload post-hook (Peace-Maker).
|
||||
- Fixed FakeClientCommandEx always leaking memory (bug 5678).
|
||||
- Fixed extra entity networking occuring with SetEntProp natives on some games.
|
||||
- Fixed being able to nominate same map multiple times (bug 5109).
|
||||
- Fixed spurious FindEntityByClassname error being logged on some games and platforms.
|
||||
- Fixed an Anti-Flood bypass exploit (bug 5394).
|
||||
- Removed part of Addresses gamedata error handling which could cause false errors to be logged (bug 6044).
|
||||
- Fixed mapchooser not resetting nominations count when clearing nominations list (bug 5359).
|
||||
- Improved performances of client convar query handling (bug 6003).
|
||||
|
||||
Developer Changes:
|
||||
- Added GiveAmmo native to SDKTools (bug 6039) (Peace-Maker).
|
||||
- Added SQL_SetCharset native to (re)set charset even after reconnect (bug 5786) (Peace-Maker).
|
||||
- Added support for entity references in SDKHooks natives (bug 6069).
|
||||
- Added support for server passwords to DisplayAskConnectBox stock (bug 5984) (FlaminSarge).
|
||||
- Renamed SortFunc2D parameters to match documentation (bug 6014) (Peace-Maker).
|
||||
- Fixed param order in AddToTopMenu function doc (bug 6035) (Peace-Maker).
|
||||
- Added |any| tag to WritePackCell and ReadPackCell native param/return values (bug 6001).
|
||||
- Updated SDKHook_TakeDamage native for game updates.
|
||||
- Added default infinite value for TF2_AddCondition duration.
|
||||
- Added support for conditions >= 64 in TF2_OnConditionAdded/Removed (bug 5565, bug 5976) (FlaminSarge).
|
||||
- Updated TFCond and TF customkill enum values (bug 6012) (FlaminSarge).
|
||||
- Fixed regression causing incorrect return and inability to block in TF2_OnCalcIsAttackCritical forward.
|
||||
- Fixed TE_* natives operating on incorrect data for some tempents (bug 6072).
|
||||
- Fixed CS_AliasToWeaponID not returning a valid weaponID for cz75a.
|
||||
- Fixed CS_GetWeaponPrice returning incorrect value for M4A1 in CS:GO (bug 6045).
|
||||
- Increased max gamedata byte signature length.
|
||||
- Ported SM build scripts to AMBuild2 (bug 5997).
|
||||
|
||||
----------------------------------------------------------
|
||||
SourceMod 1.5.2 [2013-10-29]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.5.2_Release_Notes
|
||||
|
||||
User Changes:
|
||||
- Updated gamedata support for TF2, CS:S, CS:GO, and HL2:DM.
|
||||
- Fixed crash from regression in SDKTools SetClientListening hook refcounting (bug 5956) (KyleS).
|
||||
- Fixed potential crash when having maps with format characters in name.
|
||||
- Fixed some nextmap issues with long map names.
|
||||
- SDKTools no longer requires gamedata for sm_dump_datamaps on TF2, CS:S, HL2:DM, and DoD:S (bug 5968).
|
||||
|
||||
Developer Changes:
|
||||
- Updated TFCond and TF custom dmg enums.
|
||||
- Updated TF2 critical hit detection logic in TF2_OnCalcIsAttackCritical to handle more cases, including when criticals are disabled (bug 5894).
|
||||
- Fixed GetEngineVersion native returning a bad value when running on MM:S 1.9.x or earlier (bug 5697).
|
||||
|
||||
----------------------------------------------------------
|
||||
SourceMod 1.5.1 [2013-09-10]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.5.1_Release_Notes
|
||||
|
||||
User Changes:
|
||||
- Updated gamedata support for TF2.
|
||||
- Added missing DispatchKeyValue gamedata for HL2 CTF (bug 5114) (peace-maker).
|
||||
- Fixed translations not being loaded if identifier was not two or three characters (fixes Portuguese) (bug 5888).
|
||||
- Fixed runoff voting occurring when receiving the exact number of required votes (bug 5890).
|
||||
- Fixed reserve slot plugin hiding too many slots on Orangebox gamesif SourceTV and/or Replay are present (bug 5499).
|
||||
- Fixed some crashes in TF2 and unexpected behavior in all games with SDKHook_TakeDamage due to uninitialized var.
|
||||
- Fixed attempted triggers from gagged users displaying in chat (bug 5918).
|
||||
- Fixed errors in Italian translation (Oktober).
|
||||
- Added Norwegian translation (checkster).
|
||||
|
||||
Developer Changes:
|
||||
- Added CS_UpdateClientModel native to CStrike extension for CS:S and CS:GO (bug 5905) (Drifter).
|
||||
- Fixed setting weapon param in SDKHook_TakeDamage overwriting attacker instead of setting weapon (bug 5911) (KyleS)
|
||||
|
||||
----------------------------------------------------------
|
||||
SourceMod 1.5.0 [2013-08-25]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.5.0_Release_Notes
|
||||
|
||||
+16
-3
@@ -1,8 +1,19 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet:
|
||||
import sys
|
||||
import ambuild.runner as runner
|
||||
try:
|
||||
from ambuild2 import run
|
||||
except:
|
||||
try:
|
||||
import ambuild
|
||||
sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n')
|
||||
sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n')
|
||||
except:
|
||||
sys.stderr.write('AMBuild must be installed to build this project.\n')
|
||||
sys.stderr.write('http://www.alliedmods.net/ambuild\n')
|
||||
sys.exit(1)
|
||||
|
||||
run = runner.Runner()
|
||||
run = run.PrepareBuild(sourcePath=sys.path[0])
|
||||
run.default_build_folder = 'obj-' + run.target_platform
|
||||
run.options.add_option('--enable-debug', action='store_const', const='1', dest='debug',
|
||||
help='Enable debugging symbols')
|
||||
run.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt',
|
||||
@@ -12,4 +23,6 @@ run.options.add_option('--no-mysql', action='store_false', default=True, dest='h
|
||||
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.options.add_option('--breakpad-dump', action='store_true', dest='breakpad_dump',
|
||||
default=False, help='Dump and upload breakpad symbols')
|
||||
run.Configure()
|
||||
|
||||
+114
-118
@@ -1,128 +1,124 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
from ambuild.command import SymlinkCommand
|
||||
|
||||
for i in SM.sdkInfo:
|
||||
sdk = SM.sdkInfo[i]
|
||||
if AMBuild.target['platform'] not in sdk['platform']:
|
||||
continue
|
||||
for sdk_name in SM.sdks:
|
||||
sdk = SM.sdks[sdk_name]
|
||||
binary_name = 'sourcemod.' + sdk.ext
|
||||
|
||||
name = 'sourcemod.' + sdk['ext']
|
||||
binary = SM.HL2Library(builder, binary_name, sdk)
|
||||
compiler = binary.compiler
|
||||
|
||||
compiler = SM.DefaultHL2Compiler('core', i)
|
||||
if sdk.name == 'csgo':
|
||||
# Protobuf 2.3 headers have some signed/unsigned compares. I believe that it's fixed in later versions, but Valve.
|
||||
if compiler.cxx.behavior == 'gcc':
|
||||
compiler.cflags += ['-Wno-sign-compare']
|
||||
compiler.cxxincludes += [
|
||||
os.path.join(sdk.path, 'common', 'protobuf-2.3.0', 'src'),
|
||||
os.path.join(sdk.path, 'public', 'engine', 'protobuf'),
|
||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'csgo', 'protobuf')
|
||||
]
|
||||
elif sdk.name == 'dota':
|
||||
compiler.cxxincludes += [
|
||||
os.path.join(sdk.path, 'common', 'protobuf-2.4.1', 'src'),
|
||||
os.path.join(sdk.path, 'public', 'engine', 'protobuf'),
|
||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'protobuf'),
|
||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'dota', 'protobuf')
|
||||
]
|
||||
|
||||
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'))
|
||||
if builder.target_platform == 'linux':
|
||||
compiler.postlink += ['-lpthread', '-lrt']
|
||||
|
||||
extension = AMBuild.AddJob(name)
|
||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||
SM.PreSetupHL2Job(extension, binary, i)
|
||||
if sdk.name == 'csgo' or sdk.name == 'dota':
|
||||
if builder.target_platform == 'linux':
|
||||
lib_path = os.path.join(sdk.path, 'lib', 'linux32', 'release', 'libprotobuf.a')
|
||||
elif builder.target_platform == 'mac':
|
||||
lib_path = os.path.join(sdk.path, 'lib', 'osx32', 'release', 'libprotobuf.a')
|
||||
elif builder.target_platform == 'windows':
|
||||
if 'DEBUG' in compiler.defines:
|
||||
lib_path = os.path.join(sdk.path, 'lib', 'win32', 'debug', 'vs2010', 'libprotobuf.lib')
|
||||
else:
|
||||
lib_path = os.path.join(sdk.path, 'lib', 'win32', 'release', 'vs2010', 'libprotobuf.lib')
|
||||
compiler.linkflags.insert(0, binary.Dep(lib_path))
|
||||
|
||||
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)
|
||||
binary.sources += [
|
||||
'AdminCache.cpp',
|
||||
'MenuStyle_Valve.cpp',
|
||||
'logic_bridge.cpp',
|
||||
'smn_entities.cpp',
|
||||
'sm_stringutil.cpp',
|
||||
'MenuVoting.cpp',
|
||||
'smn_events.cpp',
|
||||
'smn_menus.cpp',
|
||||
'sm_trie.cpp',
|
||||
'CDataPack.cpp',
|
||||
'frame_hooks.cpp',
|
||||
'smn_nextmap.cpp',
|
||||
'sourcemm_api.cpp',
|
||||
'ChatTriggers.cpp',
|
||||
'smn_player.cpp',
|
||||
'sourcemod.cpp',
|
||||
'concmd_cleaner.cpp',
|
||||
'HalfLife2.cpp',
|
||||
'NextMap.cpp',
|
||||
'ConCmdManager.cpp',
|
||||
'ConVarManager.cpp',
|
||||
'LibrarySys.cpp',
|
||||
'PlayerManager.cpp',
|
||||
'TimerSys.cpp',
|
||||
'CoreConfig.cpp',
|
||||
'Logger.cpp',
|
||||
'smn_halflife.cpp',
|
||||
'smn_console.cpp',
|
||||
'UserMessages.cpp',
|
||||
'MenuManager.cpp',
|
||||
'smn_core.cpp',
|
||||
'smn_hudtext.cpp',
|
||||
'smn_usermsgs.cpp',
|
||||
'MenuStyle_Base.cpp',
|
||||
'smn_keyvalues.cpp',
|
||||
'smn_vector.cpp',
|
||||
'EventManager.cpp',
|
||||
'MenuStyle_Radio.cpp',
|
||||
'sm_autonatives.cpp',
|
||||
'sm_srvcmds.cpp',
|
||||
'ConsoleDetours.cpp',
|
||||
'NativeInvoker.cpp',
|
||||
'smn_database.cpp',
|
||||
'ForwardSys.cpp',
|
||||
'Database.cpp',
|
||||
'DebugReporter.cpp',
|
||||
'ShareSys.cpp',
|
||||
'PluginSys.cpp',
|
||||
'HandleSys.cpp',
|
||||
'NativeOwner.cpp',
|
||||
'ExtensionSys.cpp',
|
||||
'smn_fakenatives.cpp',
|
||||
'smn_filesystem.cpp',
|
||||
'ADTFactory.cpp',
|
||||
'PluginInfoDatabase.cpp',
|
||||
]
|
||||
|
||||
if sdk.name in ['csgo', 'dota']:
|
||||
binary.sources += ['smn_protobuf.cpp']
|
||||
else:
|
||||
binary.sources += ['smn_bitbuffer.cpp']
|
||||
|
||||
files = [
|
||||
'AdminCache.cpp',
|
||||
'ExtensionSys.cpp',
|
||||
'MenuStyle_Valve.cpp',
|
||||
'logic_bridge.cpp',
|
||||
'smn_entities.cpp',
|
||||
'sm_stringutil.cpp',
|
||||
'ADTFactory.cpp',
|
||||
'ForwardSys.cpp',
|
||||
'MenuVoting.cpp',
|
||||
'smn_events.cpp',
|
||||
'smn_menus.cpp',
|
||||
'sm_trie.cpp',
|
||||
'CDataPack.cpp',
|
||||
'frame_hooks.cpp',
|
||||
'NativeInvoker.cpp',
|
||||
'smn_fakenatives.cpp',
|
||||
'smn_nextmap.cpp',
|
||||
'sourcemm_api.cpp',
|
||||
'ChatTriggers.cpp',
|
||||
'NativeOwner.cpp',
|
||||
'smn_filesystem.cpp',
|
||||
'smn_player.cpp',
|
||||
'sourcemod.cpp',
|
||||
'concmd_cleaner.cpp',
|
||||
'HalfLife2.cpp',
|
||||
'NextMap.cpp',
|
||||
'ConCmdManager.cpp',
|
||||
'HandleSys.cpp',
|
||||
'ConVarManager.cpp',
|
||||
'LibrarySys.cpp',
|
||||
'PlayerManager.cpp',
|
||||
'TimerSys.cpp',
|
||||
'CoreConfig.cpp',
|
||||
'Logger.cpp',
|
||||
'PluginInfoDatabase.cpp',
|
||||
'smn_halflife.cpp',
|
||||
'PluginSys.cpp',
|
||||
'smn_console.cpp',
|
||||
'UserMessages.cpp',
|
||||
'Database.cpp',
|
||||
'MenuManager.cpp',
|
||||
'smn_core.cpp',
|
||||
'smn_hudtext.cpp',
|
||||
'smn_usermsgs.cpp',
|
||||
'DebugReporter.cpp',
|
||||
'MenuStyle_Base.cpp',
|
||||
'ShareSys.cpp',
|
||||
'smn_database.cpp',
|
||||
'smn_keyvalues.cpp',
|
||||
'smn_vector.cpp',
|
||||
'EventManager.cpp',
|
||||
'MenuStyle_Radio.cpp',
|
||||
'sm_autonatives.cpp',
|
||||
'sm_srvcmds.cpp',
|
||||
'ConsoleDetours.cpp'
|
||||
]
|
||||
|
||||
if i == 'csgo':
|
||||
files.append('smn_protobuf.cpp')
|
||||
else:
|
||||
files.append('smn_bitbuffer.cpp')
|
||||
if sdk.name == 'csgo':
|
||||
binary.sources += [
|
||||
os.path.join(sdk.path, 'public', 'engine', 'protobuf', 'netmessages.pb.cc'),
|
||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'csgo', 'protobuf', 'cstrike15_usermessages.pb.cc'),
|
||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'csgo', 'protobuf', 'cstrike15_usermessage_helpers.cpp'),
|
||||
]
|
||||
elif sdk.name == 'dota':
|
||||
binary.sources += [
|
||||
os.path.join(sdk.path, 'public', 'engine', 'protobuf', 'networkbasetypes.pb.cc'),
|
||||
os.path.join(sdk.path, 'public', 'engine', 'protobuf', 'netmessages.pb.cc'),
|
||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'protobuf', 'ai_activity.pb.cc'),
|
||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'protobuf', 'usermessages.pb.cc'),
|
||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'dota', 'protobuf', 'dota_commonmessages.pb.cc'),
|
||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'dota', 'protobuf', 'dota_usermessages.pb.cc'),
|
||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'dota', 'protobuf', 'dota_usermessage_helpers.cpp'),
|
||||
]
|
||||
|
||||
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)
|
||||
|
||||
if i == 'csgo':
|
||||
if AMBuild.target['platform'] in ['linux', 'darwin']:
|
||||
binary.AddObjectFiles(['libprotobuf.a'])
|
||||
|
||||
SM.AutoVersion('core', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
SM.binaries += [builder.Add(binary)]
|
||||
|
||||
|
||||
+21
-1
@@ -126,6 +126,8 @@ void ConVarManager::OnSourceModAllInitialized()
|
||||
}
|
||||
#endif
|
||||
|
||||
g_Players.AddClientListener(this);
|
||||
|
||||
SH_ADD_HOOK_STATICFUNC(ICvar, CallGlobalChangeCallbacks, icvar, OnConVarChanged, false);
|
||||
|
||||
g_PluginSys.AddPluginsListener(this);
|
||||
@@ -191,6 +193,8 @@ void ConVarManager::OnSourceModShutdown()
|
||||
}
|
||||
#endif
|
||||
|
||||
g_Players.RemoveClientListener(this);
|
||||
|
||||
SH_REMOVE_HOOK_STATICFUNC(ICvar, CallGlobalChangeCallbacks, icvar, OnConVarChanged, false);
|
||||
|
||||
/* Remove the 'convars' option from the 'sm' console command */
|
||||
@@ -307,6 +311,22 @@ void ConVarManager::OnPluginUnloaded(IPlugin *plugin)
|
||||
}
|
||||
}
|
||||
|
||||
void ConVarManager::OnClientDisconnected(int client)
|
||||
{
|
||||
/* Remove convar queries for this client that haven't returned results yet */
|
||||
for (List<ConVarQuery>::iterator iter = m_ConVarQueries.begin(); iter != m_ConVarQueries.end();)
|
||||
{
|
||||
ConVarQuery &query = (*iter);
|
||||
if (query.client == client)
|
||||
{
|
||||
iter = m_ConVarQueries.erase(iter);
|
||||
continue;
|
||||
}
|
||||
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
void ConVarManager::OnHandleDestroy(HandleType_t type, void *object)
|
||||
{
|
||||
}
|
||||
@@ -619,7 +639,7 @@ QueryCvarCookie_t ConVarManager::QueryClientConVar(edict_t *pPlayer, const char
|
||||
return InvalidQueryCvarCookie;
|
||||
}
|
||||
|
||||
ConVarQuery query = {cookie, pCallback, hndl};
|
||||
ConVarQuery query = {cookie, pCallback, (cell_t)hndl, IndexOfEdict(pPlayer)};
|
||||
m_ConVarQueries.push_back(query);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -39,8 +39,10 @@
|
||||
#include <IForwardSys.h>
|
||||
#include <IHandleSys.h>
|
||||
#include <IRootConsoleMenu.h>
|
||||
#include <IPlayerHelpers.h>
|
||||
#include <compat_wrappers.h>
|
||||
#include "concmd_cleaner.h"
|
||||
#include "PlayerManager.h"
|
||||
|
||||
#if SOURCE_ENGINE == SE_DARKMESSIAH
|
||||
class EQueryCvarValueStatus;
|
||||
@@ -75,6 +77,7 @@ struct ConVarQuery
|
||||
QueryCvarCookie_t cookie; /**< Cookie that identifies query */
|
||||
IPluginFunction *pCallback; /**< Function that will be called when query is finished */
|
||||
cell_t value; /**< Optional value passed to query function */
|
||||
cell_t client; /**< Only used for cleaning up on client disconnection */
|
||||
};
|
||||
|
||||
class ConVarManager :
|
||||
@@ -82,7 +85,8 @@ class ConVarManager :
|
||||
public IHandleTypeDispatch,
|
||||
public IPluginsListener,
|
||||
public IRootConsoleCommand,
|
||||
public IConCommandTracker
|
||||
public IConCommandTracker,
|
||||
public IClientListener
|
||||
{
|
||||
public:
|
||||
ConVarManager();
|
||||
@@ -101,6 +105,8 @@ public: //IRootConsoleCommand
|
||||
void OnRootConsoleCommand(const char *cmdname, const CCommand &command);
|
||||
public: //IConCommandTracker
|
||||
void OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name, bool is_read_safe);
|
||||
public: //IClientListener
|
||||
void OnClientDisconnected(int client);
|
||||
public:
|
||||
/**
|
||||
* Create a convar and return a handle to it.
|
||||
|
||||
+1
-1
@@ -408,7 +408,7 @@ bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
|
||||
FILE *fp = fopen(file, "wt");
|
||||
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", SOURCEMOD_VERSION);
|
||||
fprintf(fp, "// ConVars for plugin \"%s\"\n", pl->GetFilename());
|
||||
fprintf(fp, "\n\n");
|
||||
|
||||
|
||||
@@ -193,6 +193,7 @@ void CForwardManager::ForwardFree(CForward *fwd)
|
||||
|
||||
m_FreeForwards.push(fwd);
|
||||
m_managed.remove(fwd);
|
||||
m_unmanaged.remove(fwd);
|
||||
}
|
||||
|
||||
CForward *CForwardManager::ForwardMake()
|
||||
|
||||
+41
-25
@@ -72,8 +72,23 @@ CHalfLife2 g_HL2;
|
||||
ConVar *sv_lan = NULL;
|
||||
|
||||
static void *g_EntList = NULL;
|
||||
static void **g_pEntInfoList = NULL;
|
||||
static int entInfoOffset = -1;
|
||||
|
||||
static CEntInfo *EntInfoArray()
|
||||
{
|
||||
if (g_EntList != NULL)
|
||||
{
|
||||
return (CEntInfo *)((intp)g_EntList + entInfoOffset);
|
||||
}
|
||||
else if (g_pEntInfoList)
|
||||
{
|
||||
return *(CEntInfo **)g_pEntInfoList;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
namespace SourceHook
|
||||
{
|
||||
template<>
|
||||
@@ -192,40 +207,39 @@ void CHalfLife2::InitLogicalEntData()
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
if (!g_EntList)
|
||||
{
|
||||
if (!g_pGameConf->GetMemSig("LevelShutdown", (void **)&addr))
|
||||
if (g_pGameConf->GetMemSig("LevelShutdown", (void **) &addr) && addr)
|
||||
{
|
||||
g_Logger.LogError("Logical Entities not supported by this mod (LevelShutdown) - Reverting to networkable entities only");
|
||||
return;
|
||||
}
|
||||
int offset;
|
||||
if (!g_pGameConf->GetOffset("gEntList", &offset))
|
||||
{
|
||||
g_Logger.LogError("Logical Entities not supported by this mod (gEntList) - Reverting to networkable entities only");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!addr)
|
||||
{
|
||||
g_Logger.LogError("Failed lookup of LevelShutdown - Reverting to networkable entities only");
|
||||
return;
|
||||
}
|
||||
g_EntList = *reinterpret_cast<void **>(addr + offset);
|
||||
|
||||
int offset;
|
||||
if (!g_pGameConf->GetOffset("gEntList", &offset))
|
||||
{
|
||||
g_Logger.LogError("Logical Entities not supported by this mod (gEntList) - Reverting to networkable entities only");
|
||||
return;
|
||||
}
|
||||
|
||||
g_EntList = *reinterpret_cast<void **>(addr + offset);
|
||||
}
|
||||
|
||||
if (!g_EntList)
|
||||
|
||||
// If we have g_EntList from either of the above methods, make sure we can get the offset from it to EntInfo as well
|
||||
if (g_EntList && !g_pGameConf->GetOffset("EntInfo", &entInfoOffset))
|
||||
{
|
||||
g_Logger.LogError("Failed lookup of gEntList - Reverting to networkable entities only");
|
||||
g_Logger.LogError("Logical Entities not supported by this mod (EntInfo) - Reverting to networkable entities only");
|
||||
g_EntList = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!g_pGameConf->GetOffset("EntInfo", &entInfoOffset))
|
||||
// If we don't have g_EntList or have it but don't know where EntInfo is on it, use fallback.
|
||||
if (!g_EntList || entInfoOffset == -1)
|
||||
{
|
||||
g_Logger.LogError("Logical Entities not supported by this mod (EntInfo) - Reverting to networkable entities only");
|
||||
g_pGameConf->GetAddress("EntInfosPtr", (void **)&g_pEntInfoList);
|
||||
}
|
||||
|
||||
if (!g_EntList && !g_pEntInfoList)
|
||||
{
|
||||
g_Logger.LogError("Failed lookup of gEntList - Reverting to networkable entities only");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -737,6 +751,7 @@ void CHalfLife2::ProcessFakeCliCmdQueue()
|
||||
}
|
||||
|
||||
m_CmdQueue.pop();
|
||||
m_FreeCmds.push(pFake);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -993,7 +1008,9 @@ CEntInfo *CHalfLife2::LookupEntity(int entIndex)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!g_EntList || entInfoOffset == -1)
|
||||
CEntInfo *entInfos = EntInfoArray();
|
||||
|
||||
if (!entInfos)
|
||||
{
|
||||
/* Attempt to use engine interface instead */
|
||||
static CEntInfo tempInfo;
|
||||
@@ -1020,8 +1037,7 @@ CEntInfo *CHalfLife2::LookupEntity(int entIndex)
|
||||
return &tempInfo;
|
||||
}
|
||||
|
||||
CEntInfo *pArray = (CEntInfo *)(((unsigned char *)g_EntList) + entInfoOffset);
|
||||
return &pArray[entIndex];
|
||||
return &entInfos[entIndex];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -149,7 +149,7 @@ void Logger::_NewMapFile()
|
||||
} else {
|
||||
char date[32];
|
||||
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, SOURCEMOD_VERSION);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
@@ -362,7 +362,7 @@ void Logger::LogMessage(const char *vafmt, ...)
|
||||
char date[32];
|
||||
m_DailyPrintHdr = false;
|
||||
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, SOURCEMOD_VERSION);
|
||||
}
|
||||
va_list ap;
|
||||
va_start(ap, vafmt);
|
||||
|
||||
+3
-3
@@ -184,14 +184,14 @@ void NextMapManager::OnSourceModLevelChange( const char *mapName )
|
||||
m_tempChangeInfo.m_mapName[0] ='\0';
|
||||
m_tempChangeInfo.m_changeReason[0] = '\0';
|
||||
m_tempChangeInfo.startTime = time(NULL);
|
||||
UTIL_Format(lastMap, sizeof(lastMap), mapName);
|
||||
UTIL_Format(lastMap, sizeof(lastMap), "%s", mapName);
|
||||
}
|
||||
|
||||
void NextMapManager::ForceChangeLevel( const char *mapName, const char* changeReason )
|
||||
{
|
||||
/* Store the mapname and reason */
|
||||
UTIL_Format(m_tempChangeInfo.m_mapName, sizeof(m_tempChangeInfo.m_mapName), mapName);
|
||||
UTIL_Format(m_tempChangeInfo.m_changeReason, sizeof(m_tempChangeInfo.m_changeReason), changeReason);
|
||||
UTIL_Format(m_tempChangeInfo.m_mapName, sizeof(m_tempChangeInfo.m_mapName), "%s", mapName);
|
||||
UTIL_Format(m_tempChangeInfo.m_changeReason, sizeof(m_tempChangeInfo.m_changeReason), "%s", changeReason);
|
||||
|
||||
/* Change level and skip our hook */
|
||||
g_forcedChange = true;
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ struct MapChangeData
|
||||
startTime = 0;
|
||||
}
|
||||
|
||||
char m_mapName[32];
|
||||
char m_mapName[PLATFORM_MAX_PATH];
|
||||
char m_changeReason[100];
|
||||
time_t startTime;
|
||||
};
|
||||
|
||||
@@ -816,7 +816,7 @@ void PlayerManager::OnClientCommand(edict_t *pEntity)
|
||||
}
|
||||
|
||||
ClientConsolePrint(pEntity,
|
||||
"SourceMod %s, by AlliedModders LLC", SM_VERSION_STRING);
|
||||
"SourceMod %s, by AlliedModders LLC", SOURCEMOD_VERSION);
|
||||
ClientConsolePrint(pEntity,
|
||||
"To see running plugins, type \"sm plugins\"");
|
||||
ClientConsolePrint(pEntity,
|
||||
@@ -1830,7 +1830,11 @@ void CPlayer::Kick(const char *str)
|
||||
else
|
||||
{
|
||||
IClient *pClient = static_cast<IClient *>(pNetChan->GetMsgHandler());
|
||||
#if SOURCE_ENGINE == SE_CSGO
|
||||
pClient->Disconnect(str);
|
||||
#else
|
||||
pClient->Disconnect("%s", str);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+55
-57
@@ -1,61 +1,59 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
compiler = SM.DefaultCompiler()
|
||||
base = AMBuild.sourceFolder
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(base, 'core', 'logic'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(base, 'public'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(base, 'public', 'sourcepawn'))
|
||||
compiler['CDEFINES'].append('SM_DEFAULT_THREADER')
|
||||
compiler['CDEFINES'].append('SM_LOGIC')
|
||||
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
compiler['POSTLINKFLAGS'].append('-lpthread')
|
||||
if AMBuild.target['platform'] == 'darwin':
|
||||
compiler['CFLAGS'].extend(['-Wno-deprecated-declarations'])
|
||||
compiler['POSTLINKFLAGS'].extend(['-framework', 'CoreServices'])
|
||||
|
||||
extension = AMBuild.AddJob('sourcemod.logic')
|
||||
binary = Cpp.LibraryBuilder('sourcemod.logic', AMBuild, extension, compiler)
|
||||
files = [
|
||||
'common_logic.cpp',
|
||||
'smn_adt_array.cpp',
|
||||
'smn_sorting.cpp',
|
||||
'smn_maplists.cpp',
|
||||
'smn_adt_stack.cpp',
|
||||
'thread/ThreadWorker.cpp',
|
||||
'thread/BaseWorker.cpp',
|
||||
'ThreadSupport.cpp',
|
||||
'smn_float.cpp',
|
||||
'TextParsers.cpp',
|
||||
'smn_textparse.cpp',
|
||||
'smn_adt_trie.cpp',
|
||||
'Profiler.cpp',
|
||||
'smn_functions.cpp',
|
||||
'smn_timers.cpp',
|
||||
'smn_players.cpp',
|
||||
'MemoryUtils.cpp',
|
||||
'smn_admin.cpp',
|
||||
'smn_banning.cpp',
|
||||
'stringutil.cpp',
|
||||
'Translator.cpp',
|
||||
'PhraseCollection.cpp',
|
||||
'smn_lang.cpp',
|
||||
'smn_string.cpp',
|
||||
'smn_handles.cpp',
|
||||
'smn_datapacks.cpp',
|
||||
'smn_gameconfigs.cpp',
|
||||
'GameConfigs.cpp',
|
||||
'sm_crc32.cpp',
|
||||
'smn_profiler.cpp'
|
||||
]
|
||||
if AMBuild.target['platform'] == 'windows':
|
||||
files.append('thread/WinThreads.cpp')
|
||||
binary = SM.Library(builder, 'sourcemod.logic')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(builder.sourcePath, 'core', 'logic'),
|
||||
os.path.join(builder.sourcePath, 'public'),
|
||||
os.path.join(builder.sourcePath, 'public', 'sourcepawn'),
|
||||
os.path.join(builder.sourcePath, 'public', 'amtl'),
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook')
|
||||
]
|
||||
binary.compiler.defines += [
|
||||
'SM_DEFAULT_THREADER',
|
||||
'SM_LOGIC'
|
||||
]
|
||||
|
||||
if builder.target_platform == 'linux':
|
||||
binary.compiler.postlink += ['-lpthread', '-lrt']
|
||||
elif builder.target_platform == 'mac':
|
||||
binary.compiler.cflags += ['-Wno-deprecated-declarations']
|
||||
binary.compiler.postlink += ['-framework', 'CoreServices']
|
||||
binary.sources += [
|
||||
'common_logic.cpp',
|
||||
'smn_adt_array.cpp',
|
||||
'smn_sorting.cpp',
|
||||
'smn_maplists.cpp',
|
||||
'smn_adt_stack.cpp',
|
||||
'thread/ThreadWorker.cpp',
|
||||
'thread/BaseWorker.cpp',
|
||||
'ThreadSupport.cpp',
|
||||
'smn_float.cpp',
|
||||
'TextParsers.cpp',
|
||||
'smn_textparse.cpp',
|
||||
'smn_adt_trie.cpp',
|
||||
'Profiler.cpp',
|
||||
'smn_functions.cpp',
|
||||
'smn_timers.cpp',
|
||||
'smn_players.cpp',
|
||||
'MemoryUtils.cpp',
|
||||
'smn_admin.cpp',
|
||||
'smn_banning.cpp',
|
||||
'stringutil.cpp',
|
||||
'Translator.cpp',
|
||||
'PhraseCollection.cpp',
|
||||
'smn_lang.cpp',
|
||||
'smn_string.cpp',
|
||||
'smn_handles.cpp',
|
||||
'smn_datapacks.cpp',
|
||||
'smn_gameconfigs.cpp',
|
||||
'GameConfigs.cpp',
|
||||
'sm_crc32.cpp',
|
||||
'smn_profiler.cpp',
|
||||
]
|
||||
if builder.target_platform == 'windows':
|
||||
binary.sources += ['thread/WinThreads.cpp']
|
||||
else:
|
||||
files.append('thread/PosixThreads.cpp')
|
||||
binary.AddSourceFiles('core/logic', files)
|
||||
SM.AutoVersion('core/logic', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
binary.sources += ['thread/PosixThreads.cpp']
|
||||
|
||||
SM.binaries += [builder.Add(binary)]
|
||||
|
||||
@@ -90,7 +90,7 @@ struct TempSigInfo
|
||||
library[0] = '\0';
|
||||
sig[0] = '\0';
|
||||
}
|
||||
char sig[512];
|
||||
char sig[1024];
|
||||
char library[64];
|
||||
} s_TempSig;
|
||||
unsigned int s_ServerBinCRC;
|
||||
@@ -607,19 +607,11 @@ skip_find:
|
||||
{
|
||||
m_ParseState = PSTATE_GAMEDEFS_ADDRESSES;
|
||||
|
||||
if (m_Address[0] == '\0')
|
||||
if (m_Address[0] != '\0' && m_AddressSignature[0] != '\0')
|
||||
{
|
||||
smcore.LogError("[SM] Address sections must have names (gameconf \"%s\")", m_CurFile);
|
||||
break;
|
||||
AddressConf addrConf(m_AddressSignature, sizeof(m_AddressSignature), m_AddressReadCount, m_AddressRead);
|
||||
m_pAddresses->replace(m_Address, addrConf);
|
||||
}
|
||||
if (m_AddressSignature[0] == '\0')
|
||||
{
|
||||
smcore.LogError("[SM] Address section for \"%s\" did not specify a signature (gameconf \"%s\")", m_Address, m_CurFile);
|
||||
break;
|
||||
}
|
||||
|
||||
AddressConf addrConf(m_AddressSignature, sizeof(m_AddressSignature), m_AddressReadCount, m_AddressRead);
|
||||
m_pAddresses->replace(m_Address, addrConf);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -479,13 +479,6 @@ SMCResult CPhraseFile::ReadSMC_KeyValue(const SMCStates *states, const char *key
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t len = strlen(key);
|
||||
if (len < 2 || len > 3)
|
||||
{
|
||||
ParseWarning("Ignoring translation to invalid language \"%s\" on line %d.", key, states->line);
|
||||
return SMCResult_Continue;
|
||||
}
|
||||
|
||||
unsigned int lang;
|
||||
if (!m_pTranslator->GetLanguageByCode(key, &lang))
|
||||
{
|
||||
@@ -498,7 +491,7 @@ SMCResult CPhraseFile::ReadSMC_KeyValue(const SMCStates *states, const char *key
|
||||
/* See how many bytes we need for this string, then allocate.
|
||||
* NOTE: THIS SHOULD GUARANTEE THAT WE DO NOT NEED TO NEED TO SIZE CHECK
|
||||
*/
|
||||
len = strlen(value) + pPhrase->fmt_bytes + 1;
|
||||
size_t len = strlen(value) + pPhrase->fmt_bytes + 1;
|
||||
char *out_buf;
|
||||
int out_idx;
|
||||
|
||||
@@ -921,14 +914,6 @@ SMCResult Translator::ReadSMC_LeavingSection(const SMCStates *states)
|
||||
|
||||
SMCResult Translator::ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value)
|
||||
{
|
||||
size_t len = strlen(key);
|
||||
|
||||
if (len < 2 || len > 3)
|
||||
{
|
||||
smcore.LogError("[SM] Warning encountered parsing languages.cfg file.");
|
||||
smcore.LogError("[SM] Invalid language code \"%s\" is being ignored.", key);
|
||||
}
|
||||
|
||||
AddLanguage(key, value);
|
||||
|
||||
return SMCResult_Continue;
|
||||
|
||||
+3
-3
@@ -39,7 +39,7 @@
|
||||
|
||||
RootConsoleMenu g_RootMenu;
|
||||
|
||||
ConVar sourcemod_version("sourcemod_version", SM_VERSION_STRING, FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY, "SourceMod Version");
|
||||
ConVar sourcemod_version("sourcemod_version", SOURCEMOD_VERSION, FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY, "SourceMod Version");
|
||||
|
||||
RootConsoleMenu::RootConsoleMenu()
|
||||
{
|
||||
@@ -339,11 +339,11 @@ void RootConsoleMenu::OnRootConsoleCommand(const char *cmdname, const CCommand &
|
||||
else if (strcmp(cmdname, "version") == 0)
|
||||
{
|
||||
ConsolePrint(" SourceMod Version Information:");
|
||||
ConsolePrint(" SourceMod Version: %s", SM_VERSION_STRING);
|
||||
ConsolePrint(" SourceMod Version: %s", SOURCEMOD_VERSION);
|
||||
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(" Compiled on: %s %s", __DATE__, __TIME__);
|
||||
ConsolePrint(" Build ID: %s", SM_BUILD_UNIQUEID);
|
||||
ConsolePrint(" Build ID: %s", SOURCEMOD_BUILD_ID);
|
||||
ConsolePrint(" http://www.sourcemod.net/");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1407,6 +1407,23 @@ static cell_t SQL_ConnectCustom(IPluginContext *pContext, const cell_t *params)
|
||||
return hndl;
|
||||
}
|
||||
|
||||
static cell_t SQL_SetCharset(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
IDatabase *db = NULL;
|
||||
HandleError err;
|
||||
|
||||
if ((err = g_DBMan.ReadHandle(params[1], DBHandle_Database, (void **)&db))
|
||||
!= HandleError_None)
|
||||
{
|
||||
return pContext->ThrowNativeError("Invalid database Handle %x (error: %d)", params[1], err);
|
||||
}
|
||||
|
||||
char *characterset;
|
||||
pContext->LocalToString(params[2], &characterset);
|
||||
|
||||
return db->SetCharacterSet(characterset);
|
||||
}
|
||||
|
||||
REGISTER_NATIVES(dbNatives)
|
||||
{
|
||||
{"SQL_BindParamInt", SQL_BindParamInt},
|
||||
@@ -1448,6 +1465,7 @@ REGISTER_NATIVES(dbNatives)
|
||||
{"SQL_TQuery", SQL_TQuery},
|
||||
{"SQL_UnlockDatabase", SQL_UnlockDatabase},
|
||||
{"SQL_ConnectCustom", SQL_ConnectCustom},
|
||||
{"SQL_SetCharset", SQL_SetCharset},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
|
||||
+17
-1
@@ -509,7 +509,23 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
static cell_t GetEngineVersion(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
return g_SMAPI->GetSourceEngineBuild();
|
||||
int engineVer = g_SMAPI->GetSourceEngineBuild();
|
||||
#if defined METAMOD_PLAPI_VERSION
|
||||
if (engineVer == SOURCE_ENGINE_ORANGEBOXVALVE_DEPRECATED)
|
||||
{
|
||||
const char *gamedir = g_SourceMod.GetGameFolderName();
|
||||
if (strcmp(gamedir, "tf") == 0)
|
||||
return SOURCE_ENGINE_TF2;
|
||||
else if (strcmp(gamedir, "cstrike") == 0)
|
||||
return SOURCE_ENGINE_CSS;
|
||||
else if (strcmp(gamedir, "dod") == 0)
|
||||
return SOURCE_ENGINE_DODS;
|
||||
else if (strcmp(gamedir, "hl2mp") == 0)
|
||||
return SOURCE_ENGINE_HL2DM;
|
||||
}
|
||||
#endif
|
||||
|
||||
return engineVer;
|
||||
}
|
||||
|
||||
static cell_t IndexToReference(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
@@ -147,7 +147,7 @@ const char *SourceMod_Core::GetLicense()
|
||||
|
||||
const char *SourceMod_Core::GetVersion()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *SourceMod_Core::GetDate()
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
compiler = SM.DefaultExtCompiler('extensions/bintools')
|
||||
compiler['CDEFINES'].append('HOOKING_ENABLED')
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit', 'x86'))
|
||||
binary = SM.ExtLibrary(builder, 'bintools.ext')
|
||||
binary.compiler.defines += ['HOOKING_ENABLED']
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
os.path.join(builder.sourcePath, 'public', 'jit'),
|
||||
os.path.join(builder.sourcePath, 'public', 'jit', 'x86'),
|
||||
]
|
||||
|
||||
extension = AMBuild.AddJob('bintools.ext')
|
||||
binary = Cpp.LibraryBuilder('bintools.ext', AMBuild, extension, compiler)
|
||||
binary.AddSourceFiles('extensions/bintools', [
|
||||
'extension.cpp',
|
||||
'CallMaker.cpp',
|
||||
'CallWrapper.cpp',
|
||||
'HookWrapper.cpp',
|
||||
'jit_call.cpp',
|
||||
'jit_hook.cpp',
|
||||
'sdk/smsdk_ext.cpp'
|
||||
])
|
||||
SM.AutoVersion('extensions/bintools', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'CallMaker.cpp',
|
||||
'CallWrapper.cpp',
|
||||
'HookWrapper.cpp',
|
||||
'jit_call.cpp',
|
||||
'jit_hook.cpp',
|
||||
'sdk/smsdk_ext.cpp'
|
||||
]
|
||||
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
|
||||
@@ -61,11 +61,11 @@ bool BinTools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
|
||||
const char *BinTools::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *BinTools::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
compiler = SM.DefaultExtCompiler('extensions/clientprefs')
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
||||
binary = SM.ExtLibrary(builder, 'clientprefs.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
|
||||
extension = AMBuild.AddJob('clientprefs.ext')
|
||||
binary = Cpp.LibraryBuilder('clientprefs.ext', AMBuild, extension, compiler)
|
||||
binary.AddSourceFiles('extensions/clientprefs', [
|
||||
'extension.cpp',
|
||||
'cookie.cpp',
|
||||
'menus.cpp',
|
||||
'natives.cpp',
|
||||
'query.cpp',
|
||||
'sdk/smsdk_ext.cpp'
|
||||
])
|
||||
SM.AutoVersion('extensions/clientprefs', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'cookie.cpp',
|
||||
'menus.cpp',
|
||||
'natives.cpp',
|
||||
'query.cpp',
|
||||
'sdk/smsdk_ext.cpp'
|
||||
]
|
||||
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
|
||||
@@ -483,11 +483,11 @@ IdentityToken_t *ClientPrefs::GetIdentity() const
|
||||
|
||||
const char *ClientPrefs::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *ClientPrefs::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,21 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
for i in SM.sdkInfo:
|
||||
if i != 'css' and i != 'csgo':
|
||||
continue
|
||||
|
||||
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']
|
||||
extension = AMBuild.AddJob(name)
|
||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||
SM.PreSetupHL2Job(extension, binary, i)
|
||||
binary.AddSourceFiles('extensions/cstrike', [
|
||||
'extension.cpp',
|
||||
'natives.cpp',
|
||||
'RegNatives.cpp',
|
||||
'timeleft.cpp',
|
||||
'forwards.cpp',
|
||||
'util_cstrike.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'CDetour/detours.cpp',
|
||||
'asm/asm.c'
|
||||
])
|
||||
SM.PostSetupHL2Job(extension, binary, i)
|
||||
SM.AutoVersion('extensions/cstrike', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
for sdk_name in ['css', 'csgo']:
|
||||
if sdk_name not in SM.sdks:
|
||||
continue
|
||||
sdk = SM.sdks[sdk_name]
|
||||
|
||||
binary = SM.HL2Library(builder, 'game.cstrike.ext.' + sdk.ext, sdk)
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'natives.cpp',
|
||||
'RegNatives.cpp',
|
||||
'timeleft.cpp',
|
||||
'forwards.cpp',
|
||||
'util_cstrike.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'CDetour/detours.cpp',
|
||||
'asm/asm.c'
|
||||
]
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
@@ -283,12 +283,12 @@ bool CStrike::ProcessCommandTarget(cmd_target_info_t *info)
|
||||
|
||||
const char *CStrike::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *CStrike::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
void CStrike::OnPluginLoaded(IPlugin *plugin)
|
||||
|
||||
@@ -52,6 +52,7 @@ int CallPriceForward(int client, const char *weapon_name, int price);
|
||||
#define WEAPON_ASSAULTSUIT 51
|
||||
#define WEAPON_NIGHTVISION 52
|
||||
#define WEAPON_DEFUSER 53
|
||||
#define WEAPON_M4 16
|
||||
#else
|
||||
#define WEAPON_C4 6
|
||||
#define WEAPON_KNIFE 28
|
||||
|
||||
@@ -21,6 +21,13 @@ CDetour *DCSWeaponDrop = NULL;
|
||||
|
||||
int weaponNameOffset = -1;
|
||||
|
||||
//Windows CS:GO
|
||||
// int __userpurge HandleCommand_Buy_Internal<eax>(int a1<ecx>, float a2<xmm0>, int a3, int a4, char a5)
|
||||
// a1 - this
|
||||
// a2 - CCSGameRules::GetWarmupPeriodEndTime(g_pGameRules)
|
||||
// a3 - weapon
|
||||
// a4 - unknown
|
||||
// a5 - bRebuy
|
||||
#if SOURCE_ENGINE == SE_CSGO
|
||||
DETOUR_DECL_MEMBER3(DetourHandleBuy, int, const char *, weapon, int, iUnknown, bool, bRebuy)
|
||||
#else
|
||||
@@ -69,7 +76,7 @@ DETOUR_DECL_MEMBER2(DetourWeaponPrice, int, const char *, szAttribute, CEconItem
|
||||
{
|
||||
int price = DETOUR_MEMBER_CALL(DetourWeaponPrice)(szAttribute, pEconItem);
|
||||
|
||||
if(lastclient == -1 || strcmp(szAttribute, "in_game_price") != 0)
|
||||
if(lastclient == -1 || strcmp(szAttribute, "in game price") != 0)
|
||||
return price;
|
||||
|
||||
const char *weapon_name = reinterpret_cast<char *>(this+weaponNameOffset);
|
||||
@@ -78,6 +85,7 @@ DETOUR_DECL_MEMBER2(DetourWeaponPrice, int, const char *, szAttribute, CEconItem
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SOURCE_ENGINE != SE_CSGO || !defined(WIN32)
|
||||
DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
||||
{
|
||||
if (g_pIgnoreTerminateDetour)
|
||||
@@ -86,6 +94,30 @@ DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
||||
DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
//Windows CSGO
|
||||
//char __userpurge TerminateRound<al>(unsigned int a1<ecx>, signed int a2<edi>, unsigned int a3<xmm1>, int a4)
|
||||
// a1 - this
|
||||
// a2 - unknown
|
||||
// a3 - delay
|
||||
// a4 - reason
|
||||
DETOUR_DECL_MEMBER1(DetourTerminateRound, void, int, reason)
|
||||
{
|
||||
float delay;
|
||||
|
||||
if (g_pIgnoreTerminateDetour)
|
||||
{
|
||||
g_pIgnoreTerminateDetour = false;
|
||||
return DETOUR_MEMBER_CALL(DetourTerminateRound)(reason);
|
||||
}
|
||||
|
||||
//Save the delay
|
||||
__asm
|
||||
{
|
||||
movss delay, xmm1
|
||||
}
|
||||
#endif
|
||||
|
||||
float orgdelay = delay;
|
||||
int orgreason = reason;
|
||||
|
||||
@@ -98,10 +130,26 @@ DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
||||
if (result >= Pl_Handled)
|
||||
return;
|
||||
|
||||
#if SOURCE_ENGINE != SE_CSGO || !defined(WIN32)
|
||||
if (result == Pl_Changed)
|
||||
return DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason);
|
||||
|
||||
return DETOUR_MEMBER_CALL(DetourTerminateRound)(orgdelay, orgreason);
|
||||
#else
|
||||
if (result == Pl_Changed)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
movss xmm1, delay
|
||||
}
|
||||
return DETOUR_MEMBER_CALL(DetourTerminateRound)(reason);
|
||||
}
|
||||
__asm
|
||||
{
|
||||
movss xmm1, orgdelay
|
||||
}
|
||||
return DETOUR_MEMBER_CALL(DetourTerminateRound)(orgreason);
|
||||
#endif
|
||||
}
|
||||
|
||||
DETOUR_DECL_MEMBER3(DetourCSWeaponDrop, void, CBaseEntity *, weapon, bool, something, bool, toss)
|
||||
|
||||
+183
-16
@@ -34,6 +34,7 @@
|
||||
#include "forwards.h"
|
||||
#include "util_cstrike.h"
|
||||
#include <server_class.h>
|
||||
#include <iplayerinfo.h>
|
||||
|
||||
int g_iPriceOffset = -1;
|
||||
|
||||
@@ -46,6 +47,12 @@ int g_iPriceOffset = -1;
|
||||
code; \
|
||||
g_RegNatives.Register(pWrapper);
|
||||
|
||||
#define GET_MEMSIG(name) \
|
||||
if (!g_pGameConf->GetMemSig(name, &addr) || !addr) \
|
||||
{ \
|
||||
return pContext->ThrowNativeError("Failed to locate function"); \
|
||||
}
|
||||
|
||||
inline CBaseEntity *GetCBaseEntity(int num, bool isplayer)
|
||||
{
|
||||
edict_t *pEdict = gamehelpers->EdictOfIndex(num);
|
||||
@@ -150,6 +157,7 @@ static cell_t CS_RespawnPlayer(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
static cell_t CS_SwitchTeam(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
#if SOURCE_ENGINE != SE_CSGO || !defined(WIN32)
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
if (!pWrapper)
|
||||
{
|
||||
@@ -174,6 +182,41 @@ static cell_t CS_SwitchTeam(IPluginContext *pContext, const cell_t *params)
|
||||
vptr += sizeof(CBaseEntity *);
|
||||
*(int *)vptr = params[2];
|
||||
pWrapper->Execute(vstk, NULL);
|
||||
#else
|
||||
if (g_pSDKTools == NULL)
|
||||
{
|
||||
return pContext->ThrowNativeError("SDKTools interface not found. SwitchTeam native disabled.");
|
||||
}
|
||||
|
||||
static void *addr = NULL;
|
||||
if(!addr)
|
||||
{
|
||||
GET_MEMSIG("SwitchTeam");
|
||||
}
|
||||
|
||||
void *gamerules = g_pSDKTools->GetGameRules();
|
||||
if (gamerules == NULL)
|
||||
{
|
||||
return pContext->ThrowNativeError("GameRules not available. SwitchTeam native disabled.");
|
||||
}
|
||||
|
||||
CBaseEntity *pEntity;
|
||||
if (!(pEntity=GetCBaseEntity(params[1], true)))
|
||||
{
|
||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
||||
}
|
||||
|
||||
int team = params[2];
|
||||
|
||||
__asm
|
||||
{
|
||||
push team
|
||||
mov ecx, pEntity
|
||||
mov ebx, gamerules
|
||||
|
||||
call addr
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -248,7 +291,7 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
if (g_pSDKTools == NULL)
|
||||
{
|
||||
smutils->LogError(myself, "SDKTools interface not found. TerminateRound native disabled.");
|
||||
return pContext->ThrowNativeError("SDKTools interface not found. TerminateRound native disabled.");
|
||||
}
|
||||
else if (g_pSDKTools->GetInterfaceVersion() < 2)
|
||||
{
|
||||
@@ -256,6 +299,13 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
|
||||
return pContext->ThrowNativeError("SDKTools interface is outdated. TerminateRound native disabled.");
|
||||
}
|
||||
|
||||
void *gamerules = g_pSDKTools->GetGameRules();
|
||||
if (gamerules == NULL)
|
||||
{
|
||||
return pContext->ThrowNativeError("GameRules not available. TerminateRound native disabled.");
|
||||
}
|
||||
|
||||
#if SOURCE_ENGINE != SE_CSGO || !defined(WIN32)
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
|
||||
if (!pWrapper)
|
||||
@@ -271,12 +321,6 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 2))
|
||||
}
|
||||
|
||||
void *gamerules = g_pSDKTools->GetGameRules();
|
||||
if (gamerules == NULL)
|
||||
{
|
||||
return pContext->ThrowNativeError("GameRules not available. TerminateRound native disabled.");
|
||||
}
|
||||
|
||||
if (params[3] == 1 && g_pTerminateRoundDetoured)
|
||||
g_pIgnoreTerminateDetour = true;
|
||||
|
||||
@@ -290,7 +334,30 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
|
||||
*(int*)vptr = params[2];
|
||||
|
||||
pWrapper->Execute(vstk, NULL);
|
||||
#else
|
||||
static void *addr = NULL;
|
||||
|
||||
if(!addr)
|
||||
{
|
||||
GET_MEMSIG("TerminateRound");
|
||||
}
|
||||
|
||||
if (params[3] == 1 && g_pTerminateRoundDetoured)
|
||||
g_pIgnoreTerminateDetour = true;
|
||||
|
||||
float delay = sp_ctof(params[1]);
|
||||
int reason = params[2];
|
||||
signed int unknown = 1;//We might want to find what this is?
|
||||
__asm
|
||||
{
|
||||
push reason
|
||||
movss xmm1, delay
|
||||
mov edi, unknown
|
||||
mov ecx, gamerules
|
||||
call addr
|
||||
}
|
||||
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -360,6 +427,11 @@ static cell_t CS_GetWeaponPrice(IPluginContext *pContext, const cell_t *params)
|
||||
return pContext->ThrowNativeError("Failed to get weaponinfo");
|
||||
}
|
||||
|
||||
CBaseEntity *pEntity;
|
||||
if (!(pEntity = GetCBaseEntity(params[1], true)))
|
||||
{
|
||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
||||
}
|
||||
#if SOURCE_ENGINE == SE_CSGO
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
|
||||
@@ -380,14 +452,91 @@ static cell_t CS_GetWeaponPrice(IPluginContext *pContext, const cell_t *params)
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, &ret, pass, 2))
|
||||
}
|
||||
|
||||
// Get a CEconItemView for the m4
|
||||
// Found in CCSPlayer::HandleCommand_Buy_Internal
|
||||
// Linux a1 - CCSPlayer *pEntity, v5 - Player Team, a3 - ItemLoadoutSlot -1 use default loadoutslot:
|
||||
// v4 = *(int (__cdecl **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)(a1 + 9492) + 36); // offset 9
|
||||
// v6 = v4(a1 + 9492, v5, a3);
|
||||
// Windows v5 - CCSPlayer *pEntity a4 - ItemLoadoutSlot -1 use default loadoutslot:
|
||||
// v8 = (*(int (__stdcall **)(_DWORD, int))(*(_DWORD *)(v5 + 9472) + 32))(*(_DWORD *)(v5 + 760), a4); // offset 8
|
||||
// The function is CCSPlayerInventory::GetItemInLoadout(int, int)
|
||||
// We can pass NULL view to the GetAttribute to use default loadoutslot.
|
||||
// We only really care about m4a1/m4a4 as price differs between them
|
||||
// thisPtrOffset = 9472/9492
|
||||
|
||||
static ICallWrapper *pGetView = NULL;
|
||||
static int thisPtrOffset = -1;
|
||||
CEconItemView *view = NULL;
|
||||
|
||||
if(!pGetView)
|
||||
{
|
||||
int offset = -1;
|
||||
int byteOffset = -1;
|
||||
void *pHandleCommandBuy = NULL;
|
||||
if (!g_pGameConf->GetOffset("GetItemInLoadout", &offset) || offset == -1)
|
||||
{
|
||||
smutils->LogError(myself, "Failed to get GetItemInLoadout offset. Reverting to NULL ItemView");
|
||||
}
|
||||
else if (!g_pGameConf->GetOffset("CCSPlayerInventoryOffset", &byteOffset) || byteOffset == -1)
|
||||
{
|
||||
smutils->LogError(myself, "Failed to get CCSPlayerInventoryOffset offset. Reverting to NULL ItemView");
|
||||
}
|
||||
else if (!g_pGameConf->GetMemSig("HandleCommand_Buy_Internal", &pHandleCommandBuy) || !pHandleCommandBuy)
|
||||
{
|
||||
smutils->LogError(myself, "Failed to get HandleCommand_Buy_Internal function. Reverting to NULL ItemView");
|
||||
}
|
||||
else
|
||||
{
|
||||
thisPtrOffset = *(int *)((intptr_t)pHandleCommandBuy + byteOffset);
|
||||
|
||||
PassInfo pass[2];
|
||||
PassInfo ret;
|
||||
pass[0].flags = PASSFLAG_BYVAL;
|
||||
pass[0].type = PassType_Basic;
|
||||
pass[0].size = sizeof(int);
|
||||
pass[1].flags = PASSFLAG_BYVAL;
|
||||
pass[1].type = PassType_Basic;
|
||||
pass[1].size = sizeof(int);
|
||||
|
||||
ret.flags = PASSFLAG_BYVAL;
|
||||
ret.type = PassType_Basic;
|
||||
ret.size = sizeof(void *);
|
||||
|
||||
pGetView = g_pBinTools->CreateVCall(offset, 0, 0, &ret, pass, 2);
|
||||
g_RegNatives.Register(pGetView);
|
||||
}
|
||||
}
|
||||
|
||||
IPlayerInfo *playerinfo = playerhelpers->GetGamePlayer(params[1])->GetPlayerInfo();
|
||||
if(pGetView && thisPtrOffset != -1 && playerinfo)
|
||||
{
|
||||
//If the gun isnt an M4 we ignore this as M4 is the only one that differs in price based on Loadout item.
|
||||
int iLoadoutSlot = -1;
|
||||
if(id == WEAPON_M4)
|
||||
{
|
||||
iLoadoutSlot = 15;
|
||||
}
|
||||
|
||||
unsigned char vstk_view[sizeof(void *) + sizeof(int) * 2];
|
||||
unsigned char *vptr_view = vstk_view;
|
||||
|
||||
*(void **)vptr_view = (void *)((intptr_t)pEntity + thisPtrOffset);
|
||||
vptr_view += sizeof(void *);
|
||||
*(int *)vptr_view = playerinfo->GetTeamIndex();
|
||||
vptr_view += sizeof(int);
|
||||
*(int *)vptr_view = iLoadoutSlot;
|
||||
|
||||
pGetView->Execute(vstk_view, &view);
|
||||
}
|
||||
|
||||
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;
|
||||
*(const char **)vptr = "in game price";
|
||||
vptr += sizeof(const char *);
|
||||
*(CEconItemView **)vptr = view;
|
||||
|
||||
int price = 0;
|
||||
pWrapper->Execute(vstk, &price);
|
||||
@@ -404,12 +553,6 @@ static cell_t CS_GetWeaponPrice(IPluginContext *pContext, const cell_t *params)
|
||||
int price = *(int *)((intptr_t)info + g_iPriceOffset);
|
||||
#endif
|
||||
|
||||
CBaseEntity *pEntity;
|
||||
if (!(pEntity = GetCBaseEntity(params[1], true)))
|
||||
{
|
||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
||||
}
|
||||
|
||||
if (params[3] || weaponNameOffset == -1)
|
||||
return price;
|
||||
|
||||
@@ -506,6 +649,10 @@ static cell_t CS_AliasToWeaponID(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
return SMCSWeapon_HKP2000;
|
||||
}
|
||||
else if(strstr(weapon, "cz75a") != NULL)
|
||||
{
|
||||
return SMCSWeapon_P250;
|
||||
}
|
||||
#endif
|
||||
|
||||
int id = GetFakeWeaponID(AliasToWeaponID(weapon));
|
||||
@@ -787,6 +934,25 @@ static cell_t CS_GetClientAssists(IPluginContext *pContext, const cell_t *params
|
||||
#endif
|
||||
}
|
||||
|
||||
static cell_t CS_UpdateClientModel(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
if (!pWrapper)
|
||||
{
|
||||
REGISTER_NATIVE_ADDR("SetModelFromClass",
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, NULL, 0));
|
||||
}
|
||||
|
||||
CBaseEntity *pEntity;
|
||||
if (!(pEntity=GetCBaseEntity(params[1], true)))
|
||||
{
|
||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
||||
}
|
||||
|
||||
pWrapper->Execute(&pEntity, NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
sp_nativeinfo_t g_CSNatives[] =
|
||||
{
|
||||
{"CS_RespawnPlayer", CS_RespawnPlayer},
|
||||
@@ -807,6 +973,7 @@ sp_nativeinfo_t g_CSNatives[] =
|
||||
{"CS_SetClientContributionScore", CS_SetClientContributionScore},
|
||||
{"CS_GetClientAssists", CS_GetClientAssists},
|
||||
{"CS_SetClientAssists", CS_SetClientAssists},
|
||||
{"CS_UpdateClientModel", CS_UpdateClientModel},
|
||||
{"CS_IsValidWeaponID", CS_IsValidWeaponID},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -44,8 +44,17 @@
|
||||
code; \
|
||||
g_RegNatives.Register(pWrapper);
|
||||
|
||||
#define GET_MEMSIG(name, defaultret) \
|
||||
if (!g_pGameConf->GetMemSig(name, &addr) || !addr) \
|
||||
{ \
|
||||
g_pSM->LogError(myself, "Failed to locate function."); \
|
||||
return defaultret;\
|
||||
}
|
||||
|
||||
void *GetWeaponInfo(int weaponID)
|
||||
{
|
||||
void *info;
|
||||
#if SOURCE_ENGINE != SE_CSGO || !defined(WIN32)
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
if (!pWrapper)
|
||||
{
|
||||
@@ -61,8 +70,6 @@ void *GetWeaponInfo(int weaponID)
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retpass, pass, 1))
|
||||
}
|
||||
|
||||
void *info;
|
||||
|
||||
unsigned char vstk[sizeof(int)];
|
||||
unsigned char *vptr = vstk;
|
||||
|
||||
@@ -70,11 +77,30 @@ void *GetWeaponInfo(int weaponID)
|
||||
|
||||
pWrapper->Execute(vstk, &info);
|
||||
|
||||
|
||||
#else
|
||||
static void *addr = NULL;
|
||||
|
||||
if(!addr)
|
||||
{
|
||||
GET_MEMSIG("GetWeaponInfo", 0);
|
||||
}
|
||||
|
||||
__asm
|
||||
{
|
||||
mov ecx, weaponID
|
||||
call addr
|
||||
mov info, eax
|
||||
}
|
||||
#endif
|
||||
return info;
|
||||
}
|
||||
|
||||
const char *GetTranslatedWeaponAlias(const char *weapon)
|
||||
{
|
||||
const char *alias = NULL;
|
||||
|
||||
#if SOURCE_ENGINE != SE_CSGO || !defined(WIN32)
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
|
||||
if (!pWrapper)
|
||||
@@ -90,20 +116,35 @@ const char *GetTranslatedWeaponAlias(const char *weapon)
|
||||
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);
|
||||
pWrapper->Execute(vstk, &alias);
|
||||
#else
|
||||
static void *addr = NULL;
|
||||
|
||||
return ret;
|
||||
if(!addr)
|
||||
{
|
||||
GET_MEMSIG("GetTranslatedWeaponAlias", weapon);
|
||||
}
|
||||
|
||||
__asm
|
||||
{
|
||||
mov ecx, weapon
|
||||
call addr
|
||||
mov alias, eax
|
||||
}
|
||||
#endif
|
||||
return alias;
|
||||
}
|
||||
|
||||
int AliasToWeaponID(const char *weapon)
|
||||
{
|
||||
int weaponID = 0;
|
||||
#if SOURCE_ENGINE != SE_CSGO || !defined(WIN32)
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
|
||||
if (!pWrapper)
|
||||
@@ -119,7 +160,6 @@ int AliasToWeaponID(const char *weapon)
|
||||
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;
|
||||
@@ -127,12 +167,28 @@ int AliasToWeaponID(const char *weapon)
|
||||
*(const char **)vptr = weapon;
|
||||
|
||||
pWrapper->Execute(vstk, &weaponID);
|
||||
#else
|
||||
static void *addr = NULL;
|
||||
|
||||
if(!addr)
|
||||
{
|
||||
GET_MEMSIG("AliasToWeaponID", 0);
|
||||
}
|
||||
|
||||
__asm
|
||||
{
|
||||
mov ecx, weapon
|
||||
call addr
|
||||
mov weaponID, eax
|
||||
}
|
||||
#endif
|
||||
return weaponID;
|
||||
}
|
||||
|
||||
const char *WeaponIDToAlias(int weaponID)
|
||||
{
|
||||
const char *alias = NULL;
|
||||
#if SOURCE_ENGINE != SE_CSGO || !defined(WIN32)
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
|
||||
if (!pWrapper)
|
||||
@@ -148,16 +204,30 @@ const char *WeaponIDToAlias(int weaponID)
|
||||
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;
|
||||
pWrapper->Execute(vstk, &alias);
|
||||
#else
|
||||
static void *addr = NULL;
|
||||
|
||||
if(!addr)
|
||||
{
|
||||
GET_MEMSIG("WeaponIDToAlias", 0);
|
||||
}
|
||||
|
||||
int realWeaponID = GetRealWeaponID(weaponID);
|
||||
__asm
|
||||
{
|
||||
mov ecx, realWeaponID
|
||||
call addr
|
||||
mov alias, eax
|
||||
}
|
||||
#endif
|
||||
return alias;
|
||||
}
|
||||
int GetRealWeaponID(int weaponId)
|
||||
{
|
||||
|
||||
+19
-82
@@ -1,87 +1,24 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python :
|
||||
import os.path
|
||||
import subprocess
|
||||
import ambuild.command as command
|
||||
import ambuild.osutil as osutil
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python :
|
||||
import os
|
||||
|
||||
def BuildCURL():
|
||||
curl = AMBuild.AddJob('curl')
|
||||
if AMBuild.target['platform'] in ['linux', 'darwin']:
|
||||
if not osutil.FileExists(os.path.join(AMBuild.outputFolder, 'curl', 'Makefile')):
|
||||
args = ['/bin/bash',
|
||||
os.path.join(AMBuild.sourceFolder, 'extensions', 'curl', 'curl-src', 'configure'),
|
||||
'--enable-static',
|
||||
'--disable-shared',
|
||||
'--disable-ldap',
|
||||
'--without-ssl',
|
||||
'--without-libidn',
|
||||
'--without-libssh2',
|
||||
'--without-zlib']
|
||||
env = os.environ.copy()
|
||||
env['CFLAGS'] = '-m32'
|
||||
if AMBuild.target['platform'] == 'darwin':
|
||||
env['LDFLAGS'] = '-mmacosx-version-min=10.5'
|
||||
else:
|
||||
env['CFLAGS'] += ' -D_GNU_SOURCE'
|
||||
curl.AddCommand(command.DirectCommand(argv = args, env = env))
|
||||
curl.AddCommand(command.ShellCommand('cd lib && make'))
|
||||
else:
|
||||
args = ''
|
||||
projpath = os.path.join(AMBuild.sourceFolder, 'extensions', 'curl', 'curl-src', 'lib',
|
||||
'build_libcurl.vcproj')
|
||||
try:
|
||||
subprocess.Popen('vcbuild')
|
||||
except:
|
||||
xprojpath = os.path.join(AMBuild.sourceFolder, 'extensions', 'curl', 'curl-src', 'lib',
|
||||
'build_libcurl.vcxproj')
|
||||
if not os.path.isfile(xprojpath):
|
||||
curl.AddCommand(command.DirectCommand(['vcupgrade', projpath]))
|
||||
args = ['msbuild', xprojpath, '/p:Configuration=LIB Release']
|
||||
|
||||
if not args:
|
||||
args = ['vcbuild', projpath, 'LIB Release']
|
||||
|
||||
curl.AddCommand(command.DirectCommand(args))
|
||||
#die "Unable to find libcurl.lib!\n" unless (-f "LIB-Release\\libcurl.lib");
|
||||
libcurl = builder.RunScript('curl-src/lib/AMBuilder')
|
||||
|
||||
BuildCURL()
|
||||
binary = SM.ExtLibrary(builder, 'webternet.ext')
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
binary.compiler.defines += ['CURL_STATICLIB']
|
||||
binary.compiler.postlink += [libcurl.binary]
|
||||
if builder.target_platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif builder.target_platform == 'windows':
|
||||
binary.compiler.postlink += ['ws2_32.lib']
|
||||
|
||||
compiler = SM.DefaultExtCompiler('extensions/curl')
|
||||
extension = AMBuild.AddJob('webternet.ext')
|
||||
binary = Cpp.LibraryBuilder('webternet.ext', AMBuild, extension, compiler)
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'curlapi.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
]
|
||||
|
||||
curlPath = [AMBuild.sourceFolder, 'extensions', 'curl', 'curl-src', 'include']
|
||||
compiler['CXXINCLUDES'].append(os.path.join(*curlPath))
|
||||
compiler['CDEFINES'].append('CURL_STATICLIB')
|
||||
|
||||
binary.AddSourceFiles('extensions/curl', [
|
||||
'extension.cpp',
|
||||
'curlapi.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
])
|
||||
|
||||
if AMBuild.target['platform'] == 'linux' or AMBuild.target['platform'] == 'darwin':
|
||||
path = os.path.join(AMBuild.outputFolder,
|
||||
'curl',
|
||||
'lib',
|
||||
'.libs',
|
||||
'libcurl.a')
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
binary['POSTLINKFLAGS'].append('-lrt')
|
||||
binary.AddObjectFiles([path])
|
||||
elif AMBuild.target['platform'] == 'windows':
|
||||
path = os.path.join(AMBuild.sourceFolder,
|
||||
'extensions',
|
||||
'curl',
|
||||
'curl-src',
|
||||
'lib',
|
||||
'LIB-Release',
|
||||
'libcurl.lib')
|
||||
if os.path.isfile(path):
|
||||
binary.RelinkIfNewer(path)
|
||||
binary['POSTLINKFLAGS'].extend([path, 'ws2_32.lib'])
|
||||
|
||||
SM.AutoVersion('extensions/curl', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
# vim: sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os, platform
|
||||
|
||||
builder.SetBuildFolder('libcurl')
|
||||
|
||||
binary = builder.compiler.StaticLibrary('curl')
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'lib'),
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
|
||||
if builder.target_platform == 'mac':
|
||||
mac_version, ignore, ignore = platform.mac_ver()
|
||||
mac_tuple = mac_version.split('.')
|
||||
if int(mac_tuple[0]) >= 10 and int(mac_tuple[1]) >= 9:
|
||||
binary.compiler.defines += ['BUILTIN_STRLCAT']
|
||||
elif builder.target_platform == 'windows':
|
||||
binary.compiler.defines += [
|
||||
'BUILDING_LIBCURL',
|
||||
'CURL_STATICLIB',
|
||||
'CURL_DISABLE_LDAP',
|
||||
]
|
||||
elif builder.target_platform == 'linux':
|
||||
binary.compiler.defines += ['_GNU_SOURCE']
|
||||
|
||||
binary.sources += [
|
||||
'base64.c',
|
||||
'connect.c',
|
||||
'content_encoding.c',
|
||||
'cookie.c',
|
||||
'curl_addrinfo.c',
|
||||
'dict.c',
|
||||
'easy.c',
|
||||
'escape.c',
|
||||
'file.c',
|
||||
'formdata.c',
|
||||
'ftp.c',
|
||||
'getenv.c',
|
||||
'getinfo.c',
|
||||
'gtls.c',
|
||||
'hash.c',
|
||||
'hostares.c',
|
||||
'hostasyn.c',
|
||||
'hostip.c',
|
||||
'hostip4.c',
|
||||
'hostip6.c',
|
||||
'hostsyn.c',
|
||||
'hostthre.c',
|
||||
'http.c',
|
||||
'http_chunks.c',
|
||||
'http_digest.c',
|
||||
'http_negotiate.c',
|
||||
'http_ntlm.c',
|
||||
'if2ip.c',
|
||||
'inet_ntop.c',
|
||||
'inet_pton.c',
|
||||
'krb4.c',
|
||||
'krb5.c',
|
||||
'ldap.c',
|
||||
'llist.c',
|
||||
'md5.c',
|
||||
'memdebug.c',
|
||||
'mprintf.c',
|
||||
'multi.c',
|
||||
'netrc.c',
|
||||
'nss.c',
|
||||
'parsedate.c',
|
||||
'progress.c',
|
||||
'qssl.c',
|
||||
'rawstr.c',
|
||||
'security.c',
|
||||
'select.c',
|
||||
'sendf.c',
|
||||
'share.c',
|
||||
'socks.c',
|
||||
'speedcheck.c',
|
||||
'splay.c',
|
||||
'ssh.c',
|
||||
'sslgen.c',
|
||||
'ssluse.c',
|
||||
'strdup.c',
|
||||
'strequal.c',
|
||||
'strerror.c',
|
||||
'strtok.c',
|
||||
'strtoofft.c',
|
||||
'telnet.c',
|
||||
'tftp.c',
|
||||
'timeval.c',
|
||||
'transfer.c',
|
||||
'url.c',
|
||||
'version.c'
|
||||
]
|
||||
rvalue = builder.Add(binary)
|
||||
|
||||
@@ -0,0 +1,918 @@
|
||||
/* lib/config.h. Generated from config.h.in by configure. */
|
||||
/* lib/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the $func function. */
|
||||
/* #undef AS_TR_CPP */
|
||||
|
||||
/* when building libcurl itself */
|
||||
/* #undef BUILDING_LIBCURL */
|
||||
|
||||
/* Location of default ca bundle */
|
||||
#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
|
||||
|
||||
/* Location of default ca path */
|
||||
/* #undef CURL_CA_PATH */
|
||||
|
||||
/* to disable cookies support */
|
||||
/* #undef CURL_DISABLE_COOKIES */
|
||||
|
||||
/* to disable cryptographic authentication */
|
||||
/* #undef CURL_DISABLE_CRYPTO_AUTH */
|
||||
|
||||
/* to disable DICT */
|
||||
/* #undef CURL_DISABLE_DICT */
|
||||
|
||||
/* to disable FILE */
|
||||
/* #undef CURL_DISABLE_FILE */
|
||||
|
||||
/* to disable FTP */
|
||||
/* #undef CURL_DISABLE_FTP */
|
||||
|
||||
/* to disable HTTP */
|
||||
/* #undef CURL_DISABLE_HTTP */
|
||||
|
||||
/* to disable LDAP */
|
||||
#define CURL_DISABLE_LDAP 1
|
||||
|
||||
/* to disable LDAPS */
|
||||
#define CURL_DISABLE_LDAPS 1
|
||||
|
||||
/* to disable proxies */
|
||||
/* #undef CURL_DISABLE_PROXY */
|
||||
|
||||
/* to disable TELNET */
|
||||
/* #undef CURL_DISABLE_TELNET */
|
||||
|
||||
/* to disable TFTP */
|
||||
/* #undef CURL_DISABLE_TFTP */
|
||||
|
||||
/* to disable verbose strings */
|
||||
/* #undef CURL_DISABLE_VERBOSE_STRINGS */
|
||||
|
||||
/* to make a symbol visible */
|
||||
/* #undef CURL_EXTERN_SYMBOL */
|
||||
|
||||
/* to enable hidden symbols */
|
||||
/* #undef CURL_HIDDEN_SYMBOLS */
|
||||
|
||||
/* W$ LDAP with non-W$ compiler */
|
||||
/* #undef CURL_LDAP_HYBRID */
|
||||
|
||||
/* Use W$ LDAP implementation */
|
||||
/* #undef CURL_LDAP_WIN */
|
||||
|
||||
/* when not building a shared library */
|
||||
/* #undef CURL_STATICLIB */
|
||||
|
||||
/* Set to explicitly specify we don't want to use thread-safe functions */
|
||||
/* #undef DISABLED_THREADSAFE */
|
||||
|
||||
/* your Entropy Gathering Daemon socket pathname */
|
||||
/* #undef EGD_SOCKET */
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#define ENABLE_IPV6 1
|
||||
|
||||
/* Define to the type qualifier of arg 1 for getnameinfo. */
|
||||
#define GETNAMEINFO_QUAL_ARG1 const
|
||||
|
||||
/* Define to the type of arg 1 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
|
||||
|
||||
/* Define to the type of arg 2 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG2 socklen_t
|
||||
|
||||
/* Define to the type of args 4 and 6 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG46 size_t
|
||||
|
||||
/* Define to the type of arg 7 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG7 unsigned int
|
||||
|
||||
/* Specifies the number of arguments to getservbyport_r */
|
||||
#define GETSERVBYPORT_R_ARGS 6
|
||||
|
||||
/* Specifies the size of the buffer to pass to getservbyport_r */
|
||||
#define GETSERVBYPORT_R_BUFSIZE 4096
|
||||
|
||||
/* Define to 1 if you have the alarm function. */
|
||||
#define HAVE_ALARM 1
|
||||
|
||||
/* Define to 1 if you have the <alloca.h> header file. */
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the <arpa/tftp.h> header file. */
|
||||
#define HAVE_ARPA_TFTP_H 1
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#define HAVE_ASSERT_H 1
|
||||
|
||||
/* Define to 1 if you have the `basename' function. */
|
||||
#define HAVE_BASENAME 1
|
||||
|
||||
/* Define to 1 if bool is an available type. */
|
||||
#define HAVE_BOOL_T 1
|
||||
|
||||
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
|
||||
#define HAVE_CLOCK_GETTIME_MONOTONIC 1
|
||||
|
||||
/* Define to 1 if you have the `closesocket' function. */
|
||||
/* #undef HAVE_CLOSESOCKET */
|
||||
|
||||
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
|
||||
/* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */
|
||||
|
||||
/* Define to 1 if you have the <crypto.h> header file. */
|
||||
/* #undef HAVE_CRYPTO_H */
|
||||
|
||||
/* Define to 1 if you have the <des.h> header file. */
|
||||
/* #undef HAVE_DES_H */
|
||||
|
||||
/* disabled non-blocking sockets */
|
||||
/* #undef HAVE_DISABLED_NONBLOCKING */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */
|
||||
/* #undef HAVE_ENGINE_LOAD_BUILTIN_ENGINES */
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have the <err.h> header file. */
|
||||
/* #undef HAVE_ERR_H */
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the fdopen function. */
|
||||
#define HAVE_FDOPEN 1
|
||||
|
||||
/* use FIONBIO for non-blocking sockets */
|
||||
/* #undef HAVE_FIONBIO */
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
#define HAVE_FORK 1
|
||||
|
||||
/* Define to 1 if you have the freeaddrinfo function. */
|
||||
#define HAVE_FREEADDRINFO 1
|
||||
|
||||
/* Define to 1 if you have the freeifaddrs function. */
|
||||
#define HAVE_FREEIFADDRS 1
|
||||
|
||||
/* Define to 1 if you have the ftruncate function. */
|
||||
#define HAVE_FTRUNCATE 1
|
||||
|
||||
/* Define to 1 if you have a working getaddrinfo function. */
|
||||
#define HAVE_GETADDRINFO 1
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#define HAVE_GETEUID 1
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr' function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
/* Define to 1 if you have the gethostbyaddr_r function. */
|
||||
#define HAVE_GETHOSTBYADDR_R 1
|
||||
|
||||
/* gethostbyaddr_r() takes 5 args */
|
||||
/* #undef HAVE_GETHOSTBYADDR_R_5 */
|
||||
|
||||
/* gethostbyaddr_r() takes 7 args */
|
||||
/* #undef HAVE_GETHOSTBYADDR_R_7 */
|
||||
|
||||
/* gethostbyaddr_r() takes 8 args */
|
||||
#define HAVE_GETHOSTBYADDR_R_8 1
|
||||
|
||||
/* If you have gethostbyname */
|
||||
#define HAVE_GETHOSTBYNAME 1
|
||||
|
||||
/* Define to 1 if you have the gethostbyname_r function. */
|
||||
#define HAVE_GETHOSTBYNAME_R 1
|
||||
|
||||
/* gethostbyname_r() takes 3 args */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_3 */
|
||||
|
||||
/* gethostbyname_r() takes 5 args */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_5 */
|
||||
|
||||
/* gethostbyname_r() takes 6 args */
|
||||
#define HAVE_GETHOSTBYNAME_R_6 1
|
||||
|
||||
/* Define to 1 if you have the gethostname function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define to 1 if you have a working getifaddrs function. */
|
||||
#define HAVE_GETIFADDRS 1
|
||||
|
||||
/* Define to 1 if you have the getnameinfo function. */
|
||||
#define HAVE_GETNAMEINFO 1
|
||||
|
||||
/* Define to 1 if you have the `getpass_r' function. */
|
||||
/* #undef HAVE_GETPASS_R */
|
||||
|
||||
/* Define to 1 if you have the `getppid' function. */
|
||||
#define HAVE_GETPPID 1
|
||||
|
||||
/* Define to 1 if you have the `getprotobyname' function. */
|
||||
#define HAVE_GETPROTOBYNAME 1
|
||||
|
||||
/* Define to 1 if you have the `getpwuid' function. */
|
||||
#define HAVE_GETPWUID 1
|
||||
|
||||
/* Define to 1 if you have the `getrlimit' function. */
|
||||
#define HAVE_GETRLIMIT 1
|
||||
|
||||
/* Define to 1 if you have the getservbyport_r function. */
|
||||
#define HAVE_GETSERVBYPORT_R 1
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have a working glibc-style strerror_r function. */
|
||||
/* #undef HAVE_GLIBC_STRERROR_R */
|
||||
|
||||
/* Define to 1 if you have a working gmtime_r function. */
|
||||
#define HAVE_GMTIME_R 1
|
||||
|
||||
/* if you have the gssapi libraries */
|
||||
/* #undef HAVE_GSSAPI */
|
||||
|
||||
/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
|
||||
/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
|
||||
|
||||
/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
|
||||
/* #undef HAVE_GSSAPI_GSSAPI_H */
|
||||
|
||||
/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
|
||||
/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
|
||||
|
||||
/* if you have the GNU gssapi libraries */
|
||||
/* #undef HAVE_GSSGNU */
|
||||
|
||||
/* if you have the Heimdal gssapi libraries */
|
||||
/* #undef HAVE_GSSHEIMDAL */
|
||||
|
||||
/* if you have the MIT gssapi libraries */
|
||||
/* #undef HAVE_GSSMIT */
|
||||
|
||||
/* Define to 1 if you have the `idna_strerror' function. */
|
||||
/* #undef HAVE_IDNA_STRERROR */
|
||||
|
||||
/* Define to 1 if you have the `idn_free' function. */
|
||||
/* #undef HAVE_IDN_FREE */
|
||||
|
||||
/* Define to 1 if you have the <idn-free.h> header file. */
|
||||
/* #undef HAVE_IDN_FREE_H */
|
||||
|
||||
/* Define to 1 if you have the <ifaddrs.h> header file. */
|
||||
#define HAVE_IFADDRS_H 1
|
||||
|
||||
/* Define to 1 if you have the `inet_addr' function. */
|
||||
#define HAVE_INET_ADDR 1
|
||||
|
||||
/* Define to 1 if you have the inet_ntoa_r function. */
|
||||
/* #undef HAVE_INET_NTOA_R */
|
||||
|
||||
/* inet_ntoa_r() takes 2 args */
|
||||
/* #undef HAVE_INET_NTOA_R_2 */
|
||||
|
||||
/* inet_ntoa_r() takes 3 args */
|
||||
/* #undef HAVE_INET_NTOA_R_3 */
|
||||
|
||||
/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
|
||||
/* #undef HAVE_INET_NTOP */
|
||||
|
||||
/* Define to 1 if you have a IPv6 capable working inet_pton function. */
|
||||
/* #undef HAVE_INET_PTON */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* use ioctlsocket() for non-blocking sockets */
|
||||
/* #undef HAVE_IOCTLSOCKET */
|
||||
|
||||
/* use Ioctlsocket() for non-blocking sockets */
|
||||
/* #undef HAVE_IOCTLSOCKET_CASE */
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
/* #undef HAVE_IO_H */
|
||||
|
||||
/* if you have the Kerberos4 libraries (including -ldes) */
|
||||
/* #undef HAVE_KRB4 */
|
||||
|
||||
/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
|
||||
/* #undef HAVE_KRB_GET_OUR_IP_FOR_REALM */
|
||||
|
||||
/* Define to 1 if you have the <krb.h> header file. */
|
||||
/* #undef HAVE_KRB_H */
|
||||
|
||||
/* Define to 1 if you have the lber.h header file. */
|
||||
/* #undef HAVE_LBER_H */
|
||||
|
||||
/* Define to 1 if you have the ldapssl.h header file. */
|
||||
/* #undef HAVE_LDAPSSL_H */
|
||||
|
||||
/* Define to 1 if you have the ldap.h header file. */
|
||||
/* #undef HAVE_LDAP_H */
|
||||
|
||||
/* Use LDAPS implementation */
|
||||
/* #undef HAVE_LDAP_SSL */
|
||||
|
||||
/* Define to 1 if you have the ldap_ssl.h header file. */
|
||||
/* #undef HAVE_LDAP_SSL_H */
|
||||
|
||||
/* Define to 1 if you have the `ldap_url_parse' function. */
|
||||
/* #undef HAVE_LDAP_URL_PARSE */
|
||||
|
||||
/* Define to 1 if you have the <libgen.h> header file. */
|
||||
#define HAVE_LIBGEN_H 1
|
||||
|
||||
/* Define to 1 if you have the `idn' library (-lidn). */
|
||||
/* #undef HAVE_LIBIDN */
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
/* #undef HAVE_LIBRESOLV */
|
||||
|
||||
/* Define to 1 if you have the `resolve' library (-lresolve). */
|
||||
/* #undef HAVE_LIBRESOLVE */
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
/* #undef HAVE_LIBSOCKET */
|
||||
|
||||
/* Define to 1 if you have the `ssh2' library (-lssh2). */
|
||||
/* #undef HAVE_LIBSSH2 */
|
||||
|
||||
/* Define to 1 if you have the <libssh2.h> header file. */
|
||||
/* #undef HAVE_LIBSSH2_H */
|
||||
|
||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||
/* #undef HAVE_LIBSSL */
|
||||
|
||||
/* if zlib is available */
|
||||
/* #undef HAVE_LIBZ */
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* if your compiler supports LL */
|
||||
#define HAVE_LL 1
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define to 1 if you have a working localtime_r function. */
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
|
||||
/* Define to 1 if the compiler supports the 'long long' data type. */
|
||||
#define HAVE_LONGLONG 1
|
||||
|
||||
/* Define to 1 if you have the malloc.h header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the MSG_NOSIGNAL flag. */
|
||||
#define HAVE_MSG_NOSIGNAL 1
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
#define HAVE_NETINET_TCP_H 1
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#define HAVE_NET_IF_H 1
|
||||
|
||||
/* Define to 1 if NI_WITHSCOPEID exists and works. */
|
||||
/* #undef HAVE_NI_WITHSCOPEID */
|
||||
|
||||
/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE
|
||||
*/
|
||||
/* #undef HAVE_OLD_GSSMIT */
|
||||
|
||||
/* Define to 1 if you have the <openssl/crypto.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_CRYPTO_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/engine.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_ENGINE_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/err.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_ERR_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/pem.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_PEM_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/pkcs12.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_PKCS12_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/rsa.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_RSA_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/ssl.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_SSL_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/x509.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_X509_H */
|
||||
|
||||
/* use O_NONBLOCK for non-blocking sockets */
|
||||
#define HAVE_O_NONBLOCK 1
|
||||
|
||||
/* Define to 1 if you have the <pem.h> header file. */
|
||||
/* #undef HAVE_PEM_H */
|
||||
|
||||
/* Define to 1 if you have the `perror' function. */
|
||||
#define HAVE_PERROR 1
|
||||
|
||||
/* Define to 1 if you have the `pipe' function. */
|
||||
#define HAVE_PIPE 1
|
||||
|
||||
/* if you have the function PK11_CreateGenericObject */
|
||||
/* #undef HAVE_PK11_CREATEGENERICOBJECT */
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#define HAVE_POLL 1
|
||||
|
||||
/* If you have a fine poll */
|
||||
#define HAVE_POLL_FINE 1
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#define HAVE_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have a working POSIX-style strerror_r function. */
|
||||
#define HAVE_POSIX_STRERROR_R 1
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#define HAVE_PWD_H 1
|
||||
|
||||
/* Define to 1 if you have the `RAND_egd' function. */
|
||||
/* #undef HAVE_RAND_EGD */
|
||||
|
||||
/* Define to 1 if you have the `RAND_screen' function. */
|
||||
/* #undef HAVE_RAND_SCREEN */
|
||||
|
||||
/* Define to 1 if you have the `RAND_status' function. */
|
||||
/* #undef HAVE_RAND_STATUS */
|
||||
|
||||
/* Define to 1 if you have the recv function. */
|
||||
#define HAVE_RECV 1
|
||||
|
||||
/* Define to 1 if you have the recvfrom function. */
|
||||
#define HAVE_RECVFROM 1
|
||||
|
||||
/* Define to 1 if you have the <rsa.h> header file. */
|
||||
/* #undef HAVE_RSA_H */
|
||||
|
||||
/* Define to 1 if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the send function. */
|
||||
#define HAVE_SEND 1
|
||||
|
||||
/* Define to 1 if you have the <setjmp.h> header file. */
|
||||
#define HAVE_SETJMP_H 1
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define to 1 if you have the `setmode' function. */
|
||||
/* #undef HAVE_SETMODE */
|
||||
|
||||
/* Define to 1 if you have the `setrlimit' function. */
|
||||
#define HAVE_SETRLIMIT 1
|
||||
|
||||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||||
#define HAVE_SGTTY_H 1
|
||||
|
||||
/* Define to 1 if you have the sigaction function. */
|
||||
#define HAVE_SIGACTION 1
|
||||
|
||||
/* Define to 1 if you have the siginterrupt function. */
|
||||
#define HAVE_SIGINTERRUPT 1
|
||||
|
||||
/* Define to 1 if you have the signal function. */
|
||||
#define HAVE_SIGNAL 1
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* Define to 1 if you have the sigsetjmp function or macro. */
|
||||
#define HAVE_SIGSETJMP 1
|
||||
|
||||
/* Define to 1 if sig_atomic_t is an available typedef. */
|
||||
#define HAVE_SIG_ATOMIC_T 1
|
||||
|
||||
/* Define to 1 if sig_atomic_t is already defined as volatile. */
|
||||
/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* use SO_NONBLOCK for non-blocking sockets */
|
||||
/* #undef HAVE_SO_NONBLOCK */
|
||||
|
||||
/* Define this if you have the SPNEGO library fbopenssl */
|
||||
/* #undef HAVE_SPNEGO */
|
||||
|
||||
/* Define to 1 if you have the `SSL_get_shutdown' function. */
|
||||
/* #undef HAVE_SSL_GET_SHUTDOWN */
|
||||
|
||||
/* Define to 1 if you have the <ssl.h> header file. */
|
||||
/* #undef HAVE_SSL_H */
|
||||
|
||||
/* Define to 1 if you have the <stdbool.h> header file. */
|
||||
#define HAVE_STDBOOL_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#define HAVE_STDIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the strcasecmp function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the strcasestr function. */
|
||||
/* #undef HAVE_STRCASESTR */
|
||||
|
||||
/* Define to 1 if you have the strcmpi function. */
|
||||
/* #undef HAVE_STRCMPI */
|
||||
|
||||
/* Define to 1 if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the strerror_r function. */
|
||||
#define HAVE_STRERROR_R 1
|
||||
|
||||
/* Define to 1 if you have the stricmp function. */
|
||||
/* #undef HAVE_STRICMP */
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the strlcat function. */
|
||||
/* #undef HAVE_STRLCAT */
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
/* #undef HAVE_STRLCPY */
|
||||
|
||||
/* Define to 1 if you have the strncasecmp function. */
|
||||
#define HAVE_STRNCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the strncmpi function. */
|
||||
/* #undef HAVE_STRNCMPI */
|
||||
|
||||
/* Define to 1 if you have the strnicmp function. */
|
||||
/* #undef HAVE_STRNICMP */
|
||||
|
||||
/* Define to 1 if you have the strstr function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define to 1 if you have the strtok_r function. */
|
||||
#define HAVE_STRTOK_R 1
|
||||
|
||||
/* Define to 1 if you have the strtoll function. */
|
||||
#define HAVE_STRTOLL 1
|
||||
|
||||
/* if struct sockaddr_storage is defined */
|
||||
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
|
||||
|
||||
/* Define to 1 if you have the timeval struct. */
|
||||
#define HAVE_STRUCT_TIMEVAL 1
|
||||
|
||||
/* Define to 1 if you have the <sys/filio.h> header file. */
|
||||
/* #undef HAVE_SYS_FILIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#define HAVE_SYS_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
#define HAVE_SYS_RESOURCE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
/* #undef HAVE_SYS_SOCKIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
#define HAVE_SYS_UIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||
#define HAVE_SYS_UN_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||
/* #undef HAVE_SYS_UTIME_H */
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Define to 1 if you have the <termio.h> header file. */
|
||||
#define HAVE_TERMIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <tld.h> header file. */
|
||||
/* #undef HAVE_TLD_H */
|
||||
|
||||
/* Define to 1 if you have the `tld_strerror' function. */
|
||||
/* #undef HAVE_TLD_STRERROR */
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#define HAVE_UNAME 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `utime' function. */
|
||||
#define HAVE_UTIME 1
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
#define HAVE_UTIME_H 1
|
||||
|
||||
/* Define to 1 if compiler supports C99 variadic macro style. */
|
||||
#define HAVE_VARIADIC_MACROS_C99 1
|
||||
|
||||
/* Define to 1 if compiler supports old gcc variadic macro style. */
|
||||
#define HAVE_VARIADIC_MACROS_GCC 1
|
||||
|
||||
/* Define to 1 if you have the winber.h header file. */
|
||||
/* #undef HAVE_WINBER_H */
|
||||
|
||||
/* Define to 1 if you have the windows.h header file. */
|
||||
/* #undef HAVE_WINDOWS_H */
|
||||
|
||||
/* Define to 1 if you have the winldap.h header file. */
|
||||
/* #undef HAVE_WINLDAP_H */
|
||||
|
||||
/* Define to 1 if you have the winsock2.h header file. */
|
||||
/* #undef HAVE_WINSOCK2_H */
|
||||
|
||||
/* Define to 1 if you have the winsock.h header file. */
|
||||
/* #undef HAVE_WINSOCK_H */
|
||||
|
||||
/* Define this symbol if your OS supports changing the contents of argv */
|
||||
#define HAVE_WRITABLE_ARGV 1
|
||||
|
||||
/* Define to 1 if you have the writev function. */
|
||||
#define HAVE_WRITEV 1
|
||||
|
||||
/* Define to 1 if you have the ws2tcpip.h header file. */
|
||||
/* #undef HAVE_WS2TCPIP_H */
|
||||
|
||||
/* Define to 1 if you have the <x509.h> header file. */
|
||||
/* #undef HAVE_X509_H */
|
||||
|
||||
/* if you have the zlib.h header file */
|
||||
/* #undef HAVE_ZLIB_H */
|
||||
|
||||
/* Define to 1 if you are building a native Windows target. */
|
||||
/* #undef NATIVE_WINDOWS */
|
||||
|
||||
/* If you lack a fine basename() prototype */
|
||||
/* #undef NEED_BASENAME_PROTO */
|
||||
|
||||
/* Define to 1 if you need the lber.h header file even with ldap.h */
|
||||
/* #undef NEED_LBER_H */
|
||||
|
||||
/* Define to 1 if you need the malloc.h header file even with stdlib.h */
|
||||
/* #undef NEED_MALLOC_H */
|
||||
|
||||
/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
|
||||
/* #undef NEED_REENTRANT */
|
||||
|
||||
/* cpu-machine-OS */
|
||||
#define OS "x86_64-unknown-linux-gnu"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "curl"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "curl"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "curl -"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "curl"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "-"
|
||||
|
||||
/* a suitable file to read random data from */
|
||||
/* #undef RANDOM_FILE */
|
||||
|
||||
/* Define to the type of arg 1 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type pointed by arg 2 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG2 void
|
||||
|
||||
/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
|
||||
#define RECVFROM_TYPE_ARG2_IS_VOID 1
|
||||
|
||||
/* Define to the type of arg 3 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to the type of arg 4 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG4 int
|
||||
|
||||
/* Define to the type pointed by arg 5 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG5 struct sockaddr
|
||||
|
||||
/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */
|
||||
/* #undef RECVFROM_TYPE_ARG5_IS_VOID */
|
||||
|
||||
/* Define to the type pointed by arg 6 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG6 socklen_t
|
||||
|
||||
/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */
|
||||
/* #undef RECVFROM_TYPE_ARG6_IS_VOID */
|
||||
|
||||
/* Define to the function return type for recvfrom. */
|
||||
#define RECVFROM_TYPE_RETV int
|
||||
|
||||
/* Define to the type of arg 1 for recv. */
|
||||
#define RECV_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of arg 2 for recv. */
|
||||
#define RECV_TYPE_ARG2 void *
|
||||
|
||||
/* Define to the type of arg 3 for recv. */
|
||||
#define RECV_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to the type of arg 4 for recv. */
|
||||
#define RECV_TYPE_ARG4 int
|
||||
|
||||
/* Define to the function return type for recv. */
|
||||
#define RECV_TYPE_RETV int
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to the type qualifier of arg 5 for select. */
|
||||
#define SELECT_QUAL_ARG5
|
||||
|
||||
/* Define to the type of arg 1 for select. */
|
||||
#define SELECT_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for select. */
|
||||
#define SELECT_TYPE_ARG234 fd_set *
|
||||
|
||||
/* Define to the type of arg 5 for select. */
|
||||
#define SELECT_TYPE_ARG5 struct timeval *
|
||||
|
||||
/* Define to the function return type for select. */
|
||||
#define SELECT_TYPE_RETV int
|
||||
|
||||
/* Define to the type qualifier of arg 2 for send. */
|
||||
#define SEND_QUAL_ARG2 const
|
||||
|
||||
/* Define to the type of arg 1 for send. */
|
||||
#define SEND_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of arg 2 for send. */
|
||||
#define SEND_TYPE_ARG2 void *
|
||||
|
||||
/* Define to the type of arg 3 for send. */
|
||||
#define SEND_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to the type of arg 4 for send. */
|
||||
#define SEND_TYPE_ARG4 int
|
||||
|
||||
/* Define to the function return type for send. */
|
||||
#define SEND_TYPE_RETV int
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* The size of `off_t', as computed by sizeof. */
|
||||
#define SIZEOF_OFF_T 8
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#define SIZEOF_SIZE_T 4
|
||||
|
||||
/* The size of `time_t', as computed by sizeof. */
|
||||
#define SIZEOF_TIME_T 4
|
||||
|
||||
/* The size of `void*', as computed by sizeof. */
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to the type of arg 3 for strerror_r. */
|
||||
#define STRERROR_R_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if you want to enable c-ares support */
|
||||
/* #undef USE_ARES */
|
||||
|
||||
/* if GnuTLS is enabled */
|
||||
/* #undef USE_GNUTLS */
|
||||
|
||||
/* if libSSH2 is in use */
|
||||
/* #undef USE_LIBSSH2 */
|
||||
|
||||
/* If you want to build curl with the built-in manual */
|
||||
#define USE_MANUAL 1
|
||||
|
||||
/* if NSS is enabled */
|
||||
/* #undef USE_NSS */
|
||||
|
||||
/* if OpenSSL is in use */
|
||||
/* #undef USE_OPENSSL */
|
||||
|
||||
/* if SSL is enabled */
|
||||
/* #undef USE_SSLEAY */
|
||||
|
||||
/* Define to 1 if you are building a Windows target without large file
|
||||
support. */
|
||||
/* #undef USE_WIN32_LARGE_FILES */
|
||||
|
||||
/* to enable SSPI support */
|
||||
/* #undef USE_WINDOWS_SSPI */
|
||||
|
||||
/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */
|
||||
/* #undef USE_YASSLEMUL */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "7.19.2"
|
||||
|
||||
/* Define to avoid automatic inclusion of winsock.h */
|
||||
/* #undef WIN32_LEAN_AND_MEAN */
|
||||
|
||||
/* Define to 1 if OS is AIX. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* # undef _ALL_SOURCE */
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/* define this if you need it to compile thread-safe code */
|
||||
/* #undef _THREAD_SAFE */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Type to use in place of in_addr_t when system does not provide it. */
|
||||
/* #undef in_addr_t */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Type to use in place of socklen_t when system does not provide it. */
|
||||
/* #undef socklen_t */
|
||||
|
||||
/* the signed version of size_t */
|
||||
/* #undef ssize_t */
|
||||
@@ -0,0 +1,918 @@
|
||||
/* lib/config.h. Generated from config.h.in by configure. */
|
||||
/* lib/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the $func function. */
|
||||
/* #undef AS_TR_CPP */
|
||||
|
||||
/* when building libcurl itself */
|
||||
/* #undef BUILDING_LIBCURL */
|
||||
|
||||
/* Location of default ca bundle */
|
||||
/* #undef CURL_CA_BUNDLE */
|
||||
|
||||
/* Location of default ca path */
|
||||
/* #undef CURL_CA_PATH */
|
||||
|
||||
/* to disable cookies support */
|
||||
/* #undef CURL_DISABLE_COOKIES */
|
||||
|
||||
/* to disable cryptographic authentication */
|
||||
/* #undef CURL_DISABLE_CRYPTO_AUTH */
|
||||
|
||||
/* to disable DICT */
|
||||
/* #undef CURL_DISABLE_DICT */
|
||||
|
||||
/* to disable FILE */
|
||||
/* #undef CURL_DISABLE_FILE */
|
||||
|
||||
/* to disable FTP */
|
||||
/* #undef CURL_DISABLE_FTP */
|
||||
|
||||
/* to disable HTTP */
|
||||
/* #undef CURL_DISABLE_HTTP */
|
||||
|
||||
/* to disable LDAP */
|
||||
#define CURL_DISABLE_LDAP 1
|
||||
|
||||
/* to disable LDAPS */
|
||||
#define CURL_DISABLE_LDAPS 1
|
||||
|
||||
/* to disable proxies */
|
||||
/* #undef CURL_DISABLE_PROXY */
|
||||
|
||||
/* to disable TELNET */
|
||||
/* #undef CURL_DISABLE_TELNET */
|
||||
|
||||
/* to disable TFTP */
|
||||
/* #undef CURL_DISABLE_TFTP */
|
||||
|
||||
/* to disable verbose strings */
|
||||
/* #undef CURL_DISABLE_VERBOSE_STRINGS */
|
||||
|
||||
/* to make a symbol visible */
|
||||
/* #undef CURL_EXTERN_SYMBOL */
|
||||
|
||||
/* to enable hidden symbols */
|
||||
/* #undef CURL_HIDDEN_SYMBOLS */
|
||||
|
||||
/* W$ LDAP with non-W$ compiler */
|
||||
/* #undef CURL_LDAP_HYBRID */
|
||||
|
||||
/* Use W$ LDAP implementation */
|
||||
/* #undef CURL_LDAP_WIN */
|
||||
|
||||
/* when not building a shared library */
|
||||
/* #undef CURL_STATICLIB */
|
||||
|
||||
/* Set to explicitly specify we don't want to use thread-safe functions */
|
||||
/* #undef DISABLED_THREADSAFE */
|
||||
|
||||
/* your Entropy Gathering Daemon socket pathname */
|
||||
/* #undef EGD_SOCKET */
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#define ENABLE_IPV6 1
|
||||
|
||||
/* Define to the type qualifier of arg 1 for getnameinfo. */
|
||||
#define GETNAMEINFO_QUAL_ARG1 const
|
||||
|
||||
/* Define to the type of arg 1 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
|
||||
|
||||
/* Define to the type of arg 2 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG2 socklen_t
|
||||
|
||||
/* Define to the type of args 4 and 6 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG46 socklen_t
|
||||
|
||||
/* Define to the type of arg 7 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG7 int
|
||||
|
||||
/* Specifies the number of arguments to getservbyport_r */
|
||||
/* #undef GETSERVBYPORT_R_ARGS */
|
||||
|
||||
/* Specifies the size of the buffer to pass to getservbyport_r */
|
||||
/* #undef GETSERVBYPORT_R_BUFSIZE */
|
||||
|
||||
/* Define to 1 if you have the alarm function. */
|
||||
#define HAVE_ALARM 1
|
||||
|
||||
/* Define to 1 if you have the <alloca.h> header file. */
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the <arpa/tftp.h> header file. */
|
||||
#define HAVE_ARPA_TFTP_H 1
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#define HAVE_ASSERT_H 1
|
||||
|
||||
/* Define to 1 if you have the `basename' function. */
|
||||
#define HAVE_BASENAME 1
|
||||
|
||||
/* Define to 1 if bool is an available type. */
|
||||
#define HAVE_BOOL_T 1
|
||||
|
||||
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
|
||||
/* #undef HAVE_CLOCK_GETTIME_MONOTONIC */
|
||||
|
||||
/* Define to 1 if you have the `closesocket' function. */
|
||||
/* #undef HAVE_CLOSESOCKET */
|
||||
|
||||
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
|
||||
/* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */
|
||||
|
||||
/* Define to 1 if you have the <crypto.h> header file. */
|
||||
/* #undef HAVE_CRYPTO_H */
|
||||
|
||||
/* Define to 1 if you have the <des.h> header file. */
|
||||
/* #undef HAVE_DES_H */
|
||||
|
||||
/* disabled non-blocking sockets */
|
||||
/* #undef HAVE_DISABLED_NONBLOCKING */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */
|
||||
/* #undef HAVE_ENGINE_LOAD_BUILTIN_ENGINES */
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have the <err.h> header file. */
|
||||
/* #undef HAVE_ERR_H */
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the fdopen function. */
|
||||
#define HAVE_FDOPEN 1
|
||||
|
||||
/* use FIONBIO for non-blocking sockets */
|
||||
/* #undef HAVE_FIONBIO */
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
#define HAVE_FORK 1
|
||||
|
||||
/* Define to 1 if you have the freeaddrinfo function. */
|
||||
#define HAVE_FREEADDRINFO 1
|
||||
|
||||
/* Define to 1 if you have the freeifaddrs function. */
|
||||
#define HAVE_FREEIFADDRS 1
|
||||
|
||||
/* Define to 1 if you have the ftruncate function. */
|
||||
#define HAVE_FTRUNCATE 1
|
||||
|
||||
/* Define to 1 if you have a working getaddrinfo function. */
|
||||
#define HAVE_GETADDRINFO 1
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#define HAVE_GETEUID 1
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr' function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
/* Define to 1 if you have the gethostbyaddr_r function. */
|
||||
/* #undef HAVE_GETHOSTBYADDR_R */
|
||||
|
||||
/* gethostbyaddr_r() takes 5 args */
|
||||
/* #undef HAVE_GETHOSTBYADDR_R_5 */
|
||||
|
||||
/* gethostbyaddr_r() takes 7 args */
|
||||
/* #undef HAVE_GETHOSTBYADDR_R_7 */
|
||||
|
||||
/* gethostbyaddr_r() takes 8 args */
|
||||
/* #undef HAVE_GETHOSTBYADDR_R_8 */
|
||||
|
||||
/* If you have gethostbyname */
|
||||
#define HAVE_GETHOSTBYNAME 1
|
||||
|
||||
/* Define to 1 if you have the gethostbyname_r function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R */
|
||||
|
||||
/* gethostbyname_r() takes 3 args */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_3 */
|
||||
|
||||
/* gethostbyname_r() takes 5 args */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_5 */
|
||||
|
||||
/* gethostbyname_r() takes 6 args */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_6 */
|
||||
|
||||
/* Define to 1 if you have the gethostname function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define to 1 if you have a working getifaddrs function. */
|
||||
#define HAVE_GETIFADDRS 1
|
||||
|
||||
/* Define to 1 if you have the getnameinfo function. */
|
||||
#define HAVE_GETNAMEINFO 1
|
||||
|
||||
/* Define to 1 if you have the `getpass_r' function. */
|
||||
/* #undef HAVE_GETPASS_R */
|
||||
|
||||
/* Define to 1 if you have the `getppid' function. */
|
||||
#define HAVE_GETPPID 1
|
||||
|
||||
/* Define to 1 if you have the `getprotobyname' function. */
|
||||
#define HAVE_GETPROTOBYNAME 1
|
||||
|
||||
/* Define to 1 if you have the `getpwuid' function. */
|
||||
#define HAVE_GETPWUID 1
|
||||
|
||||
/* Define to 1 if you have the `getrlimit' function. */
|
||||
#define HAVE_GETRLIMIT 1
|
||||
|
||||
/* Define to 1 if you have the getservbyport_r function. */
|
||||
/* #undef HAVE_GETSERVBYPORT_R */
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have a working glibc-style strerror_r function. */
|
||||
/* #undef HAVE_GLIBC_STRERROR_R */
|
||||
|
||||
/* Define to 1 if you have a working gmtime_r function. */
|
||||
#define HAVE_GMTIME_R 1
|
||||
|
||||
/* if you have the gssapi libraries */
|
||||
/* #undef HAVE_GSSAPI */
|
||||
|
||||
/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
|
||||
/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
|
||||
|
||||
/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
|
||||
/* #undef HAVE_GSSAPI_GSSAPI_H */
|
||||
|
||||
/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
|
||||
/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
|
||||
|
||||
/* if you have the GNU gssapi libraries */
|
||||
/* #undef HAVE_GSSGNU */
|
||||
|
||||
/* if you have the Heimdal gssapi libraries */
|
||||
/* #undef HAVE_GSSHEIMDAL */
|
||||
|
||||
/* if you have the MIT gssapi libraries */
|
||||
/* #undef HAVE_GSSMIT */
|
||||
|
||||
/* Define to 1 if you have the `idna_strerror' function. */
|
||||
/* #undef HAVE_IDNA_STRERROR */
|
||||
|
||||
/* Define to 1 if you have the `idn_free' function. */
|
||||
/* #undef HAVE_IDN_FREE */
|
||||
|
||||
/* Define to 1 if you have the <idn-free.h> header file. */
|
||||
/* #undef HAVE_IDN_FREE_H */
|
||||
|
||||
/* Define to 1 if you have the <ifaddrs.h> header file. */
|
||||
#define HAVE_IFADDRS_H 1
|
||||
|
||||
/* Define to 1 if you have the `inet_addr' function. */
|
||||
#define HAVE_INET_ADDR 1
|
||||
|
||||
/* Define to 1 if you have the inet_ntoa_r function. */
|
||||
/* #undef HAVE_INET_NTOA_R */
|
||||
|
||||
/* inet_ntoa_r() takes 2 args */
|
||||
/* #undef HAVE_INET_NTOA_R_2 */
|
||||
|
||||
/* inet_ntoa_r() takes 3 args */
|
||||
/* #undef HAVE_INET_NTOA_R_3 */
|
||||
|
||||
/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
|
||||
/* #undef HAVE_INET_NTOP */
|
||||
|
||||
/* Define to 1 if you have a IPv6 capable working inet_pton function. */
|
||||
/* #undef HAVE_INET_PTON */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* use ioctlsocket() for non-blocking sockets */
|
||||
/* #undef HAVE_IOCTLSOCKET */
|
||||
|
||||
/* use Ioctlsocket() for non-blocking sockets */
|
||||
/* #undef HAVE_IOCTLSOCKET_CASE */
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
/* #undef HAVE_IO_H */
|
||||
|
||||
/* if you have the Kerberos4 libraries (including -ldes) */
|
||||
/* #undef HAVE_KRB4 */
|
||||
|
||||
/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
|
||||
/* #undef HAVE_KRB_GET_OUR_IP_FOR_REALM */
|
||||
|
||||
/* Define to 1 if you have the <krb.h> header file. */
|
||||
/* #undef HAVE_KRB_H */
|
||||
|
||||
/* Define to 1 if you have the lber.h header file. */
|
||||
/* #undef HAVE_LBER_H */
|
||||
|
||||
/* Define to 1 if you have the ldapssl.h header file. */
|
||||
/* #undef HAVE_LDAPSSL_H */
|
||||
|
||||
/* Define to 1 if you have the ldap.h header file. */
|
||||
/* #undef HAVE_LDAP_H */
|
||||
|
||||
/* Use LDAPS implementation */
|
||||
/* #undef HAVE_LDAP_SSL */
|
||||
|
||||
/* Define to 1 if you have the ldap_ssl.h header file. */
|
||||
/* #undef HAVE_LDAP_SSL_H */
|
||||
|
||||
/* Define to 1 if you have the `ldap_url_parse' function. */
|
||||
/* #undef HAVE_LDAP_URL_PARSE */
|
||||
|
||||
/* Define to 1 if you have the <libgen.h> header file. */
|
||||
#define HAVE_LIBGEN_H 1
|
||||
|
||||
/* Define to 1 if you have the `idn' library (-lidn). */
|
||||
/* #undef HAVE_LIBIDN */
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
/* #undef HAVE_LIBRESOLV */
|
||||
|
||||
/* Define to 1 if you have the `resolve' library (-lresolve). */
|
||||
/* #undef HAVE_LIBRESOLVE */
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
/* #undef HAVE_LIBSOCKET */
|
||||
|
||||
/* Define to 1 if you have the `ssh2' library (-lssh2). */
|
||||
/* #undef HAVE_LIBSSH2 */
|
||||
|
||||
/* Define to 1 if you have the <libssh2.h> header file. */
|
||||
/* #undef HAVE_LIBSSH2_H */
|
||||
|
||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||
/* #undef HAVE_LIBSSL */
|
||||
|
||||
/* if zlib is available */
|
||||
/* #undef HAVE_LIBZ */
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* if your compiler supports LL */
|
||||
#define HAVE_LL 1
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define to 1 if you have a working localtime_r function. */
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
|
||||
/* Define to 1 if the compiler supports the 'long long' data type. */
|
||||
#define HAVE_LONGLONG 1
|
||||
|
||||
/* Define to 1 if you have the malloc.h header file. */
|
||||
/* #undef HAVE_MALLOC_H */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the MSG_NOSIGNAL flag. */
|
||||
/* #undef HAVE_MSG_NOSIGNAL */
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
#define HAVE_NETINET_TCP_H 1
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#define HAVE_NET_IF_H 1
|
||||
|
||||
/* Define to 1 if NI_WITHSCOPEID exists and works. */
|
||||
/* #undef HAVE_NI_WITHSCOPEID */
|
||||
|
||||
/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE
|
||||
*/
|
||||
/* #undef HAVE_OLD_GSSMIT */
|
||||
|
||||
/* Define to 1 if you have the <openssl/crypto.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_CRYPTO_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/engine.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_ENGINE_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/err.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_ERR_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/pem.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_PEM_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/pkcs12.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_PKCS12_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/rsa.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_RSA_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/ssl.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_SSL_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/x509.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_X509_H */
|
||||
|
||||
/* use O_NONBLOCK for non-blocking sockets */
|
||||
#define HAVE_O_NONBLOCK 1
|
||||
|
||||
/* Define to 1 if you have the <pem.h> header file. */
|
||||
/* #undef HAVE_PEM_H */
|
||||
|
||||
/* Define to 1 if you have the `perror' function. */
|
||||
#define HAVE_PERROR 1
|
||||
|
||||
/* Define to 1 if you have the `pipe' function. */
|
||||
#define HAVE_PIPE 1
|
||||
|
||||
/* if you have the function PK11_CreateGenericObject */
|
||||
/* #undef HAVE_PK11_CREATEGENERICOBJECT */
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#define HAVE_POLL 1
|
||||
|
||||
/* If you have a fine poll */
|
||||
/* #undef HAVE_POLL_FINE */
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#define HAVE_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have a working POSIX-style strerror_r function. */
|
||||
#define HAVE_POSIX_STRERROR_R 1
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#define HAVE_PWD_H 1
|
||||
|
||||
/* Define to 1 if you have the `RAND_egd' function. */
|
||||
/* #undef HAVE_RAND_EGD */
|
||||
|
||||
/* Define to 1 if you have the `RAND_screen' function. */
|
||||
/* #undef HAVE_RAND_SCREEN */
|
||||
|
||||
/* Define to 1 if you have the `RAND_status' function. */
|
||||
/* #undef HAVE_RAND_STATUS */
|
||||
|
||||
/* Define to 1 if you have the recv function. */
|
||||
#define HAVE_RECV 1
|
||||
|
||||
/* Define to 1 if you have the recvfrom function. */
|
||||
#define HAVE_RECVFROM 1
|
||||
|
||||
/* Define to 1 if you have the <rsa.h> header file. */
|
||||
/* #undef HAVE_RSA_H */
|
||||
|
||||
/* Define to 1 if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the send function. */
|
||||
#define HAVE_SEND 1
|
||||
|
||||
/* Define to 1 if you have the <setjmp.h> header file. */
|
||||
#define HAVE_SETJMP_H 1
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define to 1 if you have the `setmode' function. */
|
||||
#define HAVE_SETMODE 1
|
||||
|
||||
/* Define to 1 if you have the `setrlimit' function. */
|
||||
#define HAVE_SETRLIMIT 1
|
||||
|
||||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||||
#define HAVE_SGTTY_H 1
|
||||
|
||||
/* Define to 1 if you have the sigaction function. */
|
||||
#define HAVE_SIGACTION 1
|
||||
|
||||
/* Define to 1 if you have the siginterrupt function. */
|
||||
#define HAVE_SIGINTERRUPT 1
|
||||
|
||||
/* Define to 1 if you have the signal function. */
|
||||
#define HAVE_SIGNAL 1
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* Define to 1 if you have the sigsetjmp function or macro. */
|
||||
#define HAVE_SIGSETJMP 1
|
||||
|
||||
/* Define to 1 if sig_atomic_t is an available typedef. */
|
||||
#define HAVE_SIG_ATOMIC_T 1
|
||||
|
||||
/* Define to 1 if sig_atomic_t is already defined as volatile. */
|
||||
/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* use SO_NONBLOCK for non-blocking sockets */
|
||||
/* #undef HAVE_SO_NONBLOCK */
|
||||
|
||||
/* Define this if you have the SPNEGO library fbopenssl */
|
||||
/* #undef HAVE_SPNEGO */
|
||||
|
||||
/* Define to 1 if you have the `SSL_get_shutdown' function. */
|
||||
/* #undef HAVE_SSL_GET_SHUTDOWN */
|
||||
|
||||
/* Define to 1 if you have the <ssl.h> header file. */
|
||||
/* #undef HAVE_SSL_H */
|
||||
|
||||
/* Define to 1 if you have the <stdbool.h> header file. */
|
||||
#define HAVE_STDBOOL_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#define HAVE_STDIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the strcasecmp function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the strcasestr function. */
|
||||
#define HAVE_STRCASESTR 1
|
||||
|
||||
/* Define to 1 if you have the strcmpi function. */
|
||||
/* #undef HAVE_STRCMPI */
|
||||
|
||||
/* Define to 1 if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the strerror_r function. */
|
||||
#define HAVE_STRERROR_R 1
|
||||
|
||||
/* Define to 1 if you have the stricmp function. */
|
||||
/* #undef HAVE_STRICMP */
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the strlcat function. */
|
||||
#define HAVE_STRLCAT 1
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
/* #undef HAVE_STRLCPY */
|
||||
|
||||
/* Define to 1 if you have the strncasecmp function. */
|
||||
#define HAVE_STRNCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the strncmpi function. */
|
||||
/* #undef HAVE_STRNCMPI */
|
||||
|
||||
/* Define to 1 if you have the strnicmp function. */
|
||||
/* #undef HAVE_STRNICMP */
|
||||
|
||||
/* Define to 1 if you have the strstr function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define to 1 if you have the strtok_r function. */
|
||||
#define HAVE_STRTOK_R 1
|
||||
|
||||
/* Define to 1 if you have the strtoll function. */
|
||||
#define HAVE_STRTOLL 1
|
||||
|
||||
/* if struct sockaddr_storage is defined */
|
||||
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
|
||||
|
||||
/* Define to 1 if you have the timeval struct. */
|
||||
#define HAVE_STRUCT_TIMEVAL 1
|
||||
|
||||
/* Define to 1 if you have the <sys/filio.h> header file. */
|
||||
#define HAVE_SYS_FILIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#define HAVE_SYS_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
#define HAVE_SYS_RESOURCE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
#define HAVE_SYS_SOCKIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
#define HAVE_SYS_UIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||
#define HAVE_SYS_UN_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||
/* #undef HAVE_SYS_UTIME_H */
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Define to 1 if you have the <termio.h> header file. */
|
||||
/* #undef HAVE_TERMIO_H */
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <tld.h> header file. */
|
||||
/* #undef HAVE_TLD_H */
|
||||
|
||||
/* Define to 1 if you have the `tld_strerror' function. */
|
||||
/* #undef HAVE_TLD_STRERROR */
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#define HAVE_UNAME 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `utime' function. */
|
||||
#define HAVE_UTIME 1
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
#define HAVE_UTIME_H 1
|
||||
|
||||
/* Define to 1 if compiler supports C99 variadic macro style. */
|
||||
#define HAVE_VARIADIC_MACROS_C99 1
|
||||
|
||||
/* Define to 1 if compiler supports old gcc variadic macro style. */
|
||||
#define HAVE_VARIADIC_MACROS_GCC 1
|
||||
|
||||
/* Define to 1 if you have the winber.h header file. */
|
||||
/* #undef HAVE_WINBER_H */
|
||||
|
||||
/* Define to 1 if you have the windows.h header file. */
|
||||
/* #undef HAVE_WINDOWS_H */
|
||||
|
||||
/* Define to 1 if you have the winldap.h header file. */
|
||||
/* #undef HAVE_WINLDAP_H */
|
||||
|
||||
/* Define to 1 if you have the winsock2.h header file. */
|
||||
/* #undef HAVE_WINSOCK2_H */
|
||||
|
||||
/* Define to 1 if you have the winsock.h header file. */
|
||||
/* #undef HAVE_WINSOCK_H */
|
||||
|
||||
/* Define this symbol if your OS supports changing the contents of argv */
|
||||
#define HAVE_WRITABLE_ARGV 1
|
||||
|
||||
/* Define to 1 if you have the writev function. */
|
||||
#define HAVE_WRITEV 1
|
||||
|
||||
/* Define to 1 if you have the ws2tcpip.h header file. */
|
||||
/* #undef HAVE_WS2TCPIP_H */
|
||||
|
||||
/* Define to 1 if you have the <x509.h> header file. */
|
||||
/* #undef HAVE_X509_H */
|
||||
|
||||
/* if you have the zlib.h header file */
|
||||
/* #undef HAVE_ZLIB_H */
|
||||
|
||||
/* Define to 1 if you are building a native Windows target. */
|
||||
/* #undef NATIVE_WINDOWS */
|
||||
|
||||
/* If you lack a fine basename() prototype */
|
||||
/* #undef NEED_BASENAME_PROTO */
|
||||
|
||||
/* Define to 1 if you need the lber.h header file even with ldap.h */
|
||||
/* #undef NEED_LBER_H */
|
||||
|
||||
/* Define to 1 if you need the malloc.h header file even with stdlib.h */
|
||||
/* #undef NEED_MALLOC_H */
|
||||
|
||||
/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
|
||||
/* #undef NEED_REENTRANT */
|
||||
|
||||
/* cpu-machine-OS */
|
||||
#define OS "i386-apple-darwin13.0.0"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "curl"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "curl"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "curl -"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "curl"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "-"
|
||||
|
||||
/* a suitable file to read random data from */
|
||||
/* #undef RANDOM_FILE */
|
||||
|
||||
/* Define to the type of arg 1 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type pointed by arg 2 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG2 void
|
||||
|
||||
/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
|
||||
#define RECVFROM_TYPE_ARG2_IS_VOID 1
|
||||
|
||||
/* Define to the type of arg 3 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to the type of arg 4 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG4 int
|
||||
|
||||
/* Define to the type pointed by arg 5 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG5 struct sockaddr
|
||||
|
||||
/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */
|
||||
/* #undef RECVFROM_TYPE_ARG5_IS_VOID */
|
||||
|
||||
/* Define to the type pointed by arg 6 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG6 socklen_t
|
||||
|
||||
/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */
|
||||
/* #undef RECVFROM_TYPE_ARG6_IS_VOID */
|
||||
|
||||
/* Define to the function return type for recvfrom. */
|
||||
#define RECVFROM_TYPE_RETV ssize_t
|
||||
|
||||
/* Define to the type of arg 1 for recv. */
|
||||
#define RECV_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of arg 2 for recv. */
|
||||
#define RECV_TYPE_ARG2 void *
|
||||
|
||||
/* Define to the type of arg 3 for recv. */
|
||||
#define RECV_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to the type of arg 4 for recv. */
|
||||
#define RECV_TYPE_ARG4 int
|
||||
|
||||
/* Define to the function return type for recv. */
|
||||
#define RECV_TYPE_RETV ssize_t
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to the type qualifier of arg 5 for select. */
|
||||
#define SELECT_QUAL_ARG5
|
||||
|
||||
/* Define to the type of arg 1 for select. */
|
||||
#define SELECT_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for select. */
|
||||
#define SELECT_TYPE_ARG234 fd_set *
|
||||
|
||||
/* Define to the type of arg 5 for select. */
|
||||
#define SELECT_TYPE_ARG5 struct timeval *
|
||||
|
||||
/* Define to the function return type for select. */
|
||||
#define SELECT_TYPE_RETV int
|
||||
|
||||
/* Define to the type qualifier of arg 2 for send. */
|
||||
#define SEND_QUAL_ARG2 const
|
||||
|
||||
/* Define to the type of arg 1 for send. */
|
||||
#define SEND_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of arg 2 for send. */
|
||||
#define SEND_TYPE_ARG2 void *
|
||||
|
||||
/* Define to the type of arg 3 for send. */
|
||||
#define SEND_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to the type of arg 4 for send. */
|
||||
#define SEND_TYPE_ARG4 int
|
||||
|
||||
/* Define to the function return type for send. */
|
||||
#define SEND_TYPE_RETV ssize_t
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* The size of `off_t', as computed by sizeof. */
|
||||
#define SIZEOF_OFF_T 8
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#define SIZEOF_SIZE_T 4
|
||||
|
||||
/* The size of `time_t', as computed by sizeof. */
|
||||
#define SIZEOF_TIME_T 4
|
||||
|
||||
/* The size of `void*', as computed by sizeof. */
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to the type of arg 3 for strerror_r. */
|
||||
#define STRERROR_R_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if you want to enable c-ares support */
|
||||
/* #undef USE_ARES */
|
||||
|
||||
/* if GnuTLS is enabled */
|
||||
/* #undef USE_GNUTLS */
|
||||
|
||||
/* if libSSH2 is in use */
|
||||
/* #undef USE_LIBSSH2 */
|
||||
|
||||
/* If you want to build curl with the built-in manual */
|
||||
#define USE_MANUAL 1
|
||||
|
||||
/* if NSS is enabled */
|
||||
/* #undef USE_NSS */
|
||||
|
||||
/* if OpenSSL is in use */
|
||||
/* #undef USE_OPENSSL */
|
||||
|
||||
/* if SSL is enabled */
|
||||
/* #undef USE_SSLEAY */
|
||||
|
||||
/* Define to 1 if you are building a Windows target without large file
|
||||
support. */
|
||||
/* #undef USE_WIN32_LARGE_FILES */
|
||||
|
||||
/* to enable SSPI support */
|
||||
/* #undef USE_WINDOWS_SSPI */
|
||||
|
||||
/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */
|
||||
/* #undef USE_YASSLEMUL */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "7.19.2"
|
||||
|
||||
/* Define to avoid automatic inclusion of winsock.h */
|
||||
/* #undef WIN32_LEAN_AND_MEAN */
|
||||
|
||||
/* Define to 1 if OS is AIX. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* # undef _ALL_SOURCE */
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/* define this if you need it to compile thread-safe code */
|
||||
/* #undef _THREAD_SAFE */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Type to use in place of in_addr_t when system does not provide it. */
|
||||
/* #undef in_addr_t */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Type to use in place of socklen_t when system does not provide it. */
|
||||
/* #undef socklen_t */
|
||||
|
||||
/* the signed version of size_t */
|
||||
/* #undef ssize_t */
|
||||
@@ -48,6 +48,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
# include "config-sm-linux.h"
|
||||
#elif defined(__APPLE__)
|
||||
# include "config-sm-mac.h"
|
||||
#endif
|
||||
|
||||
#if defined(macintosh) && defined(__MRC__)
|
||||
# include "config-mac.h"
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#ifndef HAVE_STRLCAT
|
||||
#define strlcat(x,y,z) Curl_strlcat(x,y,z)
|
||||
#endif
|
||||
#if !defined(BUILTIN_STRLCAT)
|
||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -78,11 +78,11 @@ void CurlExt::SDK_OnUnload()
|
||||
|
||||
const char *CurlExt::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *CurlExt::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
|
||||
+13
-14
@@ -1,16 +1,15 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
compiler = SM.DefaultExtCompiler('extensions/geoip')
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
extension = AMBuild.AddJob('geoip.ext')
|
||||
binary = Cpp.LibraryBuilder('geoip.ext', AMBuild, extension, compiler)
|
||||
binary.AddSourceFiles('extensions/geoip', [
|
||||
'extension.cpp',
|
||||
'GeoIP.c',
|
||||
'sdk/smsdk_ext.cpp'
|
||||
])
|
||||
if AMBuild.target['platform'] == 'windows':
|
||||
binary['POSTLINKFLAGS'].append('wsock32.lib')
|
||||
SM.AutoVersion('extensions/geoip', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
binary = SM.ExtLibrary(builder, 'geoip.ext')
|
||||
if builder.target_platform == 'windows':
|
||||
binary.compiler.postlink += ['wsock32.lib']
|
||||
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'GeoIP.c',
|
||||
'sdk/smsdk_ext.cpp'
|
||||
]
|
||||
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
|
||||
@@ -70,12 +70,12 @@ void GeoIP_Extension::SDK_OnUnload()
|
||||
|
||||
const char *GeoIP_Extension::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *GeoIP_Extension::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
/*******************************
|
||||
|
||||
+30
-34
@@ -1,39 +1,35 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
compiler = SM.DefaultExtCompiler('extensions/mysql')
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['MYSQL5'], 'include'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
||||
if SM.mysql_root:
|
||||
binary = SM.ExtLibrary(builder, 'dbi.mysql.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mysql_root, 'include'),
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook')
|
||||
]
|
||||
|
||||
extension = AMBuild.AddJob('dbi.mysql.ext')
|
||||
binary = Cpp.LibraryBuilder('dbi.mysql.ext', AMBuild, extension, compiler)
|
||||
if builder.target_platform == 'linux' or builder.target_platform == 'mac':
|
||||
binary.compiler.postlink += [
|
||||
os.path.join(SM.mysql_root, 'lib', 'libmysqlclient_r.a'),
|
||||
'-lz',
|
||||
'-lpthread',
|
||||
'-lm'
|
||||
]
|
||||
elif builder.target_platform == 'windows':
|
||||
binary.compiler.postlink += [
|
||||
os.path.join(SM.mysql_root, 'lib', 'opt', 'mysqlclient.lib'),
|
||||
os.path.join(SM.mysql_root, 'lib', 'opt', 'zlib.lib'),
|
||||
'wsock32.lib'
|
||||
]
|
||||
|
||||
if AMBuild.target['platform'] == 'linux' or AMBuild.target['platform'] == 'darwin':
|
||||
lib = os.path.join(AMBuild.cache['MYSQL5'], 'lib', 'libmysqlclient_r.a')
|
||||
link = [lib,
|
||||
'-lz',
|
||||
'-lpthread',
|
||||
'-lm']
|
||||
binary.RelinkIfNewer(lib)
|
||||
binary['POSTLINKFLAGS'].extend(link)
|
||||
elif AMBuild.target['platform'] == 'windows':
|
||||
mylib = os.path.join(AMBuild.cache['MYSQL5'], 'lib', 'opt', 'mysqlclient.lib')
|
||||
zlib = os.path.join(AMBuild.cache['MYSQL5'], 'lib', 'opt', 'zlib.lib')
|
||||
binary.RelinkIfNewer(mylib)
|
||||
binary.RelinkIfNewer(zlib)
|
||||
binary['POSTLINKFLAGS'].extend([mylib, zlib, 'wsock32.lib'])
|
||||
|
||||
|
||||
binary.AddSourceFiles('extensions/mysql', [
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'mysql/MyBasicResults.cpp',
|
||||
'mysql/MyBoundResults.cpp',
|
||||
'mysql/MyDatabase.cpp',
|
||||
'mysql/MyDriver.cpp',
|
||||
'mysql/MyStatement.cpp',
|
||||
'extension.cpp'
|
||||
])
|
||||
SM.AutoVersion('extensions/mysql', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
binary.sources += [
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'mysql/MyBasicResults.cpp',
|
||||
'mysql/MyBoundResults.cpp',
|
||||
'mysql/MyDatabase.cpp',
|
||||
'mysql/MyDriver.cpp',
|
||||
'mysql/MyStatement.cpp',
|
||||
'extension.cpp'
|
||||
]
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
|
||||
@@ -62,11 +62,11 @@ void DBI_MySQL::SDK_OnUnload()
|
||||
|
||||
const char *DBI_MySQL::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *DBI_MySQL::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
|
||||
@@ -326,3 +326,8 @@ IDBDriver *MyDatabase::GetDriver()
|
||||
{
|
||||
return &g_MyDriver;
|
||||
}
|
||||
|
||||
bool MyDatabase::SetCharacterSet(const char *characterset)
|
||||
{
|
||||
return mysql_set_character_set(m_mysql, characterset) == 0 ? true : false;
|
||||
}
|
||||
@@ -62,6 +62,7 @@ public: //IDatabase
|
||||
IQuery *DoQueryEx(const char *query, size_t len);
|
||||
unsigned int GetAffectedRowsForQuery(IQuery *query);
|
||||
unsigned int GetInsertIDForQuery(IQuery *query);
|
||||
bool SetCharacterSet(const char *characterset);
|
||||
public:
|
||||
const DatabaseInfo &GetInfo();
|
||||
private:
|
||||
|
||||
+18
-22
@@ -1,28 +1,24 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
compiler = SM.DefaultExtCompiler('extensions/regex')
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
||||
binary = SM.ExtLibrary(builder, 'regex.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
|
||||
extension = AMBuild.AddJob('regex.ext')
|
||||
binary = Cpp.LibraryBuilder('regex.ext', AMBuild, extension, compiler)
|
||||
if builder.target_platform == 'linux':
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_linux', 'libpcre.a')
|
||||
elif builder.target_platform == 'windows':
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_win', 'pcre.lib')
|
||||
elif builder.target_platform == 'mac':
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_darwin', 'libpcre.a')
|
||||
binary.compiler.postlink += [binary.Dep(path)]
|
||||
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
path = os.path.join(AMBuild.sourceFolder, 'extensions', 'regex', 'lib_linux', 'libpcre.a')
|
||||
elif AMBuild.target['platform'] == 'windows':
|
||||
path = os.path.join(AMBuild.sourceFolder, 'extensions', 'regex', 'lib_win', 'pcre.lib')
|
||||
elif AMBuild.target['platform'] == 'darwin':
|
||||
path = os.path.join(AMBuild.sourceFolder, 'extensions', 'regex', 'lib_darwin', 'libpcre.a')
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'CRegEx.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
]
|
||||
|
||||
binary.RelinkIfNewer(path)
|
||||
binary['POSTLINKFLAGS'].append(path)
|
||||
|
||||
binary.AddSourceFiles('extensions/regex', [
|
||||
'extension.cpp',
|
||||
'CRegEx.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
])
|
||||
SM.AutoVersion('extensions/regex', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
|
||||
@@ -65,12 +65,12 @@ void RegexExtension::SDK_OnUnload()
|
||||
|
||||
const char *RegexExtension::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *RegexExtension::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
static cell_t CompileRegex(IPluginContext *pCtx, const cell_t *params)
|
||||
|
||||
@@ -1,31 +1,21 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
for i in SM.sdkInfo:
|
||||
sdk = SM.sdkInfo[i]
|
||||
if AMBuild.target['platform'] not in sdk['platform']:
|
||||
continue
|
||||
|
||||
compiler = SM.DefaultHL2Compiler('extensions/sdkhooks', i)
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'game', 'shared'))
|
||||
|
||||
if compiler.cc.name == 'gcc' or compiler.cc.name == 'clang':
|
||||
compiler['CFLAGS'].append('-Wno-parentheses')
|
||||
compiler['CXXFLAGS'].append('-Wno-invalid-offsetof')
|
||||
|
||||
name = 'sdkhooks.ext.' + sdk['ext']
|
||||
extension = AMBuild.AddJob(name)
|
||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||
SM.PreSetupHL2Job(extension, binary, i)
|
||||
binary.AddSourceFiles('extensions/sdkhooks', [
|
||||
'extension.cpp',
|
||||
'natives.cpp',
|
||||
'takedamageinfohack.cpp',
|
||||
'util.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
])
|
||||
SM.PostSetupHL2Job(extension, binary, i)
|
||||
SM.AutoVersion('extensions/sdkhooks', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
for sdk_name in SM.sdks:
|
||||
sdk = SM.sdks[sdk_name]
|
||||
|
||||
binary = SM.HL2Library(builder, 'sdkhooks.ext.' + sdk.ext, sdk)
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(sdk.path, 'game', 'shared')
|
||||
]
|
||||
if binary.compiler.cxx.behavior == 'gcc':
|
||||
binary.compiler.cxxflags += ['-Wno-invalid-offsetof']
|
||||
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'natives.cpp',
|
||||
'takedamageinfohack.cpp',
|
||||
'util.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
]
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
@@ -118,6 +118,29 @@ IGameConfig *g_pGameConf = NULL;
|
||||
|
||||
char g_szMapEntities[2097152];
|
||||
|
||||
CUtlVector<IEntityListener *> *EntListeners()
|
||||
{
|
||||
void *gEntList = gamehelpers->GetGlobalEntityList();
|
||||
if (gEntList)
|
||||
{
|
||||
int offset = -1; /* 65572 */
|
||||
if (g_pGameConf->GetOffset("EntityListeners", &offset))
|
||||
{
|
||||
return (CUtlVector<IEntityListener *> *)((intptr_t) gEntList + offset);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
void *entListeners;
|
||||
if (g_pGameConf->GetAddress("EntityListenersPtr", &entListeners))
|
||||
{
|
||||
return (CUtlVector<IEntityListener *> *)entListeners;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IServerGameDLL & IVEngineServer Hooks
|
||||
@@ -211,22 +234,14 @@ bool SDKHooks::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
return false;
|
||||
}
|
||||
|
||||
void *gEntList = gamehelpers->GetGlobalEntityList();
|
||||
if (!gEntList)
|
||||
CUtlVector<IEntityListener *> *entListeners = EntListeners();
|
||||
if (!entListeners)
|
||||
{
|
||||
g_pSM->Format(error, maxlength, "Cannot find gEntList pointer");
|
||||
g_pSM->Format(error, maxlength, "Failed to setup entity listeners");
|
||||
return false;
|
||||
}
|
||||
|
||||
int offset = -1; /* 65572 */
|
||||
if (!g_pGameConf->GetOffset("EntityListeners", &offset))
|
||||
{
|
||||
g_pSM->Format(error, maxlength, "Cannot find EntityListeners offset");
|
||||
return false;
|
||||
}
|
||||
|
||||
CUtlVector<IEntityListener *> *pListeners = (CUtlVector<IEntityListener *> *)((intptr_t)gEntList + offset);
|
||||
pListeners->AddToTail(this);
|
||||
entListeners->AddToTail(this);
|
||||
|
||||
SetupHooks();
|
||||
|
||||
@@ -320,16 +335,8 @@ void SDKHooks::SDK_OnUnload()
|
||||
sharesys->DropCapabilityProvider(myself, this, "SDKHook_DmgCustomInOTD");
|
||||
sharesys->DropCapabilityProvider(myself, this, "SDKHook_LogicalEntSupport");
|
||||
|
||||
void *gEntList = gamehelpers->GetGlobalEntityList();
|
||||
if (gEntList)
|
||||
{
|
||||
int offset = -1; /* 65572 */
|
||||
if (g_pGameConf->GetOffset("EntityListeners", &offset))
|
||||
{
|
||||
CUtlVector<IEntityListener *> *pListeners = (CUtlVector<IEntityListener *> *)((intptr_t)gEntList + offset);
|
||||
pListeners->FindAndRemove(this);
|
||||
}
|
||||
}
|
||||
CUtlVector<IEntityListener *> *entListeners = EntListeners();
|
||||
entListeners->FindAndRemove(this);
|
||||
|
||||
gameconfs->CloseGameConfigFile(g_pGameConf);
|
||||
}
|
||||
@@ -350,12 +357,12 @@ bool SDKHooks::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool
|
||||
|
||||
const char *SDKHooks::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *SDKHooks::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
void SDKHooks::OnPluginLoaded(IPlugin *plugin)
|
||||
@@ -517,7 +524,7 @@ HookReturn SDKHooks::Hook(int entity, SDKHookType type, IPluginFunction *callbac
|
||||
if(!g_HookTypes[type].supported)
|
||||
return HookRet_NotSupported;
|
||||
|
||||
CBaseEntity *pEnt = UTIL_GetCBaseEntity(entity);
|
||||
CBaseEntity *pEnt = gamehelpers->ReferenceToEntity(entity);
|
||||
if(!pEnt)
|
||||
return HookRet_InvalidEntity;
|
||||
if(type < 0 || type >= SDKHook_MAXHOOKS)
|
||||
@@ -1157,7 +1164,7 @@ bool SDKHooks::Hook_ReloadPost()
|
||||
|
||||
callback = g_HookList[i].callback;
|
||||
callback->PushCell(entity);
|
||||
callback->PushCell(META_RESULT_OVERRIDE_RET(bool) ? 1 : 0);
|
||||
callback->PushCell(META_RESULT_ORIG_RET(bool) ? 1 : 0);
|
||||
callback->Execute(NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,14 +58,15 @@ cell_t Native_Hook(IPluginContext *pContext, const cell_t *params)
|
||||
break;
|
||||
case HookRet_BadEntForHookType:
|
||||
{
|
||||
const char * pClassname = gamehelpers->GetEntityClassname(PEntityOfEntIndex(gamehelpers->ReferenceToIndex(params[1])));
|
||||
if (!pClassname)
|
||||
{
|
||||
pContext->ThrowNativeError("Hook type not valid for this type of entity (%i).", entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
pContext->ThrowNativeError("Hook type not valid for this type of entity (%s)", pClassname);
|
||||
CBaseEntity *pEnt = gamehelpers->ReferenceToEntity(params[1]);
|
||||
const char *pClassname = pEnt ? gamehelpers->GetEntityClassname(pEnt) : NULL;
|
||||
if (!pClassname)
|
||||
{
|
||||
pContext->ThrowNativeError("Hook type not valid for this type of entity (%i).", entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
pContext->ThrowNativeError("Hook type not valid for this type of entity (%i/%s)", entity, pClassname);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -108,38 +109,45 @@ cell_t Native_TakeDamage(IPluginContext *pContext, const cell_t *params)
|
||||
#if !defined SH_DECL_MANUALEXTERN1
|
||||
pContext->ThrowNativeError("SDKHooks_TakeDamage is not supported on this engine.");
|
||||
#else
|
||||
CBaseEntity *pVictim = UTIL_GetCBaseEntity(params[1]);
|
||||
CBaseEntity *pVictim = gamehelpers->ReferenceToEntity(params[1]);
|
||||
if (!pVictim)
|
||||
return pContext->ThrowNativeError("Invalid entity index %d for victim", params[1]);
|
||||
|
||||
CBaseEntity *pInflictor = UTIL_GetCBaseEntity(params[2]);
|
||||
CBaseEntity *pInflictor = gamehelpers->ReferenceToEntity(params[2]);
|
||||
if (!pInflictor)
|
||||
return pContext->ThrowNativeError("Invalid entity index %d for inflictor", params[2]);
|
||||
|
||||
CBaseEntity *pAttacker = NULL;
|
||||
CBaseEntity *pAttacker;
|
||||
if (params[3] != -1)
|
||||
{
|
||||
pAttacker = UTIL_GetCBaseEntity(params[3]);
|
||||
pAttacker = gamehelpers->ReferenceToEntity(params[3]);
|
||||
if (!pAttacker)
|
||||
{
|
||||
return pContext->ThrowNativeError("Invalid entity index %d for attackerr", params[3]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pAttacker = NULL;
|
||||
}
|
||||
|
||||
float flDamage = sp_ctof(params[4]);
|
||||
int iDamageType = params[5];
|
||||
|
||||
CBaseEntity *pWeapon = NULL;
|
||||
CBaseEntity *pWeapon;
|
||||
if (params[6] != -1)
|
||||
{
|
||||
pAttacker = UTIL_GetCBaseEntity(params[6]);
|
||||
if (!pAttacker)
|
||||
pWeapon = gamehelpers->ReferenceToEntity(params[6]);
|
||||
if (!pWeapon)
|
||||
{
|
||||
return pContext->ThrowNativeError("Invalid entity index %d for weapon", params[6]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pWeapon = NULL;
|
||||
}
|
||||
|
||||
Vector vecDamageForce = Vector(0.0f, 0.0f, 0.0f);
|
||||
cell_t *addr;
|
||||
int err;
|
||||
if ((err = pContext->LocalToPhysAddr(params[7], &addr)) != SP_ERROR_NONE)
|
||||
@@ -147,26 +155,29 @@ cell_t Native_TakeDamage(IPluginContext *pContext, const cell_t *params)
|
||||
return pContext->ThrowNativeError("Could not read damageForce vector");
|
||||
}
|
||||
|
||||
Vector vecDamageForce;
|
||||
if (addr != pContext->GetNullRef(SP_NULL_VECTOR))
|
||||
{
|
||||
vecDamageForce = Vector(
|
||||
sp_ctof(addr[0]),
|
||||
sp_ctof(addr[1]),
|
||||
sp_ctof(addr[2]));
|
||||
vecDamageForce.Init(sp_ctof(addr[0]), sp_ctof(addr[1]), sp_ctof(addr[2]));
|
||||
}
|
||||
else
|
||||
{
|
||||
vecDamageForce.Init();
|
||||
}
|
||||
|
||||
Vector vecDamagePosition = vec3_origin;
|
||||
if ((err = pContext->LocalToPhysAddr(params[8], &addr)) != SP_ERROR_NONE)
|
||||
{
|
||||
return pContext->ThrowNativeError("Could not read damagePosition vector");
|
||||
}
|
||||
|
||||
Vector vecDamagePosition;
|
||||
if (addr != pContext->GetNullRef(SP_NULL_VECTOR))
|
||||
{
|
||||
vecDamagePosition = Vector(
|
||||
sp_ctof(addr[0]),
|
||||
sp_ctof(addr[1]),
|
||||
sp_ctof(addr[2]));
|
||||
vecDamagePosition.Init(sp_ctof(addr[0]), sp_ctof(addr[1]), sp_ctof(addr[2]));
|
||||
}
|
||||
else
|
||||
{
|
||||
vecDamagePosition = vec3_origin;
|
||||
}
|
||||
|
||||
CTakeDamageInfoHack info(pInflictor, pAttacker, flDamage, iDamageType, pWeapon, vecDamageForce, vecDamagePosition);
|
||||
@@ -182,11 +193,15 @@ cell_t Native_DropWeapon(IPluginContext *pContext, const cell_t *params)
|
||||
#if !defined SH_DECL_MANUALEXTERN1
|
||||
pContext->ThrowNativeError("SDKHooks_DropWeapon is not supported on this engine.");
|
||||
#else
|
||||
CBaseEntity *pPlayer = UTIL_GetCBaseEntity(params[1], true);
|
||||
CBaseEntity *pPlayer = gamehelpers->ReferenceToEntity(params[1]);
|
||||
if (!pPlayer)
|
||||
return pContext->ThrowNativeError("Invalid client index %d", params[1]);
|
||||
|
||||
IGamePlayer *pGamePlayer = playerhelpers->GetGamePlayer(gamehelpers->ReferenceToIndex(params[1]));
|
||||
if (!pGamePlayer || !pGamePlayer->IsInGame())
|
||||
return pContext->ThrowNativeError("Client index %d not in game", params[1]);
|
||||
|
||||
CBaseEntity *pWeapon = UTIL_GetCBaseEntity(params[2]);
|
||||
CBaseEntity *pWeapon = gamehelpers->ReferenceToEntity(params[2]);
|
||||
if (!pWeapon)
|
||||
return pContext->ThrowNativeError("Invalid entity index %d for weapon", params[2]);
|
||||
|
||||
|
||||
@@ -62,10 +62,17 @@ CTakeDamageInfoHack::CTakeDamageInfoHack( CBaseEntity *pInflictor, CBaseEntity *
|
||||
m_vecReportedPosition = vec3_origin;
|
||||
m_iAmmoType = -1;
|
||||
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
#if SOURCE_ENGINE < SE_ORANGEBOX
|
||||
m_iCustomKillType = 0;
|
||||
#else
|
||||
m_iDamageCustom = 0;
|
||||
#endif
|
||||
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
|
||||
m_iDamagedOtherPlayers = 0;
|
||||
m_iPlayerPenetrateCount = 0;
|
||||
m_flUnknown = 0.0f;
|
||||
m_iPlayerPenetrationCount = 0;
|
||||
m_flDamageBonus = 0.0f;
|
||||
m_bForceFriendlyFire = false;
|
||||
#endif
|
||||
|
||||
#if SOURCE_ENGINE >= SE_ALIENSWARM
|
||||
|
||||
@@ -34,36 +34,6 @@
|
||||
#include "extension.h"
|
||||
#include "util.h"
|
||||
|
||||
CBaseEntity *UTIL_GetCBaseEntity(int num, bool onlyPlayers)
|
||||
{
|
||||
edict_t *pEdict = PEntityOfEntIndex(num);
|
||||
if (!pEdict || pEdict->IsFree())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (num > 0 && num <= playerhelpers->GetMaxClients())
|
||||
{
|
||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(pEdict);
|
||||
if (!pPlayer || !pPlayer->IsConnected())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else if (onlyPlayers)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IServerUnknown *pUnk;
|
||||
if ((pUnk=pEdict->GetUnknown()) == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return pUnk->GetBaseEntity();
|
||||
}
|
||||
|
||||
bool UTIL_FindDataTable(SendTable *pTable,
|
||||
const char *name,
|
||||
sm_sendprop_info_t *info,
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#include <compat_wrappers.h>
|
||||
|
||||
CBaseEntity *UTIL_GetCBaseEntity(int num, bool onlyPlayers=false);
|
||||
bool UTIL_FindDataTable(SendTable *pTable, const char *name, sm_sendprop_info_t *info, unsigned int offset);
|
||||
|
||||
#endif //_INCLUDE_TF2TOOLS_UTIL_H_
|
||||
|
||||
@@ -1,53 +1,45 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
for i in SM.sdkInfo:
|
||||
sdk = SM.sdkInfo[i]
|
||||
if AMBuild.target['platform'] not in sdk['platform']:
|
||||
continue
|
||||
for sdk_name in SM.sdks:
|
||||
sdk = SM.sdks[sdk_name]
|
||||
|
||||
compiler = SM.DefaultHL2Compiler('extensions/sdktools', i)
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit', 'x86'))
|
||||
binary = SM.HL2Library(builder, 'sdktools.ext.' + sdk.ext, sdk)
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(sdk.path, 'game', 'shared'),
|
||||
os.path.join(builder.sourcePath, 'public', 'jit'),
|
||||
os.path.join(builder.sourcePath, 'public', 'jit', 'x86'),
|
||||
]
|
||||
|
||||
if compiler.cc.name == 'gcc' or compiler.cc.name == 'clang':
|
||||
compiler['CFLAGS'].append('-Wno-parentheses')
|
||||
compiler['CXXFLAGS'].append('-Wno-invalid-offsetof')
|
||||
if sdk.name != 'ep1':
|
||||
binary.compiler.defines += ['HOOKING_ENABLED']
|
||||
|
||||
if i != 'ep1':
|
||||
compiler['CDEFINES'].append('HOOKING_ENABLED')
|
||||
|
||||
name = 'sdktools.ext.' + sdk['ext']
|
||||
extension = AMBuild.AddJob(name)
|
||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||
SM.PreSetupHL2Job(extension, binary, i)
|
||||
binary.AddSourceFiles('extensions/sdktools', [
|
||||
'extension.cpp',
|
||||
'inputnatives.cpp',
|
||||
'output.cpp',
|
||||
'outputnatives.cpp',
|
||||
'tempents.cpp',
|
||||
'tenatives.cpp',
|
||||
'teamnatives.cpp',
|
||||
'trnatives.cpp',
|
||||
'vcaller.cpp',
|
||||
'vcallbuilder.cpp',
|
||||
'vdecoder.cpp',
|
||||
'vglobals.cpp',
|
||||
'vhelpers.cpp',
|
||||
'vnatives.cpp',
|
||||
'voice.cpp',
|
||||
'vsound.cpp',
|
||||
'clientnatives.cpp',
|
||||
'hooks.cpp',
|
||||
'gamerulesnatives.cpp',
|
||||
'vstringtable.cpp',
|
||||
'CDetour/detours.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'asm/asm.c'
|
||||
])
|
||||
SM.PostSetupHL2Job(extension, binary, i)
|
||||
SM.AutoVersion('extensions/sdktools', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
if binary.compiler.cxx.behavior == 'gcc':
|
||||
binary.compiler.cxxflags += ['-Wno-invalid-offsetof']
|
||||
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'inputnatives.cpp',
|
||||
'output.cpp',
|
||||
'outputnatives.cpp',
|
||||
'tempents.cpp',
|
||||
'tenatives.cpp',
|
||||
'teamnatives.cpp',
|
||||
'trnatives.cpp',
|
||||
'vcaller.cpp',
|
||||
'vcallbuilder.cpp',
|
||||
'vdecoder.cpp',
|
||||
'vglobals.cpp',
|
||||
'vhelpers.cpp',
|
||||
'vnatives.cpp',
|
||||
'voice.cpp',
|
||||
'vsound.cpp',
|
||||
'clientnatives.cpp',
|
||||
'hooks.cpp',
|
||||
'gamerulesnatives.cpp',
|
||||
'vstringtable.cpp',
|
||||
'CDetour/detours.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'asm/asm.c'
|
||||
]
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
@@ -435,12 +435,12 @@ bool SDKTools::ProcessCommandTarget(cmd_target_info_t *info)
|
||||
|
||||
const char *SDKTools::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *SDKTools::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
void SDKTools::OnClientPutInServer(int client)
|
||||
|
||||
@@ -118,16 +118,16 @@ int TempEntityInfo::_FindOffset(const char *name, int *size)
|
||||
{
|
||||
int offset;
|
||||
|
||||
SendProp *prop = g_pGameHelpers->FindInSendTable(m_Sc->GetName(), name);
|
||||
if (!prop)
|
||||
sm_sendprop_info_t info;
|
||||
if (!g_pGameHelpers->FindSendPropInfo(m_Sc->GetName(), name, &info))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
offset = prop->GetOffset();
|
||||
offset = info.actual_offset;
|
||||
if (size)
|
||||
{
|
||||
*size = prop->m_nBits;
|
||||
*size = info.prop->m_nBits;
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
||||
@@ -516,6 +516,12 @@ CON_COMMAND(sm_dump_classes, "Dumps the class list as a text file")
|
||||
return;
|
||||
}
|
||||
|
||||
CEntityFactoryDictionary *dict = NULL;
|
||||
|
||||
#if SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM
|
||||
dict = (CEntityFactoryDictionary *)servertools->GetEntityFactoryDictionary();
|
||||
#else
|
||||
|
||||
ICallWrapper *pWrapper = NULL;
|
||||
|
||||
if (!pWrapper)
|
||||
@@ -535,21 +541,13 @@ CON_COMMAND(sm_dump_classes, "Dumps the class list as a text file")
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retData, NULL, 0);
|
||||
}
|
||||
|
||||
|
||||
void *returnData = NULL;
|
||||
|
||||
pWrapper->Execute(NULL, &returnData);
|
||||
pWrapper->Execute(NULL, &dict);
|
||||
|
||||
pWrapper->Destroy();
|
||||
|
||||
if (returnData == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
CEntityFactoryDictionary *dict = ( CEntityFactoryDictionary * )returnData;
|
||||
|
||||
if ( !dict )
|
||||
if (dict == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -778,7 +778,15 @@ static cell_t FindEntityByClassname(IPluginContext *pContext, const cell_t *para
|
||||
if (!bProbablyNoFEBC)
|
||||
{
|
||||
bProbablyNoFEBC = true;
|
||||
g_pSM->LogError(myself, "%s, falling back to IServerTools method.", error);
|
||||
|
||||
// CreateBaseCall above abstracts all of the gamedata logic, but we need to know if the key was even found.
|
||||
// We don't want to log an error if key isn't present (knowing falling back to native method), only throw
|
||||
// error if signature/symbol was not found.
|
||||
void *dummy;
|
||||
if (g_pGameConf->GetMemSig("FindEntityByClassname", &dummy))
|
||||
{
|
||||
g_pSM->LogError(myself, "%s, falling back to IServerTools method.", error);
|
||||
}
|
||||
}
|
||||
return NativeFindEntityByClassname(pContext, params);
|
||||
#else
|
||||
@@ -1252,6 +1260,34 @@ static cell_t GetPlayerResourceEntity(IPluginContext *pContext, const cell_t *pa
|
||||
return -1;
|
||||
}
|
||||
|
||||
static cell_t GivePlayerAmmo(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
static ValveCall *pCall = NULL;
|
||||
if (!pCall)
|
||||
{
|
||||
ValvePassInfo pass[3];
|
||||
InitPass(pass[0], Valve_POD, PassType_Basic, PASSFLAG_BYVAL);
|
||||
InitPass(pass[1], Valve_POD, PassType_Basic, PASSFLAG_BYVAL);
|
||||
InitPass(pass[2], Valve_Bool, PassType_Basic, PASSFLAG_BYVAL);
|
||||
if (!CreateBaseCall("GiveAmmo", ValveCall_Player, &pass[0], pass, 3, &pCall))
|
||||
{
|
||||
return pContext->ThrowNativeError("\"GiveAmmo\" not supported by this mod");
|
||||
} else if (!pCall) {
|
||||
return pContext->ThrowNativeError("\"GiveAmmo\" wrapper failed to initialize");
|
||||
}
|
||||
}
|
||||
|
||||
int ammoGiven;
|
||||
START_CALL();
|
||||
DECODE_VALVE_PARAM(1, thisinfo, 0);
|
||||
DECODE_VALVE_PARAM(2, vparams, 0);
|
||||
DECODE_VALVE_PARAM(3, vparams, 1);
|
||||
DECODE_VALVE_PARAM(4, vparams, 2);
|
||||
FINISH_CALL_SIMPLE(&ammoGiven);
|
||||
|
||||
return ammoGiven;
|
||||
}
|
||||
|
||||
sp_nativeinfo_t g_Natives[] =
|
||||
{
|
||||
{"ExtinguishEntity", ExtinguishEntity},
|
||||
@@ -1280,5 +1316,6 @@ sp_nativeinfo_t g_Natives[] =
|
||||
{"ActivateEntity", ActivateEntity},
|
||||
{"SetClientInfo", SetClientInfo},
|
||||
{"GetPlayerResourceEntity", GetPlayerResourceEntity},
|
||||
{"GivePlayerAmmo", GivePlayerAmmo},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ SH_DECL_HOOK1_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *)
|
||||
|
||||
bool DecHookCount()
|
||||
{
|
||||
if (g_VoiceHookCount == 0)
|
||||
if (--g_VoiceHookCount == 0)
|
||||
{
|
||||
SH_REMOVE_HOOK_MEMFUNC(IVoiceServer, SetClientListening, voiceserver, &g_SdkTools, &SDKTools::OnSetClientListening, false);
|
||||
return true;
|
||||
|
||||
+23
-17
@@ -1,22 +1,28 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
compiler = SM.DefaultExtCompiler('extensions/sqlite')
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
||||
binary = SM.ExtLibrary(builder, 'dbi.sqlite.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
|
||||
compiler['CDEFINES'].extend(['SQLITE_OMIT_LOAD_EXTENSION', 'SQLITE_THREADSAFE'])
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
compiler['POSTLINKFLAGS'].extend(['-ldl', '-lpthread'])
|
||||
binary.compiler.defines += [
|
||||
'SQLITE_OMIT_LOAD_EXTENSION',
|
||||
'SQLITE_THREADSAFE'
|
||||
]
|
||||
if builder.target_platform == 'linux':
|
||||
binary.compiler.postlink += ['-ldl', '-lpthread']
|
||||
|
||||
extension = AMBuild.AddJob('dbi.sqlite.ext')
|
||||
binary = Cpp.LibraryBuilder('dbi.sqlite.ext', AMBuild, extension, compiler)
|
||||
files = [
|
||||
'sdk/smsdk_ext.cpp', 'sdk/sm_memtable.cpp', 'extension.cpp',
|
||||
'driver/SqDatabase.cpp', 'driver/SqDriver.cpp', 'driver/SqQuery.cpp',
|
||||
'driver/SqResults.cpp', 'sqlite-source/sqlite3.c'
|
||||
]
|
||||
binary.AddSourceFiles('extensions/sqlite', files)
|
||||
SM.AutoVersion('extensions/sqlite', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
binary.sources += [
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'sdk/sm_memtable.cpp',
|
||||
'extension.cpp',
|
||||
'driver/SqDatabase.cpp',
|
||||
'driver/SqDriver.cpp',
|
||||
'driver/SqQuery.cpp',
|
||||
'driver/SqResults.cpp',
|
||||
'sqlite-source/sqlite3.c'
|
||||
]
|
||||
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
|
||||
@@ -254,3 +254,9 @@ sqlite3 *SqDatabase::GetDb()
|
||||
{
|
||||
return m_sq3;
|
||||
}
|
||||
|
||||
bool SqDatabase::SetCharacterSet(const char *characterset)
|
||||
{
|
||||
// sqlite only supports utf8 and utf16 - by the time the database is created. It's too late here.
|
||||
return false;
|
||||
}
|
||||
@@ -58,6 +58,7 @@ public:
|
||||
IQuery *DoQueryEx(const char *query, size_t len);
|
||||
unsigned int GetAffectedRowsForQuery(IQuery *query);
|
||||
unsigned int GetInsertIDForQuery(IQuery *query);
|
||||
bool SetCharacterSet(const char *characterset);
|
||||
public:
|
||||
sqlite3 *GetDb();
|
||||
private:
|
||||
|
||||
@@ -74,11 +74,11 @@ size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
|
||||
|
||||
const char *SqliteExt::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *SqliteExt::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
|
||||
+20
-29
@@ -1,31 +1,22 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
sdk = SM.sdkInfo['tf2']
|
||||
compiler = SM.DefaultHL2Compiler('extensions/tf2', 'tf2')
|
||||
if compiler.cc.name == 'gcc' or compiler.cc.name == 'clang':
|
||||
compiler['CFLAGS'].append('-Wno-parentheses')
|
||||
|
||||
name = 'game.tf2.ext.' + sdk['ext']
|
||||
extension = AMBuild.AddJob(name)
|
||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||
SM.PreSetupHL2Job(extension, binary, 'tf2')
|
||||
binary.AddSourceFiles('extensions/tf2', [
|
||||
'extension.cpp',
|
||||
'natives.cpp',
|
||||
'RegNatives.cpp',
|
||||
'util.cpp',
|
||||
'criticals.cpp',
|
||||
'holiday.cpp',
|
||||
'teleporter.cpp',
|
||||
'gameplayrules.cpp',
|
||||
'conditions.cpp',
|
||||
'CDetour/detours.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'asm/asm.c'
|
||||
])
|
||||
SM.PostSetupHL2Job(extension, binary, 'tf2')
|
||||
SM.AutoVersion('extensions/tf2', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
|
||||
if 'tf2' in SM.sdks:
|
||||
sdk = SM.sdks['tf2']
|
||||
|
||||
binary = SM.HL2Library(builder, 'game.tf2.ext.' + sdk.ext, sdk)
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'natives.cpp',
|
||||
'RegNatives.cpp',
|
||||
'util.cpp',
|
||||
'criticals.cpp',
|
||||
'holiday.cpp',
|
||||
'teleporter.cpp',
|
||||
'gameplayrules.cpp',
|
||||
'conditions.cpp',
|
||||
'CDetour/detours.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'asm/asm.c'
|
||||
]
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
@@ -35,7 +35,11 @@
|
||||
|
||||
#include <iplayerinfo.h>
|
||||
|
||||
typedef uint64_t condflags_t;
|
||||
typedef struct condflags_s {
|
||||
uint64_t upper;
|
||||
uint64_t lower;
|
||||
} condflags_t;
|
||||
condflags_t condflags_empty = { 0, 0 };
|
||||
|
||||
condflags_t g_PlayerConds[MAXPLAYERS+1];
|
||||
|
||||
@@ -44,6 +48,7 @@ IForward *g_removeCondForward = NULL;
|
||||
|
||||
int playerCondOffset = -1;
|
||||
int playerCondExOffset = -1;
|
||||
int playerCondEx2Offset = -1;
|
||||
int conditionBitsOffset = -1;
|
||||
|
||||
bool g_bIgnoreRemove;
|
||||
@@ -52,14 +57,18 @@ bool g_bIgnoreRemove;
|
||||
|
||||
inline condflags_t GetPlayerConds(CBaseEntity *pPlayer)
|
||||
{
|
||||
uint32_t playerCond = *(uint32_t *)((intptr_t)pPlayer + playerCondOffset);
|
||||
uint32_t condBits = *(uint32_t *)((intptr_t)pPlayer + conditionBitsOffset);
|
||||
uint32_t playerCondEx = *(uint32_t *)((intptr_t)pPlayer + playerCondExOffset);
|
||||
condflags_t result;
|
||||
uint32_t playerCond = *(uint32_t *)((intptr_t)pPlayer + playerCondOffset);
|
||||
uint32_t condBits = *(uint32_t *)((intptr_t)pPlayer + conditionBitsOffset);
|
||||
uint32_t playerCondEx = *(uint32_t *)((intptr_t)pPlayer + playerCondExOffset);
|
||||
uint32_t playerCondEx2 = *(uint32_t *)((intptr_t)pPlayer + playerCondEx2Offset);
|
||||
|
||||
uint64_t playerCondExAdj = playerCondEx;
|
||||
playerCondExAdj <<= 32;
|
||||
|
||||
return playerCond|condBits|playerCondExAdj;
|
||||
result.lower = playerCond|condBits|playerCondExAdj;
|
||||
result.upper = playerCondEx2;
|
||||
return result;
|
||||
}
|
||||
|
||||
void Conditions_OnGameFrame(bool simulating)
|
||||
@@ -88,33 +97,49 @@ void Conditions_OnGameFrame(bool simulating)
|
||||
oldconds = g_PlayerConds[i];
|
||||
newconds = GetPlayerConds(pEntity);
|
||||
|
||||
if (oldconds == newconds)
|
||||
if (oldconds.lower == newconds.lower && oldconds.upper == newconds.upper)
|
||||
continue;
|
||||
|
||||
addedconds = newconds &~ oldconds;
|
||||
removedconds = oldconds &~ newconds;
|
||||
addedconds.lower = newconds.lower &~ oldconds.lower;
|
||||
removedconds.lower = oldconds.lower &~ newconds.lower;
|
||||
addedconds.upper = newconds.upper &~ oldconds.upper;
|
||||
removedconds.upper = oldconds.upper &~ newconds.upper;
|
||||
|
||||
uint64_t j;
|
||||
condflags_t bit;
|
||||
uint64_t bit;
|
||||
|
||||
for (j = 0; j < MAX_CONDS && (bit = ((condflags_t)1 << j)) <= addedconds; j++)
|
||||
uint64_t maxbit = MAX(addedconds.lower, addedconds.upper);
|
||||
for (j = 0; j < MAX_CONDS && (bit = ((uint64_t)1 << j)) <= maxbit; j++)
|
||||
{
|
||||
if ((addedconds & bit) == bit)
|
||||
if ((addedconds.lower & bit) == bit)
|
||||
{
|
||||
g_addCondForward->PushCell(i);
|
||||
g_addCondForward->PushCell(j & 0xFFFFFFFF);
|
||||
g_addCondForward->Execute(NULL, NULL);
|
||||
}
|
||||
if ((addedconds.upper & bit) == bit)
|
||||
{
|
||||
g_addCondForward->PushCell(i);
|
||||
g_addCondForward->PushCell((j+64) & 0xFFFFFFFF);
|
||||
g_addCondForward->Execute(NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < MAX_CONDS && (bit = ((condflags_t)1 << j)) <= removedconds; j++)
|
||||
maxbit = MAX(removedconds.lower, removedconds.upper);
|
||||
for (j = 0; j < MAX_CONDS && (bit = ((uint64_t)1 << j)) <= maxbit; j++)
|
||||
{
|
||||
if ((removedconds & bit) == bit)
|
||||
if ((removedconds.lower & bit) == bit)
|
||||
{
|
||||
g_removeCondForward->PushCell(i);
|
||||
g_removeCondForward->PushCell(j & 0xFFFFFFFF);
|
||||
g_removeCondForward->Execute(NULL, NULL);
|
||||
}
|
||||
if ((removedconds.upper & bit) == bit)
|
||||
{
|
||||
g_removeCondForward->PushCell(i);
|
||||
g_removeCondForward->PushCell((j+64) & 0xFFFFFFFF);
|
||||
g_removeCondForward->Execute(NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
g_PlayerConds[i] = newconds;
|
||||
@@ -148,7 +173,15 @@ bool InitialiseConditionChecks()
|
||||
|
||||
playerCondExOffset = prop.actual_offset;
|
||||
|
||||
if (playerCondOffset == -1 || playerCondExOffset == -1 || conditionBitsOffset == -1)
|
||||
if (!gamehelpers->FindSendPropInfo("CTFPlayer", "m_nPlayerCondEx2", &prop))
|
||||
{
|
||||
g_pSM->LogError(myself, "Failed to find m_nPlayerCondEx2 prop offset");
|
||||
return false;
|
||||
}
|
||||
|
||||
playerCondEx2Offset = prop.actual_offset;
|
||||
|
||||
if (playerCondOffset == -1 || playerCondExOffset == -1 || conditionBitsOffset == -1 || playerCondEx2Offset == -1)
|
||||
return false;
|
||||
|
||||
int maxClients = gpGlobals->maxClients;
|
||||
@@ -168,7 +201,7 @@ bool InitialiseConditionChecks()
|
||||
|
||||
void Conditions_OnClientPutInServer(int client)
|
||||
{
|
||||
g_PlayerConds[client] = 0;
|
||||
g_PlayerConds[client] = condflags_empty;
|
||||
}
|
||||
|
||||
void RemoveConditionChecks()
|
||||
|
||||
+157
-185
@@ -30,217 +30,189 @@
|
||||
*/
|
||||
|
||||
#include "criticals.h"
|
||||
#include "util.h"
|
||||
|
||||
IServerGameEnts *gameents = NULL;
|
||||
|
||||
CDetour *calcIsAttackCriticalDetour = NULL;
|
||||
CDetour *calcIsAttackCriticalMeleeDetour = NULL;
|
||||
CDetour *calcIsAttackCriticalBowDetour = NULL;
|
||||
CritManager g_CritManager;
|
||||
|
||||
IForward *g_critForward = NULL;
|
||||
|
||||
enum DetourResult
|
||||
SH_DECL_MANUALHOOK0(CalcIsAttackCriticalHelper, 0, 0, 0, bool);
|
||||
SH_DECL_MANUALHOOK0(CalcIsAttackCriticalHelperNoCrits, 0, 0, 0, bool);
|
||||
|
||||
const char TF_WEAPON_DATATABLE[] = "DT_TFWeaponBase";
|
||||
|
||||
CritManager::CritManager() :
|
||||
m_enabled(false),
|
||||
m_hooksSetup(false)
|
||||
{
|
||||
Result_Ignore,
|
||||
Result_NoCrit,
|
||||
Result_Crit,
|
||||
};
|
||||
|
||||
int CheckBaseHandle(CBaseHandle &hndl)
|
||||
{
|
||||
if (!hndl.IsValid())
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int index = hndl.GetEntryIndex();
|
||||
|
||||
edict_t *pStoredEdict;
|
||||
|
||||
pStoredEdict = engine->PEntityOfEntIndex(index);
|
||||
|
||||
if (pStoredEdict == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
IServerEntity *pSE = pStoredEdict->GetIServerEntity();
|
||||
|
||||
if (pSE == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (pSE->GetRefEHandle() != hndl)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return index;
|
||||
m_entsHooked.Init();
|
||||
}
|
||||
|
||||
DetourResult DetourCallback(CBaseEntity *pEnt)
|
||||
bool CritManager::TryEnable()
|
||||
{
|
||||
edict_t *pEdict = gameents->BaseEntityToEdict((CBaseEntity *)pEnt);
|
||||
|
||||
if (!pEdict)
|
||||
if (!m_hooksSetup)
|
||||
{
|
||||
g_pSM->LogMessage(myself, "Entity Error");
|
||||
return Result_Ignore;
|
||||
int offset;
|
||||
|
||||
if (!g_pGameConf->GetOffset("CalcIsAttackCriticalHelper", &offset))
|
||||
{
|
||||
g_pSM->LogError(myself, "Failed to find CalcIsAttackCriticalHelper offset");
|
||||
return false;
|
||||
}
|
||||
|
||||
SH_MANUALHOOK_RECONFIGURE(CalcIsAttackCriticalHelper, offset, 0, 0);
|
||||
|
||||
if (!g_pGameConf->GetOffset("CalcIsAttackCriticalHelperNoCrits", &offset))
|
||||
{
|
||||
g_pSM->LogError(myself, "Failed to find CalcIsAttackCriticalHelperNoCrits offset");
|
||||
return false;
|
||||
}
|
||||
|
||||
SH_MANUALHOOK_RECONFIGURE(CalcIsAttackCriticalHelperNoCrits, offset, 0, 0);
|
||||
|
||||
m_hooksSetup = true;
|
||||
}
|
||||
|
||||
for (size_t i = playerhelpers->GetMaxClients() + 1; i < MAX_EDICTS; ++i)
|
||||
{
|
||||
CBaseEntity *pEntity = gamehelpers->ReferenceToEntity(i);
|
||||
if (pEntity == NULL)
|
||||
continue;
|
||||
|
||||
IServerUnknown *pUnknown = (IServerUnknown *)pEntity;
|
||||
IServerNetworkable *pNetworkable = pUnknown->GetNetworkable();
|
||||
if (!pNetworkable)
|
||||
continue;
|
||||
|
||||
if (!UTIL_ContainsDataTable(pNetworkable->GetServerClass()->m_pTable, TF_WEAPON_DATATABLE))
|
||||
continue;
|
||||
|
||||
SH_ADD_MANUALHOOK(CalcIsAttackCriticalHelper, pEntity, SH_MEMBER(&g_CritManager, &CritManager::Hook_CalcIsAttackCriticalHelper), false);
|
||||
SH_ADD_MANUALHOOK(CalcIsAttackCriticalHelperNoCrits, pEntity, SH_MEMBER(&g_CritManager, &CritManager::Hook_CalcIsAttackCriticalHelperNoCrits), false);
|
||||
|
||||
m_entsHooked.Set(i);
|
||||
}
|
||||
|
||||
m_enabled = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CritManager::Disable()
|
||||
{
|
||||
int i = m_entsHooked.FindNextSetBit(playerhelpers->GetMaxClients() + 1);
|
||||
for (i; i != -1; i = m_entsHooked.FindNextSetBit(i))
|
||||
{
|
||||
CBaseEntity *pEntity = gamehelpers->ReferenceToEntity(i);
|
||||
SH_REMOVE_MANUALHOOK(CalcIsAttackCriticalHelper, pEntity, SH_MEMBER(&g_CritManager, &CritManager::Hook_CalcIsAttackCriticalHelper), false);
|
||||
SH_REMOVE_MANUALHOOK(CalcIsAttackCriticalHelperNoCrits, pEntity, SH_MEMBER(&g_CritManager, &CritManager::Hook_CalcIsAttackCriticalHelperNoCrits), false);
|
||||
|
||||
m_entsHooked.Set(i, false);
|
||||
}
|
||||
|
||||
m_enabled = false;
|
||||
}
|
||||
|
||||
void CritManager::OnEntityCreated(CBaseEntity *pEntity, const char *classname)
|
||||
{
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
IServerUnknown *pUnknown = (IServerUnknown *)pEntity;
|
||||
IServerNetworkable *pNetworkable = pUnknown->GetNetworkable();
|
||||
if (!pNetworkable)
|
||||
return;
|
||||
|
||||
if (!UTIL_ContainsDataTable(pNetworkable->GetServerClass()->m_pTable, TF_WEAPON_DATATABLE))
|
||||
return;
|
||||
|
||||
SH_ADD_MANUALHOOK(CalcIsAttackCriticalHelper, pEntity, SH_MEMBER(&g_CritManager, &CritManager::Hook_CalcIsAttackCriticalHelper), false);
|
||||
SH_ADD_MANUALHOOK(CalcIsAttackCriticalHelperNoCrits, pEntity, SH_MEMBER(&g_CritManager, &CritManager::Hook_CalcIsAttackCriticalHelperNoCrits), false);
|
||||
|
||||
m_entsHooked.Set(gamehelpers->EntityToBCompatRef(pEntity));
|
||||
}
|
||||
|
||||
void CritManager::OnEntityDestroyed(CBaseEntity *pEntity)
|
||||
{
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
int index = gamehelpers->EntityToBCompatRef(pEntity);
|
||||
if (index < 0 || index >= MAX_EDICTS)
|
||||
return;
|
||||
|
||||
if (!m_entsHooked.IsBitSet(index))
|
||||
return;
|
||||
|
||||
SH_REMOVE_MANUALHOOK(CalcIsAttackCriticalHelper, pEntity, SH_MEMBER(&g_CritManager, &CritManager::Hook_CalcIsAttackCriticalHelper), false);
|
||||
SH_REMOVE_MANUALHOOK(CalcIsAttackCriticalHelperNoCrits, pEntity, SH_MEMBER(&g_CritManager, &CritManager::Hook_CalcIsAttackCriticalHelperNoCrits), false);
|
||||
|
||||
m_entsHooked.Set(index, false);
|
||||
}
|
||||
|
||||
bool CritManager::Hook_CalcIsAttackCriticalHelper()
|
||||
{
|
||||
return Hook_CalcIsAttackCriticalHelpers(false);
|
||||
}
|
||||
|
||||
bool CritManager::Hook_CalcIsAttackCriticalHelperNoCrits()
|
||||
{
|
||||
return Hook_CalcIsAttackCriticalHelpers(true);
|
||||
}
|
||||
|
||||
bool CritManager::Hook_CalcIsAttackCriticalHelpers(bool noCrits)
|
||||
{
|
||||
CBaseEntity *pWeapon = META_IFACEPTR(CBaseEntity);
|
||||
|
||||
// If there's an invalid ent or invalid networkable here, we've got issues elsewhere.
|
||||
|
||||
IServerNetworkable *pNetWeapon = ((IServerUnknown *)pWeapon)->GetNetworkable();
|
||||
ServerClass *pServerClass = pNetWeapon->GetServerClass();
|
||||
if (!pServerClass)
|
||||
{
|
||||
g_pSM->LogError(myself, "Invalid server class on weapon.");
|
||||
RETURN_META_VALUE(MRES_IGNORED, false);
|
||||
}
|
||||
|
||||
sm_sendprop_info_t info;
|
||||
|
||||
if (!gamehelpers->FindSendPropInfo(pEdict->GetNetworkable()->GetServerClass()->GetName(), "m_hOwnerEntity", &info))
|
||||
if (!gamehelpers->FindSendPropInfo(pServerClass->GetName(), "m_hOwnerEntity", &info))
|
||||
{
|
||||
g_pSM->LogMessage(myself, "Offset Error");
|
||||
return Result_Ignore;
|
||||
g_pSM->LogError(myself, "Could not find m_hOwnerEntity on %s", pServerClass->GetName());
|
||||
RETURN_META_VALUE(MRES_IGNORED, false);
|
||||
}
|
||||
|
||||
if (!g_critForward)
|
||||
int returnValue;
|
||||
if (noCrits)
|
||||
{
|
||||
g_pSM->LogMessage(myself, "Invalid Forward");
|
||||
return Result_Ignore;
|
||||
returnValue = SH_MCALL(pWeapon, CalcIsAttackCriticalHelperNoCrits)() ? 1 : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue = SH_MCALL(pWeapon, CalcIsAttackCriticalHelper)() ? 1 : 0;
|
||||
}
|
||||
|
||||
int returnValue=0;
|
||||
int ownerIndex = -1;
|
||||
CBaseHandle &hndl = *(CBaseHandle *) ((intptr_t)pWeapon + info.actual_offset);
|
||||
CBaseEntity *pHandleEntity = gamehelpers->ReferenceToEntity(hndl.GetEntryIndex());
|
||||
|
||||
CBaseHandle &hndl = *(CBaseHandle *)((uint8_t *)pEnt + info.actual_offset);
|
||||
int index = CheckBaseHandle(hndl);
|
||||
if (pHandleEntity != NULL && hndl == reinterpret_cast<IHandleEntity *>(pHandleEntity)->GetRefEHandle())
|
||||
{
|
||||
ownerIndex = hndl.GetEntryIndex();
|
||||
}
|
||||
|
||||
g_critForward->PushCell(index); //Client index
|
||||
g_critForward->PushCell(engine->IndexOfEdict(pEdict)); // Weapon index
|
||||
g_critForward->PushString(pEdict->GetClassName()); //Weapon classname
|
||||
g_critForward->PushCell(ownerIndex); //Client index
|
||||
g_critForward->PushCell(gamehelpers->EntityToBCompatRef(pWeapon)); // Weapon index
|
||||
g_critForward->PushString(gamehelpers->GetEntityClassname(pWeapon)); //Weapon classname
|
||||
g_critForward->PushCellByRef(&returnValue); //return value
|
||||
|
||||
cell_t result = 0;
|
||||
|
||||
g_critForward->Execute(&result);
|
||||
|
||||
if (result)
|
||||
if (result > Pl_Continue)
|
||||
{
|
||||
if (returnValue)
|
||||
{
|
||||
return Result_Crit;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Result_NoCrit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return Result_Ignore;
|
||||
}
|
||||
}
|
||||
|
||||
DETOUR_DECL_MEMBER0(CalcIsAttackCriticalHelperMelee, bool)
|
||||
{
|
||||
DetourResult result = DetourCallback((CBaseEntity *)this);
|
||||
|
||||
if (result == Result_Ignore)
|
||||
{
|
||||
return DETOUR_MEMBER_CALL(CalcIsAttackCriticalHelperMelee)();
|
||||
}
|
||||
else if (result == Result_NoCrit)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
DETOUR_DECL_MEMBER0(CalcIsAttackCriticalHelper, bool)
|
||||
{
|
||||
DetourResult result = DetourCallback((CBaseEntity *)this);
|
||||
|
||||
if (result == Result_Ignore)
|
||||
{
|
||||
return DETOUR_MEMBER_CALL(CalcIsAttackCriticalHelper)();
|
||||
}
|
||||
else if (result == Result_NoCrit)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
DETOUR_DECL_MEMBER0(CalcIsAttackCriticalHelperBow, bool)
|
||||
{
|
||||
DetourResult result = DetourCallback((CBaseEntity *)this);
|
||||
|
||||
if (result == Result_Ignore)
|
||||
{
|
||||
return DETOUR_MEMBER_CALL(CalcIsAttackCriticalHelperBow)();
|
||||
}
|
||||
else if (result == Result_NoCrit)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
bool InitialiseCritDetours()
|
||||
{
|
||||
calcIsAttackCriticalDetour = DETOUR_CREATE_MEMBER(CalcIsAttackCriticalHelper, "CalcCritical");
|
||||
calcIsAttackCriticalMeleeDetour = DETOUR_CREATE_MEMBER(CalcIsAttackCriticalHelperMelee, "CalcCriticalMelee");
|
||||
calcIsAttackCriticalBowDetour = DETOUR_CREATE_MEMBER(CalcIsAttackCriticalHelperBow, "CalcCriticalBow");
|
||||
|
||||
bool HookCreated = false;
|
||||
|
||||
if (calcIsAttackCriticalDetour != NULL)
|
||||
{
|
||||
calcIsAttackCriticalDetour->EnableDetour();
|
||||
HookCreated = true;
|
||||
}
|
||||
|
||||
if (calcIsAttackCriticalMeleeDetour != NULL)
|
||||
{
|
||||
calcIsAttackCriticalMeleeDetour->EnableDetour();
|
||||
HookCreated = true;
|
||||
}
|
||||
|
||||
if (calcIsAttackCriticalBowDetour != NULL)
|
||||
{
|
||||
calcIsAttackCriticalBowDetour->EnableDetour();
|
||||
HookCreated = true;
|
||||
}
|
||||
|
||||
if (HookCreated)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
g_pSM->LogError(myself, "No critical hit forwards could be initialized - Disabled critical hit hooks");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void RemoveCritDetours()
|
||||
{
|
||||
if (calcIsAttackCriticalDetour != NULL)
|
||||
{
|
||||
calcIsAttackCriticalDetour->Destroy();
|
||||
calcIsAttackCriticalDetour = NULL;
|
||||
}
|
||||
|
||||
if (calcIsAttackCriticalMeleeDetour != NULL)
|
||||
{
|
||||
calcIsAttackCriticalMeleeDetour->Destroy();
|
||||
calcIsAttackCriticalMeleeDetour = NULL;
|
||||
}
|
||||
|
||||
if (calcIsAttackCriticalBowDetour != NULL)
|
||||
{
|
||||
calcIsAttackCriticalBowDetour->Destroy();
|
||||
calcIsAttackCriticalBowDetour = NULL;
|
||||
RETURN_META_VALUE(MRES_SUPERCEDE, returnValue);
|
||||
}
|
||||
|
||||
RETURN_META_VALUE(MRES_IGNORED, false);
|
||||
}
|
||||
|
||||
@@ -36,12 +36,41 @@
|
||||
#include <jit/jit_helpers.h>
|
||||
#include <jit/x86/x86_macros.h>
|
||||
#include "CDetour/detours.h"
|
||||
#include "ISDKHooks.h"
|
||||
|
||||
bool InitialiseCritDetours();
|
||||
void RemoveCritDetours();
|
||||
class CritManager : public ISMEntityListener
|
||||
{
|
||||
public:
|
||||
CritManager();
|
||||
|
||||
public:
|
||||
bool TryEnable();
|
||||
void Disable();
|
||||
|
||||
// ISMEntityListener
|
||||
public:
|
||||
virtual void OnEntityCreated(CBaseEntity *pEntity, const char *classname);
|
||||
virtual void OnEntityDestroyed(CBaseEntity *pEntity);
|
||||
|
||||
private:
|
||||
void HookEntityIfWeapon(CBaseEntity *pEntity);
|
||||
void UnhookEntityIfHooked(CBaseEntity *pEntity);
|
||||
|
||||
public:
|
||||
// CritHook
|
||||
bool Hook_CalcIsAttackCriticalHelper();
|
||||
bool Hook_CalcIsAttackCriticalHelperNoCrits();
|
||||
private:
|
||||
bool Hook_CalcIsAttackCriticalHelpers(bool noCrits);
|
||||
|
||||
private:
|
||||
bool m_enabled;
|
||||
bool m_hooksSetup;
|
||||
CBitVec<MAX_EDICTS> m_entsHooked;
|
||||
};
|
||||
|
||||
extern CritManager g_CritManager;
|
||||
|
||||
extern IForward *g_critForward;
|
||||
|
||||
extern IServerGameEnts *gameents;
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_CRITICALS_H_
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "gameplayrules.h"
|
||||
#include "teleporter.h"
|
||||
#include "CDetour/detours.h"
|
||||
#include "ISDKHooks.h"
|
||||
|
||||
/**
|
||||
* @file extension.cpp
|
||||
@@ -52,6 +53,7 @@ TF2Tools g_TF2Tools;
|
||||
IGameConfig *g_pGameConf = NULL;
|
||||
|
||||
IBinTools *g_pBinTools = NULL;
|
||||
ISDKHooks *g_pSDKHooks = NULL;
|
||||
|
||||
SMEXT_LINK(&g_TF2Tools);
|
||||
|
||||
@@ -91,6 +93,7 @@ bool TF2Tools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
}
|
||||
|
||||
sharesys->AddDependency(myself, "bintools.ext", true, true);
|
||||
sharesys->AddDependency(myself, "sdkhooks.ext", true, true);
|
||||
|
||||
char conf_error[255] = "";
|
||||
if (!gameconfs->LoadGameConfigFile("sm-tf2.games", &g_pGameConf, conf_error, sizeof(conf_error)))
|
||||
@@ -133,12 +136,12 @@ bool TF2Tools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
|
||||
const char *TF2Tools::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *TF2Tools::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
bool TF2Tools::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late)
|
||||
@@ -151,8 +154,6 @@ bool TF2Tools::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool
|
||||
|
||||
GET_V_IFACE_CURRENT(GetEngineFactory, icvar, ICvar, CVAR_INTERFACE_VERSION);
|
||||
|
||||
GET_V_IFACE_CURRENT(GetServerFactory, gameents, IServerGameEnts, INTERFACEVERSION_SERVERGAMEENTS);
|
||||
|
||||
GET_V_IFACE_CURRENT(GetEngineFactory, m_GameEventManager, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2);
|
||||
m_GameEventManager->AddListener(this, "teamplay_restart_round", true);
|
||||
|
||||
@@ -177,11 +178,22 @@ void TF2Tools::SDK_OnUnload()
|
||||
forwards->ReleaseForward(g_waitingPlayersStartForward);
|
||||
forwards->ReleaseForward(g_waitingPlayersEndForward);
|
||||
forwards->ReleaseForward(g_teleportForward);
|
||||
|
||||
if (g_pSDKHooks != NULL)
|
||||
{
|
||||
g_pSDKHooks->RemoveEntityListener(&g_CritManager);
|
||||
}
|
||||
}
|
||||
|
||||
void TF2Tools::SDK_OnAllLoaded()
|
||||
{
|
||||
SM_GET_LATE_IFACE(BINTOOLS, g_pBinTools);
|
||||
SM_GET_LATE_IFACE(SDKHOOKS, g_pSDKHooks);
|
||||
|
||||
if (g_pSDKHooks != NULL)
|
||||
{
|
||||
g_pSDKHooks->AddEntityListener(&g_CritManager);
|
||||
}
|
||||
}
|
||||
|
||||
bool TF2Tools::RegisterConCommandBase(ConCommandBase *pVar)
|
||||
@@ -198,6 +210,7 @@ void TF2Tools::FireGameEvent( IGameEvent *event )
|
||||
bool TF2Tools::QueryRunning(char *error, size_t maxlength)
|
||||
{
|
||||
SM_CHECK_IFACE(BINTOOLS, g_pBinTools);
|
||||
SM_GET_LATE_IFACE(SDKHOOKS, g_pSDKHooks);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -209,6 +222,11 @@ bool TF2Tools::QueryInterfaceDrop(SMInterface *pInterface)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pInterface == g_pSDKHooks)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return IExtensionInterface::QueryInterfaceDrop(pInterface);
|
||||
}
|
||||
|
||||
@@ -321,7 +339,7 @@ void TF2Tools::OnPluginLoaded(IPlugin *plugin)
|
||||
{
|
||||
if (!m_CritDetoursEnabled && g_critForward->GetFunctionCount())
|
||||
{
|
||||
m_CritDetoursEnabled = InitialiseCritDetours();
|
||||
m_CritDetoursEnabled = g_CritManager.TryEnable();
|
||||
}
|
||||
|
||||
if (!m_IsHolidayDetourEnabled && g_isHolidayForward->GetFunctionCount())
|
||||
@@ -353,7 +371,7 @@ void TF2Tools::OnPluginUnloaded(IPlugin *plugin)
|
||||
{
|
||||
if (m_CritDetoursEnabled && !g_critForward->GetFunctionCount())
|
||||
{
|
||||
RemoveCritDetours();
|
||||
g_CritManager.Disable();
|
||||
m_CritDetoursEnabled = false;
|
||||
}
|
||||
if (m_IsHolidayDetourEnabled && !g_isHolidayForward->GetFunctionCount())
|
||||
|
||||
@@ -100,14 +100,17 @@ cell_t TF2_Burn(IPluginContext *pContext, const cell_t *params)
|
||||
if (!pWrapper)
|
||||
{
|
||||
REGISTER_NATIVE_ADDR("Burn",
|
||||
PassInfo pass[2]; \
|
||||
PassInfo pass[3]; \
|
||||
pass[0].flags = PASSFLAG_BYVAL; \
|
||||
pass[0].size = sizeof(CBaseEntity *); \
|
||||
pass[0].type = PassType_Basic; \
|
||||
pass[1].flags = PASSFLAG_BYVAL; \
|
||||
pass[1].size = sizeof(CBaseEntity *); \
|
||||
pass[1].type = PassType_Basic; \
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 2))
|
||||
pass[2].flags = PASSFLAG_BYVAL; \
|
||||
pass[2].size = sizeof(float); \
|
||||
pass[2].type = PassType_Basic; \
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 3))
|
||||
}
|
||||
|
||||
CBaseEntity *pEntity;
|
||||
@@ -132,6 +135,8 @@ cell_t TF2_Burn(IPluginContext *pContext, const cell_t *params)
|
||||
*(CBaseEntity **)vptr = pTarget;
|
||||
vptr += sizeof(CBaseEntity *);
|
||||
*(CBaseEntity **)vptr = NULL;
|
||||
vptr += sizeof(CBaseEntity *);
|
||||
*(float *)vptr = -1.0f;
|
||||
|
||||
pWrapper->Execute(vstk, NULL);
|
||||
|
||||
|
||||
@@ -88,6 +88,38 @@ bool UTIL_FindDataTable(SendTable *pTable,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool UTIL_ContainsDataTable(SendTable *pTable, const char *name)
|
||||
{
|
||||
const char *pname = pTable->GetName();
|
||||
int props = pTable->GetNumProps();
|
||||
SendProp *prop;
|
||||
SendTable *table;
|
||||
|
||||
if (pname && strcmp(name, pname) == 0)
|
||||
return true;
|
||||
|
||||
for (int i = 0; i < props; i++)
|
||||
{
|
||||
prop = pTable->GetProp(i);
|
||||
|
||||
if ((table = prop->GetDataTable()) != NULL)
|
||||
{
|
||||
pname = table->GetName();
|
||||
if (pname && strcmp(name, pname) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (UTIL_ContainsDataTable(table, name))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ServerClass *UTIL_FindServerClass(const char *classname)
|
||||
{
|
||||
ServerClass *sc = gamedll->GetAllServerClasses();
|
||||
|
||||
@@ -49,6 +49,8 @@ bool UTIL_FindDataTable(SendTable *pTable,
|
||||
sm_sendprop_info_t *info,
|
||||
unsigned int offset);
|
||||
|
||||
bool UTIL_ContainsDataTable(SendTable *pTable, const char *name);
|
||||
|
||||
ServerClass *UTIL_FindServerClass(const char *classname);
|
||||
|
||||
CBaseEntity *UTIL_GetCBaseEntity(int num, bool onlyPlayers);
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
compiler = SM.DefaultExtCompiler('extensions/topmenus')
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
||||
binary = SM.ExtLibrary(builder, 'topmenus.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
|
||||
extension = AMBuild.AddJob('topmenus.ext')
|
||||
binary = Cpp.LibraryBuilder('topmenus.ext', AMBuild, extension, compiler)
|
||||
binary.AddSourceFiles('extensions/topmenus', [
|
||||
'extension.cpp',
|
||||
'smn_topmenus.cpp',
|
||||
'TopMenu.cpp',
|
||||
'TopMenuManager.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'sdk/sm_memtable.cpp'
|
||||
])
|
||||
SM.AutoVersion('extensions/topmenus', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'smn_topmenus.cpp',
|
||||
'TopMenu.cpp',
|
||||
'TopMenuManager.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'sdk/sm_memtable.cpp'
|
||||
]
|
||||
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
@@ -67,11 +67,11 @@ void TopMenuExtension::SDK_OnUnload()
|
||||
|
||||
const char *TopMenuExtension::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *TopMenuExtension::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
compiler = SM.DefaultExtCompiler('extensions/updater')
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
||||
binary = SM.ExtLibrary(builder, 'updater.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
|
||||
extension = AMBuild.AddJob('updater.ext')
|
||||
binary = Cpp.LibraryBuilder('updater.ext', AMBuild, extension, compiler)
|
||||
binary.AddSourceFiles('extensions/updater', [
|
||||
'extension.cpp',
|
||||
'MemoryDownloader.cpp',
|
||||
'Updater.cpp',
|
||||
'md5.cpp',
|
||||
'sdk/smsdk_ext.cpp'
|
||||
])
|
||||
SM.AutoVersion('extensions/updater', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'MemoryDownloader.cpp',
|
||||
'Updater.cpp',
|
||||
'md5.cpp',
|
||||
'sdk/smsdk_ext.cpp'
|
||||
]
|
||||
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ void UpdateReader::PerformUpdate(const char *url)
|
||||
xfer = webternet->CreateSession();
|
||||
xfer->SetFailOnHTTPError(true);
|
||||
|
||||
form->AddString("version", SM_VERSION_STRING);
|
||||
form->AddString("version", SOURCEMOD_VERSION);
|
||||
|
||||
unsigned int num_files = 0;
|
||||
add_folders(form, "gamedata", num_files);
|
||||
|
||||
@@ -249,11 +249,11 @@ void AddUpdateError(const char *fmt, ...)
|
||||
|
||||
const char *SmUpdater::GetExtensionVerString()
|
||||
{
|
||||
return SM_VERSION_STRING;
|
||||
return SOURCEMOD_VERSION;
|
||||
}
|
||||
|
||||
const char *SmUpdater::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
return SOURCEMOD_BUILD_TIME;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
"plugin_e10aab3464312dc0e484bda26b490b3f" "http://forums.alliedmods.net/showpost.php?p=1767388&postcount=7" /* LightRP (Sphex) - Version 1.2.7 */
|
||||
"plugin_a7973ddc4e72aafd0312432568a1806b" "http://forums.alliedmods.net/showpost.php?p=1767388&postcount=7" /* LightRP (Sphex) - Version 1.2.8 */
|
||||
"plugin_39ddd719f74b62e27e8e480871b9d3b6" "http://forums.alliedmods.net/showpost.php?p=1803875&postcount=1" /* Malicious plugin being uploaded to CS:GO servers */
|
||||
"plugin_da397f32bf24c7ef954bd121441a3b0e" "http://forums.alliedmods.net/showpost.php?p=2032419&postcount=1" /* Advertising plugin being uploaded to CS:GO servers */
|
||||
"plugin_ee0bb0aa0d24491feda4235a92779f71" "http://forums.alliedmods.net/showpost.php?p=2032419&postcount=1" /* Advertising plugin being uploaded to CS:GO servers */
|
||||
"plugin_f405db5491a465b1a30859ee7f7c5080" "" /* UCP Server (Endi) - Version 6.9 */
|
||||
"plugin_6fcb6721fb740b854b0a05bfc9a7984a" "" /* UCP Server (Endi) - Version 7.1 */
|
||||
"plugin_4d320d6c5aba5d31c644fe2847c0662f" "" /* UCP Server (Endi) - Version 7.2 */
|
||||
@@ -24,6 +26,7 @@
|
||||
"plugin_24602c74f183cfcd157b3d50dee96c52" "" /* UCP Server (Endi) - Version 7.8.3 */
|
||||
"plugin_78140f1a0f26cd3297767d0598eac4b1" "" /* [Any] PReplay (DarthNinja) - Version 1.0.0 */
|
||||
"plugin_55923ba6bfe41569a3e4fbd7ca4606e5" "" /* VIP Plugin (World-Source.Ru) - Version 2.0 */
|
||||
"plugin_4bf983e1d5b61ba0b1ab9a7e53bfda27" "" /* WarMod CS:GO (Twelve-60) */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,17 +19,22 @@
|
||||
"game" "csgo"
|
||||
}
|
||||
|
||||
"Addresses"
|
||||
{
|
||||
"EntInfosPtr"
|
||||
{
|
||||
"windows"
|
||||
{
|
||||
"signature" "EntInfosFinder"
|
||||
"read" "19"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
/* Offset into LevelShutdown */
|
||||
"gEntList"
|
||||
{
|
||||
"windows" "11"
|
||||
}
|
||||
|
||||
"EntInfo"
|
||||
{
|
||||
"windows" "4"
|
||||
"linux" "4"
|
||||
"mac" "4"
|
||||
}
|
||||
@@ -37,10 +42,11 @@
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
"LevelShutdown"
|
||||
// This is not unique, but all matches have what we need. Found from FindEntityByClassname.
|
||||
"EntInfosFinder"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xE8"
|
||||
"windows" "\xEB\x15\x0F\xB7\xC0\x8D\x34\x40\x8B\x34\x2A\x2A\x2A\x2A\x2A\xEB\x06\x8B\x35"
|
||||
}
|
||||
|
||||
"gEntList"
|
||||
|
||||
@@ -35,22 +35,22 @@
|
||||
"mac" "68"
|
||||
}
|
||||
"PreThink"
|
||||
{
|
||||
"windows" "362"
|
||||
"linux" "363"
|
||||
"mac" "363"
|
||||
}
|
||||
"PostThink"
|
||||
{
|
||||
"windows" "363"
|
||||
"linux" "364"
|
||||
"mac" "364"
|
||||
}
|
||||
"PostThink"
|
||||
{
|
||||
"windows" "364"
|
||||
"linux" "365"
|
||||
"mac" "365"
|
||||
}
|
||||
"Reload"
|
||||
{
|
||||
"windows" "309"
|
||||
"linux" "310"
|
||||
"mac" "310"
|
||||
"windows" "307"
|
||||
"linux" "313"
|
||||
"mac" "313"
|
||||
}
|
||||
"SetTransmit"
|
||||
{
|
||||
@@ -136,29 +136,6 @@
|
||||
"linux" "283"
|
||||
"mac" "283"
|
||||
}
|
||||
|
||||
|
||||
// no longer used
|
||||
"UpdateOnRemove"
|
||||
{
|
||||
"windows" "109"
|
||||
"linux" "110"
|
||||
"mac" "110"
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
// no longer used
|
||||
"IEntityFactoryDictionary"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
|
||||
"linux" "@_Z23EntityFactoryDictionaryv"
|
||||
"mac" "@_Z23EntityFactoryDictionaryv"
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,10 +145,31 @@
|
||||
{
|
||||
"EntityListeners"
|
||||
{
|
||||
"windows" "196644"
|
||||
"linux" "196644"
|
||||
"mac" "196644"
|
||||
}
|
||||
}
|
||||
|
||||
"Addresses"
|
||||
{
|
||||
"EntityListenersPtr"
|
||||
{
|
||||
"windows"
|
||||
{
|
||||
"signature" "EntityListenersFinder"
|
||||
"read" "18"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
// Find call to AddListenerEntity in CPhysSaveRestoreBlockHandler::PreRestore (virtual)
|
||||
"EntityListenersFinder"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x8B\x0D\x2A\x2A\x2A\x2A\x33\xC0\x56\x85\xC9\x7E\x32\x8B"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,181 +1,8 @@
|
||||
"Games"
|
||||
{
|
||||
// Now this is getting ridiculous
|
||||
"#default"
|
||||
// tf, hl2mp, and dods are in the same file for legacy reasons
|
||||
"tf"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "hl2mp"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
"EndTouch"
|
||||
{
|
||||
"windows" "99"
|
||||
"linux" "100"
|
||||
"mac" "100"
|
||||
}
|
||||
"FireBullets"
|
||||
{
|
||||
"windows" "111"
|
||||
"linux" "112"
|
||||
"mac" "112"
|
||||
}
|
||||
"GetMaxHealth"
|
||||
{
|
||||
"windows" "116"
|
||||
"linux" "117"
|
||||
"mac" "117"
|
||||
}
|
||||
"GroundEntChanged"
|
||||
{
|
||||
"windows" "176"
|
||||
"linux" "177"
|
||||
"mac" "177"
|
||||
}
|
||||
"OnTakeDamage"
|
||||
{
|
||||
"windows" "62"
|
||||
"linux" "63"
|
||||
"mac" "63"
|
||||
}
|
||||
"PreThink"
|
||||
{
|
||||
"windows" "330"
|
||||
"linux" "331"
|
||||
"mac" "331"
|
||||
}
|
||||
"PostThink"
|
||||
{
|
||||
"windows" "331"
|
||||
"linux" "332"
|
||||
"mac" "332"
|
||||
}
|
||||
"Reload"
|
||||
{
|
||||
"windows" "274"
|
||||
"linux" "275"
|
||||
"mac" "275"
|
||||
}
|
||||
"SetTransmit"
|
||||
{
|
||||
"windows" "20"
|
||||
"linux" "21"
|
||||
"mac" "21"
|
||||
}
|
||||
"ShouldCollide"
|
||||
{
|
||||
"windows" "16"
|
||||
"linux" "17"
|
||||
"mac" "17"
|
||||
}
|
||||
"Spawn"
|
||||
{
|
||||
"windows" "22"
|
||||
"linux" "23"
|
||||
"mac" "23"
|
||||
}
|
||||
"StartTouch"
|
||||
{
|
||||
"windows" "97"
|
||||
"linux" "98"
|
||||
"mac" "98"
|
||||
}
|
||||
"Think"
|
||||
{
|
||||
"windows" "47"
|
||||
"linux" "48"
|
||||
"mac" "48"
|
||||
}
|
||||
"Touch"
|
||||
{
|
||||
"windows" "98"
|
||||
"linux" "99"
|
||||
"mac" "99"
|
||||
}
|
||||
"TraceAttack"
|
||||
{
|
||||
"windows" "60"
|
||||
"linux" "61"
|
||||
"mac" "61"
|
||||
}
|
||||
"Use"
|
||||
{
|
||||
"windows" "96"
|
||||
"linux" "97"
|
||||
"mac" "97"
|
||||
}
|
||||
"VPhysicsUpdate"
|
||||
{
|
||||
"windows" "156"
|
||||
"linux" "157"
|
||||
"mac" "157"
|
||||
}
|
||||
"Weapon_CanSwitchTo"
|
||||
{
|
||||
"windows" "264"
|
||||
"linux" "265"
|
||||
"mac" "265"
|
||||
}
|
||||
"Weapon_CanUse"
|
||||
{
|
||||
"windows" "258"
|
||||
"linux" "259"
|
||||
"mac" "259"
|
||||
}
|
||||
"Weapon_Drop"
|
||||
{
|
||||
"windows" "261"
|
||||
"linux" "262"
|
||||
"mac" "262"
|
||||
}
|
||||
"Weapon_Equip"
|
||||
{
|
||||
"windows" "259"
|
||||
"linux" "260"
|
||||
"mac" "260"
|
||||
}
|
||||
"Weapon_Switch"
|
||||
{
|
||||
"windows" "262"
|
||||
"linux" "263"
|
||||
"mac" "263"
|
||||
}
|
||||
|
||||
|
||||
// no longer used
|
||||
"UpdateOnRemove"
|
||||
{
|
||||
"windows" "104"
|
||||
"linux" "105"
|
||||
"mac" "105"
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
// no longer used
|
||||
"IEntityFactoryDictionary"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
|
||||
"linux" "@_Z23EntityFactoryDictionaryv"
|
||||
"mac" "@_Z23EntityFactoryDictionaryv"
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
// Now this is getting ridiculous
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "tf"
|
||||
"game" "dod"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
"EndTouch"
|
||||
@@ -310,46 +137,283 @@
|
||||
"linux" "264"
|
||||
"mac" "264"
|
||||
}
|
||||
|
||||
|
||||
// no longer used
|
||||
"UpdateOnRemove"
|
||||
{
|
||||
"windows" "105"
|
||||
"linux" "106"
|
||||
"mac" "106"
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
// no longer used
|
||||
"IEntityFactoryDictionary"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
|
||||
"linux" "@_Z23EntityFactoryDictionaryv"
|
||||
"mac" "@_Z23EntityFactoryDictionaryv"
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
"#default"
|
||||
"hl2mp"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "cstrike"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
"EndTouch"
|
||||
{
|
||||
"windows" "100"
|
||||
"linux" "101"
|
||||
"mac" "101"
|
||||
}
|
||||
"FireBullets"
|
||||
{
|
||||
"windows" "112"
|
||||
"linux" "113"
|
||||
"mac" "113"
|
||||
}
|
||||
"GetMaxHealth"
|
||||
{
|
||||
"windows" "117"
|
||||
"linux" "118"
|
||||
"mac" "118"
|
||||
}
|
||||
"GroundEntChanged"
|
||||
{
|
||||
"windows" "178"
|
||||
"linux" "179"
|
||||
"mac" "179"
|
||||
}
|
||||
"OnTakeDamage"
|
||||
{
|
||||
"windows" "62"
|
||||
"linux" "63"
|
||||
"mac" "63"
|
||||
}
|
||||
"PreThink"
|
||||
{
|
||||
"windows" "331"
|
||||
"linux" "332"
|
||||
"mac" "332"
|
||||
}
|
||||
"PostThink"
|
||||
{
|
||||
"windows" "332"
|
||||
"linux" "333"
|
||||
"mac" "333"
|
||||
}
|
||||
"Reload"
|
||||
{
|
||||
"windows" "272"
|
||||
"linux" "273"
|
||||
"mac" "273"
|
||||
"windows" "268"
|
||||
"linux" "269"
|
||||
"mac" "269"
|
||||
}
|
||||
"SetTransmit"
|
||||
{
|
||||
"windows" "20"
|
||||
"linux" "21"
|
||||
"mac" "21"
|
||||
}
|
||||
"ShouldCollide"
|
||||
{
|
||||
"windows" "16"
|
||||
"linux" "17"
|
||||
"mac" "17"
|
||||
}
|
||||
"Spawn"
|
||||
{
|
||||
"windows" "22"
|
||||
"linux" "23"
|
||||
"mac" "23"
|
||||
}
|
||||
"StartTouch"
|
||||
{
|
||||
"windows" "98"
|
||||
"linux" "99"
|
||||
"mac" "99"
|
||||
}
|
||||
"Think"
|
||||
{
|
||||
"windows" "47"
|
||||
"linux" "48"
|
||||
"mac" "48"
|
||||
}
|
||||
"Touch"
|
||||
{
|
||||
"windows" "99"
|
||||
"linux" "100"
|
||||
"mac" "100"
|
||||
}
|
||||
"TraceAttack"
|
||||
{
|
||||
"windows" "60"
|
||||
"linux" "61"
|
||||
"mac" "61"
|
||||
}
|
||||
"Use"
|
||||
{
|
||||
"windows" "97"
|
||||
"linux" "98"
|
||||
"mac" "98"
|
||||
}
|
||||
"VPhysicsUpdate"
|
||||
{
|
||||
"windows" "157"
|
||||
"linux" "158"
|
||||
"mac" "158"
|
||||
}
|
||||
"Weapon_CanSwitchTo"
|
||||
{
|
||||
"windows" "265"
|
||||
"linux" "266"
|
||||
"mac" "266"
|
||||
}
|
||||
"Weapon_CanUse"
|
||||
{
|
||||
"windows" "259"
|
||||
"linux" "260"
|
||||
"mac" "260"
|
||||
}
|
||||
"Weapon_Drop"
|
||||
{
|
||||
"windows" "262"
|
||||
"linux" "263"
|
||||
"mac" "263"
|
||||
}
|
||||
"Weapon_Equip"
|
||||
{
|
||||
"windows" "260"
|
||||
"linux" "261"
|
||||
"mac" "261"
|
||||
}
|
||||
"Weapon_Switch"
|
||||
{
|
||||
"windows" "263"
|
||||
"linux" "264"
|
||||
"mac" "264"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
"dod"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"EndTouch"
|
||||
{
|
||||
"windows" "100"
|
||||
"linux" "101"
|
||||
"mac" "101"
|
||||
}
|
||||
"FireBullets"
|
||||
{
|
||||
"windows" "112"
|
||||
"linux" "113"
|
||||
"mac" "113"
|
||||
}
|
||||
"GetMaxHealth"
|
||||
{
|
||||
"windows" "117"
|
||||
"linux" "118"
|
||||
"mac" "118"
|
||||
}
|
||||
"GroundEntChanged"
|
||||
{
|
||||
"windows" "178"
|
||||
"linux" "179"
|
||||
"mac" "179"
|
||||
}
|
||||
"OnTakeDamage"
|
||||
{
|
||||
"windows" "62"
|
||||
"linux" "63"
|
||||
"mac" "63"
|
||||
}
|
||||
"PreThink"
|
||||
{
|
||||
"windows" "331"
|
||||
"linux" "332"
|
||||
"mac" "332"
|
||||
}
|
||||
"PostThink"
|
||||
{
|
||||
"windows" "332"
|
||||
"linux" "333"
|
||||
"mac" "333"
|
||||
}
|
||||
"Reload"
|
||||
{
|
||||
"windows" "268"
|
||||
"linux" "269"
|
||||
"mac" "269"
|
||||
}
|
||||
"SetTransmit"
|
||||
{
|
||||
"windows" "20"
|
||||
"linux" "21"
|
||||
"mac" "21"
|
||||
}
|
||||
"ShouldCollide"
|
||||
{
|
||||
"windows" "16"
|
||||
"linux" "17"
|
||||
"mac" "17"
|
||||
}
|
||||
"Spawn"
|
||||
{
|
||||
"windows" "22"
|
||||
"linux" "23"
|
||||
"mac" "23"
|
||||
}
|
||||
"StartTouch"
|
||||
{
|
||||
"windows" "98"
|
||||
"linux" "99"
|
||||
"mac" "99"
|
||||
}
|
||||
"Think"
|
||||
{
|
||||
"windows" "47"
|
||||
"linux" "48"
|
||||
"mac" "48"
|
||||
}
|
||||
"Touch"
|
||||
{
|
||||
"windows" "99"
|
||||
"linux" "100"
|
||||
"mac" "100"
|
||||
}
|
||||
"TraceAttack"
|
||||
{
|
||||
"windows" "60"
|
||||
"linux" "61"
|
||||
"mac" "61"
|
||||
}
|
||||
"Use"
|
||||
{
|
||||
"windows" "97"
|
||||
"linux" "98"
|
||||
"mac" "98"
|
||||
}
|
||||
"VPhysicsUpdate"
|
||||
{
|
||||
"windows" "157"
|
||||
"linux" "158"
|
||||
"mac" "158"
|
||||
}
|
||||
"Weapon_CanSwitchTo"
|
||||
{
|
||||
"windows" "265"
|
||||
"linux" "266"
|
||||
"mac" "266"
|
||||
}
|
||||
"Weapon_CanUse"
|
||||
{
|
||||
"windows" "259"
|
||||
"linux" "260"
|
||||
"mac" "260"
|
||||
}
|
||||
"Weapon_Drop"
|
||||
{
|
||||
"windows" "262"
|
||||
"linux" "263"
|
||||
"mac" "263"
|
||||
}
|
||||
"Weapon_Equip"
|
||||
{
|
||||
"windows" "260"
|
||||
"linux" "261"
|
||||
"mac" "261"
|
||||
}
|
||||
"Weapon_Switch"
|
||||
{
|
||||
"windows" "263"
|
||||
"linux" "264"
|
||||
"mac" "264"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,4 +99,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
"swarm"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"EntityListeners"
|
||||
{
|
||||
"windows" "131108"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,27 +6,27 @@
|
||||
{
|
||||
"EndTouch"
|
||||
{
|
||||
"windows" "99"
|
||||
"linux" "100"
|
||||
"mac" "100"
|
||||
"windows" "100"
|
||||
"linux" "101"
|
||||
"mac" "101"
|
||||
}
|
||||
"FireBullets"
|
||||
{
|
||||
"windows" "111"
|
||||
"linux" "112"
|
||||
"mac" "112"
|
||||
"windows" "112"
|
||||
"linux" "113"
|
||||
"mac" "113"
|
||||
}
|
||||
"GetMaxHealth"
|
||||
{
|
||||
"windows" "116"
|
||||
"linux" "117"
|
||||
"mac" "117"
|
||||
"windows" "117"
|
||||
"linux" "118"
|
||||
"mac" "118"
|
||||
}
|
||||
"GroundEntChanged"
|
||||
{
|
||||
"windows" "177"
|
||||
"linux" "178"
|
||||
"mac" "178"
|
||||
"linux" "179"
|
||||
"mac" "179"
|
||||
}
|
||||
"OnTakeDamage"
|
||||
{
|
||||
@@ -35,22 +35,22 @@
|
||||
"mac" "63"
|
||||
}
|
||||
"PreThink"
|
||||
{
|
||||
"windows" "330"
|
||||
"linux" "331"
|
||||
"mac" "331"
|
||||
}
|
||||
"PostThink"
|
||||
{
|
||||
"windows" "331"
|
||||
"linux" "332"
|
||||
"mac" "332"
|
||||
}
|
||||
"PostThink"
|
||||
{
|
||||
"windows" "332"
|
||||
"linux" "333"
|
||||
"mac" "333"
|
||||
}
|
||||
"Reload"
|
||||
{
|
||||
"windows" "270"
|
||||
"linux" "276"
|
||||
"mac" "276"
|
||||
"windows" "268"
|
||||
"linux" "269"
|
||||
"mac" "269"
|
||||
}
|
||||
"SetTransmit"
|
||||
{
|
||||
@@ -72,9 +72,9 @@
|
||||
}
|
||||
"StartTouch"
|
||||
{
|
||||
"windows" "97"
|
||||
"linux" "98"
|
||||
"mac" "98"
|
||||
"windows" "98"
|
||||
"linux" "99"
|
||||
"mac" "99"
|
||||
}
|
||||
"Think"
|
||||
{
|
||||
@@ -84,9 +84,9 @@
|
||||
}
|
||||
"Touch"
|
||||
{
|
||||
"windows" "98"
|
||||
"linux" "99"
|
||||
"mac" "99"
|
||||
"windows" "99"
|
||||
"linux" "100"
|
||||
"mac" "100"
|
||||
}
|
||||
"TraceAttack"
|
||||
{
|
||||
@@ -96,54 +96,54 @@
|
||||
}
|
||||
"Use"
|
||||
{
|
||||
"windows" "96"
|
||||
"linux" "97"
|
||||
"mac" "97"
|
||||
"windows" "97"
|
||||
"linux" "98"
|
||||
"mac" "98"
|
||||
}
|
||||
"VPhysicsUpdate"
|
||||
{
|
||||
"windows" "156"
|
||||
"linux" "157"
|
||||
"mac" "157"
|
||||
"windows" "157"
|
||||
"linux" "158"
|
||||
"mac" "158"
|
||||
}
|
||||
"Weapon_CanSwitchTo"
|
||||
{
|
||||
"windows" "264"
|
||||
"linux" "265"
|
||||
"mac" "265"
|
||||
"windows" "265"
|
||||
"linux" "266"
|
||||
"mac" "266"
|
||||
}
|
||||
"Weapon_CanUse"
|
||||
{
|
||||
"windows" "258"
|
||||
"linux" "259"
|
||||
"mac" "259"
|
||||
}
|
||||
"Weapon_Drop"
|
||||
{
|
||||
"windows" "261"
|
||||
"linux" "262"
|
||||
"mac" "262"
|
||||
}
|
||||
"Weapon_Equip"
|
||||
{
|
||||
"windows" "259"
|
||||
"linux" "260"
|
||||
"mac" "260"
|
||||
}
|
||||
"Weapon_Switch"
|
||||
"Weapon_Drop"
|
||||
{
|
||||
"windows" "262"
|
||||
"linux" "263"
|
||||
"mac" "263"
|
||||
}
|
||||
"Weapon_Equip"
|
||||
{
|
||||
"windows" "260"
|
||||
"linux" "261"
|
||||
"mac" "261"
|
||||
}
|
||||
"Weapon_Switch"
|
||||
{
|
||||
"windows" "263"
|
||||
"linux" "264"
|
||||
"mac" "264"
|
||||
}
|
||||
|
||||
|
||||
// no longer used
|
||||
"UpdateOnRemove"
|
||||
{
|
||||
"windows" "104"
|
||||
"linux" "105"
|
||||
"mac" "105"
|
||||
"windows" "105"
|
||||
"linux" "106"
|
||||
"mac" "106"
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
"Games"
|
||||
{
|
||||
/* GoldenEye: Source 4.2.4 */
|
||||
"gesource"
|
||||
{
|
||||
"Offsets"
|
||||
@@ -28,7 +29,7 @@
|
||||
}
|
||||
"GroundEntChanged"
|
||||
{
|
||||
"windows" "167"
|
||||
"windows" "168"
|
||||
"linux" "168"
|
||||
}
|
||||
"OnTakeDamage"
|
||||
@@ -46,6 +47,11 @@
|
||||
"windows" "292"
|
||||
"linux" "293"
|
||||
}
|
||||
"Reload"
|
||||
{
|
||||
"windows" "251"
|
||||
"linux" "252"
|
||||
}
|
||||
"SetTransmit"
|
||||
{
|
||||
"windows" "19"
|
||||
@@ -81,11 +87,6 @@
|
||||
"windows" "58"
|
||||
"linux" "59"
|
||||
}
|
||||
"UpdateOnRemove"
|
||||
{
|
||||
"windows" "97"
|
||||
"linux" "98"
|
||||
}
|
||||
"Use"
|
||||
{
|
||||
"windows" "89"
|
||||
@@ -121,16 +122,26 @@
|
||||
"windows" "235"
|
||||
"linux" "236"
|
||||
}
|
||||
|
||||
// no longer used
|
||||
"UpdateOnRemove"
|
||||
{
|
||||
"windows" "97"
|
||||
"linux" "98"
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
// no longer used
|
||||
"IEntityFactoryDictionary"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
|
||||
"windows" "\xA1\x2A\x2A\x2A\x2A\xA8\x01\x75\x2A\x83\xC8\x01\xB9\x2A\x2A\x2A\x2A\xA3\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
|
||||
"linux" "@_Z23EntityFactoryDictionaryv"
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
"Games"
|
||||
{
|
||||
/* HL2:CTF 2.1 */
|
||||
"hl2ctf"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"EndTouch"
|
||||
{
|
||||
"windows" "83"
|
||||
"linux" "84"
|
||||
}
|
||||
"FireBullets"
|
||||
{
|
||||
"windows" "93"
|
||||
"Linux" "94"
|
||||
}
|
||||
"GroundEntChanged"
|
||||
{
|
||||
"windows" "146"
|
||||
"linux" "147"
|
||||
}
|
||||
"OnTakeDamage"
|
||||
{
|
||||
"windows" "54"
|
||||
"linux" "55"
|
||||
}
|
||||
"PreThink"
|
||||
{
|
||||
"windows" "247"
|
||||
"linux" "248"
|
||||
}
|
||||
"PostThink"
|
||||
{
|
||||
"windows" "248"
|
||||
"linux" "249"
|
||||
}
|
||||
"SetTransmit"
|
||||
{
|
||||
"windows" "21"
|
||||
"linux" "22"
|
||||
}
|
||||
"ShouldCollide"
|
||||
{
|
||||
"windows" "17"
|
||||
"linux" "18"
|
||||
}
|
||||
"Spawn"
|
||||
{
|
||||
"windows" "23"
|
||||
"linux" "24"
|
||||
}
|
||||
"StartTouch"
|
||||
{
|
||||
"windows" "81"
|
||||
"linux" "82"
|
||||
}
|
||||
"Think"
|
||||
{
|
||||
"windows" "45"
|
||||
"linux" "46"
|
||||
}
|
||||
"Touch"
|
||||
{
|
||||
"windows" "82"
|
||||
"linux" "83"
|
||||
}
|
||||
"TraceAttack"
|
||||
{
|
||||
"windows" "53"
|
||||
"linux" "54"
|
||||
}
|
||||
"VPhysicsUpdate"
|
||||
{
|
||||
"windows" "130"
|
||||
"linux" "131"
|
||||
}
|
||||
"Weapon_CanSwitchTo"
|
||||
{
|
||||
"windows" "205"
|
||||
"linux" "206"
|
||||
}
|
||||
"Weapon_CanUse"
|
||||
{
|
||||
"windows" "199"
|
||||
"linux" "200"
|
||||
}
|
||||
"Weapon_Drop"
|
||||
{
|
||||
"windows" "202"
|
||||
"linux" "203"
|
||||
}
|
||||
"Weapon_Equip"
|
||||
{
|
||||
"windows" "200"
|
||||
"linux" "201"
|
||||
}
|
||||
"Weapon_Switch"
|
||||
{
|
||||
"windows" "203"
|
||||
"linux" "204"
|
||||
}
|
||||
"Reload"
|
||||
{
|
||||
"windows" "213"
|
||||
"linux" "214"
|
||||
}
|
||||
"Use"
|
||||
{
|
||||
"windows" "80"
|
||||
"linux" "81"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,4 +159,9 @@
|
||||
{
|
||||
"game" "synergy"
|
||||
}
|
||||
|
||||
"game.hl2ctf.txt"
|
||||
{
|
||||
"game" "hl2ctf"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
/* Offset into CBaseTempEntity constructor */
|
||||
/* Offset into CBaseTempEntity signature address */
|
||||
"s_pTempEntities"
|
||||
{
|
||||
"windows" "19"
|
||||
"windows" "4"
|
||||
}
|
||||
"GetTEName"
|
||||
{
|
||||
@@ -58,7 +58,7 @@
|
||||
"CBaseTempEntity"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x8B\xC1\x8B\x4D\x08\xC7\x00\x2A\x2A\x2A\x2A\x89\x48\x2A\x8B"
|
||||
"windows" "\x89\x41\x04\xA1\x2A\x2A\x2A\x2A\x89\x41\x08\x89\x0D\x2A\x2A\x2A\x2A\xC7"
|
||||
}
|
||||
"s_pTempEntities"
|
||||
{
|
||||
@@ -78,7 +78,7 @@
|
||||
"FindEntityByClassname"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x53\x56\x8B\xF1\x8B\x4D\x08\x57\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x83\xF8\xFF\x75\x2A\xB8\xFF\x1F\x00\x00\x8D\x04\x40\x8B\x74\xC6\x2A\xEB"
|
||||
// Fallback to IServerTools method instead on Windows, lest we add custom logic since it's no longer a thiscall on Windows in CS:GO
|
||||
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
||||
"mac" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
||||
}
|
||||
@@ -115,7 +115,7 @@
|
||||
"CreateGameRulesObject"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
|
||||
"windows" "\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x6A\x01\xFF\x50"
|
||||
}
|
||||
"g_pGameRules"
|
||||
{
|
||||
@@ -139,7 +139,7 @@
|
||||
* the expected code. A pointer to sv (IServer interface) is used
|
||||
* here.
|
||||
*/
|
||||
"CreateFakeClient_Windows" "\x55\x8B\xEC\x8B\x2A\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x85\xC0\x75"
|
||||
"CreateFakeClient_Windows" "\x55\x8B\xEC\xFF\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x85"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
@@ -147,7 +147,7 @@
|
||||
/* Offset into IVEngineServer::CreateFakeClient */
|
||||
"sv"
|
||||
{
|
||||
"windows" "8"
|
||||
"windows" "7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,10 +171,23 @@
|
||||
"EntityFactory"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
|
||||
"linux" "@_Z23EntityFactoryDictionaryv"
|
||||
"mac" "@_Z23EntityFactoryDictionaryv"
|
||||
}
|
||||
|
||||
"EntityFactoryFinder"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\xFF\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x8B\xC8\xC7"
|
||||
}
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
"EntityFactoryOffset"
|
||||
{
|
||||
"windows" "4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +199,7 @@
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x81\x2A\x2A\x2A\x2A\x2A\x53\x56\x8B\x71\x2A\x57"
|
||||
"windows" "\x55\x8B\xEC\x83\x2A\x2A\x81\xEC\x2A\x2A\x2A\x2A\x8B\xC1\x53\x56\x57\x8B\x2A\x2A\x89\x2A\x2A\x2A\x33"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
"mac" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
@@ -207,7 +220,7 @@
|
||||
"SetUserCvar"
|
||||
{
|
||||
/* Not 100% sure on this, why would windows change and not linux - TEST ME */
|
||||
"windows" "17"
|
||||
"windows" "27"
|
||||
"linux" "64"
|
||||
"mac" "64"
|
||||
}
|
||||
@@ -221,9 +234,9 @@
|
||||
*/
|
||||
"InfoChanged"
|
||||
{
|
||||
"windows" "168"
|
||||
"linux" "168"
|
||||
"mac" "168"
|
||||
"windows" "412"
|
||||
"linux" "412"
|
||||
"mac" "412"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -239,15 +252,15 @@
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "441"
|
||||
"linux" "442"
|
||||
"mac" "442"
|
||||
"windows" "443"
|
||||
"linux" "444"
|
||||
"mac" "444"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "288"
|
||||
"linux" "289"
|
||||
"mac" "289"
|
||||
"windows" "289"
|
||||
"linux" "290"
|
||||
"mac" "290"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
@@ -275,9 +288,9 @@
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "491"
|
||||
"linux" "491"
|
||||
"mac" "491"
|
||||
"windows" "493"
|
||||
"linux" "493"
|
||||
"mac" "493"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
@@ -317,9 +330,15 @@
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "461"
|
||||
"linux" "462"
|
||||
"mac" "462"
|
||||
"windows" "463"
|
||||
"linux" "464"
|
||||
"mac" "464"
|
||||
}
|
||||
"GiveAmmo"
|
||||
{
|
||||
"windows" "272"
|
||||
"linux" "273"
|
||||
"mac" "273"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,57 +28,57 @@
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "399"
|
||||
"linux" "400"
|
||||
"mac" "400"
|
||||
"windows" "400"
|
||||
"linux" "401"
|
||||
"mac" "401"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "268"
|
||||
"linux" "269"
|
||||
"mac" "269"
|
||||
"windows" "269"
|
||||
"linux" "270"
|
||||
"mac" "270"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "266"
|
||||
"linux" "267"
|
||||
"mac" "267"
|
||||
"windows" "267"
|
||||
"linux" "268"
|
||||
"mac" "268"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "207"
|
||||
"linux" "208"
|
||||
"mac" "208"
|
||||
"windows" "208"
|
||||
"linux" "209"
|
||||
"mac" "209"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "211"
|
||||
"linux" "212"
|
||||
"mac" "212"
|
||||
"windows" "212"
|
||||
"linux" "213"
|
||||
"mac" "213"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "107"
|
||||
"linux" "108"
|
||||
"mac" "108"
|
||||
"windows" "108"
|
||||
"linux" "109"
|
||||
"mac" "109"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "438"
|
||||
"linux" "438"
|
||||
"mac" "438"
|
||||
"windows" "439"
|
||||
"linux" "439"
|
||||
"mac" "439"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "139"
|
||||
"linux" "140"
|
||||
"mac" "140"
|
||||
"windows" "140"
|
||||
"linux" "141"
|
||||
"mac" "141"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "130"
|
||||
"linux" "131"
|
||||
"mac" "131"
|
||||
"windows" "131"
|
||||
"linux" "132"
|
||||
"mac" "132"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
@@ -94,9 +94,9 @@
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "259"
|
||||
"linux" "260"
|
||||
"mac" "260"
|
||||
"windows" "260"
|
||||
"linux" "261"
|
||||
"mac" "261"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
@@ -106,9 +106,15 @@
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "417"
|
||||
"linux" "418"
|
||||
"mac" "418"
|
||||
"windows" "418"
|
||||
"linux" "419"
|
||||
"mac" "419"
|
||||
}
|
||||
"GiveAmmo"
|
||||
{
|
||||
"windows" "251"
|
||||
"linux" "252"
|
||||
"mac" "252"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,12 @@
|
||||
"linux" "418"
|
||||
"mac" "418"
|
||||
}
|
||||
"GiveAmmo"
|
||||
{
|
||||
"windows" "251"
|
||||
"linux" "252"
|
||||
"mac" "252"
|
||||
}
|
||||
}
|
||||
|
||||
"Keys"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"Games"
|
||||
{
|
||||
/* GoldenEye: Source 4.2.4 */
|
||||
"gesource"
|
||||
{
|
||||
"Offsets"
|
||||
@@ -76,7 +77,12 @@
|
||||
}
|
||||
"s_pTempEntities"
|
||||
{
|
||||
"windows" "19"
|
||||
"windows" "16"
|
||||
}
|
||||
"GiveAmmo"
|
||||
{
|
||||
"windows" "226"
|
||||
"linux" "227"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
@@ -84,18 +90,18 @@
|
||||
"CBaseTempEntity"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x8B\xC1\x8B\x2A\x2A\xC7\x2A\x2A\x2A\x2A\x2A\x89\x2A\x2A\x8B\x15\x2A\x2A\x2A\x2A\x89"
|
||||
"windows" "\x55\x8B\xEC\x8B\x2A\x2A\x89\x41\x04\xC7\x2A\x2A\x2A\x2A\x2A\xA1\x2A\x2A\x2A\x2A\x89\x41\x2A\x89"
|
||||
}
|
||||
"FindEntityByClassname"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x53\x56\x8B\xF1\x8B\x2A\x2A\x57\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x40\xC1\xE0\x2A\x8B\x3C\x30\xEB\x2A\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5D\x2A\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x2A\x2A\x2A\x2A\x83\xC4\x2A\xEB\x2A\x39"
|
||||
"windows" "\x55\x8B\xEC\x53\x56\x57\x8B\xF9\x8B\x4D\x08\x85\xC9\x74\x2A\x8B\x01\xFF\x50\x08\x8B\x30\x81\xE6\xFF\x0F\x00\x00\x46\x03\xF6\x8B\x34\xF7\xEB\x2A\x8B\xB7\x04\x00\x01\x00\x85\xF6\x74\x2A\x8B\x5D\x0C\x8B\x3E\x85\xFF\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x15\x2A\x2A\x2A\x2A\x83\xC4\x04\xEB\x2A\x39\x5F\x5C"
|
||||
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
||||
}
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x81\x2A\x2A\x2A\x2A\x2A\x53\x56\x8B\x71\x2A\x57\x89\x2A\x2A\xC7"
|
||||
"windows" "\x55\x8B\xEC\x81\x2A\x2A\x2A\x2A\x2A\x53\x8B\xC1\x56\x57\x8B"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,11 @@
|
||||
"windows" "364"
|
||||
"linux" "365"
|
||||
}
|
||||
"GiveAmmo"
|
||||
{
|
||||
"windows" "194"
|
||||
"linux" "195"
|
||||
}
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
"Games"
|
||||
{
|
||||
/* HL2:CTF 2.0 RC1 */
|
||||
/* HL2:CTF 2.1 */
|
||||
"hl2ctf"
|
||||
{
|
||||
|
||||
@@ -87,6 +87,21 @@
|
||||
"windows" "0"
|
||||
"linux" "0"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "30"
|
||||
"linux" "29"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "29"
|
||||
"linux" "30"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "28"
|
||||
"linux" "31"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
|
||||
@@ -18,57 +18,57 @@
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "398"
|
||||
"linux" "399"
|
||||
"mac" "399"
|
||||
"windows" "399"
|
||||
"linux" "400"
|
||||
"mac" "400"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "268"
|
||||
"linux" "269"
|
||||
"mac" "269"
|
||||
"windows" "269"
|
||||
"linux" "270"
|
||||
"mac" "270"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "266"
|
||||
"linux" "267"
|
||||
"mac" "267"
|
||||
"windows" "267"
|
||||
"linux" "268"
|
||||
"mac" "268"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "207"
|
||||
"linux" "208"
|
||||
"mac" "208"
|
||||
"windows" "208"
|
||||
"linux" "209"
|
||||
"mac" "209"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "211"
|
||||
"linux" "212"
|
||||
"mac" "212"
|
||||
"windows" "212"
|
||||
"linux" "213"
|
||||
"mac" "213"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "107"
|
||||
"linux" "108"
|
||||
"mac" "108"
|
||||
"windows" "108"
|
||||
"linux" "109"
|
||||
"mac" "109"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "437"
|
||||
"linux" "437"
|
||||
"mac" "437"
|
||||
"windows" "438"
|
||||
"linux" "438"
|
||||
"mac" "438"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "139"
|
||||
"linux" "140"
|
||||
"mac" "140"
|
||||
"windows" "140"
|
||||
"linux" "141"
|
||||
"mac" "141"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "130"
|
||||
"linux" "131"
|
||||
"mac" "131"
|
||||
"windows" "131"
|
||||
"linux" "132"
|
||||
"mac" "132"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
@@ -84,9 +84,9 @@
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "259"
|
||||
"linux" "260"
|
||||
"mac" "260"
|
||||
"windows" "260"
|
||||
"linux" "261"
|
||||
"mac" "261"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
@@ -96,9 +96,15 @@
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "416"
|
||||
"linux" "417"
|
||||
"mac" "417"
|
||||
"windows" "417"
|
||||
"linux" "418"
|
||||
"mac" "418"
|
||||
}
|
||||
"GiveAmmo"
|
||||
{
|
||||
"windows" "251"
|
||||
"linux" "252"
|
||||
"mac" "252"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,6 +204,12 @@
|
||||
"linux" "454"
|
||||
"mac" "454"
|
||||
}
|
||||
"GiveAmmo"
|
||||
{
|
||||
"windows" "273"
|
||||
"linux" "274"
|
||||
"mac" "274"
|
||||
}
|
||||
}
|
||||
|
||||
"Keys"
|
||||
|
||||
@@ -86,6 +86,12 @@
|
||||
"windows" "382"
|
||||
"linux" "383"
|
||||
}
|
||||
"GiveAmmo"
|
||||
{
|
||||
"windows" "253"
|
||||
"linux" "253"
|
||||
"mac" "253"
|
||||
}
|
||||
|
||||
/* Offset into CBaseTempEntity constructor (vs2010 moved it!) */
|
||||
"s_pTempEntities"
|
||||
|
||||
@@ -100,6 +100,12 @@
|
||||
"linux" "418"
|
||||
"mac" "418"
|
||||
}
|
||||
"GiveAmmo"
|
||||
{
|
||||
"windows" "251"
|
||||
"linux" "252"
|
||||
"mac" "252"
|
||||
}
|
||||
}
|
||||
|
||||
"Keys"
|
||||
|
||||
@@ -32,72 +32,85 @@
|
||||
//Offset into CheckRestartRound
|
||||
"CTTeamScoreOffset"
|
||||
{
|
||||
"windows" "97"
|
||||
"linux" "125"
|
||||
"windows" "98"
|
||||
"linux" "124"
|
||||
"mac" "150"
|
||||
}
|
||||
//Offset into CheckRestartRound
|
||||
"TTeamScoreOffset"
|
||||
{
|
||||
"windows" "122"
|
||||
"linux" "160"
|
||||
"linux" "159"
|
||||
"mac" "185"
|
||||
}
|
||||
"ClanTagOffset"
|
||||
{
|
||||
"windows" "15"
|
||||
"windows" "12"
|
||||
"linux" "41"
|
||||
"mac" "22"
|
||||
}
|
||||
//Offset into HandleCommand_Buy_Internal
|
||||
"CCSPlayerInventoryOffset"
|
||||
{
|
||||
"windows" "285"
|
||||
"linux" "87"
|
||||
"mac" "109"
|
||||
}
|
||||
"GetItemInLoadout"
|
||||
{
|
||||
"windows" "8"
|
||||
"linux" "9"
|
||||
"mac" "9"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"RoundRespawn"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x2A\x56\x8B\xF1\x8B\x0D\x2A\x2A\x2A\x2A\x57\xE8\x2A\x2A\x2A\x2A\x84\xC0\x0F"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x08\x56\x8B\xF1\x8B\x0D\x2A\x2A\x2A\x2A\x57\x8B\x01\xFF\x50\x2A\x83"
|
||||
"linux" "@_ZN9CCSPlayer12RoundRespawnEv"
|
||||
"mac" "@_ZN9CCSPlayer12RoundRespawnEv"
|
||||
}
|
||||
"SwitchTeam"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x2A\x56\x57\x8B\x7D\x2A\x57\x8B\xF1\xE8\x2A\x2A\x2A\x2A\x83\xC4"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x0C\x56\x8B\x75\x2A\x57\x8B\xF9\x85\xF6\x0F\x88\x2A\x2A\x2A\x2A\x3B\x35\x2A\x2A\x2A\x2A\x0F\x8D\x2A\x2A\x2A\x2A\xA1\x2A\x2A\x2A\x2A\x83"
|
||||
"linux" "@_ZN9CCSPlayer10SwitchTeamEi"
|
||||
"mac" "@_ZN9CCSPlayer10SwitchTeamEi"
|
||||
}
|
||||
"HandleCommand_Buy_Internal"
|
||||
"HandleCommand_Buy_Internal"//Wildcard first 6 bytes for getting address for weapon price.
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x81\x2A\x2A\x2A\x2A\x2A\x53\x56\x57\x6A\x00\x8B\xF1\xE8"
|
||||
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x81\xEC\x2A\x2A\x2A\x2A\x83\x3D\x2A\x2A\x2A\x2A\x00\x53\x56\x57\x8B\xF9"
|
||||
"linux" "@_ZN9CCSPlayer26HandleCommand_Buy_InternalEPKcib"
|
||||
"mac" "@_ZN9CCSPlayer26HandleCommand_Buy_InternalEPKcib"
|
||||
}
|
||||
"CSWeaponDrop"//Wildcard first 6 bytes for CS:S DM
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x53\x56\x8B\x75\x08\x57\x6A\x00\x68"
|
||||
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x81\xEC\x2A\x2A\x2A\x2A\x56\x8B\x75\x2A\x57\x6A\x00\x68"
|
||||
"linux" "@_ZN9CCSPlayer12CSWeaponDropEP17CBaseCombatWeaponbb"
|
||||
"mac" "@_ZN9CCSPlayer12CSWeaponDropEP17CBaseCombatWeaponbb"
|
||||
}
|
||||
"TerminateRound"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x2A\x53\x8B\xD9\x8B\x2A\x2A\x2A\x2A\x2A\x56\x57\x33\xFF\x89"
|
||||
"windows" "\x55\x8B\xEC\x83\x2A\x2A\x83\x2A\x2A\x53\x56\x8B\xF1\xF3\x0F\x2A\x2A\x2A\x2A\x57\x33\xFF\x89\x2A\x2A\x2A\xC7\x2A\x2A\x2A\x00\x00\x00\x00"
|
||||
"linux" "@_ZN12CCSGameRules14TerminateRoundEfi"
|
||||
"mac" "@_ZN12CCSGameRules14TerminateRoundEfi"
|
||||
}
|
||||
"GetTranslatedWeaponAlias"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x56\x57\x8B\x2A\x2A\x33\xF6\x8D\x9B\x2A\x2A\x2A\x2A\x8B\x04\xF5\x2A\x2A\x2A\x2A\x57\x50\xE8\x2A\x2A\x2A\x2A\x83\xC4\x2A\x85\xC0\x74\x2A\x46\x83\xFE\x2A\x72\x2A\x8B\xC7\x5F\x5E\x5D\xC3"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x08\x53\x33\xC0\x89\x4D\xF8\x56\x57\x89\x45\xFC\x33\xDB\x8B\xB3\x2A\x2A\x2A\x2A\x3B\xF1\x74\x2A\x8B\xF9\x90\x0F\xB6\x06\x0F\xB6\x17\x3B\xC2\x75\x2A\x85\xC0\x75\x2A\x8B\x45\xFC\x5F\x5E\x5B\x8B\x04\xC5\x2A\x2A\x2A\x2A\x8B\xE5\x5D\xC3\x85\xD2\x74\x2A\x8D\x48\xBF\x83\xF9\x19\x77\x2A\x83\xC0\x20\x8D\x4A\xBF\x83\xF9\x19\x77\x2A\x83\xC2\x20\x3B\xC2\x75\x2A\x0F\xB6\x46\x01\x83\xC6\x02\x0F\xB6\x57\x01\x83\xC7\x02\x3B\xC2\x75\x2A\x85\xC0\x75\x2A\x8B\x45\xFC\x5F\x5E\x5B\x8B\x04\xC5\x2A\x2A\x2A\x2A\x8B\xE5\x5D\xC3\x85\xD2\x74\x2A\x8D\x48\xBF\x83\xF9\x19\x77\x2A\x83\xC0\x20\x8D\x4A\xBF\x83\xF9\x19\x77\x2A\x83\xC2\x20\x3B\xC2\x0F\x84\x2A\x2A\x2A\x2A\x2B\xC2\x85\xC0\x74\x2A\xFF\x45\xFC\x83\xC3\x08\x8B\x4D\xF8\x81\xFB\xC0\x00\x00\x00\x0F\x82\x2A\x2A\x2A\x2A\x5F\x5E\x8B\xC1\x5B\x8B\xE5\x5D\xC3"
|
||||
"linux" "@_Z24GetTranslatedWeaponAliasPKc"
|
||||
"mac" "@_Z24GetTranslatedWeaponAliasPKc"
|
||||
}
|
||||
"GetWeaponInfo"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x8B\x4D\x2A\x33\xC0\x85\xC9\x74"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x08\x33\xC0\xEB\x2A\x8D\x9B\x00\x00\x00\x00\x39\x0C\xC5\x2A\x2A\x2A\x2A\x74\x2A\x40\x83\xF8\x38\x72\x2A\x33\xC0"
|
||||
"linux" "@_Z13GetWeaponInfo10CSWeaponID"
|
||||
"mac" "@_Z13GetWeaponInfo10CSWeaponID"
|
||||
}
|
||||
@@ -105,28 +118,28 @@
|
||||
"CheckWinLimit"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x2A\x56\x57\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\x81\xF9\x2A\x2A\x2A\x2A\x75\x2A\x8B"
|
||||
"windows" "\x55\x8B\xEC\x83\xE4\xF8\x83\xEC\x64\x53\x56\x57\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\x81\xF9"
|
||||
"linux" "@_ZN12CCSGameRules17CheckRestartRoundEv"
|
||||
"mac" "@_ZN12CCSGameRules17CheckRestartRoundEv"
|
||||
}
|
||||
"AliasToWeaponID"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x57\x8B\x2A\x2A\x85\xFF\x75\x2A\x33\xC0\x5F\x5D\xC3\x56\x33\xF6\x8B\x04\xF5"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x08\x57\x8B\xF9\x33\xC0"
|
||||
"linux" "@_Z15AliasToWeaponIDPKc"
|
||||
"mac" "@_Z15AliasToWeaponIDPKc"
|
||||
}
|
||||
"WeaponIDToAlias"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x8B\x4D\x08\x33\xC0\xEB\x2A\x8D\x9B\x00\x00\x00\x00\x39\x0C\xC5\x2A\x2A\x2A\x2A\x74\x2A\x40\x83\xF8\x38\x72\x2A\x33\xC0\x5D\xC3\x8B\x04\xC5\x2A\x2A\x2A\x2A\x6A\x5F"
|
||||
"windows" "\x33\xC0\x39\x0C\xC5\x2A\x2A\x2A\x2A\x74\x2A\x40\x83\xF8\x38\x72\x2A\x33\xC0\xC3\x6A\x5F"
|
||||
"linux" "@_Z15WeaponIDToAliasi"
|
||||
"mac" "@_Z15WeaponIDToAliasi"
|
||||
}
|
||||
"SetClanTag"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x8B\x2A\x2A\x85\xC0\x74\x2A\x6A\x10\x50\x81\xC1\x2A\x2A\x2A\x2A\x51"
|
||||
"windows" "\x55\x8B\xEC\x8B\x55\x08\x85\xD2\x74\x2A\x8D\x81\x1C\x20\x00\x00"
|
||||
"linux" "@_ZN9CCSPlayer10SetClanTagEPKc"
|
||||
"mac" "@_ZN9CCSPlayer10SetClanTagEPKc"
|
||||
}
|
||||
@@ -134,10 +147,17 @@
|
||||
"GetAttributeInt"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x08\x56\x57\x8B\xF1\x50\x8D\x4D\xFC\x51\xE8\x2A\x2A\x2A\x2A\x8B\x4D\x0C\x0F\x57\xC0\x8B\x7D\xFC\x83\xC4\x08\xF3\x0F\x11\x45\x08\x85\xC9\x74\x2A\x80\x2A\x2A\x00\x74\x2A\x57\x8D\x55\x08\x52\xE8\x2A\x2A\x2A\x2A\x84\xC0\x75\x2A\x57\x8B\xCE\xE8\x2A\x2A\x2A\x2A\x83\xF8\xFF\x74\x2A\x83\xF8\xFF\x7E\x2A\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x04\x81\x83\x2A\x2A\x05"
|
||||
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x83\xEC\x1C\x53\x8B\x5D\x0C\xC7\x44\x24\x04\x00\x00\x00\x00\x56\x8B\xF1\x89\x74\x24\x0C\x57\x8B\x7D\x08\x85\xDB\x74\x2A\x80\x7B\x44\x00\x74\x2A\x57\xE8\x2A\x2A\x2A\x2A\x8B\xC8\xE8\x2A\x2A\x2A\x2A\x89\x44\x24\x14\xE8\x2A\x2A\x2A\x2A\x8B\x70\x08\xE8\x2A\x2A\x2A\x2A\x3B\x70\x08\x74\x2A\x57\xE8\x2A\x2A\x2A\x2A\x8B\xC8\xE8\x2A\x2A\x2A\x2A\xEB\x2A\x8B\x44\x24\x14\x85\xC0\x74\x2A\x89\x44\x24\x1C\x8D\x4C\x24\x18\x8D\x44\x24\x0C\xC7\x44\x24\x18\x2A\x2A\x2A\x2A\x89\x44\x24\x20\x8B\x03\x51\x8B\xCB\xC6\x44\x24\x28\x00\xFF\x50\x2A\x80\x7C\x24\x24\x00\x74\x2A\x8B\x44\x24\x0C"
|
||||
"linux" "@_ZNK16FileWeaponInfo_t15GetAttributeIntEPKcPK13CEconItemView"
|
||||
"mac" "@_ZNK16FileWeaponInfo_t15GetAttributeIntEPKcPK13CEconItemView"
|
||||
}
|
||||
"SetModelFromClass"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x08\x56\x57\x8B\xF9\xC7\x45\xFC\x2A\x2A\x2A\x2A\x8B\x87"
|
||||
"linux" "@_ZN9CCSPlayer17SetModelFromClassEv"
|
||||
"mac" "@_ZN9CCSPlayer17SetModelFromClassEv"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,16 +183,16 @@
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
"CScoreBase" "m_bIsLookingAtWeapon"
|
||||
"CScoreBase" "m_bIsHoldingLookAtWeapon"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
"CScore"
|
||||
{
|
||||
"windows" "36"
|
||||
"linux" "36"
|
||||
"mac" "36"
|
||||
"windows" "55"
|
||||
"linux" "55"
|
||||
"mac" "55"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"TerminateRound"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x24\x53\x8B\x5D\x0C\x56\x57\x33\xFF"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x2A\x8B\x45\x2A\x53\x56\x57\x33\xFF"
|
||||
"linux" "@_ZN12CCSGameRules14TerminateRoundEfi"
|
||||
"mac" "@_ZN12CCSGameRules14TerminateRoundEfi"
|
||||
}
|
||||
@@ -138,6 +138,13 @@
|
||||
"linux" "@_ZN12CCSGameRules13CheckWinLimitEv"
|
||||
"mac" "@_ZN12CCSGameRules5ThinkEv"
|
||||
}
|
||||
"SetModelFromClass"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x2C\x89\x4D\xD4\x8B\x4D\xD4\xE8\x2A\x2A\x2A\x2A\x83\xF8\x02\x0F\x85\x2A\x2A\x2A\x2A\x8B"
|
||||
"linux" "@_ZN9CCSPlayer17SetModelFromClassEv"
|
||||
"mac" "@_ZN9CCSPlayer17SetModelFromClassEv"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+16
-25
@@ -19,8 +19,8 @@
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x51\x56\x8B\xF1\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x01\x8B\x2A\x2A\x2A\x2A\x2A\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x57\x6A\x2A\x8D\x2A\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\xC1\x2A\x2A\x24\x01\x0F\x2A\x2A\x2A\x2A\x2A\x8B"
|
||||
"linux" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase"
|
||||
"mac" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase"
|
||||
"linux" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBasef"
|
||||
"mac" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBasef"
|
||||
}
|
||||
"RemoveDisguise"
|
||||
{
|
||||
@@ -36,38 +36,17 @@
|
||||
"linux" "@_ZN15CTFPlayerShared8DisguiseEiiP9CTFPlayerb"
|
||||
"mac" "@_ZN15CTFPlayerShared8DisguiseEiiP9CTFPlayerb"
|
||||
}
|
||||
"CalcCritical"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_ZN13CTFWeaponBase26CalcIsAttackCriticalHelperEv"
|
||||
"mac" "@_ZN13CTFWeaponBase26CalcIsAttackCriticalHelperEv"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x2A\x56\x57\x6A\x00\x68\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\x6A\x00\x8B\xF1\xE8\x2A\x2A\x2A\x2A\x50\xE8\x2A\x2A\x2A\x2A\x8B\xF8\x83\xC4\x2A\x85\xFF\x74\x2A\x8B"
|
||||
}
|
||||
"CalcCriticalMelee"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_ZN18CTFWeaponBaseMelee26CalcIsAttackCriticalHelperEv"
|
||||
"mac" "@_ZN18CTFWeaponBaseMelee26CalcIsAttackCriticalHelperEv"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x08\x53\x56\x8B\xF1\xE8\x2A\x2A\x2A\x2A\x8B\xD8\x85\xDB\x74\x10"
|
||||
}
|
||||
"CalcCriticalBow"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_ZN14CTFCompoundBow26CalcIsAttackCriticalHelperEv"
|
||||
"mac" "@_ZN14CTFCompoundBow26CalcIsAttackCriticalHelperEv"
|
||||
"windows" "\xE8\x2A\x2A\x2A\x2A\x85\xC0\x74\x2A\x8D\x88\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x74\x2A\xB0"
|
||||
}
|
||||
"Regenerate"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x2A\xF3\x0F\x2A\x2A\x2A\x2A\x2A\x2A\x53\x56\x8B\xF1\x8B"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x2A\x53\x56\x8B\xF1\x8B\x06\x8B\x2A\x2A\x2A\x2A\x2A\x57\xFF\xD2\x8B\x8E\x2A\x2A\x2A\x2A\x8D\x9E"
|
||||
"linux" "@_ZN9CTFPlayer10RegenerateEb"
|
||||
"mac" "@_ZN9CTFPlayer10RegenerateEb"
|
||||
}
|
||||
"AddCondition"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x08\x53\x56\x8B\x75\x08\x57\x8B\xD9"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x08\x53\x8B\xD9\x83\xBB\x2A\x2A\x2A\x2A\x00\x0F"
|
||||
"linux" "@_ZN15CTFPlayerShared7AddCondE7ETFCondfP11CBaseEntity"
|
||||
"mac" "@_ZN15CTFPlayerShared7AddCondE7ETFCondfP11CBaseEntity"
|
||||
}
|
||||
@@ -136,6 +115,18 @@
|
||||
"linux" "325"
|
||||
"mac" "325"
|
||||
}
|
||||
"CalcIsAttackCriticalHelper"
|
||||
{
|
||||
"windows" "381"
|
||||
"linux" "388"
|
||||
"mac" "388"
|
||||
}
|
||||
"CalcIsAttackCriticalHelperNoCrits"
|
||||
{
|
||||
"windows" "382"
|
||||
"linux" "389"
|
||||
"mac" "389"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+18
-18
@@ -1,22 +1,22 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os.path
|
||||
|
||||
compiler = SM.DefaultCompiler()
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
||||
if builder.target_platform in ['windows', 'mac']:
|
||||
name = 'sourcemod_mm'
|
||||
extra_ldflags = []
|
||||
elif builder.target_platform == 'linux':
|
||||
name = 'sourcemod_mm_i486'
|
||||
extra_ldflags = ['-ldl']
|
||||
|
||||
if AMBuild.target['platform'] == 'windows' or AMBuild.target['platform'] == 'darwin':
|
||||
name = 'sourcemod_mm'
|
||||
elif AMBuild.target['platform'] == 'linux':
|
||||
name = 'sourcemod_mm_i486'
|
||||
compiler['POSTLINKFLAGS'].extend(['-ldl'])
|
||||
|
||||
loader = AMBuild.AddJob('loader')
|
||||
binary = Cpp.LibraryBuilder(name, AMBuild, loader, compiler)
|
||||
binary.AddSourceFiles('loader', [
|
||||
'loader.cpp'
|
||||
])
|
||||
SM.AutoVersion('loader', binary)
|
||||
SM.ExtractDebugInfo(loader, binary)
|
||||
binary.SendToJob()
|
||||
binary = SM.Library(builder, name)
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core'),
|
||||
os.path.join(SM.mms_root, 'sourcehook')
|
||||
]
|
||||
binary.compiler.linkflags += extra_ldflags
|
||||
binary.sources = [
|
||||
'loader.cpp'
|
||||
]
|
||||
|
||||
nodes = builder.Add(binary)
|
||||
SM.binaries += [nodes]
|
||||
|
||||
+58
-46
@@ -1,53 +1,65 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
import os.path
|
||||
import ambuild.osutil as osutil
|
||||
import ambuild.command as command
|
||||
|
||||
files = [
|
||||
'adminhelp.sp',
|
||||
'antiflood.sp',
|
||||
'basecomm.sp',
|
||||
'clientprefs.sp',
|
||||
'nextmap.sp',
|
||||
'reservedslots.sp',
|
||||
'adminmenu.sp',
|
||||
'basebans.sp',
|
||||
'basetriggers.sp',
|
||||
'funcommands.sp',
|
||||
'nominations.sp',
|
||||
'rockthevote.sp',
|
||||
'admin-sql-prefetch.sp',
|
||||
'basechat.sp',
|
||||
'basevotes.sp',
|
||||
'funvotes.sp',
|
||||
'playercommands.sp',
|
||||
'sounds.sp',
|
||||
'admin-sql-threaded.sp',
|
||||
'basecommands.sp',
|
||||
'mapchooser.sp',
|
||||
'randomcycle.sp',
|
||||
'sql-admin-manager.sp'
|
||||
]
|
||||
'adminhelp.sp',
|
||||
'antiflood.sp',
|
||||
'basecomm.sp',
|
||||
'clientprefs.sp',
|
||||
'nextmap.sp',
|
||||
'reservedslots.sp',
|
||||
'adminmenu.sp',
|
||||
'basebans.sp',
|
||||
'basetriggers.sp',
|
||||
'funcommands.sp',
|
||||
'nominations.sp',
|
||||
'rockthevote.sp',
|
||||
'admin-sql-prefetch.sp',
|
||||
'basechat.sp',
|
||||
'basevotes.sp',
|
||||
'funvotes.sp',
|
||||
'playercommands.sp',
|
||||
'sounds.sp',
|
||||
'admin-sql-threaded.sp',
|
||||
'basecommands.sp',
|
||||
'mapchooser.sp',
|
||||
'randomcycle.sp',
|
||||
'sql-admin-manager.sp'
|
||||
]
|
||||
|
||||
plugins = AMBuild.AddJob('plugins')
|
||||
spcomp_argv = [
|
||||
os.path.join(builder.buildPath, SM.spcomp.binary.path),
|
||||
'SM_GENERATED_BUILD=',
|
||||
'-i' + os.path.relpath(os.path.join(builder.buildPath, 'includes'),
|
||||
os.path.join(builder.buildPath, builder.buildFolder)),
|
||||
'-i' + os.path.relpath(os.path.join(builder.sourcePath, 'plugins', 'include'),
|
||||
os.path.join(builder.buildPath, builder.buildFolder)),
|
||||
'-h',
|
||||
]
|
||||
|
||||
spcomp = os.path.join(AMBuild.outputFolder, 'spcomp', 'spcomp')
|
||||
includes = os.path.relpath(os.path.join(AMBuild.sourceFolder, 'plugins', 'include'),
|
||||
os.path.join(AMBuild.outputFolder, 'plugins'))
|
||||
|
||||
versioninc = os.path.relpath(os.path.join(AMBuild.outputFolder, 'includes'),
|
||||
os.path.join(AMBuild.outputFolder, 'plugins'))
|
||||
|
||||
#This one has to be special
|
||||
sp = os.path.join(AMBuild.sourceFolder, 'plugins', 'admin-flatfile', 'admin-flatfile.sp')
|
||||
args = [spcomp, 'SM_GENERATED_BUILD=', '-i' + versioninc, '-i' + includes, sp]
|
||||
plugins.AddCommand(command.DirectCommand(args))
|
||||
|
||||
#Do the normal ones
|
||||
for file in files:
|
||||
sp = os.path.join(AMBuild.sourceFolder, 'plugins', file)
|
||||
args = [spcomp, 'SM_GENERATED_BUILD=', '-i' + versioninc, '-i' + includes, sp]
|
||||
plugins.AddCommand(command.DirectCommand(args))
|
||||
def build_plugin(script_path, smx_file):
|
||||
inputs = [
|
||||
SM.spcomp.binary,
|
||||
script_path,
|
||||
]
|
||||
outputs = [
|
||||
smx_file
|
||||
]
|
||||
argv = spcomp_argv + [script_path]
|
||||
cmd_entry, (smx_entry,) = builder.AddCommand(
|
||||
inputs = inputs,
|
||||
argv = argv,
|
||||
outputs = outputs,
|
||||
dep_type = 'msvc',
|
||||
weak_inputs = SM.generated_headers
|
||||
)
|
||||
SM.smx_files[smx_file] = smx_entry
|
||||
|
||||
for script_file in files:
|
||||
script_path = os.path.join(builder.currentSourcePath, script_file)
|
||||
smx_file = os.path.splitext(script_file)[0] + '.smx'
|
||||
build_plugin(script_path, smx_file)
|
||||
|
||||
# This one has to be special.
|
||||
build_plugin(os.path.join(builder.currentSourcePath, 'admin-flatfile', 'admin-flatfile.sp'),
|
||||
'admin-flatfile.smx')
|
||||
|
||||
@@ -72,7 +72,7 @@ public bool:OnClientFloodCheck(client)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (g_LastTime[client] > GetGameTime())
|
||||
if (g_LastTime[client] >= GetGameTime())
|
||||
{
|
||||
/* If player has 3 or more flood tokens, block their message */
|
||||
if (g_FloodTokens[client] >= 3)
|
||||
@@ -95,7 +95,7 @@ public OnClientFloodResult(client, bool:blocked)
|
||||
new Float:curTime = GetGameTime();
|
||||
new Float:newTime = curTime + max_chat;
|
||||
|
||||
if (g_LastTime[client] > curTime)
|
||||
if (g_LastTime[client] >= curTime)
|
||||
{
|
||||
/* If the last message was blocked, update their time limit */
|
||||
if (blocked)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user