Add support for Source SDK Base 2013 (bug 5917, r=asherkin).
1.1 --- a/AMBuildScript Wed Oct 09 09:12:46 2013 -0400
1.2 +++ b/AMBuildScript Sun Oct 13 14:14:51 2013 -0400
1.3 @@ -38,48 +38,51 @@
1.4 self.possibleSdks['ep2'] = {'sdk': 'HL2SDKOB', 'ext': '2.ep2', 'def': '3',
1.5 'name': 'ORANGEBOX', 'platform': ['windows', 'linux'],
1.6 'dir': 'hl2sdk-ob'}
1.7 - self.possibleSdks['css'] = {'sdk': 'HL2SDKCSS', 'ext': '2.css', 'def': '6',
1.8 + self.possibleSdks['css'] = {'sdk': 'HL2SDKCSS', 'ext': '2.css', 'def': '6',
1.9 'name': 'CSS', 'platform': ['windows', 'linux', 'darwin'],
1.10 'dir': 'hl2sdk-css'}
1.11 - self.possibleSdks['hl2dm'] = {'sdk': 'HL2SDKHL2DM', 'ext': '2.hl2dm', 'def': '7',
1.12 + self.possibleSdks['hl2dm'] = {'sdk': 'HL2SDKHL2DM', 'ext': '2.hl2dm', 'def': '7',
1.13 'name': 'HL2DM', 'platform': ['windows', 'linux', 'darwin'],
1.14 'dir': 'hl2sdk-hl2dm'}
1.15 - self.possibleSdks['dods'] = {'sdk': 'HL2SDKDODS', 'ext': '2.dods', 'def': '8',
1.16 + self.possibleSdks['dods'] = {'sdk': 'HL2SDKDODS', 'ext': '2.dods', 'def': '8',
1.17 'name': 'DODS', 'platform': ['windows', 'linux', 'darwin'],
1.18 'dir': 'hl2sdk-dods'}
1.19 - self.possibleSdks['tf2'] = {'sdk': 'HL2SDKTF2', 'ext': '2.tf2', 'def': '9',
1.20 + self.possibleSdks['sdk2013'] = {'sdk': 'HL2SDK2013', 'ext': '2.sdk2013', 'def': '9',
1.21 + 'name': 'SDK2013', 'platform': ['windows', 'linux', 'darwin'],
1.22 + 'dir': 'hl2sdk-2013'}
1.23 + self.possibleSdks['tf2'] = {'sdk': 'HL2SDKTF2', 'ext': '2.tf2', 'def': '10',
1.24 'name': 'TF2', 'platform': ['windows', 'linux', 'darwin'],
1.25 'dir': 'hl2sdk-tf2'}
1.26 - self.possibleSdks['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '10',
1.27 + self.possibleSdks['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '11',
1.28 'name': 'LEFT4DEAD', 'platform': ['windows', 'linux', 'darwin'],
1.29 'dir': 'hl2sdk-l4d'}
1.30 - self.possibleSdks['nd'] = {'sdk': 'HL2SDKND', 'ext': '2.nd', 'def': '11',
1.31 + self.possibleSdks['nd'] = {'sdk': 'HL2SDKND', 'ext': '2.nd', 'def': '12',
1.32 'name': 'NUCLEARDAWN', 'platform': ['windows', 'linux', 'darwin'],
1.33 'dir': 'hl2sdk-nd'}
1.34 - self.possibleSdks['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '12',
1.35 + self.possibleSdks['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '13',
1.36 'name': 'LEFT4DEAD2', 'platform': ['windows', 'linux', 'darwin'],
1.37 'dir': 'hl2sdk-l4d2'}
1.38 - self.possibleSdks['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2',
1.39 + self.possibleSdks['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2',
1.40 'name': 'DARKMESSIAH', 'platform': ['windows'],
1.41 'dir': 'hl2sdk-darkm'}
1.42 - self.possibleSdks['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '13',
1.43 + self.possibleSdks['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '14',
1.44 'name': 'ALIENSWARM', 'platform': ['windows'],
1.45 'dir': 'hl2sdk-swarm'}
1.46 - self.possibleSdks['bgt'] = {'sdk': 'HL2SDK-BGT', 'ext': '2.bgt', 'def': '4',
1.47 + self.possibleSdks['bgt'] = {'sdk': 'HL2SDK-BGT', 'ext': '2.bgt', 'def': '4',
1.48 'name': 'BLOODYGOODTIME', 'platform': ['windows'],
1.49 'dir': 'hl2sdk-bgt'}
1.50 - self.possibleSdks['eye'] = {'sdk': 'HL2SDK-EYE', 'ext': '2.eye', 'def': '5',
1.51 + self.possibleSdks['eye'] = {'sdk': 'HL2SDK-EYE', 'ext': '2.eye', 'def': '5',
1.52 'name': 'EYE', 'platform': ['windows'],
1.53 'dir': 'hl2sdk-eye'}
1.54 - self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '15',
1.55 + self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '16',
1.56 'name': 'CSGO', 'platform': ['windows', 'linux', 'darwin'],
1.57 'dir': 'hl2sdk-csgo'}
1.58 - self.possibleSdks['dota'] = {'sdk': 'HL2SDKDOTA', 'ext': '2.dota', 'def': '16',
1.59 + self.possibleSdks['dota'] = {'sdk': 'HL2SDKDOTA', 'ext': '2.dota', 'def': '17',
1.60 'name': 'DOTA', 'platform': ['windows'],
1.61 'dir': 'hl2sdk-dota'}
1.62 - # self.possibleSdks['portal2'] = {'sdk': 'HL2SDK-PORTAL2', 'ext': '2.portal2', 'def': '14',
1.63 - # 'name': 'PORTAL2', 'platform': ['windows'],
1.64 - # 'dir': 'hl2sdk-portal2'}
1.65 + self.possibleSdks['portal2'] = {'sdk': 'HL2SDKPORTAL2','ext': '2.portal2', 'def': '15',
1.66 + 'name': 'PORTAL2', 'platform': [],
1.67 + 'dir': 'hl2sdk-portal2'}
1.68
1.69 self.sdkInfo = { }
1.70
1.71 @@ -322,42 +325,38 @@
1.72 if AMBuild.target['platform'] == 'linux':
1.73 if sdk == 'ep1':
1.74 staticLibs = os.path.join(sdkPath, 'linux_sdk')
1.75 + elif sdk == 'sdk2013':
1.76 + staticLibs = os.path.join(sdkPath, 'lib', 'public', 'linux32')
1.77 else:
1.78 staticLibs = os.path.join(sdkPath, 'lib', 'linux')
1.79 workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
1.80 + libs = []
1.81 if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'l4d2']:
1.82 libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib_srv.so', 'libtier0_srv.so']
1.83 - for lib in libs:
1.84 - link = os.path.join(workFolder, lib)
1.85 - target = os.path.join(staticLibs, lib)
1.86 - try:
1.87 - os.lstat(link)
1.88 - except:
1.89 - job.AddCommand(SymlinkCommand(link, target))
1.90 elif sdk in ['l4d', 'nd', 'csgo']:
1.91 libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.so', 'libtier0.so']
1.92 if sdk == 'csgo':
1.93 libs.append('interfaces_i486.a')
1.94 - for lib in libs:
1.95 - link = os.path.join(workFolder, lib)
1.96 - target = os.path.join(staticLibs, lib)
1.97 - try:
1.98 - os.lstat(link)
1.99 - except:
1.100 - job.AddCommand(SymlinkCommand(link, target))
1.101 + elif sdk == 'sdk2013':
1.102 + libs = ['tier1.a', 'mathlib.a', 'libvstdlib_srv.so', 'libtier0_srv.so']
1.103 else:
1.104 libs = ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_i486.so', 'tier0_i486.so']
1.105 - for lib in libs:
1.106 - link = os.path.join(workFolder, lib)
1.107 - target = os.path.join(staticLibs, lib)
1.108 - try:
1.109 - os.lstat(link)
1.110 - except:
1.111 - job.AddCommand(SymlinkCommand(link, target))
1.112 +
1.113 + for lib in libs:
1.114 + link = os.path.join(workFolder, lib)
1.115 + target = os.path.join(staticLibs, lib)
1.116 + try:
1.117 + os.lstat(link)
1.118 + except:
1.119 + job.AddCommand(SymlinkCommand(link, target))
1.120 elif AMBuild.target['platform'] == 'darwin':
1.121 - staticLibs = os.path.join(sdkPath, 'lib', 'mac')
1.122 + if sdk == 'sdk2013':
1.123 + staticLibs = os.path.join(sdkPath, 'lib', 'public', 'osx32')
1.124 + libs = ['tier1.a', 'mathlib.a', 'libvstdlib.dylib', 'libtier0.dylib']
1.125 + else:
1.126 + staticLibs = os.path.join(sdkPath, 'lib', 'mac')
1.127 + libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.dylib', 'libtier0.dylib']
1.128 workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
1.129 - libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.dylib', 'libtier0.dylib']
1.130 if sdk == 'csgo':
1.131 libs.append('interfaces_i486.a')
1.132 for lib in libs:
1.133 @@ -378,7 +377,11 @@
1.134
1.135 def PostSetupHL2Job(self, job, builder, sdk):
1.136 if AMBuild.target['platform'] in ['linux', 'darwin']:
1.137 - builder.AddObjectFiles(['tier1_i486.a', 'mathlib_i486.a'])
1.138 + if sdk == 'sdk2013':
1.139 + builder.AddObjectFiles(['tier1.a', 'mathlib.a'])
1.140 + else:
1.141 + builder.AddObjectFiles(['tier1_i486.a', 'mathlib_i486.a'])
1.142 +
1.143 if sdk == 'csgo':
1.144 builder.AddObjectFiles(['interfaces_i486.a'])
1.145
1.146 @@ -394,10 +397,6 @@
1.147
1.148 info = self.possibleSdks
1.149 compiler['CDEFINES'].extend(['SE_' + info[i]['name'] + '=' + info[i]['def'] for i in info])
1.150 -
1.151 - # We don't build for Portal 2 (yet?, ever?), but using this define in code as
1.152 - # it saves trouble if we ever need to
1.153 - compiler['CDEFINES'].append('SE_PORTAL2=14')
1.154
1.155 paths = [['public'], ['public', 'engine'], ['public', 'mathlib'], ['public', 'vstdlib'],
1.156 ['public', 'tier0'], ['public', 'tier1']]
1.157 @@ -414,6 +413,13 @@
1.158 sdkPath = AMBuild.cache[info['sdk']]
1.159
1.160 compiler['CDEFINES'].append('SOURCE_ENGINE=' + info['def'])
1.161 +
1.162 + if sdk == 'sdk2013' and isinstance(compiler.cxx, Cpp.CompatGCC):
1.163 + # The 2013 SDK already has these in public/tier0/basetypes.h
1.164 + compiler['CDEFINES'].remove('stricmp=strcasecmp')
1.165 + compiler['CDEFINES'].remove('_stricmp=strcasecmp')
1.166 + compiler['CDEFINES'].remove('_snprintf=snprintf')
1.167 + compiler['CDEFINES'].remove('_vsnprintf=vsnprintf')
1.168
1.169 if sdk in ['swarm','csgo','dota']:
1.170 if AMBuild.target['platform'] == 'windows':
1.171 @@ -421,13 +427,24 @@
1.172 else:
1.173 compiler['CDEFINES'].extend(['COMPILER_GCC'])
1.174
1.175 - if sdk == 'ep1':
1.176 - if AMBuild.target['platform'] == 'linux':
1.177 + if sdk == 'sdk2013' and AMBuild.target['platform'] == 'darwin':
1.178 + compiler['POSTLINKFLAGS'].append('-liconv')
1.179 +
1.180 + if sdk in ['css','hl2dm','dods','sdk2013','tf2','l4d2']:
1.181 + if AMBuild.target['platform'] == 'linux' or AMBuild.target['platform'] == 'darwin':
1.182 + compiler['CDEFINES'].append('NO_MALLOC_OVERRIDE')
1.183 +
1.184 + if AMBuild.target['platform'] == 'linux':
1.185 + if sdk == 'ep1':
1.186 staticLibs = os.path.join(sdkPath, 'linux_sdk')
1.187 - else:
1.188 - if AMBuild.target['platform'] == 'linux':
1.189 + elif sdk == 'sdk2013':
1.190 + staticLibs = os.path.join(sdkPath, 'lib', 'public', 'linux32')
1.191 + else:
1.192 staticLibs = os.path.join(sdkPath, 'lib', 'linux')
1.193 - elif AMBuild.target['platform'] == 'darwin':
1.194 + elif AMBuild.target['platform'] == 'darwin':
1.195 + if sdk == 'sdk2013':
1.196 + staticLibs = os.path.join(sdkPath, 'lib', 'public', 'osx32')
1.197 + else:
1.198 staticLibs = os.path.join(sdkPath, 'lib', 'mac')
1.199
1.200 for i in paths:
1.201 @@ -436,7 +453,7 @@
1.202 if not noLink:
1.203 if AMBuild.target['platform'] == 'linux':
1.204 compiler['POSTLINKFLAGS'][0:0] = ['-lm']
1.205 - if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'l4d2']:
1.206 + if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'l4d2']:
1.207 compiler['POSTLINKFLAGS'][0:0] = ['libtier0_srv.so']
1.208 compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib_srv.so']
1.209 elif sdk in ['l4d', 'nd', 'csgo']:
2.1 --- a/core/HalfLife2.cpp Wed Oct 09 09:12:46 2013 -0400
2.2 +++ b/core/HalfLife2.cpp Sun Oct 13 14:14:51 2013 -0400
2.3 @@ -58,7 +58,7 @@
2.4 #define TIER0_NAME "libtier0.dylib"
2.5 #define VSTDLIB_NAME "libvstdlib.dylib"
2.6 #elif defined __linux__
2.7 -#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_LEFT4DEAD2
2.8 +#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_LEFT4DEAD2
2.9 #define TIER0_NAME "libtier0_srv.so"
2.10 #define VSTDLIB_NAME "libvstdlib_srv.so"
2.11 #elif SOURCE_ENGINE >= SE_LEFT4DEAD
3.1 --- a/core/MenuStyle_Base.cpp Wed Oct 09 09:12:46 2013 -0400
3.2 +++ b/core/MenuStyle_Base.cpp Sun Oct 13 14:14:51 2013 -0400
3.3 @@ -338,7 +338,7 @@
3.4 #endif
3.5 0,
3.6 PITCH_NORM,
3.7 -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
3.8 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
3.9 0,
3.10 #endif
3.11 &pos);
4.1 --- a/core/logic_bridge.cpp Wed Oct 09 09:12:46 2013 -0400
4.2 +++ b/core/logic_bridge.cpp Sun Oct 13 14:14:51 2013 -0400
4.3 @@ -219,6 +219,8 @@
4.4 return "hl2dm";
4.5 #elif SOURCE_ENGINE == SE_DODS
4.6 return "dods";
4.7 +#elif SOURCE_ENGINE == SE_SDK2013
4.8 + return "sdk2013";
4.9 #elif SOURCE_ENGINE == SE_TF2
4.10 return "tf2";
4.11 #elif SOURCE_ENGINE == SE_LEFT4DEAD
4.12 @@ -240,7 +242,16 @@
4.13
4.14 static bool symbols_are_hidden()
4.15 {
4.16 -#if (SOURCE_ENGINE == SE_CSS) || (SOURCE_ENGINE == SE_HL2DM) || (SOURCE_ENGINE == SE_DODS) || (SOURCE_ENGINE == SE_TF2) || (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_NUCLEARDAWN) || (SOURCE_ENGINE == SE_LEFT4DEAD2) || (SOURCE_ENGINE == SE_CSGO) || (SOURCE_ENGINE == SE_DOTA)
4.17 +#if (SOURCE_ENGINE == SE_CSS) \
4.18 + || (SOURCE_ENGINE == SE_HL2DM) \
4.19 + || (SOURCE_ENGINE == SE_DODS) \
4.20 + || (SOURCE_ENGINE == SE_SDK2013) \
4.21 + || (SOURCE_ENGINE == SE_TF2) \
4.22 + || (SOURCE_ENGINE == SE_LEFT4DEAD) \
4.23 + || (SOURCE_ENGINE == SE_NUCLEARDAWN) \
4.24 + || (SOURCE_ENGINE == SE_LEFT4DEAD2) \
4.25 + || (SOURCE_ENGINE == SE_CSGO) \
4.26 + || (SOURCE_ENGINE == SE_DOTA)
4.27 return true;
4.28 #else
4.29 return false;
4.30 @@ -345,6 +356,8 @@
4.31 #define GAMEFIX "2.hl2dm"
4.32 #elif SOURCE_ENGINE == SE_DODS
4.33 #define GAMEFIX "2.dods"
4.34 +#elif SOURCE_ENGINE == SE_SDK2013
4.35 +#define GAMEFIX "2.sdk2013"
4.36 #elif SOURCE_ENGINE == SE_TF2
4.37 #define GAMEFIX "2.tf2"
4.38 #elif SOURCE_ENGINE == SE_DARKMESSIAH
5.1 --- a/core/smn_entities.cpp Wed Oct 09 09:12:46 2013 -0400
5.2 +++ b/core/smn_entities.cpp Sun Oct 13 14:14:51 2013 -0400
5.3 @@ -1254,7 +1254,7 @@
5.4 is_unsigned = ((pProp->GetFlags() & SPROP_UNSIGNED) == SPROP_UNSIGNED);
5.5
5.6 // This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
5.7 -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
5.8 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
5.9 if (pProp->GetFlags() & SPROP_VARINT)
5.10 {
5.11 bit_count = sizeof(int) * 8;
5.12 @@ -1352,7 +1352,7 @@
5.13 FIND_PROP_SEND(DPT_Int, "integer");
5.14
5.15 // This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
5.16 -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
5.17 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
5.18 if (pProp->GetFlags() & SPROP_VARINT)
5.19 {
5.20 bit_count = sizeof(int) * 8;
5.21 @@ -2074,7 +2074,7 @@
5.22 #if SOURCE_ENGINE == SE_ALIENSWARM
5.23 case FL_FREEZING:
5.24 return ENTFLAG_FREEZING;
5.25 -#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
5.26 +#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
5.27 case FL_EP2V_UNKNOWN:
5.28 return ENTFLAG_EP2V_UNKNOWN1;
5.29 #endif
5.30 @@ -2152,7 +2152,7 @@
5.31 #if SOURCE_ENGINE == SE_ALIENSWARM
5.32 case ENTFLAG_FREEZING:
5.33 return FL_FREEZING;
5.34 -#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
5.35 +#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
5.36 case ENTFLAG_EP2V_UNKNOWN1:
5.37 return FL_EP2V_UNKNOWN;
5.38 #endif
6.1 --- a/core/smn_halflife.cpp Wed Oct 09 09:12:46 2013 -0400
6.2 +++ b/core/smn_halflife.cpp Sun Oct 13 14:14:51 2013 -0400
6.3 @@ -497,6 +497,7 @@
6.4 case SOURCE_ENGINE_HL2DM:
6.5 case SOURCE_ENGINE_DODS:
6.6 case SOURCE_ENGINE_TF2:
6.7 + case SOURCE_ENGINE_SDK2013:
6.8 return 35;
6.9 case SOURCE_ENGINE_LEFT4DEAD:
6.10 return 40;
7.1 --- a/extensions/sdktools/hooks.cpp Wed Oct 09 09:12:46 2013 -0400
7.2 +++ b/extensions/sdktools/hooks.cpp Sun Oct 13 14:14:51 2013 -0400
7.3 @@ -32,6 +32,12 @@
7.4 #include "hooks.h"
7.5 #include "extension.h"
7.6
7.7 +#include "basehandle.h"
7.8 +#include "vector.h"
7.9 +#include "utlvector.h"
7.10 +#include <shareddefs.h>
7.11 +#include "usercmd.h"
7.12 +
7.13 #define FEATURECAP_PLAYERRUNCMD_11PARAMS "SDKTools PlayerRunCmd 11Params"
7.14
7.15 CHookManager g_Hooks;
8.1 --- a/extensions/sdktools/hooks.h Wed Oct 09 09:12:46 2013 -0400
8.2 +++ b/extensions/sdktools/hooks.h Sun Oct 13 14:14:51 2013 -0400
8.3 @@ -32,12 +32,8 @@
8.4 #ifndef _INCLUDE_HOOKS_H_
8.5 #define _INCLUDE_HOOKS_H_
8.6
8.7 -#include "basehandle.h"
8.8 -#undef ARRAYSIZE
8.9 -#include "vector.h"
8.10 -#include "utlvector.h"
8.11 -#include <shareddefs.h>
8.12 -#include "usercmd.h"
8.13 +class CUserCmd;
8.14 +
8.15 #include "extension.h"
8.16
8.17 class CHookManager : IPluginsListener, IFeatureProvider
9.1 --- a/extensions/sdktools/vcaller.cpp Wed Oct 09 09:12:46 2013 -0400
9.2 +++ b/extensions/sdktools/vcaller.cpp Sun Oct 13 14:14:51 2013 -0400
9.3 @@ -129,7 +129,15 @@
9.4 {
9.5 return 0;
9.6 }
9.7 -#if (SOURCE_ENGINE == SE_CSS) || (SOURCE_ENGINE == SE_HL2DM) || (SOURCE_ENGINE == SE_DODS) || (SOURCE_ENGINE == SE_TF2) || (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2) || (SOURCE_ENGINE == SE_NUCLEARDAWN) || (SOURCE_ENGINE == SE_CSGO)
9.8 +#if SOURCE_ENGINE == SE_CSS \
9.9 + || SOURCE_ENGINE == SE_HL2DM \
9.10 + || SOURCE_ENGINE == SE_DODS \
9.11 + || SOURCE_ENGINE == SE_SDK2013 \
9.12 + || SOURCE_ENGINE == SE_TF2 \
9.13 + || SOURCE_ENGINE == SE_LEFT4DEAD \
9.14 + || SOURCE_ENGINE == SE_LEFT4DEAD2 \
9.15 + || SOURCE_ENGINE == SE_NUCLEARDAWN \
9.16 + || SOURCE_ENGINE == SE_CSGO
9.17 s_call_addr = memutils->ResolveSymbol(handle, &sig[1]);
9.18 #else
9.19 s_call_addr = dlsym(handle, &sig[1]);
10.1 --- a/extensions/sdktools/vnatives.cpp Wed Oct 09 09:12:46 2013 -0400
10.2 +++ b/extensions/sdktools/vnatives.cpp Sun Oct 13 14:14:51 2013 -0400
10.3 @@ -566,7 +566,7 @@
10.4 CellRecipientFilter rf;
10.5 rf.SetToReliable(true);
10.6 rf.Initialize(player_list, total_players);
10.7 -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
10.8 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
10.9 engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, 0, &pos);
10.10 #elif SOURCE_ENGINE < SE_PORTAL2
10.11 engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, &pos);
11.1 --- a/extensions/sdktools/vsound.cpp Wed Oct 09 09:12:46 2013 -0400
11.2 +++ b/extensions/sdktools/vsound.cpp Sun Oct 13 14:14:51 2013 -0400
11.3 @@ -41,7 +41,7 @@
11.4 #if SOURCE_ENGINE >= SE_PORTAL2
11.5 SH_DECL_HOOK17(IEngineSound, EmitSound, SH_NOATTRIB, 0, int, IRecipientFilter &, int, int, const char *, unsigned int, const char *, float, float, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
11.6 SH_DECL_HOOK17(IEngineSound, EmitSound, SH_NOATTRIB, 1, int, IRecipientFilter &, int, int, const char *, unsigned int, const char *, float, soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
11.7 -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
11.8 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
11.9 SH_DECL_HOOK15_void(IEngineSound, EmitSound, SH_NOATTRIB, 0, IRecipientFilter &, int, int, const char *, float, float, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
11.10 SH_DECL_HOOK15_void(IEngineSound, EmitSound, SH_NOATTRIB, 1, IRecipientFilter &, int, int, const char *, float, soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
11.11 #else
11.12 @@ -288,7 +288,7 @@
11.13 float flVolume, soundlevel_t iSoundlevel, int nSeed, int iFlags, int iPitch, const Vector *pOrigin,
11.14 const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
11.15 float soundtime, int speakerentity)
11.16 -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
11.17 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
11.18 void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
11.19 float flVolume, soundlevel_t iSoundlevel, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
11.20 const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
11.21 @@ -349,7 +349,7 @@
11.22 (crf, iEntIndex, iChannel, buffer, -1, buffer, flVolume, iSoundlevel, nSeed, iFlags, iPitch, pOrigin,
11.23 pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
11.24 );
11.25 -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
11.26 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
11.27 RETURN_META_NEWPARAMS(
11.28 MRES_IGNORED,
11.29 static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float, soundlevel_t,
11.30 @@ -380,7 +380,7 @@
11.31 float flVolume, float flAttenuation, int nSeed, int iFlags, int iPitch, const Vector *pOrigin,
11.32 const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
11.33 float soundtime, int speakerentity)
11.34 -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
11.35 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
11.36 void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
11.37 float flVolume, float flAttenuation, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
11.38 const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
11.39 @@ -442,7 +442,7 @@
11.40 (crf, iEntIndex, iChannel, buffer, -1, buffer, flVolume, SNDLVL_TO_ATTN(static_cast<soundlevel_t>(sndlevel)),
11.41 nSeed, iFlags, iPitch, pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
11.42 );
11.43 -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
11.44 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
11.45 RETURN_META_NEWPARAMS(
11.46 MRES_IGNORED,
11.47 static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char *, float, float,
11.48 @@ -711,7 +711,7 @@
11.49 soundtime,
11.50 speakerentity);
11.51 }
11.52 -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
11.53 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
11.54 if (g_InSoundHook)
11.55 {
11.56 SH_CALL(enginesoundPatch,
11.57 @@ -839,7 +839,7 @@
11.58 soundtime,
11.59 speakerentity);
11.60 }
11.61 -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
11.62 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
11.63 if (g_InSoundHook)
11.64 {
11.65 SH_CALL(enginesoundPatch,
11.66 @@ -1012,7 +1012,7 @@
11.67 #endif
11.68 flags,
11.69 pitch,
11.70 -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
11.71 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
11.72 0,
11.73 #endif
11.74 pOrigin,
12.1 --- a/extensions/sdktools/vsound.h Wed Oct 09 09:12:46 2013 -0400
12.2 +++ b/extensions/sdktools/vsound.h Sun Oct 13 14:14:51 2013 -0400
12.3 @@ -67,7 +67,7 @@
12.4 const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
12.5 float soundtime, int speakerentity);
12.6 #else
12.7 -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
12.8 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
12.9
12.10 void OnEmitSound(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume,
12.11 soundlevel_t iSoundlevel, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
12.12 @@ -86,7 +86,7 @@
12.13 float flAttenuation, int iFlags, int iPitch, const Vector *pOrigin,
12.14 const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
12.15 float soundtime, int speakerentity);
12.16 -#endif // SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
12.17 +#endif // SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2
12.18 #endif // SOURCE_ENGINE >= SE_PORTAL2
12.19 private:
12.20 size_t _FillInPlayers(int *pl_array, IRecipientFilter *pFilter);
13.1 --- a/loader/loader.cpp Wed Oct 09 09:12:46 2013 -0400
13.2 +++ b/loader/loader.cpp Sun Oct 13 14:14:51 2013 -0400
13.3 @@ -80,6 +80,7 @@
13.4 #define FILENAME_1_6_CSS "sourcemod.2.css" PLATFORM_EXT
13.5 #define FILENAME_1_6_HL2DM "sourcemod.2.hl2dm" PLATFORM_EXT
13.6 #define FILENAME_1_6_DODS "sourcemod.2.dods" PLATFORM_EXT
13.7 +#define FILENAME_1_6_SDK2013 "sourcemod.2.sdk2013" PLATFORM_EXT
13.8 #define FILENAME_1_6_TF2 "sourcemod.2.tf2" PLATFORM_EXT
13.9 #define FILENAME_1_6_ND "sourcemod.2.nd" PLATFORM_EXT
13.10 #define FILENAME_1_6_DOTA "sourcemod.2.dota" PLATFORM_EXT
13.11 @@ -297,6 +298,11 @@
13.12 filename = FILENAME_1_6_DODS;
13.13 break;
13.14 }
13.15 + case SOURCE_ENGINE_SDK2013:
13.16 + {
13.17 + filename = FILENAME_1_6_SDK2013;
13.18 + break;
13.19 + }
13.20 case SOURCE_ENGINE_TF2:
13.21 {
13.22 filename = FILENAME_1_6_TF2;
14.1 --- a/plugins/include/halflife.inc Wed Oct 09 09:12:46 2013 -0400
14.2 +++ b/plugins/include/halflife.inc Sun Oct 13 14:14:51 2013 -0400
14.3 @@ -83,7 +83,8 @@
14.4 Engine_HL2DM, /**< Half-Life 2 Deathmatch */
14.5 Engine_DODS, /**< Day of Defeat: Source */
14.6 Engine_TF2, /**< Team Fortress 2 */
14.7 - Engine_NuclearDawn /**< Nuclear Dawn */
14.8 + Engine_NuclearDawn, /**< Nuclear Dawn */
14.9 + Engine_SDK2013, /**< Source SDK 2013 */
14.10 };
14.11
14.12 #define INVALID_ENT_REFERENCE 0xFFFFFFFF