Compare commits
164
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4acbd45a34 | ||
|
|
c46a4e0a41 | ||
|
|
4916b99c1a | ||
|
|
012d58cc29 | ||
|
|
e7344c6b62 | ||
|
|
e41c7fddca | ||
|
|
4b1d372004 | ||
|
|
d120789a23 | ||
|
|
154be77ccb | ||
|
|
d5d620340d | ||
|
|
4c29a78f56 | ||
|
|
f05b9ef600 | ||
|
|
6a8e6837a7 | ||
|
|
d9bfdd3ae4 | ||
|
|
0c29170bba | ||
|
|
7f2765af9b | ||
|
|
51ae63bd78 | ||
|
|
f37c188b5a | ||
|
|
34ae5da0cb | ||
|
|
365dee321f | ||
|
|
aea5ad1459 | ||
|
|
2aa592ae2f | ||
|
|
fef508156b | ||
|
|
9347be33c3 | ||
|
|
52ed344653 | ||
|
|
a25b9d4b53 | ||
|
|
9e0590e12f | ||
|
|
f6b9b99abe | ||
|
|
2b5bf29dfc | ||
|
|
ee7413bbdd | ||
|
|
764d63a533 | ||
|
|
bcbff0b2e9 | ||
|
|
35b74715d8 | ||
|
|
e0639de6a0 | ||
|
|
f025fd8a05 | ||
|
|
625848b95d | ||
|
|
2de9d5f9cb | ||
|
|
ab15436a7f | ||
|
|
e507aa5025 | ||
|
|
8b205b0d5d | ||
|
|
e4e54510c8 | ||
|
|
d706023c74 | ||
|
|
8df27acc1f | ||
|
|
4c5c2eae24 | ||
|
|
bc4eecae8f | ||
|
|
218b9b1fab | ||
|
|
0750b93797 | ||
|
|
41b0e7fc53 | ||
|
|
801815b742 | ||
|
|
01a826268b | ||
|
|
55ec20b215 | ||
|
|
dc550c25e5 | ||
|
|
ad842e4665 | ||
|
|
f7398119f4 | ||
|
|
b21337c56d | ||
|
|
c1d040e153 | ||
|
|
4c3fb52c69 | ||
|
|
31c29fb33e | ||
|
|
87af9af0f6 | ||
|
|
ebb26e6144 | ||
|
|
50c15f4f78 | ||
|
|
e02bdca793 | ||
|
|
8bcbe128e7 | ||
|
|
68991bc733 | ||
|
|
d77d1de462 | ||
|
|
e1081c0a50 | ||
|
|
2b3f888712 | ||
|
|
b8e530ab7e | ||
|
|
274539cf49 | ||
|
|
6e92d0df4f | ||
|
|
1bb5f0e52b | ||
|
|
1af3446593 | ||
|
|
b70b8cf0cb | ||
|
|
8dca4bf093 | ||
|
|
a7d170bf13 | ||
|
|
f5865ee46f | ||
|
|
adac0f17c4 | ||
|
|
b8b9e4db90 | ||
|
|
5fdb4d05fa | ||
|
|
93768cfd4d | ||
|
|
8cdd3faa89 | ||
|
|
98dee0097a | ||
|
|
090cc9f818 | ||
|
|
9abbe96a7f | ||
|
|
3aeab98517 | ||
|
|
11daaac1b4 | ||
|
|
15c5ed1dd3 | ||
|
|
1bb9adc767 | ||
|
|
dd83c23cda | ||
|
|
e8a6040926 | ||
|
|
5ff8ec62e0 | ||
|
|
1f06a6951d | ||
|
|
d65f993c53 | ||
|
|
c5e37e15e6 | ||
|
|
c4473acc4e | ||
|
|
8e845b0a33 | ||
|
|
26c3193653 | ||
|
|
ee19cf4045 | ||
|
|
fca7c4f4a3 | ||
|
|
b811336c1e | ||
|
|
3fc3ab4372 | ||
|
|
6434cc7bf0 | ||
|
|
d8e3e7e11d | ||
|
|
061a958b9f | ||
|
|
294afcca2a | ||
|
|
e8834ed9cb | ||
|
|
a37e6bbb8b | ||
|
|
4d007d6b2a | ||
|
|
9527457ca0 | ||
|
|
f7d3396001 | ||
|
|
55508e0068 | ||
|
|
cc691da4d0 | ||
|
|
d05d47139d | ||
|
|
47e02e0f6c | ||
|
|
5202c1361f | ||
|
|
1d13430519 | ||
|
|
1852813741 | ||
|
|
d711c17534 | ||
|
|
717606deef | ||
|
|
5d01407ad5 | ||
|
|
41fcefad5f | ||
|
|
01f912611e | ||
|
|
f0ad0b110e | ||
|
|
fb35cf52f5 | ||
|
|
fe435ca0ab | ||
|
|
f356cb78f9 | ||
|
|
e5d1e0b319 | ||
|
|
9188e9f6a9 | ||
|
|
8e72f57333 | ||
|
|
df1e56e408 | ||
|
|
4afbf67ce1 | ||
|
|
5c1efcb4d6 | ||
|
|
f3fb84d1d0 | ||
|
|
6cae738f1c | ||
|
|
bff4fe01e3 | ||
|
|
959c571fc6 | ||
|
|
c5c8b90262 | ||
|
|
8744c1871d | ||
|
|
98a1dc7757 | ||
|
|
4064c6f1c2 | ||
|
|
04c2e47a5f | ||
|
|
2f03f53ab1 | ||
|
|
0d2819e3b5 | ||
|
|
8d16ac2295 | ||
|
|
714e71b6c3 | ||
|
|
0c16c6ebe9 | ||
|
|
1b9ce5f484 | ||
|
|
c4390478fc | ||
|
|
7d97de8a10 | ||
|
|
51bee0f420 | ||
|
|
04642a7cc0 | ||
|
|
8a0a911d43 | ||
|
|
fae6673957 | ||
|
|
63f50b1e73 | ||
|
|
f53746f720 | ||
|
|
5dd18eeaad | ||
|
|
7316b6255c | ||
|
|
eb2605f1a3 | ||
|
|
01a3a09d96 | ||
|
|
01e7fb463b | ||
|
|
f8f6f2cf6c | ||
|
|
99ae90ecc5 | ||
|
|
d64125ddd4 | ||
|
|
7fb3632fd7 |
@@ -6,6 +6,7 @@
|
||||
# Files generated by Visual Studio
|
||||
\.aps$
|
||||
\.ncb$
|
||||
\.sdf$
|
||||
\.suo$
|
||||
\.user$
|
||||
|
||||
|
||||
@@ -6,3 +6,13 @@ b3ffa8a4511c4eadaf533fc790aa6b14f7f0c6ea sourcemod-1.1.2
|
||||
a71318396392e3c6d0ff31e069a60fbde59e0cea sourcemod-1.3.0
|
||||
3f33d01fcc28b509bed30f7be07ed215cc000538 sourcemod-1.3.1
|
||||
a3e8f7a7fdf7f012dd02ad491a2e1ccdad151687 sourcemod-1.3.2
|
||||
c5062ca8283033cf33f45da6f19e486ca10835ff sourcemod-1.3.3
|
||||
4d6afc42522c8f416dc45be7af7b145507b00630 sourcemod-1.3.4
|
||||
9de8baa40cc593d8ca5f976a3357772e804ae9e8 sourcemod-1.3.5
|
||||
8036343199caaf2812b21bb24f1fa84bf5a9e2ef sourcemod-1.3.6
|
||||
0f35d8b324ba8f6272dac3e473f056b451a13b54 sourcemod-1.3.7
|
||||
2726e2ec8c90bfc547753c5a2a160b726587ecde sourcemod-1.3.8
|
||||
2726e2ec8c90bfc547753c5a2a160b726587ecde sourcemod-1.3.8
|
||||
fa2f05c3ae003a01cc0d65df8998fcb1a936328e sourcemod-1.3.8
|
||||
fa2f05c3ae003a01cc0d65df8998fcb1a936328e sourcemod-1.3.8
|
||||
0000000000000000000000000000000000000000 sourcemod-1.3.8
|
||||
|
||||
+18
-6
@@ -22,6 +22,8 @@ class SM:
|
||||
if AMBuild.target['platform'] == 'windows':
|
||||
self.sdkInfo['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2',
|
||||
'name': 'DARKMESSIAH'}
|
||||
self.sdkInfo['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '7',
|
||||
'name': 'ALIENSWARM'}
|
||||
|
||||
if AMBuild.mode == 'config':
|
||||
#Detect compilers
|
||||
@@ -40,6 +42,7 @@ class SM:
|
||||
#Dark Messiah is Windows-only
|
||||
if AMBuild.target['platform'] == 'windows':
|
||||
envvars['HL2SDK-DARKM'] = 'hl2sdk-darkm'
|
||||
envvars['HL2SDK-SWARM'] = 'hl2sdk-swarm'
|
||||
|
||||
#Must have a path for each envvar (file a bug if you don't like this)
|
||||
for i in envvars:
|
||||
@@ -81,7 +84,7 @@ class SM:
|
||||
self.compiler.AddToListVar('CFLAGS', '-mfpmath=sse')
|
||||
self.compiler.AddToListVar('CFLAGS', '-msse')
|
||||
self.compiler.AddToListVar('CFLAGS', '-m32')
|
||||
self.compiler.AddToListVar('CFLAGS', '-static-libgcc')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-static-libgcc')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-fno-exceptions')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-fno-rtti')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-fno-threadsafe-statics')
|
||||
@@ -91,6 +94,7 @@ class SM:
|
||||
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')
|
||||
@@ -124,8 +128,9 @@ class SM:
|
||||
if self.vendor == 'gcc':
|
||||
self.compiler.AddToListVar('CFLAGS', '-O3')
|
||||
elif self.vendor == 'msvc':
|
||||
self.compiler.AddToListVar('CFLAGS', '/Ot')
|
||||
self.compiler.AddToListVar('CFLAGS', '/Ox')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '/OPT:ICF')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '/OPT:REF')
|
||||
|
||||
#Debugging
|
||||
if AMBuild.options.debug == '1':
|
||||
@@ -200,7 +205,7 @@ class SM:
|
||||
else:
|
||||
staticLibs = os.path.join(sdkPath, 'lib', 'linux')
|
||||
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
|
||||
if sdk == 'ep2v' or sdk == 'l4d2':
|
||||
if sdk in ['ep2v', 'l4d', 'l4d2']:
|
||||
for i in ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.so', 'libtier0.so']:
|
||||
link = os.path.join(workFolder, i)
|
||||
target = os.path.join(staticLibs, i)
|
||||
@@ -217,7 +222,10 @@ class SM:
|
||||
except:
|
||||
job.AddCommand(SymlinkCommand(link, target))
|
||||
elif AMBuild.target['platform'] == 'windows':
|
||||
for lib in ['tier0', 'tier1', 'vstdlib', 'mathlib']:
|
||||
libs = ['tier0', 'tier1', 'vstdlib', 'mathlib']
|
||||
if sdk == 'swarm':
|
||||
libs.append('interfaces')
|
||||
for lib in libs:
|
||||
libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
|
||||
builder.RebuildIfNewer(libPath)
|
||||
builder['POSTLINKFLAGS'].append(libPath)
|
||||
@@ -238,7 +246,8 @@ class SM:
|
||||
|
||||
info = self.sdkInfo
|
||||
compiler['CDEFINES'].extend(['SE_' + info[i]['name'] + '=' + info[i]['def'] for i in info])
|
||||
compiler['CDEFINES'].append('SE_DARKMESSIAH=2')
|
||||
if AMBuild.target['platform'] != 'windows':
|
||||
compiler['CDEFINES'].extend(['SE_DARKMESSIAH=2', 'SE_ALIENSWARM=7'])
|
||||
|
||||
paths = [['public'], ['public', 'engine'], ['public', 'mathlib'], ['public', 'vstdlib'],
|
||||
['public', 'tier0'], ['public', 'tier1']]
|
||||
@@ -255,6 +264,9 @@ class SM:
|
||||
|
||||
compiler['CDEFINES'].append('SOURCE_ENGINE=' + info['def'])
|
||||
|
||||
if sdk == 'swarm' and AMBuild.target['platform'] == 'windows':
|
||||
compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
|
||||
|
||||
if sdk == 'ep1':
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
staticLibs = os.path.join(sdkPath, 'linux_sdk')
|
||||
@@ -268,7 +280,7 @@ class SM:
|
||||
if not noLink:
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['-lm']
|
||||
if sdk == 'ep2v' or sdk == 'l4d2':
|
||||
if sdk in ['ep2v', 'l4d', 'l4d2']:
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so']
|
||||
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so']
|
||||
else:
|
||||
|
||||
+121
@@ -1,5 +1,126 @@
|
||||
SourceMod Changelog
|
||||
|
||||
-----------------------------
|
||||
|
||||
SourceMod 1.3.8 [2011-06-23]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.3.8_Release_Notes
|
||||
|
||||
User Changes:
|
||||
|
||||
- Updated support for latest OrangeBox engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
|
||||
- Updated support for various games, including Garry's Mod, Zombie Panic, and Dino D-Day.
|
||||
- Added gamedata for Eternal Silence.
|
||||
- Fixed libgcc_s.so.1 load error present on some systems (bug 4876).
|
||||
- Handle leak notices now print to error log (in addition fatal log) (bug 4929).
|
||||
- Translator now properly falls back on bad server language (bug 4861).
|
||||
- Fixed invalid client errors from bad MaxClients value when SourceTV is late-loaded (bug 4881).
|
||||
- Fixed crash on plugin unload when two commands exist with same name, different casing (bug 4698).
|
||||
|
||||
Developer Changes:
|
||||
|
||||
- Updated TF2 condition defines (bug 4916).
|
||||
- Fixed var names and docs for TF2_MakeBleed native (bug 4928).
|
||||
- Removed compiler double include check (bug 4863).
|
||||
- Fixed plugin compile errors when using GetEntityClassname (bug 4798).
|
||||
|
||||
---------------------------
|
||||
|
||||
SourceMod 1.3.7 [2011-04-15]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.3.7_Release_Notes
|
||||
|
||||
User Changes:
|
||||
|
||||
- Updated support for latest OrangeBox engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
|
||||
- Updated support for various games, including Zombie Panic, CS ProMod, Empires, and GoldenEye: Source.
|
||||
- Added gamedata for Dino D-Day.
|
||||
- Fix precedence of voice mute flag versus specific client overrides (bug 4826).
|
||||
- Fix mistaken unhooking of voice hooks (bug 4804).
|
||||
- Fixed graphical glitches with funcommands effects in L4D1 (bug 3486).
|
||||
- Fixed bug in nominations that could cause "Unknown command" error (bug 4797).
|
||||
- Removed tv_enable hook to fix rare max client count issue (bug 4791).
|
||||
- Added missing unhooking of ClientConnect in PlayerManager (bug 4749).
|
||||
- Fixed sm_rtv printing "unknown command" (bug 4730).
|
||||
- Fixed voting crash when client console, chat, and SourceTV are enabled (bug 4676).
|
||||
- Fixed CDetour crash in TF2 extension when last plugin using forward is unloaded (bug 4713).
|
||||
|
||||
Developer Changes:
|
||||
|
||||
- SetEntProp now marks edict state as changed (bug 4855).
|
||||
- Added GetEntityClassname stock (bug 4798).
|
||||
- Fix compiler hanging when #including a directory (bug 4822).
|
||||
- Added GetEntityFlags and SetEntityFlags natives for better cross-engine compatibility. (bug 4809).
|
||||
- Fixed ClientPrefs natives not being marked optional when REQUIRE_EXTENSIONS not defined (bug 4839).
|
||||
- Changed some instances of LogMessage to LogAction (bug 4649).
|
||||
- Added some new language natives (bug 4613).
|
||||
- Fixed SetTeamScore not updating score on client (bug 2736).
|
||||
- Raised MAXPLAYERS from 64 to 65 (bug 4490).
|
||||
- Added and updated many TF2-specific defines in tf2.inc and tf2_stocks.inc.
|
||||
- Fixed TF2_GetPlayerConditionFlags no longer necessarily returning all set flags (bug 4726).
|
||||
- Fixed profiler flush not clearing, added 'report' and 'clear' (bug 4674).
|
||||
- Fixed GetPlayerDecalFile crash on L4D and L4D2 (bug 4729).
|
||||
- Fixed TF2_OnGetHoliday detour no longer firing under all circumstances (bug 4700).
|
||||
- Added TF2_IsPlayerInDuel native to TF2 extension (bug 4695).
|
||||
|
||||
----------------------------
|
||||
|
||||
SourceMod 1.3.6 [2010-10-31]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.3.6_Release_Notes
|
||||
|
||||
User Changes:
|
||||
|
||||
- Updated support for latest Left 4 Dead 1 (bug 4681).
|
||||
|
||||
Developer Changes:
|
||||
|
||||
- Updated TF2 custom kill defines (bug 4682).
|
||||
|
||||
----------------------------
|
||||
|
||||
SourceMod 1.3.5 [2010-10-17]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.3.5_Release_Notes
|
||||
|
||||
User Changes:
|
||||
|
||||
- Updated support for CS:S, Garry's Mod, DoD:S, TF2, HL2DM.
|
||||
- Added support for Firearms: Source (bug 4537).
|
||||
- Added support for Fistful of Frags (bug 3883).
|
||||
- Added support for Alien Swarm (bug 4530).
|
||||
- Fixed living players hearing dead players if alltalk is disabled while deadtalk is on (bug 4533, thanks Zach Callear).
|
||||
- Fixed timeleft not getting reset on Game_Commencing in CS:S (bug 4557).
|
||||
- Fixed PlayerRunCmd being hooked when not used (bug 3990).
|
||||
- Fixed errors and missing effects caused by missing sprites on L4D2 (bug 4512).
|
||||
- Fixed 'sm plugins' public command skipping plugins in recommended listing (bug 4501).
|
||||
- Fixed corruption with large database.cfg files (bug 4286).
|
||||
|
||||
Developer Changes:
|
||||
|
||||
- Added TF2 object stocks (bug 4536).
|
||||
- Added TF2_MakeBleed native to TF2 ext (bug 4542).
|
||||
- Added support for logical entities in Synergy (bug 4534).
|
||||
- Updated TF2 conditions enum and defines (bug 4526).
|
||||
- Fixed potential crash with IMemUtils::FindPattern on Linux (bug 4554).
|
||||
|
||||
----------------------------
|
||||
|
||||
SourceMod 1.3.4 [2010-07-18]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.3.4_Release_Notes
|
||||
|
||||
User Changes:
|
||||
|
||||
- Support for latest TF update (bug 4506).
|
||||
- Support for latest L4D2 update (bug 4509).
|
||||
|
||||
Developer Changes:
|
||||
|
||||
- Added FindFlagChar native (bug 3776).
|
||||
- Added GetConVarDefault native (bug 4502).
|
||||
- Added forward for TF's GetHoliday function (bug 4462).
|
||||
|
||||
----------------------------
|
||||
|
||||
SourceMod 1.3.3 [2010-06-23]
|
||||
|
||||
+36
-39
@@ -226,30 +226,38 @@ void ConCmdManager::SetCommandClient(int client)
|
||||
m_CmdClient = client + 1;
|
||||
}
|
||||
|
||||
ConCmdInfo *ConCmdManager::FindInTrie(const char *name)
|
||||
{
|
||||
ConCmdInfo *pInfo;
|
||||
if (!sm_trie_retrieve(m_pCmds, name, (void **)&pInfo))
|
||||
return NULL;
|
||||
return pInfo;
|
||||
}
|
||||
|
||||
ConCmdList::iterator ConCmdManager::FindInList(const char *cmd)
|
||||
{
|
||||
List<ConCmdInfo *>::iterator iter = m_CmdList.begin();
|
||||
|
||||
while (iter != m_CmdList.end())
|
||||
{
|
||||
if (strcasecmp((*iter)->pCmd->GetName(), cmd) == 0)
|
||||
break;
|
||||
iter++;
|
||||
}
|
||||
|
||||
return iter;
|
||||
}
|
||||
|
||||
ResultType ConCmdManager::DispatchClientCommand(int client, const char *cmd, int args, ResultType type)
|
||||
{
|
||||
ConCmdInfo *pInfo;
|
||||
|
||||
if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
|
||||
if ((pInfo = FindInTrie(cmd)) == NULL)
|
||||
{
|
||||
List<ConCmdInfo *>::iterator iter;
|
||||
|
||||
pInfo = NULL;
|
||||
iter = m_CmdList.begin();
|
||||
while (iter != m_CmdList.end())
|
||||
{
|
||||
if (strcasecmp((*iter)->pCmd->GetName(), cmd) == 0)
|
||||
{
|
||||
pInfo = (*iter);
|
||||
break;
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
|
||||
if (pInfo == NULL)
|
||||
{
|
||||
ConCmdList::iterator item = FindInList(cmd);
|
||||
if (item == m_CmdList.end())
|
||||
return type;
|
||||
}
|
||||
pInfo = *item;
|
||||
}
|
||||
|
||||
cell_t result = type;
|
||||
@@ -314,35 +322,20 @@ void ConCmdManager::InternalDispatch(const CCommand &command)
|
||||
*/
|
||||
const char *cmd = g_HL2.CurrentCommandName();
|
||||
|
||||
ConCmdInfo *pInfo;
|
||||
if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
|
||||
ConCmdInfo *pInfo = FindInTrie(cmd);
|
||||
if (pInfo == NULL)
|
||||
{
|
||||
/* Unfortunately, we now have to do a slow lookup because Valve made client commands
|
||||
* case-insensitive. We can't even use our sortedness.
|
||||
*/
|
||||
if (client == 0 && !engine->IsDedicatedServer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
List<ConCmdInfo *>::iterator iter;
|
||||
ConCmdList::iterator item = FindInList(cmd);
|
||||
if (item == m_CmdList.end())
|
||||
return;
|
||||
|
||||
pInfo = NULL;
|
||||
iter = m_CmdList.begin();
|
||||
while (iter != m_CmdList.end())
|
||||
{
|
||||
if (strcasecmp((*iter)->pCmd->GetName(), cmd) == 0)
|
||||
{
|
||||
pInfo = (*iter);
|
||||
break;
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
|
||||
if (pInfo == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
pInfo = *item;
|
||||
}
|
||||
|
||||
/* This is a hack to prevent say triggers from firing on messages that were
|
||||
@@ -916,6 +909,10 @@ ConCmdInfo *ConCmdManager::AddOrFindCommand(const char *name, const char *descri
|
||||
ConCmdInfo *pInfo;
|
||||
if (!sm_trie_retrieve(m_pCmds, name, (void **)&pInfo))
|
||||
{
|
||||
ConCmdList::iterator item = FindInList(name);
|
||||
if (item != m_CmdList.end())
|
||||
return *item;
|
||||
|
||||
pInfo = new ConCmdInfo();
|
||||
/* Find the commandopan */
|
||||
ConCommand *pCmd = FindCommand(name);
|
||||
|
||||
@@ -92,6 +92,8 @@ struct ConCmdInfo
|
||||
bool is_admin_set; /**< Whether or not admin info is set */
|
||||
};
|
||||
|
||||
typedef List<ConCmdInfo *> ConCmdList;
|
||||
|
||||
class ConCmdManager :
|
||||
public SMGlobalClass,
|
||||
public IRootConsoleCommand,
|
||||
@@ -139,6 +141,12 @@ private:
|
||||
void RemoveConCmds(List<CmdHook *> &cmdlist);
|
||||
void RemoveConCmds(List<CmdHook *> &cmdlist, IPluginContext *pContext);
|
||||
bool CheckAccess(int client, const char *cmd, AdminCmdInfo *pAdmin);
|
||||
|
||||
// Case insensitive
|
||||
ConCmdList::iterator FindInList(const char *name);
|
||||
|
||||
// Case sensitive
|
||||
ConCmdInfo *FindInTrie(const char *name);
|
||||
public:
|
||||
inline int GetCommandClient()
|
||||
{
|
||||
@@ -151,7 +159,7 @@ public:
|
||||
private:
|
||||
Trie *m_pCmds; /* command lookup */
|
||||
Trie *m_pCmdGrps; /* command group lookup */
|
||||
List<ConCmdInfo *> m_CmdList; /* command list */
|
||||
ConCmdList m_CmdList; /* command list */
|
||||
int m_CmdClient; /* current client */
|
||||
BaseStringTable m_Strings; /* string table */
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 sw=4 tw=99 noet :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -31,59 +31,59 @@
|
||||
#ifndef _INCLUDE_SOURCEMOD_CON_COMMAND_BASE_ITERATOR_H_
|
||||
#define _INCLUDE_SOURCEMOD_CON_COMMAND_BASE_ITERATOR_H_
|
||||
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
class ConCommandBaseIterator
|
||||
{
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
ICvarIteratorInternal *cvarIter;
|
||||
#else
|
||||
ConCommandBase *cvarIter;
|
||||
#endif
|
||||
|
||||
public:
|
||||
ConCommandBaseIterator()
|
||||
inline ConCommandBaseIterator() : iter(icvar)
|
||||
{
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
cvarIter = icvar->FactoryInternalIterator();
|
||||
cvarIter->SetFirst();
|
||||
#else
|
||||
cvarIter = icvar->GetCommands();
|
||||
#endif
|
||||
}
|
||||
|
||||
~ConCommandBaseIterator()
|
||||
{
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
g_pMemAlloc->Free(cvarIter);
|
||||
#endif
|
||||
iter.SetFirst();
|
||||
}
|
||||
|
||||
inline bool IsValid()
|
||||
{
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
return cvarIter->IsValid();
|
||||
#else
|
||||
return cvarIter != NULL;
|
||||
#endif
|
||||
return iter.IsValid();
|
||||
}
|
||||
|
||||
inline void Next()
|
||||
{
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
cvarIter->Next();
|
||||
#else
|
||||
cvarIter = const_cast<ConCommandBase*>(cvarIter->GetNext());
|
||||
#endif
|
||||
iter.Next();
|
||||
}
|
||||
|
||||
inline ConCommandBase *Get()
|
||||
{
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
return cvarIter->Get();
|
||||
#else
|
||||
return cvarIter;
|
||||
#endif
|
||||
return iter.Get();
|
||||
}
|
||||
private:
|
||||
ICvar::Iterator iter;
|
||||
};
|
||||
#else
|
||||
class ConCommandBaseIterator
|
||||
{
|
||||
public:
|
||||
inline ConCommandBaseIterator()
|
||||
{
|
||||
iter = icvar->GetCommands();
|
||||
}
|
||||
|
||||
inline bool IsValid()
|
||||
{
|
||||
return iter != NULL;
|
||||
}
|
||||
|
||||
inline void Next()
|
||||
{
|
||||
iter = const_cast<ConCommandBase *>(iter->GetNext());
|
||||
}
|
||||
|
||||
inline ConCommandBase *Get()
|
||||
{
|
||||
return iter;
|
||||
}
|
||||
private:
|
||||
ConCommandBase *iter;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* _INCLUDE_SOURCEMOD_CON_COMMAND_BASE_ITERATOR_H_ */
|
||||
|
||||
|
||||
+40
-31
@@ -47,7 +47,7 @@ DBManager g_DBMan;
|
||||
static bool s_OneTimeThreaderErrorMsg = false;
|
||||
|
||||
DBManager::DBManager()
|
||||
: m_StrTab(512), m_ParseLevel(0), m_ParseState(0), m_pDefault(NULL)
|
||||
: m_ParseLevel(0), m_ParseState(0), m_pDefault(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ void DBManager::OnSourceModShutdown()
|
||||
m_pQueueLock->DestroyThis();
|
||||
g_HandleSys.RemoveType(m_DatabaseType, g_pCoreIdent);
|
||||
g_HandleSys.RemoveType(m_DriverType, g_pCoreIdent);
|
||||
ClearConfigs();
|
||||
}
|
||||
|
||||
unsigned int DBManager::GetInterfaceVersion()
|
||||
@@ -133,13 +134,20 @@ void DBManager::OnHandleDestroy(HandleType_t type, void *object)
|
||||
|
||||
void DBManager::ReadSMC_ParseStart()
|
||||
{
|
||||
m_confs.clear();
|
||||
ClearConfigs();
|
||||
m_ParseLevel = 0;
|
||||
m_ParseState = DBPARSE_LEVEL_NONE;
|
||||
m_StrTab.Reset();
|
||||
m_DefDriver.clear();
|
||||
}
|
||||
|
||||
void DBManager::ClearConfigs()
|
||||
{
|
||||
List<ConfDbInfo *>::iterator iter;
|
||||
for (iter=m_confs.begin(); iter!=m_confs.end(); iter++)
|
||||
delete (*iter);
|
||||
m_confs.clear();
|
||||
}
|
||||
|
||||
ConfDbInfo s_CurInfo;
|
||||
SMCResult DBManager::ReadSMC_NewSection(const SMCStates *states, const char *name)
|
||||
{
|
||||
@@ -159,7 +167,7 @@ SMCResult DBManager::ReadSMC_NewSection(const SMCStates *states, const char *nam
|
||||
}
|
||||
} else if (m_ParseState == DBPARSE_LEVEL_MAIN) {
|
||||
s_CurInfo = ConfDbInfo();
|
||||
s_CurInfo.name = m_StrTab.AddString(name);
|
||||
s_CurInfo.name = name;
|
||||
m_ParseState = DBPARSE_LEVEL_DATABASE;
|
||||
} else if (m_ParseState == DBPARSE_LEVEL_DATABASE) {
|
||||
m_ParseLevel++;
|
||||
@@ -186,16 +194,16 @@ SMCResult DBManager::ReadSMC_KeyValue(const SMCStates *states, const char *key,
|
||||
{
|
||||
if (strcmp(value, "default") != 0)
|
||||
{
|
||||
s_CurInfo.driver = m_StrTab.AddString(value);
|
||||
s_CurInfo.driver = value;
|
||||
}
|
||||
} else if (strcmp(key, "database") == 0) {
|
||||
s_CurInfo.database = m_StrTab.AddString(value);
|
||||
s_CurInfo.database = value;
|
||||
} else if (strcmp(key, "host") == 0) {
|
||||
s_CurInfo.host = m_StrTab.AddString(value);
|
||||
s_CurInfo.host = value;
|
||||
} else if (strcmp(key, "user") == 0) {
|
||||
s_CurInfo.user = m_StrTab.AddString(value);
|
||||
s_CurInfo.user = value;
|
||||
} else if (strcmp(key, "pass") == 0) {
|
||||
s_CurInfo.pass = m_StrTab.AddString(value);
|
||||
s_CurInfo.pass = value;
|
||||
} else if (strcmp(key, "timeout") == 0) {
|
||||
s_CurInfo.info.maxTimeout = atoi(value);
|
||||
} else if (strcmp(key, "port") == 0) {
|
||||
@@ -206,13 +214,6 @@ SMCResult DBManager::ReadSMC_KeyValue(const SMCStates *states, const char *key,
|
||||
return SMCResult_Continue;
|
||||
}
|
||||
|
||||
#define ASSIGN_VAR(var) \
|
||||
if (s_CurInfo.var == -1) { \
|
||||
s_CurInfo.info.var = ""; \
|
||||
} else { \
|
||||
s_CurInfo.info.var = m_StrTab.GetString(s_CurInfo.var); \
|
||||
}
|
||||
|
||||
SMCResult DBManager::ReadSMC_LeavingSection(const SMCStates *states)
|
||||
{
|
||||
if (m_ParseLevel)
|
||||
@@ -223,17 +224,26 @@ SMCResult DBManager::ReadSMC_LeavingSection(const SMCStates *states)
|
||||
|
||||
if (m_ParseState == DBPARSE_LEVEL_DATABASE)
|
||||
{
|
||||
/* Set all of the info members to either a blank string
|
||||
* or the string pointer from the string table.
|
||||
*/
|
||||
ASSIGN_VAR(driver);
|
||||
ASSIGN_VAR(database);
|
||||
ASSIGN_VAR(host);
|
||||
ASSIGN_VAR(user);
|
||||
ASSIGN_VAR(pass);
|
||||
ConfDbInfo *cdb = new ConfDbInfo();
|
||||
|
||||
cdb->name = s_CurInfo.name;
|
||||
cdb->driver = s_CurInfo.driver;
|
||||
cdb->host = s_CurInfo.host;
|
||||
cdb->user = s_CurInfo.user;
|
||||
cdb->pass = s_CurInfo.pass;
|
||||
cdb->database = s_CurInfo.database;
|
||||
cdb->realDriver = s_CurInfo.realDriver;
|
||||
cdb->info.maxTimeout = s_CurInfo.info.maxTimeout;
|
||||
cdb->info.port = s_CurInfo.info.port;
|
||||
|
||||
cdb->info.driver = cdb->driver.c_str();
|
||||
cdb->info.database = cdb->database.c_str();
|
||||
cdb->info.host = cdb->host.c_str();
|
||||
cdb->info.user = cdb->user.c_str();
|
||||
cdb->info.pass = cdb->pass.c_str();
|
||||
|
||||
/* Save it.. */
|
||||
m_confs.push_back(s_CurInfo);
|
||||
m_confs.push_back(cdb);
|
||||
|
||||
/* Go up one level */
|
||||
m_ParseState = DBPARSE_LEVEL_MAIN;
|
||||
@@ -244,7 +254,6 @@ SMCResult DBManager::ReadSMC_LeavingSection(const SMCStates *states)
|
||||
|
||||
return SMCResult_Continue;
|
||||
}
|
||||
#undef ASSIGN_VAR
|
||||
|
||||
void DBManager::ReadSMC_ParseEnd(bool halted, bool failed)
|
||||
{
|
||||
@@ -333,10 +342,10 @@ void DBManager::RemoveDriver(IDBDriver *pDriver)
|
||||
}
|
||||
|
||||
/* Make sure NOTHING references this! */
|
||||
List<ConfDbInfo>::iterator iter;
|
||||
List<ConfDbInfo *>::iterator iter;
|
||||
for (iter=m_confs.begin(); iter!=m_confs.end(); iter++)
|
||||
{
|
||||
ConfDbInfo &db = (*iter);
|
||||
ConfDbInfo &db = *(*iter);
|
||||
if (db.realDriver == pDriver)
|
||||
{
|
||||
db.realDriver = NULL;
|
||||
@@ -448,12 +457,12 @@ const DatabaseInfo *DBManager::FindDatabaseConf(const char *name)
|
||||
|
||||
ConfDbInfo *DBManager::GetDatabaseConf(const char *name)
|
||||
{
|
||||
List<ConfDbInfo>::iterator iter;
|
||||
List<ConfDbInfo *>::iterator iter;
|
||||
|
||||
for (iter=m_confs.begin(); iter!=m_confs.end(); iter++)
|
||||
{
|
||||
ConfDbInfo &conf = (*iter);
|
||||
if (strcmp(m_StrTab.GetString(conf.name), name) == 0)
|
||||
ConfDbInfo &conf = *(*iter);
|
||||
if (conf.name == name)
|
||||
{
|
||||
return &conf;
|
||||
}
|
||||
|
||||
+9
-10
@@ -47,16 +47,15 @@ using namespace SourceHook;
|
||||
|
||||
struct ConfDbInfo
|
||||
{
|
||||
ConfDbInfo() : name(-1), driver(-1), host(-1), user(-1), pass(-1),
|
||||
database(-1), realDriver(NULL)
|
||||
ConfDbInfo() : realDriver(NULL)
|
||||
{
|
||||
}
|
||||
int name;
|
||||
int driver;
|
||||
int host;
|
||||
int user;
|
||||
int pass;
|
||||
int database;
|
||||
String name;
|
||||
String driver;
|
||||
String host;
|
||||
String user;
|
||||
String pass;
|
||||
String database;
|
||||
IDBDriver *realDriver;
|
||||
DatabaseInfo info;
|
||||
};
|
||||
@@ -121,6 +120,7 @@ public:
|
||||
return m_DatabaseType;
|
||||
}
|
||||
private:
|
||||
void ClearConfigs();
|
||||
void KillWorkerThread();
|
||||
private:
|
||||
CVector<IDBDriver *> m_drivers;
|
||||
@@ -134,11 +134,10 @@ private:
|
||||
IMutex *m_pQueueLock; /* Queue safety lock */
|
||||
IMutex *m_pThinkLock; /* Think-queue lock */
|
||||
|
||||
List<ConfDbInfo> m_confs;
|
||||
List<ConfDbInfo *> m_confs;
|
||||
HandleType_t m_DriverType;
|
||||
HandleType_t m_DatabaseType;
|
||||
String m_DefDriver;
|
||||
BaseStringTable m_StrTab;
|
||||
char m_Filename[PLATFORM_MAX_PATH];
|
||||
unsigned int m_ParseLevel;
|
||||
unsigned int m_ParseState;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 sw=4 tw=99 noet :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -161,6 +161,13 @@ void EventManager::FireGameEvent(IGameEvent *pEvent)
|
||||
Just need to add ourselves as a listener to make our hook on IGameEventManager2::FireEvent work */
|
||||
}
|
||||
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
int EventManager::GetEventDebugID()
|
||||
{
|
||||
return EVENT_DEBUG_ID_INIT;
|
||||
}
|
||||
#endif
|
||||
|
||||
EventHookError EventManager::HookEvent(const char *name, IPluginFunction *pFunction, EventHookMode mode)
|
||||
{
|
||||
EventHook *pHook;
|
||||
|
||||
+4
-1
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -105,6 +105,9 @@ public: // IPluginsListener
|
||||
void OnPluginUnloaded(IPlugin *plugin);
|
||||
public: // IGameEventListener2
|
||||
void FireGameEvent(IGameEvent *pEvent);
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
int GetEventDebugID();
|
||||
#endif
|
||||
public:
|
||||
/**
|
||||
* Get the 'GameEvent' handle type ID.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 sw=4 tw=99 noet :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -65,6 +65,8 @@ CRemoteExtension::CRemoteExtension(IExtensionInterface *pAPI, const char *filena
|
||||
#define GAMEFIX "2.l4d"
|
||||
#elif SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||
#define GAMEFIX "2.l4d2"
|
||||
#elif SOURCE_ENGINE == SE_ALIENSWARM
|
||||
#define GAMEFIX "2.swarm"
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOX
|
||||
#define GAMEFIX "2.ep2"
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
@@ -988,7 +990,7 @@ void CExtensionManager::OnRootConsoleCommand(const char *cmdname, const CCommand
|
||||
{
|
||||
if (argcount < 4)
|
||||
{
|
||||
g_RootMenu.ConsolePrint("[SM] Usage: sm info <#>");
|
||||
g_RootMenu.ConsolePrint("[SM] Usage: sm exts info <#>");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -996,7 +998,7 @@ void CExtensionManager::OnRootConsoleCommand(const char *cmdname, const CCommand
|
||||
unsigned int id = atoi(sId);
|
||||
if (id <= 0)
|
||||
{
|
||||
g_RootMenu.ConsolePrint("[SM] Usage: sm info <#>");
|
||||
g_RootMenu.ConsolePrint("[SM] Usage: sm exts info <#>");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1073,7 +1075,7 @@ void CExtensionManager::OnRootConsoleCommand(const char *cmdname, const CCommand
|
||||
{
|
||||
if (argcount < 4)
|
||||
{
|
||||
g_RootMenu.ConsolePrint("[SM] Usage: sm unload <#> [code]");
|
||||
g_RootMenu.ConsolePrint("[SM] Usage: sm exts unload <#> [code]");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,6 +117,8 @@ static bool DoesEngineMatch(const char *value)
|
||||
if (strcmp(value, "left4dead") == 0)
|
||||
#elif SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||
if (strcmp(value, "left4dead2") == 0)
|
||||
#elif SOURCE_ENGINE == SE_ALIENSWARM
|
||||
if (strcmp(value, "alienswarm") == 0)
|
||||
#else
|
||||
#error "Unknown engine type"
|
||||
#endif
|
||||
@@ -504,7 +506,7 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states)
|
||||
void *handle = dlopen(info.dli_fname, RTLD_NOW);
|
||||
if (handle)
|
||||
{
|
||||
#if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
final_addr = g_MemUtils.ResolveSymbol(handle, &s_TempSig.sig[1]);
|
||||
#else
|
||||
final_addr = dlsym(handle, &s_TempSig.sig[1]);
|
||||
|
||||
+47
-28
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -132,40 +132,61 @@ void CHalfLife2::OnSourceModAllInitialized()
|
||||
void CHalfLife2::OnSourceModAllInitialized_Post()
|
||||
{
|
||||
char *addr = NULL;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
int offset;
|
||||
|
||||
/* gEntList and/or g_pEntityList */
|
||||
if (!g_pGameConf->GetMemSig("LevelShutdown", (void **)&addr))
|
||||
/*
|
||||
* gEntList and/or g_pEntityList
|
||||
*
|
||||
* First try to lookup pointer directly for platforms with symbols.
|
||||
* If symbols aren't present (Windows or stripped Linux/Mac),
|
||||
* attempt find via LevelShutdown + offset
|
||||
*/
|
||||
if (g_pGameConf->GetMemSig("gEntList", (void **)&addr))
|
||||
{
|
||||
g_Logger.LogError("Logical Entities not supported by this mod (LevelShutdown) - Reverting to networkable entities only");
|
||||
return;
|
||||
#if !defined PLATFORM_WINDOWS
|
||||
if (!addr)
|
||||
{
|
||||
// Key exists so notify if lookup fails, but try other method.
|
||||
g_Logger.LogError("Failed lookup of gEntList directly - Reverting to lookup via LevelShutdown");
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
g_EntList = reinterpret_cast<void *>(addr);
|
||||
#if !defined PLATFORM_WINDOWS
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (!addr)
|
||||
|
||||
|
||||
if (!g_EntList)
|
||||
{
|
||||
g_Logger.LogError("Failed lookup of LevelShutdown - Reverting to networkable entities only");
|
||||
return;
|
||||
if (!g_pGameConf->GetMemSig("LevelShutdown", (void **)&addr))
|
||||
{
|
||||
g_Logger.LogError("Logical Entities not supported by this mod (LevelShutdown) - Reverting to networkable entities only");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!addr)
|
||||
{
|
||||
g_Logger.LogError("Failed lookup of 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;
|
||||
}
|
||||
|
||||
g_EntList = *reinterpret_cast<void **>(addr + 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);
|
||||
#elif defined PLATFORM_LINUX
|
||||
/* gEntList and/or g_pEntityList */
|
||||
if (!g_pGameConf->GetMemSig("gEntList", (void **)&addr))
|
||||
{
|
||||
g_Logger.LogError("Logical Entities not supported by this mod (gEntList) - Reverting to networkable entities only");
|
||||
return;
|
||||
}
|
||||
if (!addr)
|
||||
|
||||
if (!g_EntList)
|
||||
{
|
||||
g_Logger.LogError("Failed lookup of gEntList - Reverting to networkable entities only");
|
||||
return;
|
||||
}
|
||||
g_EntList = reinterpret_cast<void *>(addr);
|
||||
#endif
|
||||
|
||||
if (!g_pGameConf->GetOffset("EntInfo", &entInfoOffset))
|
||||
{
|
||||
@@ -359,13 +380,11 @@ void CHalfLife2::SetEdictStateChanged(edict_t *pEdict, unsigned short offset)
|
||||
#if SOURCE_ENGINE != SE_DARKMESSIAH
|
||||
if (g_pSharedChangeInfo != NULL)
|
||||
{
|
||||
#if SOURCE_ENGINE != SE_LEFT4DEAD2
|
||||
if (offset)
|
||||
{
|
||||
pEdict->StateChanged(offset);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
pEdict->StateChanged();
|
||||
}
|
||||
|
||||
+7
-3
@@ -950,6 +950,10 @@ bool HandleSystem::InitAccessDefaults(TypeAccess *pTypeAccess, HandleAccess *pHa
|
||||
return true;
|
||||
}
|
||||
|
||||
#define HANDLE_LOG_VERY_BAD(message, ...) \
|
||||
g_Logger.LogFatal(message, ##__VA_ARGS__); \
|
||||
g_Logger.LogError(message, ##__VA_ARGS__);
|
||||
|
||||
bool HandleSystem::TryAndFreeSomeHandles()
|
||||
{
|
||||
IPluginIterator *pl_iter = g_PluginSys.GetPluginIterator();
|
||||
@@ -995,9 +999,9 @@ bool HandleSystem::TryAndFreeSomeHandles()
|
||||
return false;
|
||||
}
|
||||
|
||||
g_Logger.LogFatal("[SM] MEMORY LEAK DETECTED IN PLUGIN (file \"%s\")", highest_owner->GetFilename());
|
||||
g_Logger.LogFatal("[SM] Unloading plugin to free %d handles.", highest_handle_count);
|
||||
g_Logger.LogFatal("[SM] Contact the author(s) of this plugin to correct this error.", highest_handle_count);
|
||||
HANDLE_LOG_VERY_BAD("[SM] MEMORY LEAK DETECTED IN PLUGIN (file \"%s\")", highest_owner->GetFilename());
|
||||
HANDLE_LOG_VERY_BAD("[SM] Unloading plugin to free %d handles.", highest_handle_count);
|
||||
HANDLE_LOG_VERY_BAD("[SM] Contact the author(s) of this plugin to correct this error.", highest_handle_count);
|
||||
|
||||
highest_owner->GetBaseContext()->ThrowNativeErrorEx(SP_ERROR_MEMACCESS, "Memory leak");
|
||||
|
||||
|
||||
+15
-4
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 sw=4 tw=99 noet :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -33,6 +33,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <link.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#define PAGE_SIZE 4096
|
||||
#define PAGE_ALIGN_UP(x) ((x + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
|
||||
#endif
|
||||
|
||||
MemoryUtils g_MemUtils;
|
||||
@@ -354,14 +357,22 @@ bool MemoryUtils::GetLibraryInfo(const void *libPtr, DynLibInfo &lib)
|
||||
phdrCount = file->e_phnum;
|
||||
phdr = reinterpret_cast<Elf32_Phdr *>(baseAddr + file->e_phoff);
|
||||
|
||||
/* Add up the memory sizes of segments marked as PT_LOAD as those are the only ones that should be in memory */
|
||||
for (uint16_t i = 0; i < phdrCount; i++)
|
||||
{
|
||||
Elf32_Phdr &hdr = phdr[i];
|
||||
|
||||
if (hdr.p_type == PT_LOAD)
|
||||
/* We only really care about the segment with executable code */
|
||||
if (hdr.p_type == PT_LOAD && hdr.p_flags == (PF_X|PF_R))
|
||||
{
|
||||
lib.memorySize += hdr.p_memsz;
|
||||
/* From glibc, elf/dl-load.c:
|
||||
* c->mapend = ((ph->p_vaddr + ph->p_filesz + GLRO(dl_pagesize) - 1)
|
||||
* & ~(GLRO(dl_pagesize) - 1));
|
||||
*
|
||||
* In glibc, the segment file size is aligned up to the nearest page size and
|
||||
* added to the virtual address of the segment. We just want the size here.
|
||||
*/
|
||||
lib.memorySize = PAGE_ALIGN_UP(hdr.p_filesz);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -538,7 +538,7 @@ void VoteMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int ite
|
||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(i);
|
||||
assert(pPlayer);
|
||||
|
||||
if (pPlayer->IsInGame())
|
||||
if (pPlayer->IsInGame() && !pPlayer->IsFakeClient())
|
||||
{
|
||||
if (m_Revoting[client])
|
||||
{
|
||||
|
||||
+17
-24
@@ -55,7 +55,7 @@ bool g_OnMapStarted = false;
|
||||
IForward *PreAdminCheck = NULL;
|
||||
IForward *PostAdminCheck = NULL;
|
||||
IForward *PostAdminFilter = NULL;
|
||||
IForward *OnClientConnected = NULL;
|
||||
|
||||
const unsigned int *g_NumPlayersToAuth = NULL;
|
||||
int lifestate_offset = -1;
|
||||
List<ICommandTargetProcessor *> target_processors;
|
||||
@@ -142,6 +142,7 @@ void PlayerManager::OnSourceModAllInitialized()
|
||||
ParamType p2[] = {Param_Cell};
|
||||
|
||||
m_clconnect = g_Forwards.CreateForward("OnClientConnect", ET_LowEvent, 3, p1);
|
||||
m_clconnect_post = g_Forwards.CreateForward("OnClientConnected", ET_Ignore, 1, p2);
|
||||
m_clputinserver = g_Forwards.CreateForward("OnClientPutInServer", ET_Ignore, 1, p2);
|
||||
m_cldisconnect = g_Forwards.CreateForward("OnClientDisconnect", ET_Ignore, 1, p2);
|
||||
m_cldisconnect_post = g_Forwards.CreateForward("OnClientDisconnect_Post", ET_Ignore, 1, p2);
|
||||
@@ -150,7 +151,6 @@ void PlayerManager::OnSourceModAllInitialized()
|
||||
m_clauth = g_Forwards.CreateForward("OnClientAuthorized", ET_Ignore, 2, NULL, Param_Cell, Param_String);
|
||||
m_onActivate = g_Forwards.CreateForward("OnServerLoad", ET_Ignore, 0, NULL);
|
||||
m_onActivate2 = g_Forwards.CreateForward("OnMapStart", ET_Ignore, 0, NULL);
|
||||
OnClientConnected = g_Forwards.CreateForward("OnClientConnected", ET_Ignore, 1, p2);
|
||||
|
||||
PreAdminCheck = g_Forwards.CreateForward("OnClientPreAdminCheck", ET_Event, 1, p1);
|
||||
PostAdminCheck = g_Forwards.CreateForward("OnClientPostAdminCheck", ET_Ignore, 1, p1);
|
||||
@@ -159,8 +159,6 @@ void PlayerManager::OnSourceModAllInitialized()
|
||||
m_bIsListenServer = !engine->IsDedicatedServer();
|
||||
m_ListenClient = 0;
|
||||
|
||||
g_ConVarManager.AddConVarChangeListener("tv_enable", this);
|
||||
|
||||
ConCommand *pCmd = FindCommand("maxplayers");
|
||||
if (pCmd != NULL)
|
||||
{
|
||||
@@ -172,6 +170,7 @@ void PlayerManager::OnSourceModAllInitialized()
|
||||
void PlayerManager::OnSourceModShutdown()
|
||||
{
|
||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, serverClients, this, &PlayerManager::OnClientConnect, false);
|
||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, serverClients, this, &PlayerManager::OnClientConnect_Post, true);
|
||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, serverClients, this, &PlayerManager::OnClientPutInServer, true);
|
||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, serverClients, this, &PlayerManager::OnClientDisconnect, false);
|
||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, serverClients, this, &PlayerManager::OnClientDisconnect_Post, true);
|
||||
@@ -181,6 +180,7 @@ void PlayerManager::OnSourceModShutdown()
|
||||
|
||||
/* Release forwards */
|
||||
g_Forwards.ReleaseForward(m_clconnect);
|
||||
g_Forwards.ReleaseForward(m_clconnect_post);
|
||||
g_Forwards.ReleaseForward(m_clputinserver);
|
||||
g_Forwards.ReleaseForward(m_cldisconnect);
|
||||
g_Forwards.ReleaseForward(m_cldisconnect_post);
|
||||
@@ -189,7 +189,6 @@ void PlayerManager::OnSourceModShutdown()
|
||||
g_Forwards.ReleaseForward(m_clauth);
|
||||
g_Forwards.ReleaseForward(m_onActivate);
|
||||
g_Forwards.ReleaseForward(m_onActivate2);
|
||||
g_Forwards.ReleaseForward(OnClientConnected);
|
||||
|
||||
g_Forwards.ReleaseForward(PreAdminCheck);
|
||||
g_Forwards.ReleaseForward(PostAdminCheck);
|
||||
@@ -197,8 +196,6 @@ void PlayerManager::OnSourceModShutdown()
|
||||
|
||||
delete [] m_Players;
|
||||
|
||||
g_ConVarManager.RemoveConVarChangeListener("tv_enable", this);
|
||||
|
||||
if (maxplayersCmd != NULL)
|
||||
{
|
||||
SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, maxplayersCmd, CmdMaxplayersCallback, true);
|
||||
@@ -238,7 +235,10 @@ void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int cl
|
||||
if (!m_FirstPass)
|
||||
{
|
||||
/* Initialize all players */
|
||||
m_maxClients = clientMax;
|
||||
|
||||
// clientMax will not necessarily be correct here (such as on late SourceTV enable)
|
||||
m_maxClients = gpGlobals->maxClients;
|
||||
|
||||
m_PlayerCount = 0;
|
||||
m_Players = new CPlayer[ABSOLUTE_PLAYER_LIMIT + 1];
|
||||
m_AuthQueue = new unsigned int[ABSOLUTE_PLAYER_LIMIT + 1];
|
||||
@@ -478,8 +478,8 @@ bool PlayerManager::OnClientConnect_Post(edict_t *pEntity, const char *pszName,
|
||||
}
|
||||
|
||||
cell_t res;
|
||||
OnClientConnected->PushCell(client);
|
||||
OnClientConnected->Execute(&res, NULL);
|
||||
m_clconnect_post->PushCell(client);
|
||||
m_clconnect_post->Execute(&res, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -522,8 +522,8 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
||||
}
|
||||
|
||||
cell_t res;
|
||||
OnClientConnected->PushCell(client);
|
||||
OnClientConnected->Execute(&res, NULL);
|
||||
m_clconnect_post->PushCell(client);
|
||||
m_clconnect_post->Execute(&res, NULL);
|
||||
|
||||
/* Now do authorization */
|
||||
for (iter=m_hooks.begin(); iter!=m_hooks.end(); iter++)
|
||||
@@ -1343,18 +1343,6 @@ void PlayerManager::ProcessCommandTarget(cmd_target_info_t *info)
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerManager::OnConVarChanged( ConVar *pConVar, const char *oldValue, float flOldValue )
|
||||
{
|
||||
if (pConVar->GetBool() && !atoi(oldValue))
|
||||
{
|
||||
MaxPlayersChanged(gpGlobals->maxClients + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
MaxPlayersChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerManager::OnSourceModMaxPlayersChanged( int newvalue )
|
||||
{
|
||||
m_maxClients = newvalue;
|
||||
@@ -1781,6 +1769,11 @@ unsigned int CPlayer::GetLanguageId()
|
||||
return m_LangId;
|
||||
}
|
||||
|
||||
void CPlayer::SetLanguageId(unsigned int id)
|
||||
{
|
||||
m_LangId = id;
|
||||
}
|
||||
|
||||
int CPlayer::GetUserId()
|
||||
{
|
||||
if (m_UserId == -1)
|
||||
|
||||
@@ -82,6 +82,7 @@ public:
|
||||
bool IsInKickQueue();
|
||||
IPlayerInfo *GetPlayerInfo();
|
||||
unsigned int GetLanguageId();
|
||||
void SetLanguageId(unsigned int id);
|
||||
int GetUserId();
|
||||
bool RunAdminCacheChecks();
|
||||
void NotifyPostAdminChecks();
|
||||
@@ -123,8 +124,7 @@ private:
|
||||
|
||||
class PlayerManager :
|
||||
public SMGlobalClass,
|
||||
public IPlayerManager,
|
||||
public IConVarChangeListener
|
||||
public IPlayerManager
|
||||
{
|
||||
friend class CPlayer;
|
||||
public:
|
||||
@@ -169,8 +169,6 @@ public: //IPlayerManager
|
||||
void UnregisterCommandTargetProcessor(ICommandTargetProcessor *pHandler);
|
||||
void ProcessCommandTarget(cmd_target_info_t *info);
|
||||
int GetClientFromSerial(unsigned int serial);
|
||||
public: // IConVarChangeListener
|
||||
void OnConVarChanged(ConVar *pConVar, const char *oldValue, float flOldValue);
|
||||
public:
|
||||
inline int MaxClients()
|
||||
{
|
||||
@@ -197,6 +195,7 @@ private:
|
||||
private:
|
||||
List<IClientListener *> m_hooks;
|
||||
IForward *m_clconnect;
|
||||
IForward *m_clconnect_post;
|
||||
IForward *m_cldisconnect;
|
||||
IForward *m_cldisconnect_post;
|
||||
IForward *m_clputinserver;
|
||||
|
||||
+1
-1
@@ -2741,6 +2741,6 @@ void CPluginManager::ListPluginsToClient(CPlayer *player, const CCommand &args)
|
||||
/* Do we actually have more plugins? */
|
||||
if (iter != m_plugins.end())
|
||||
{
|
||||
ClientConsolePrint(e, "To see more, type \"sm plugins %d\"", id + 1);
|
||||
ClientConsolePrint(e, "To see more, type \"sm plugins %d\"", id);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -47,7 +47,9 @@
|
||||
#include "sm_trie.h"
|
||||
#include "sourcemod.h"
|
||||
#include <IRootConsoleMenu.h>
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE == SE_ALIENSWARM
|
||||
#include "convar_sm_swarm.h"
|
||||
#elif (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#include "convar_sm_l4d.h"
|
||||
#elif (SOURCE_ENGINE == SE_ORANGEBOX) || (SOURCE_ENGINE == SE_ORANGEBOXVALVE)
|
||||
#include "convar_sm_ob.h"
|
||||
|
||||
+4
-2
@@ -887,8 +887,10 @@ void Translator::RebuildLanguageDatabase(const char *lang_header_file)
|
||||
strncopy(m_InitialLang, "en", sizeof(m_InitialLang));
|
||||
m_ServerLang = SOURCEMOD_LANGUAGE_ENGLISH;
|
||||
}
|
||||
|
||||
m_ServerLang = reinterpret_cast<unsigned int>(serverLang);
|
||||
else
|
||||
{
|
||||
m_ServerLang = reinterpret_cast<unsigned int>(serverLang);
|
||||
}
|
||||
|
||||
if (!m_Languages.size())
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
UserMessages g_UserMsgs;
|
||||
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
SH_DECL_HOOK3(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int, const char *);
|
||||
#else
|
||||
SH_DECL_HOOK2(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int);
|
||||
@@ -168,13 +168,13 @@ bf_write *UserMessages::StartMessage(int msg_id, const cell_t players[], unsigne
|
||||
|
||||
if (m_CurFlags & USERMSG_BLOCKHOOKS)
|
||||
{
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
buffer = ENGINE_CALL(UserMessageBegin)(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, g_SMAPI->GetUserMessage(msg_id));
|
||||
#else
|
||||
buffer = ENGINE_CALL(UserMessageBegin)(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id);
|
||||
#endif
|
||||
} else {
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
buffer = engine->UserMessageBegin(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, g_SMAPI->GetUserMessage(msg_id));
|
||||
#else
|
||||
buffer = engine->UserMessageBegin(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id);
|
||||
@@ -316,7 +316,7 @@ void UserMessages::_DecRefCounter()
|
||||
}
|
||||
}
|
||||
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name)
|
||||
#else
|
||||
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type)
|
||||
@@ -346,7 +346,7 @@ bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_typ
|
||||
RETURN_META_VALUE(MRES_IGNORED, NULL);
|
||||
}
|
||||
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name)
|
||||
#else
|
||||
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type)
|
||||
@@ -500,7 +500,7 @@ void UserMessages::OnMessageEnd_Pre()
|
||||
{
|
||||
bf_write *engine_bfw;
|
||||
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
engine_bfw = ENGINE_CALL(UserMessageBegin)(m_CurRecFilter, m_CurId, g_SMAPI->GetUserMessage(m_CurId));
|
||||
#else
|
||||
engine_bfw = ENGINE_CALL(UserMessageBegin)(m_CurRecFilter, m_CurId);
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -79,7 +79,7 @@ public: //IUserMessages
|
||||
IUserMessageListener *pListener,
|
||||
bool intercept=false);
|
||||
public:
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
bf_write *OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name);
|
||||
bf_write *OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name);
|
||||
#else
|
||||
|
||||
@@ -386,7 +386,7 @@ public:
|
||||
virtual void SetValue( const char *value );
|
||||
virtual void SetValue( float value );
|
||||
virtual void SetValue( int value );
|
||||
#if SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD2
|
||||
virtual void SetValue( Color value );
|
||||
#endif
|
||||
|
||||
@@ -404,6 +404,9 @@ private:
|
||||
// For CVARs marked FCVAR_NEVER_AS_STRING
|
||||
virtual void InternalSetFloatValue( float fNewValue );
|
||||
virtual void InternalSetIntValue( int nValue );
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD2
|
||||
virtual void InternalSetColorValue( Color value );
|
||||
#endif
|
||||
|
||||
virtual bool ClampValue( float& value );
|
||||
virtual void ChangeStringValue( const char *tempVal, float flOldValue );
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -341,15 +341,46 @@ void ProfileEngine::OnRootConsoleCommand2(const char *cmdname, const ICommandArg
|
||||
GenerateReport(fp);
|
||||
|
||||
fclose(fp);
|
||||
|
||||
Clear();
|
||||
|
||||
rootmenu->ConsolePrint("Profiler report generated as: %s\n", path);
|
||||
|
||||
return;
|
||||
}
|
||||
else if (strcmp(command->Arg(2), "report") == 0)
|
||||
{
|
||||
FILE *fp;
|
||||
char path[256];
|
||||
|
||||
g_pSM->BuildPath(Path_SM, path, sizeof(path), "logs/profile_%d.xml", (int)time(NULL));
|
||||
|
||||
if ((fp = fopen(path, "wt")) == NULL)
|
||||
{
|
||||
rootmenu->ConsolePrint("Failed, could not open file for writing: %s", path);
|
||||
return;
|
||||
}
|
||||
|
||||
GenerateReport(fp);
|
||||
|
||||
fclose(fp);
|
||||
|
||||
rootmenu->ConsolePrint("Profiler report generated as: %s\n", path);
|
||||
return;
|
||||
}
|
||||
else if (strcmp(command->Arg(2), "clear") == 0)
|
||||
{
|
||||
Clear();
|
||||
|
||||
rootmenu->ConsolePrint("Profiler statistics cleared.\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
rootmenu->ConsolePrint("Profiler commands:");
|
||||
rootmenu->DrawGenericOption("flush", "Flushes statistics to disk and starts over");
|
||||
rootmenu->DrawGenericOption("report", "Flushes statistics to disk");
|
||||
rootmenu->DrawGenericOption("clear", "Clears statistics");
|
||||
}
|
||||
|
||||
bool ProfileEngine::GenerateReport(FILE *fp)
|
||||
|
||||
+2
-1
@@ -328,9 +328,10 @@ void RootConsoleMenu::OnRootConsoleCommand(const char *cmdname, const CCommand &
|
||||
ConsolePrint(" Matt \"pRED\" Woodrow");
|
||||
ConsolePrint(" Scott \"DS\" Ehlert");
|
||||
ConsolePrint(" Fyren");
|
||||
ConsolePrint(" Nicholas \"psychonic\" Hastings");
|
||||
ConsolePrint(" Borja \"faluco\" Ferrer");
|
||||
ConsolePrint(" Pavol \"PM OnoTo\" Marko");
|
||||
ConsolePrint(" Special thanks to Liam, psychonic, ferret, and Mani");
|
||||
ConsolePrint(" Special thanks to Liam, ferret, and Mani");
|
||||
ConsolePrint(" Special thanks to Viper and SteamFriends");
|
||||
ConsolePrint(" http://www.sourcemod.net/");
|
||||
}
|
||||
|
||||
@@ -505,6 +505,22 @@ static cell_t FindFlagByChar(IPluginContext *pContext, const cell_t *params)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell_t FindFlagChar(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
cell_t *addr;
|
||||
pContext->LocalToPhysAddr(params[2], &addr);
|
||||
|
||||
char flagchar;
|
||||
if (!g_Admins.FindFlagChar((AdminFlag)params[1], &flagchar))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
*addr = (cell_t)flagchar;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell_t ReadFlagString(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
char *flag;
|
||||
@@ -561,6 +577,7 @@ REGISTER_NATIVES(adminNatives)
|
||||
{"CreateAuthMethod", CreateAuthMethod},
|
||||
{"FindFlagByName", FindFlagByName},
|
||||
{"FindFlagByChar", FindFlagByChar},
|
||||
{"FindFlagChar", FindFlagChar},
|
||||
{"ReadFlagString", ReadFlagString},
|
||||
{"GetAdmGroupImmunityLevel",GetAdmGroupImmunityLevel},
|
||||
{"SetAdmGroupImmunityLevel",SetAdmGroupImmunityLevel},
|
||||
|
||||
+40
-56
@@ -45,6 +45,7 @@
|
||||
#include <sm_trie_tpl.h>
|
||||
#include "Logger.h"
|
||||
#include "ConsoleDetours.h"
|
||||
#include "ConCommandBaseIterator.h"
|
||||
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOXVALVE
|
||||
#define NETMSG_BITS 6
|
||||
@@ -52,7 +53,7 @@
|
||||
#define NETMSG_BITS 5
|
||||
#endif
|
||||
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
#define NET_SETCONVAR 6
|
||||
#else
|
||||
#define NET_SETCONVAR 5
|
||||
@@ -73,15 +74,6 @@ struct GlobCmdIter
|
||||
List<ConCmdInfo *>::iterator iter;
|
||||
};
|
||||
|
||||
struct ConCmdIter
|
||||
{
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
ICvarIteratorInternal *pLast;
|
||||
#else
|
||||
const ConCommandBase *pLast;
|
||||
#endif
|
||||
};
|
||||
|
||||
class ConsoleHelpers :
|
||||
public SMGlobalClass,
|
||||
public IHandleTypeDispatch
|
||||
@@ -108,11 +100,7 @@ public:
|
||||
}
|
||||
else if (type == htConCmdIter)
|
||||
{
|
||||
ConCmdIter *iter = (ConCmdIter * )object;
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
// ICvarIteratorInternal has no virtual destructor
|
||||
g_pMemAlloc->Free(iter->pLast);
|
||||
#endif
|
||||
ConCommandBaseIterator *iter = (ConCommandBaseIterator * )object;
|
||||
delete iter;
|
||||
}
|
||||
}
|
||||
@@ -120,7 +108,7 @@ public:
|
||||
{
|
||||
if (type == htConCmdIter)
|
||||
{
|
||||
*pSize = sizeof(ConCmdIter);
|
||||
*pSize = sizeof(ConCommandBaseIterator);
|
||||
return true;
|
||||
}
|
||||
else if (type == hCmdIterType)
|
||||
@@ -187,7 +175,7 @@ private:
|
||||
KTrie<ConCommandBase *> m_CmdFlags;
|
||||
} s_CommandFlagsHelper;
|
||||
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
#if SOURCE_ENGINE < SE_ORANGEBOX
|
||||
static void ReplicateConVar(ConVar *pConVar)
|
||||
{
|
||||
int maxClients = g_Players.GetMaxClients();
|
||||
@@ -361,7 +349,7 @@ static cell_t sm_SetConVarNum(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
pConVar->SetValue(params[2]);
|
||||
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
#if SOURCE_ENGINE < SE_ORANGEBOX
|
||||
/* Should we replicate it? */
|
||||
if (params[3] && IsFlagSet(pConVar, FCVAR_REPLICATED))
|
||||
{
|
||||
@@ -410,7 +398,7 @@ static cell_t sm_SetConVarFloat(IPluginContext *pContext, const cell_t *params)
|
||||
float value = sp_ctof(params[2]);
|
||||
pConVar->SetValue(value);
|
||||
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
#if SOURCE_ENGINE < SE_ORANGEBOX
|
||||
/* Should we replicate it? */
|
||||
if (params[3] && IsFlagSet(pConVar, FCVAR_REPLICATED))
|
||||
{
|
||||
@@ -461,7 +449,7 @@ static cell_t sm_SetConVarString(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
pConVar->SetValue(value);
|
||||
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
#if SOURCE_ENGINE < SE_ORANGEBOX
|
||||
/* Should we replicate it? */
|
||||
if (params[3] && IsFlagSet(pConVar, FCVAR_REPLICATED))
|
||||
{
|
||||
@@ -492,7 +480,7 @@ static cell_t sm_ResetConVar(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
pConVar->Revert();
|
||||
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
#if SOURCE_ENGINE < SE_ORANGEBOX
|
||||
/* Should we replicate it? */
|
||||
if (params[3] && IsFlagSet(pConVar, FCVAR_REPLICATED))
|
||||
{
|
||||
@@ -509,6 +497,24 @@ static cell_t sm_ResetConVar(IPluginContext *pContext, const cell_t *params)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell_t GetConVarDefault(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
Handle_t hndl = static_cast<Handle_t>(params[1]);
|
||||
HandleError err;
|
||||
ConVar *pConVar;
|
||||
|
||||
if ((err=g_ConVarManager.ReadConVarHandle(hndl, &pConVar))
|
||||
!= HandleError_None)
|
||||
{
|
||||
return pContext->ThrowNativeError("Invalid convar handle %x (error %d)", hndl, err);
|
||||
}
|
||||
|
||||
size_t bytes;
|
||||
pContext->StringToLocalUTF8(params[2], params[3], pConVar->GetDefault(), &bytes);
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
static cell_t sm_GetConVarFlags(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
Handle_t hndl = static_cast<Handle_t>(params[1]);
|
||||
@@ -1184,7 +1190,7 @@ static cell_t GetCommandFlags(IPluginContext *pContext, const cell_t *params)
|
||||
static cell_t FindFirstConCommand(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
Handle_t hndl;
|
||||
ConCmdIter *pIter;
|
||||
ConCommandBaseIterator *pIter;
|
||||
cell_t *pIsCmd, *pFlags;
|
||||
const ConCommandBase *pConCmd;
|
||||
const char *desc;
|
||||
@@ -1192,21 +1198,15 @@ static cell_t FindFirstConCommand(IPluginContext *pContext, const cell_t *params
|
||||
pContext->LocalToPhysAddr(params[3], &pIsCmd);
|
||||
pContext->LocalToPhysAddr(params[4], &pFlags);
|
||||
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
ICvarIteratorInternal *cvarIter = icvar->FactoryInternalIterator();
|
||||
cvarIter->SetFirst();
|
||||
if (!cvarIter->IsValid())
|
||||
pIter = new ConCommandBaseIterator();
|
||||
|
||||
if (!pIter->IsValid())
|
||||
{
|
||||
delete pIter;
|
||||
return BAD_HANDLE;
|
||||
}
|
||||
pConCmd = cvarIter->Get();
|
||||
#else
|
||||
pConCmd = icvar->GetCommands();
|
||||
if (pConCmd == NULL)
|
||||
{
|
||||
return BAD_HANDLE;
|
||||
}
|
||||
#endif
|
||||
|
||||
pConCmd = pIter->Get();
|
||||
|
||||
pContext->StringToLocalUTF8(params[1], params[2], pConCmd->GetName(), NULL);
|
||||
*pIsCmd = pConCmd->IsCommand() ? 1 : 0;
|
||||
@@ -1218,13 +1218,6 @@ static cell_t FindFirstConCommand(IPluginContext *pContext, const cell_t *params
|
||||
pContext->StringToLocalUTF8(params[5], params[6], (desc && desc[0]) ? desc : "", NULL);
|
||||
}
|
||||
|
||||
pIter = new ConCmdIter;
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
pIter->pLast = cvarIter;
|
||||
#else
|
||||
pIter->pLast = pConCmd;
|
||||
#endif
|
||||
|
||||
if ((hndl = g_HandleSys.CreateHandle(htConCmdIter, pIter, pContext->GetIdentity(), g_pCoreIdent, NULL))
|
||||
== BAD_HANDLE)
|
||||
{
|
||||
@@ -1238,7 +1231,7 @@ static cell_t FindFirstConCommand(IPluginContext *pContext, const cell_t *params
|
||||
static cell_t FindNextConCommand(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
HandleError err;
|
||||
ConCmdIter *pIter;
|
||||
ConCommandBaseIterator *pIter;
|
||||
cell_t *pIsCmd, *pFlags;
|
||||
const char *desc;
|
||||
const ConCommandBase *pConCmd;
|
||||
@@ -1249,27 +1242,17 @@ static cell_t FindNextConCommand(IPluginContext *pContext, const cell_t *params)
|
||||
return pContext->ThrowNativeError("Invalid Handle %x (error %d)", params[1], err);
|
||||
}
|
||||
|
||||
if (pIter->pLast == NULL)
|
||||
if (!pIter->IsValid())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
ICvarIteratorInternal *cvarIter = pIter->pLast;
|
||||
cvarIter->Next();
|
||||
if (!cvarIter->IsValid())
|
||||
pIter->Next();
|
||||
if (!pIter->IsValid())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
pConCmd = cvarIter->Get();
|
||||
#else
|
||||
pConCmd = pIter->pLast->GetNext();
|
||||
if (pConCmd == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
pIter->pLast = pConCmd;
|
||||
#endif
|
||||
pConCmd = pIter->Get();
|
||||
|
||||
pContext->LocalToPhysAddr(params[4], &pIsCmd);
|
||||
pContext->LocalToPhysAddr(params[5], &pFlags);
|
||||
@@ -1409,6 +1392,7 @@ REGISTER_NATIVES(consoleNatives)
|
||||
{"GetConVarBounds", sm_GetConVarBounds},
|
||||
{"SetConVarBounds", sm_SetConVarBounds},
|
||||
{"QueryClientConVar", sm_QueryClientConVar},
|
||||
{"GetConVarDefault", GetConVarDefault},
|
||||
{"RegServerCmd", sm_RegServerCmd},
|
||||
{"RegConsoleCmd", sm_RegConsoleCmd},
|
||||
{"GetCmdArgString", sm_GetCmdArgString},
|
||||
|
||||
+305
-12
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -37,6 +37,44 @@
|
||||
#include "GameConfigs.h"
|
||||
#include "sm_stringutil.h"
|
||||
|
||||
// These values need to mirror the values in entity_prop_stocks
|
||||
#define ENTFLAG_ONGROUND (1 << 0)
|
||||
#define ENTFLAG_DUCKING (1 << 1)
|
||||
#define ENTFLAG_WATERJUMP (1 << 2)
|
||||
#define ENTFLAG_ONTRAIN (1 << 3)
|
||||
#define ENTFLAG_INRAIN (1 << 4)
|
||||
#define ENTFLAG_FROZEN (1 << 5)
|
||||
#define ENTFLAG_ATCONTROLS (1 << 6)
|
||||
#define ENTFLAG_CLIENT (1 << 7)
|
||||
#define ENTFLAG_FAKECLIENT (1 << 8)
|
||||
#define ENTFLAG_INWATER (1 << 9)
|
||||
#define ENTFLAG_FLY (1 << 10)
|
||||
#define ENTFLAG_SWIM (1 << 11)
|
||||
#define ENTFLAG_CONVEYOR (1 << 12)
|
||||
#define ENTFLAG_NPC (1 << 13)
|
||||
#define ENTFLAG_GODMODE (1 << 14)
|
||||
#define ENTFLAG_NOTARGET (1 << 15)
|
||||
#define ENTFLAG_AIMTARGET (1 << 16)
|
||||
#define ENTFLAG_PARTIALGROUND (1 << 17)
|
||||
#define ENTFLAG_STATICPROP (1 << 18)
|
||||
#define ENTFLAG_GRAPHED (1 << 19)
|
||||
#define ENTFLAG_GRENADE (1 << 20)
|
||||
#define ENTFLAG_STEPMOVEMENT (1 << 21)
|
||||
#define ENTFLAG_DONTTOUCH (1 << 22)
|
||||
#define ENTFLAG_BASEVELOCITY (1 << 23)
|
||||
#define ENTFLAG_WORLDBRUSH (1 << 24)
|
||||
#define ENTFLAG_OBJECT (1 << 25)
|
||||
#define ENTFLAG_KILLME (1 << 26)
|
||||
#define ENTFLAG_ONFIRE (1 << 27)
|
||||
#define ENTFLAG_DISSOLVING (1 << 28)
|
||||
#define ENTFLAG_TRANSRAGDOLL (1 << 29)
|
||||
#define ENTFLAG_UNBLOCKABLE_BY_PLAYER (1 << 30)
|
||||
#define ENTFLAG_FREEZING (1 << 31)
|
||||
#define ENTFLAG_EP2V_UNKNOWN1 (1 << 31)
|
||||
|
||||
// Not defined in the sdk as we have no clue what it is
|
||||
#define FL_EP2V_UNKNOWN (1 << 2)
|
||||
|
||||
enum PropType
|
||||
{
|
||||
Prop_Send = 0,
|
||||
@@ -859,7 +897,7 @@ static cell_t FindDataMapOffs(IPluginContext *pContext, const cell_t *params)
|
||||
}
|
||||
}
|
||||
|
||||
return td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
return GetTypeDescOffs(td);
|
||||
}
|
||||
|
||||
static cell_t GetEntDataString(IPluginContext *pContext, const cell_t *params)
|
||||
@@ -1003,7 +1041,7 @@ static cell_t GetEntProp(IPluginContext *pContext, const cell_t *params)
|
||||
td->fieldType);
|
||||
}
|
||||
|
||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(td);
|
||||
break;
|
||||
}
|
||||
case Prop_Send:
|
||||
@@ -1092,7 +1130,7 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params)
|
||||
td->fieldType);
|
||||
}
|
||||
|
||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(td);
|
||||
break;
|
||||
}
|
||||
case Prop_Send:
|
||||
@@ -1142,6 +1180,11 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params)
|
||||
*(bool *)((uint8_t *)pEntity + offset) = params[4] ? true : false;
|
||||
}
|
||||
|
||||
if (params[2] == Prop_Send && (pEdict != NULL))
|
||||
{
|
||||
g_HL2.SetEdictStateChanged(pEdict, offset);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1183,7 +1226,7 @@ static cell_t GetEntPropFloat(IPluginContext *pContext, const cell_t *params)
|
||||
FIELD_TIME);
|
||||
}
|
||||
|
||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(td);
|
||||
break;
|
||||
}
|
||||
case Prop_Send:
|
||||
@@ -1252,7 +1295,7 @@ static cell_t SetEntPropFloat(IPluginContext *pContext, const cell_t *params)
|
||||
FIELD_TIME);
|
||||
}
|
||||
|
||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(td);
|
||||
break;
|
||||
}
|
||||
case Prop_Send:
|
||||
@@ -1324,7 +1367,7 @@ static cell_t GetEntPropEnt(IPluginContext *pContext, const cell_t *params)
|
||||
FIELD_EHANDLE);
|
||||
}
|
||||
|
||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(td);
|
||||
break;
|
||||
}
|
||||
case Prop_Send:
|
||||
@@ -1392,7 +1435,7 @@ static cell_t SetEntPropEnt(IPluginContext *pContext, const cell_t *params)
|
||||
FIELD_EHANDLE);
|
||||
}
|
||||
|
||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(td);
|
||||
break;
|
||||
}
|
||||
case Prop_Send:
|
||||
@@ -1483,7 +1526,7 @@ static cell_t GetEntPropVector(IPluginContext *pContext, const cell_t *params)
|
||||
FIELD_POSITION_VECTOR);
|
||||
}
|
||||
|
||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(td);
|
||||
break;
|
||||
}
|
||||
case Prop_Send:
|
||||
@@ -1559,7 +1602,7 @@ static cell_t SetEntPropVector(IPluginContext *pContext, const cell_t *params)
|
||||
FIELD_POSITION_VECTOR);
|
||||
}
|
||||
|
||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(td);
|
||||
break;
|
||||
}
|
||||
case Prop_Send:
|
||||
@@ -1646,7 +1689,7 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
bIsStringIndex = (td->fieldType != FIELD_CHARACTER);
|
||||
|
||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(td);
|
||||
break;
|
||||
}
|
||||
case Prop_Send:
|
||||
@@ -1725,7 +1768,7 @@ static cell_t SetEntPropString(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
return pContext->ThrowNativeError("Property \"%s\" is not a valid string", prop);
|
||||
}
|
||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(td);
|
||||
maxlen = td->fieldSize;
|
||||
break;
|
||||
}
|
||||
@@ -1772,6 +1815,254 @@ static cell_t SetEntPropString(IPluginContext *pContext, const cell_t *params)
|
||||
return len;
|
||||
}
|
||||
|
||||
static int32_t SDKEntFlagToSMEntFlag(int flag)
|
||||
{
|
||||
switch (flag)
|
||||
{
|
||||
case FL_ONGROUND:
|
||||
return ENTFLAG_ONGROUND;
|
||||
case FL_DUCKING:
|
||||
return ENTFLAG_DUCKING;
|
||||
case FL_WATERJUMP:
|
||||
return ENTFLAG_WATERJUMP;
|
||||
case FL_ONTRAIN:
|
||||
return ENTFLAG_ONTRAIN;
|
||||
case FL_INRAIN:
|
||||
return ENTFLAG_INRAIN;
|
||||
case FL_FROZEN:
|
||||
return ENTFLAG_FROZEN;
|
||||
case FL_ATCONTROLS:
|
||||
return ENTFLAG_ATCONTROLS;
|
||||
case FL_CLIENT:
|
||||
return ENTFLAG_CLIENT;
|
||||
case FL_FAKECLIENT:
|
||||
return ENTFLAG_FAKECLIENT;
|
||||
case FL_INWATER:
|
||||
return ENTFLAG_INWATER;
|
||||
case FL_FLY:
|
||||
return ENTFLAG_FLY;
|
||||
case FL_SWIM:
|
||||
return ENTFLAG_SWIM;
|
||||
case FL_CONVEYOR:
|
||||
return ENTFLAG_CONVEYOR;
|
||||
case FL_NPC:
|
||||
return ENTFLAG_NPC;
|
||||
case FL_GODMODE:
|
||||
return ENTFLAG_GODMODE;
|
||||
case FL_NOTARGET:
|
||||
return ENTFLAG_NOTARGET;
|
||||
case FL_AIMTARGET:
|
||||
return ENTFLAG_AIMTARGET;
|
||||
case FL_PARTIALGROUND:
|
||||
return ENTFLAG_PARTIALGROUND;
|
||||
case FL_STATICPROP:
|
||||
return ENTFLAG_STATICPROP;
|
||||
case FL_GRAPHED:
|
||||
return ENTFLAG_GRAPHED;
|
||||
case FL_GRENADE:
|
||||
return ENTFLAG_GRENADE;
|
||||
case FL_STEPMOVEMENT:
|
||||
return ENTFLAG_STEPMOVEMENT;
|
||||
case FL_DONTTOUCH:
|
||||
return ENTFLAG_DONTTOUCH;
|
||||
case FL_BASEVELOCITY:
|
||||
return ENTFLAG_BASEVELOCITY;
|
||||
case FL_WORLDBRUSH:
|
||||
return ENTFLAG_WORLDBRUSH;
|
||||
case FL_OBJECT:
|
||||
return ENTFLAG_OBJECT;
|
||||
case FL_KILLME:
|
||||
return ENTFLAG_KILLME;
|
||||
case FL_ONFIRE:
|
||||
return ENTFLAG_ONFIRE;
|
||||
case FL_DISSOLVING:
|
||||
return ENTFLAG_DISSOLVING;
|
||||
case FL_TRANSRAGDOLL:
|
||||
return ENTFLAG_TRANSRAGDOLL;
|
||||
case FL_UNBLOCKABLE_BY_PLAYER:
|
||||
return ENTFLAG_UNBLOCKABLE_BY_PLAYER;
|
||||
#if SOURCE_ENGINE == SE_ALIENSWARM
|
||||
case FL_FREEZING:
|
||||
return ENTFLAG_FREEZING;
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
case FL_EP2V_UNKNOWN:
|
||||
return ENTFLAG_EP2V_UNKNOWN1;
|
||||
#endif
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int32_t SMEntFlagToSDKEntFlag(int32_t flag)
|
||||
{
|
||||
switch (flag)
|
||||
{
|
||||
case ENTFLAG_ONGROUND:
|
||||
return FL_ONGROUND;
|
||||
case ENTFLAG_DUCKING:
|
||||
return FL_DUCKING;
|
||||
case ENTFLAG_WATERJUMP:
|
||||
return FL_WATERJUMP;
|
||||
case ENTFLAG_ONTRAIN:
|
||||
return FL_ONTRAIN;
|
||||
case ENTFLAG_INRAIN:
|
||||
return FL_INRAIN;
|
||||
case ENTFLAG_FROZEN:
|
||||
return FL_FROZEN;
|
||||
case ENTFLAG_ATCONTROLS:
|
||||
return FL_ATCONTROLS;
|
||||
case ENTFLAG_CLIENT:
|
||||
return FL_CLIENT;
|
||||
case ENTFLAG_FAKECLIENT:
|
||||
return FL_FAKECLIENT;
|
||||
case ENTFLAG_INWATER:
|
||||
return FL_INWATER;
|
||||
case ENTFLAG_FLY:
|
||||
return FL_FLY;
|
||||
case ENTFLAG_SWIM:
|
||||
return FL_SWIM;
|
||||
case ENTFLAG_CONVEYOR:
|
||||
return FL_CONVEYOR;
|
||||
case ENTFLAG_NPC:
|
||||
return FL_NPC;
|
||||
case ENTFLAG_GODMODE:
|
||||
return FL_GODMODE;
|
||||
case ENTFLAG_NOTARGET:
|
||||
return FL_NOTARGET;
|
||||
case ENTFLAG_AIMTARGET:
|
||||
return FL_AIMTARGET;
|
||||
case ENTFLAG_PARTIALGROUND:
|
||||
return FL_PARTIALGROUND;
|
||||
case ENTFLAG_STATICPROP:
|
||||
return FL_STATICPROP;
|
||||
case ENTFLAG_GRAPHED:
|
||||
return FL_GRAPHED;
|
||||
case ENTFLAG_GRENADE:
|
||||
return FL_GRENADE;
|
||||
case ENTFLAG_STEPMOVEMENT:
|
||||
return FL_STEPMOVEMENT;
|
||||
case ENTFLAG_DONTTOUCH:
|
||||
return FL_DONTTOUCH;
|
||||
case ENTFLAG_BASEVELOCITY:
|
||||
return FL_BASEVELOCITY;
|
||||
case ENTFLAG_WORLDBRUSH:
|
||||
return FL_WORLDBRUSH;
|
||||
case ENTFLAG_OBJECT:
|
||||
return FL_OBJECT;
|
||||
case ENTFLAG_KILLME:
|
||||
return FL_KILLME;
|
||||
case ENTFLAG_ONFIRE:
|
||||
return FL_ONFIRE;
|
||||
case ENTFLAG_DISSOLVING:
|
||||
return FL_DISSOLVING;
|
||||
case ENTFLAG_TRANSRAGDOLL:
|
||||
return FL_TRANSRAGDOLL;
|
||||
case ENTFLAG_UNBLOCKABLE_BY_PLAYER:
|
||||
return FL_UNBLOCKABLE_BY_PLAYER;
|
||||
#if SOURCE_ENGINE == SE_ALIENSWARM
|
||||
case ENTFLAG_FREEZING:
|
||||
return FL_FREEZING;
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
case ENTFLAG_EP2V_UNKNOWN1:
|
||||
return FL_EP2V_UNKNOWN;
|
||||
#endif
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static cell_t GetEntityFlags(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
CBaseEntity *pEntity = g_HL2.ReferenceToEntity(params[1]);
|
||||
if (!pEntity)
|
||||
{
|
||||
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
|
||||
}
|
||||
|
||||
const char *prop = g_pGameConf->GetKeyValue("m_fFlags");
|
||||
if (!prop)
|
||||
{
|
||||
return pContext->ThrowNativeError("Could not find m_fFlags prop in gamedata");
|
||||
}
|
||||
|
||||
typedescription_t *td;
|
||||
datamap_t *pMap;
|
||||
|
||||
if ((pMap = CBaseEntity_GetDataDescMap(pEntity)) == NULL)
|
||||
{
|
||||
return pContext->ThrowNativeError("Could not retrieve datamap");
|
||||
}
|
||||
if ((td = g_HL2.FindInDataMap(pMap, prop)) == NULL)
|
||||
{
|
||||
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d)",
|
||||
prop,
|
||||
params[1]);
|
||||
}
|
||||
|
||||
int offset = GetTypeDescOffs(td);
|
||||
|
||||
int32_t actual_flags = *(int32_t *)((uint8_t *)pEntity + offset);
|
||||
int32_t sm_flags = 0;
|
||||
|
||||
for (int32_t i = 0; i < 32; i++)
|
||||
{
|
||||
int32_t flag = (1<<i);
|
||||
if ((actual_flags & flag) == flag)
|
||||
{
|
||||
sm_flags |= SDKEntFlagToSMEntFlag(flag);
|
||||
}
|
||||
}
|
||||
|
||||
return sm_flags;
|
||||
}
|
||||
|
||||
static cell_t SetEntityFlags(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
CBaseEntity *pEntity = g_HL2.ReferenceToEntity(params[1]);
|
||||
if (!pEntity)
|
||||
{
|
||||
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
|
||||
}
|
||||
|
||||
const char *prop = g_pGameConf->GetKeyValue("m_fFlags");
|
||||
if (!prop)
|
||||
{
|
||||
return pContext->ThrowNativeError("Could not find m_fFlags prop in gamedata");
|
||||
}
|
||||
|
||||
typedescription_t *td;
|
||||
datamap_t *pMap;
|
||||
|
||||
if ((pMap = CBaseEntity_GetDataDescMap(pEntity)) == NULL)
|
||||
{
|
||||
return pContext->ThrowNativeError("Could not retrieve datamap");
|
||||
}
|
||||
if ((td = g_HL2.FindInDataMap(pMap, prop)) == NULL)
|
||||
{
|
||||
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d)",
|
||||
prop,
|
||||
params[1]);
|
||||
}
|
||||
|
||||
int offset = GetTypeDescOffs(td);
|
||||
|
||||
int32_t sm_flags = params[2];
|
||||
int32_t actual_flags = 0;
|
||||
|
||||
for (int32_t i = 0; i < 32; i++)
|
||||
{
|
||||
int32_t flag = (1<<i);
|
||||
if ((sm_flags & flag) == flag)
|
||||
{
|
||||
actual_flags |= SMEntFlagToSDKEntFlag(flag);
|
||||
}
|
||||
}
|
||||
|
||||
*(int32_t *)((uint8_t *)pEntity + offset) = actual_flags;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
REGISTER_NATIVES(entityNatives)
|
||||
{
|
||||
{"ChangeEdictState", ChangeEdictState},
|
||||
@@ -1793,6 +2084,7 @@ REGISTER_NATIVES(entityNatives)
|
||||
{"GetEntPropString", GetEntPropString},
|
||||
{"GetEntPropVector", GetEntPropVector},
|
||||
{"GetEntityCount", GetEntityCount},
|
||||
{"GetEntityFlags", GetEntityFlags},
|
||||
{"GetEntityNetClass", GetEntityNetClass},
|
||||
{"GetMaxEntities", GetMaxEntities},
|
||||
{"IsEntNetworkable", IsEntNetworkable},
|
||||
@@ -1806,6 +2098,7 @@ REGISTER_NATIVES(entityNatives)
|
||||
{"SetEntDataFloat", SetEntDataFloat},
|
||||
{"SetEntDataVector", SetEntDataVector},
|
||||
{"SetEntDataString", SetEntDataString},
|
||||
{"SetEntityFlags", SetEntityFlags},
|
||||
{"SetEntProp", SetEntProp},
|
||||
{"SetEntPropEnt", SetEntPropEnt},
|
||||
{"SetEntPropFloat", SetEntPropFloat},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -73,7 +73,7 @@ static cell_t IsDedicatedServer(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
static cell_t GetEngineTime(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
#if SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD2
|
||||
float fTime = Plat_FloatTime();
|
||||
#else
|
||||
float fTime = engine->Time();
|
||||
@@ -465,6 +465,8 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
|
||||
return 40;
|
||||
case SOURCE_ENGINE_LEFT4DEAD2:
|
||||
return 50;
|
||||
case SOURCE_ENGINE_ALIENSWARM:
|
||||
return 60;
|
||||
# endif
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -104,6 +104,46 @@ static cell_t sm_GetLanguageInfo(IPluginContext *pContext, const cell_t *params)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell_t sm_SetClientLanguage(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
CPlayer *player = g_Players.GetPlayerByIndex(params[1]);
|
||||
|
||||
if (!player || !player->IsInGame())
|
||||
{
|
||||
return pContext->ThrowNativeError("Invalid client index %d", params[1]);
|
||||
}
|
||||
|
||||
player->SetLanguageId(params[2]);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell_t sm_GetLanguageByCode(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
char *code;
|
||||
unsigned int langid;
|
||||
|
||||
pContext->LocalToString(params[1], &code);
|
||||
|
||||
if (g_Translator.GetLanguageByCode(code, &langid))
|
||||
return langid;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static cell_t sm_GetLanguageByName(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
char *name;
|
||||
unsigned int langid;
|
||||
|
||||
pContext->LocalToString(params[1], &name);
|
||||
|
||||
if (g_Translator.GetLanguageByName(name, &langid))
|
||||
return langid;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
REGISTER_NATIVES(langNatives)
|
||||
{
|
||||
{"LoadTranslations", sm_LoadTranslations},
|
||||
@@ -112,5 +152,8 @@ REGISTER_NATIVES(langNatives)
|
||||
{"GetServerLanguage", sm_GetServerLanguage},
|
||||
{"GetLanguageCount", sm_GetLanguageCount},
|
||||
{"GetLanguageInfo", sm_GetLanguageInfo},
|
||||
{"SetClientLanguage", sm_SetClientLanguage},
|
||||
{"GetLanguageByCode", sm_GetLanguageByCode},
|
||||
{"GetLanguageByName", sm_GetLanguageByName},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
+4
-2
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -32,7 +32,9 @@
|
||||
#ifndef _INCLUDE_SOURCEMOD_MM_API_H_
|
||||
#define _INCLUDE_SOURCEMOD_MM_API_H_
|
||||
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE == SE_ALIENSWARM
|
||||
#include "convar_sm_swarm.h"
|
||||
#elif (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#include "convar_sm_l4d.h"
|
||||
#elif (SOURCE_ENGINE == SE_ORANGEBOX) || (SOURCE_ENGINE == SE_ORANGEBOXVALVE)
|
||||
#include "convar_sm_ob.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
||||
#define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
||||
|
||||
#define MAXCLIENTS 64
|
||||
#define MAXCLIENTS 65
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
@@ -65,7 +65,7 @@ void TimeLeftEvents::FireGameEvent(IGameEvent *event)
|
||||
}
|
||||
else if (strcmp(name, "round_end") == 0)
|
||||
{
|
||||
if (event->GetInt("reason") == 16)
|
||||
if (event->GetInt("reason") == 15)
|
||||
{
|
||||
get_new_timeleft_offset = true;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod MySQL Extension
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -60,12 +60,12 @@ void DBI_MySQL::SDK_OnUnload()
|
||||
//mysql_library_end();
|
||||
}
|
||||
|
||||
const char *DBI_MySQL::GetVersion()
|
||||
const char *DBI_MySQL::GetExtensionVerString()
|
||||
{
|
||||
return SM_FULL_VERSION;
|
||||
}
|
||||
|
||||
const char *DBI_MySQL::GetDate()
|
||||
const char *DBI_MySQL::GetExtensionDateString()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod MySQL Extension
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -81,8 +81,8 @@ public:
|
||||
* @return True if working, false otherwise.
|
||||
*/
|
||||
//virtual bool QueryRunning(char *error, size_t maxlength);
|
||||
const char *GetVersion();
|
||||
const char *GetDate();
|
||||
const char *GetExtensionVerString();
|
||||
const char *GetExtensionDateString();
|
||||
public:
|
||||
#if defined SMEXT_CONF_METAMOD
|
||||
/**
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
CHookManager g_Hooks;
|
||||
static bool PRCH_enabled = false;
|
||||
static bool PRCH_used = false;
|
||||
|
||||
SH_DECL_MANUALHOOK2_void(PlayerRunCmdHook, 0, 0, 0, CUserCmd *, IMoveHelper *);
|
||||
|
||||
@@ -51,12 +52,16 @@ void CHookManager::Initialize()
|
||||
PRCH_enabled = true;
|
||||
}
|
||||
|
||||
plsys->AddPluginsListener(this);
|
||||
|
||||
m_usercmdsFwd = forwards->CreateForward("OnPlayerRunCmd", ET_Event, 6, NULL, Param_Cell, Param_CellByRef, Param_CellByRef, Param_Array, Param_Array, Param_CellByRef);
|
||||
}
|
||||
|
||||
void CHookManager::Shutdown()
|
||||
{
|
||||
forwards->ReleaseForward(m_usercmdsFwd);
|
||||
|
||||
plsys->RemovePluginsListener(this);
|
||||
}
|
||||
|
||||
void CHookManager::OnClientPutInServer(int client)
|
||||
@@ -64,6 +69,9 @@ void CHookManager::OnClientPutInServer(int client)
|
||||
if (!PRCH_enabled)
|
||||
return;
|
||||
|
||||
if (!PRCH_used)
|
||||
return;
|
||||
|
||||
edict_t *pEdict = PEntityOfEntIndex(client);
|
||||
if (!pEdict)
|
||||
{
|
||||
@@ -90,6 +98,9 @@ void CHookManager::OnClientDisconnecting(int client)
|
||||
if (!PRCH_enabled)
|
||||
return;
|
||||
|
||||
if (!PRCH_used)
|
||||
return;
|
||||
|
||||
edict_t *pEdict = PEntityOfEntIndex(client);
|
||||
if (!pEdict)
|
||||
{
|
||||
@@ -165,3 +176,49 @@ void CHookManager::PlayerRunCmd(CUserCmd *ucmd, IMoveHelper *moveHelper)
|
||||
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
|
||||
void CHookManager::OnPluginLoaded(IPlugin *plugin)
|
||||
{
|
||||
if (!PRCH_enabled)
|
||||
return;
|
||||
|
||||
if (PRCH_used)
|
||||
return;
|
||||
|
||||
if (!m_usercmdsFwd->GetFunctionCount())
|
||||
return;
|
||||
|
||||
PRCH_used = true;
|
||||
|
||||
int MaxClients = playerhelpers->GetMaxClients();
|
||||
for (int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if (playerhelpers->GetGamePlayer(i)->IsInGame())
|
||||
{
|
||||
OnClientPutInServer(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CHookManager::OnPluginUnloaded(IPlugin *plugin)
|
||||
{
|
||||
if (!PRCH_enabled)
|
||||
return;
|
||||
|
||||
if (!PRCH_used)
|
||||
return;
|
||||
|
||||
if (m_usercmdsFwd->GetFunctionCount())
|
||||
return;
|
||||
|
||||
int MaxClients = playerhelpers->GetMaxClients();
|
||||
for (int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if (playerhelpers->GetGamePlayer(i)->IsInGame())
|
||||
{
|
||||
OnClientDisconnecting(i);
|
||||
}
|
||||
}
|
||||
|
||||
PRCH_used = false;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "usercmd.h"
|
||||
#include "extension.h"
|
||||
|
||||
class CHookManager
|
||||
class CHookManager : IPluginsListener
|
||||
{
|
||||
public:
|
||||
CHookManager();
|
||||
@@ -49,6 +49,9 @@ public:
|
||||
void OnClientPutInServer(int client);
|
||||
void OnClientDisconnecting(int client);
|
||||
void PlayerRunCmd(CUserCmd *ucmd, IMoveHelper *moveHelper);
|
||||
public: //IPluginsListener
|
||||
void OnPluginLoaded(IPlugin *plugin);
|
||||
void OnPluginUnloaded(IPlugin *plugin);
|
||||
|
||||
private:
|
||||
IForward *m_usercmdsFwd;
|
||||
|
||||
@@ -438,7 +438,7 @@ const char *EntityOutputManager::FindOutputName(void *pOutput, CBaseEntity *pCal
|
||||
{
|
||||
if (pMap->dataDesc[i].flags & FTYPEDESC_OUTPUT)
|
||||
{
|
||||
if ((char *)pCaller + pMap->dataDesc[i].fieldOffset[0] == pOutput)
|
||||
if ((char *)pCaller + GetTypeDescOffs(&pMap->dataDesc[i]) == pOutput)
|
||||
{
|
||||
return pMap->dataDesc[i].externalName;
|
||||
}
|
||||
@@ -457,7 +457,7 @@ const char *EntityOutputManager::GetEntityClassname(CBaseEntity *pEntity)
|
||||
{
|
||||
datamap_t *pMap = gamehelpers->GetDataMap(pEntity);
|
||||
typedescription_t *pDesc = gamehelpers->FindInDataMap(pMap, "m_iClassname");
|
||||
offset = pDesc->fieldOffset[TD_OFFSET_NORMAL];
|
||||
offset = GetTypeDescOffs(pDesc);
|
||||
}
|
||||
|
||||
return *(const char **)(((unsigned char *)pEntity) + offset);
|
||||
|
||||
@@ -171,7 +171,12 @@ static cell_t SetTeamScore(IPluginContext *pContext, const cell_t *params)
|
||||
}
|
||||
|
||||
static int offset = g_pGameHelpers->FindInSendTable(g_Teams[teamindex].ClassName, "m_iScore")->GetOffset();
|
||||
*(int *)((unsigned char *)g_Teams[teamindex].pEnt + offset) = params[2];
|
||||
|
||||
CBaseEntity *pTeam = g_Teams[teamindex].pEnt;
|
||||
*(int *)((unsigned char *)pTeam + offset) = params[2];
|
||||
|
||||
edict_t *pEdict = gameents->BaseEntityToEdict(pTeam);
|
||||
gamehelpers->SetEdictStateChanged(pEdict, offset);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -285,26 +285,33 @@ void TempEntityManager::Initialize()
|
||||
int offset;
|
||||
m_Loaded = false;
|
||||
|
||||
/*
|
||||
* First try to lookup s_pTempEntities directly for platforms with symbols.
|
||||
* If symbols aren't present (Windows or stripped Linux/Mac),
|
||||
* attempt find via CBaseTempEntity ctor + offset
|
||||
*/
|
||||
|
||||
/* Read our sigs and offsets from the config file */
|
||||
#if defined PLATFORM_WINDOWS
|
||||
if (!g_pGameConf->GetMemSig("CBaseTempEntity", &addr) || !addr)
|
||||
if (g_pGameConf->GetMemSig("s_pTempEntities", &addr) && addr)
|
||||
{
|
||||
|
||||
/* Store the head of the TE linked list */
|
||||
m_ListHead = *(void **)addr;
|
||||
}
|
||||
else if (g_pGameConf->GetMemSig("CBaseTempEntity", &addr) && addr)
|
||||
{
|
||||
if (!g_pGameConf->GetOffset("s_pTempEntities", &offset))
|
||||
{
|
||||
return;
|
||||
}
|
||||
/* Store the head of the TE linked list */
|
||||
m_ListHead = **(void ***)((unsigned char *)addr + offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!g_pGameConf->GetOffset("s_pTempEntities", &offset))
|
||||
{
|
||||
return;
|
||||
}
|
||||
/* Store the head of the TE linked list */
|
||||
m_ListHead = **(void ***)((unsigned char *)addr + offset);
|
||||
#else
|
||||
if (!g_pGameConf->GetMemSig("s_pTempEntities", &addr) || !addr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
/* Store the head of the TE linked list */
|
||||
m_ListHead = *(void **)addr;
|
||||
#endif
|
||||
|
||||
if (!g_pGameConf->GetOffset("GetTEName", &m_NameOffs))
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod SDKTools Extension
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -530,8 +530,8 @@ static cell_t smn_TRGetPointContents(IPluginContext *pContext, const cell_t *par
|
||||
{
|
||||
mask = enginetrace->GetPointContents(pos);
|
||||
} else {
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
mask = enginetrace->GetPointContents(pos, 0, &hentity);
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
mask = enginetrace->GetPointContents(pos, MASK_ALL, &hentity);
|
||||
#else
|
||||
mask = enginetrace->GetPointContents(pos, &hentity);
|
||||
#endif
|
||||
|
||||
@@ -39,29 +39,28 @@ void InitializeValveGlobals()
|
||||
{
|
||||
g_EntList = gamehelpers->GetGlobalEntityList();
|
||||
|
||||
/*
|
||||
* g_pGameRules
|
||||
*
|
||||
* First try to lookup pointer directly for platforms with symbols.
|
||||
* If symbols aren't present (Windows or stripped Linux/Mac),
|
||||
* attempt find via CreateGameRulesObject + offset
|
||||
*/
|
||||
|
||||
char *addr;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
/* g_pGameRules */
|
||||
if (!g_pGameConf->GetMemSig("CreateGameRulesObject", (void **)&addr) || !addr)
|
||||
if (g_pGameConf->GetMemSig("g_pGameRules", (void **)&addr) && addr)
|
||||
{
|
||||
return;
|
||||
g_pGameRules = reinterpret_cast<void **>(addr);
|
||||
}
|
||||
|
||||
int offset;
|
||||
if (!g_pGameConf->GetOffset("g_pGameRules", &offset) || !offset)
|
||||
else if (g_pGameConf->GetMemSig("CreateGameRulesObject", (void **)&addr) && addr)
|
||||
{
|
||||
return;
|
||||
int offset;
|
||||
if (!g_pGameConf->GetOffset("g_pGameRules", &offset) || !offset)
|
||||
{
|
||||
return;
|
||||
}
|
||||
g_pGameRules = *reinterpret_cast<void ***>(addr + offset);
|
||||
}
|
||||
g_pGameRules = *reinterpret_cast<void ***>(addr + offset);
|
||||
#elif defined PLATFORM_LINUX
|
||||
/* g_pGameRules */
|
||||
if (!g_pGameConf->GetMemSig("g_pGameRules", (void **)&addr) || !addr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
g_pGameRules = reinterpret_cast<void **>(addr);
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t UTIL_StringToSignature(const char *str, char buffer[], size_t maxlength)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod SDKTools Extension
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -600,7 +600,7 @@ CON_COMMAND(sm_dump_classes, "Dumps the class list as a text file")
|
||||
fprintf(fp,"%s - %s\n",sclass->GetName(), dict->m_Factories.GetElementName(i));
|
||||
|
||||
typedescription_t *datamap = gamehelpers->FindInDataMap(gamehelpers->GetDataMap(entity->GetBaseEntity()), "m_iEFlags");
|
||||
int *eflags = (int *)((char *)entity->GetBaseEntity() + datamap->fieldOffset[TD_OFFSET_NORMAL]);
|
||||
int *eflags = (int *)((char *)entity->GetBaseEntity() + GetTypeDescOffs(datamap));
|
||||
*eflags |= (1<<0); // EFL_KILLME
|
||||
}
|
||||
|
||||
@@ -816,7 +816,7 @@ CON_COMMAND(sm_dump_datamaps, "Dumps the data map list as a text file")
|
||||
continue;
|
||||
}
|
||||
|
||||
int *eflags = (int *)((char *)entity->GetBaseEntity() + datamap->fieldOffset[TD_OFFSET_NORMAL]);
|
||||
int *eflags = (int *)((char *)entity->GetBaseEntity() + GetTypeDescOffs(datamap));
|
||||
*eflags |= (1<<0); // EFL_KILLME
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod SDKTools Extension
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -541,7 +541,7 @@ static cell_t SlapPlayer(IPluginContext *pContext, const cell_t *params)
|
||||
typedescription_t *pType = gamehelpers->FindInDataMap(pMap, frag_prop);
|
||||
if (pType != NULL)
|
||||
{
|
||||
s_frag_offs = pType->fieldOffset[TD_OFFSET_NORMAL];
|
||||
s_frag_offs = GetTypeDescOffs(pType);
|
||||
}
|
||||
}
|
||||
if (!s_frag_offs)
|
||||
@@ -657,7 +657,7 @@ static cell_t FindEntityByClassname(IPluginContext *pContext, const cell_t *para
|
||||
return gamehelpers->EntityToBCompatRef(pEntity);
|
||||
}
|
||||
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
static cell_t CreateEntityByName(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
static ValveCall *pCall = NULL;
|
||||
@@ -713,7 +713,7 @@ static cell_t CreateEntityByName(IPluginContext *pContext, const cell_t *params)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD2
|
||||
static cell_t DispatchSpawn(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
static ValveCall *pCall = NULL;
|
||||
|
||||
@@ -53,7 +53,6 @@ enum ListenOverride
|
||||
|
||||
size_t g_VoiceFlags[65];
|
||||
size_t g_VoiceHookCount = 0;
|
||||
int g_ClientOverrides[65];
|
||||
ListenOverride g_VoiceMap[65][65];
|
||||
bool g_ClientMutes[65][65];
|
||||
|
||||
@@ -65,10 +64,10 @@ SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *,
|
||||
SH_DECL_HOOK1_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *);
|
||||
#endif
|
||||
|
||||
bool DecHookCount(int amount = 1);
|
||||
bool DecHookCount(int amount)
|
||||
bool DecHookCount()
|
||||
{
|
||||
g_VoiceHookCount -= amount;
|
||||
g_VoiceHookCount--;
|
||||
|
||||
if (g_VoiceHookCount == 0)
|
||||
{
|
||||
SH_REMOVE_HOOK_MEMFUNC(IVoiceServer, SetClientListening, voiceserver, &g_SdkTools, &SDKTools::OnSetClientListening, false);
|
||||
@@ -89,7 +88,6 @@ void IncHookCount()
|
||||
void SDKTools::VoiceInit()
|
||||
{
|
||||
memset(g_VoiceMap, 0, sizeof(g_VoiceMap));
|
||||
memset(g_ClientOverrides, 0, sizeof(g_ClientOverrides));
|
||||
memset(g_ClientMutes, 0, sizeof(g_ClientMutes));
|
||||
|
||||
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientCommand, serverClients, this, &SDKTools::OnClientCommand, true);
|
||||
@@ -130,6 +128,11 @@ bool SDKTools::OnSetClientListening(int iReceiver, int iSender, bool bListen)
|
||||
RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, bListen, &IVoiceServer::SetClientListening, (iReceiver, iSender, false));
|
||||
}
|
||||
|
||||
if (g_VoiceFlags[iSender] & SPEAK_MUTED)
|
||||
{
|
||||
RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, bListen, &IVoiceServer::SetClientListening, (iReceiver, iSender, false));
|
||||
}
|
||||
|
||||
if (g_VoiceMap[iReceiver][iSender] == Listen_No)
|
||||
{
|
||||
RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, bListen, &IVoiceServer::SetClientListening, (iReceiver, iSender, false));
|
||||
@@ -139,11 +142,6 @@ bool SDKTools::OnSetClientListening(int iReceiver, int iSender, bool bListen)
|
||||
RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, bListen, &IVoiceServer::SetClientListening, (iReceiver, iSender, true));
|
||||
}
|
||||
|
||||
if (g_VoiceFlags[iSender] & SPEAK_MUTED)
|
||||
{
|
||||
RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, bListen, &IVoiceServer::SetClientListening, (iReceiver, iSender, false));
|
||||
}
|
||||
|
||||
if ((g_VoiceFlags[iSender] & SPEAK_ALL) || (g_VoiceFlags[iReceiver] & SPEAK_LISTENALL))
|
||||
{
|
||||
RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, bListen, &IVoiceServer::SetClientListening, (iReceiver, iSender, true));
|
||||
@@ -193,6 +191,7 @@ void SDKTools::OnClientDisconnecting(int client)
|
||||
}
|
||||
|
||||
g_ClientMutes[i][client] = false;
|
||||
g_ClientMutes[client][i] = false;
|
||||
|
||||
if (g_VoiceMap[i][client] != Listen_Default)
|
||||
{
|
||||
@@ -202,22 +201,19 @@ void SDKTools::OnClientDisconnecting(int client)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Reset this client's mutes */
|
||||
memset(&g_ClientMutes[client], 0, sizeof(bool) * 65);
|
||||
|
||||
/* Reset other clients who send to this client */
|
||||
if (g_ClientOverrides[client] > 0)
|
||||
{
|
||||
DecHookCount(g_ClientOverrides[client]);
|
||||
g_ClientOverrides[client] = 0;
|
||||
memset(&g_VoiceMap[client], false, sizeof(ListenOverride) * 65);
|
||||
if (g_VoiceMap[client][i] != Listen_Default)
|
||||
{
|
||||
g_VoiceMap[client][i] = Listen_Default;
|
||||
if (DecHookCount())
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_VoiceFlags[client])
|
||||
{
|
||||
g_VoiceFlags[client] = 0;
|
||||
g_VoiceFlags[client] = SPEAK_NORMAL;
|
||||
DecHookCount();
|
||||
}
|
||||
}
|
||||
@@ -294,13 +290,11 @@ static cell_t SetClientListening(IPluginContext *pContext, const cell_t *params)
|
||||
if (g_VoiceMap[r][s] == Listen_Default && params[3] != Listen_Default)
|
||||
{
|
||||
g_VoiceMap[r][s] = (ListenOverride) params[3];
|
||||
g_ClientOverrides[r]++;
|
||||
IncHookCount();
|
||||
}
|
||||
else if (g_VoiceMap[r][s] != Listen_Default && params[3] == Listen_Default)
|
||||
{
|
||||
g_VoiceMap[r][s] = (ListenOverride) params[3];
|
||||
g_ClientOverrides[r]--;
|
||||
DecHookCount();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -16,6 +16,7 @@ binary.AddSourceFiles('extensions/tf2', [
|
||||
'RegNatives.cpp',
|
||||
'util.cpp',
|
||||
'criticals.cpp',
|
||||
'holiday.cpp',
|
||||
'CDetour/detours.cpp',
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'asm/asm.c'
|
||||
|
||||
@@ -19,7 +19,7 @@ PROJECT = game.tf2
|
||||
USEMETA = true
|
||||
|
||||
OBJECTS = sdk/smsdk_ext.cpp extension.cpp natives.cpp RegNatives.cpp criticals.cpp \
|
||||
util.cpp CDetour/detours.cpp asm/asm.c
|
||||
holiday.cpp util.cpp CDetour/detours.cpp asm/asm.c
|
||||
|
||||
##############################################
|
||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||
|
||||
@@ -188,7 +188,7 @@ DETOUR_DECL_MEMBER0(CalcIsAttackCriticalHelperBow, bool)
|
||||
}
|
||||
}
|
||||
|
||||
void InitialiseDetours()
|
||||
bool InitialiseCritDetours()
|
||||
{
|
||||
calcIsAttackCriticalDetour = DETOUR_CREATE_MEMBER(CalcIsAttackCriticalHelper, "CalcCritical");
|
||||
calcIsAttackCriticalMeleeDetour = DETOUR_CREATE_MEMBER(CalcIsAttackCriticalHelperMelee, "CalcCriticalMelee");
|
||||
@@ -214,17 +214,33 @@ void InitialiseDetours()
|
||||
HookCreated = true;
|
||||
}
|
||||
|
||||
if (!HookCreated)
|
||||
if (HookCreated)
|
||||
{
|
||||
g_pSM->LogError(myself, "No critical hit forwards could be initialized - Disabled critical hit hooks");
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
g_pSM->LogError(myself, "No critical hit forwards could be initialized - Disabled critical hit hooks");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void RemoveDetours()
|
||||
void RemoveCritDetours()
|
||||
{
|
||||
calcIsAttackCriticalDetour->Destroy();
|
||||
calcIsAttackCriticalMeleeDetour->Destroy();
|
||||
calcIsAttackCriticalBowDetour->Destroy();
|
||||
if (calcIsAttackCriticalDetour != NULL)
|
||||
{
|
||||
calcIsAttackCriticalDetour->Destroy();
|
||||
calcIsAttackCriticalDetour = NULL;
|
||||
}
|
||||
|
||||
if (calcIsAttackCriticalMeleeDetour != NULL)
|
||||
{
|
||||
calcIsAttackCriticalMeleeDetour->Destroy();
|
||||
calcIsAttackCriticalMeleeDetour = NULL;
|
||||
}
|
||||
|
||||
if (calcIsAttackCriticalBowDetour != NULL)
|
||||
{
|
||||
calcIsAttackCriticalBowDetour->Destroy();
|
||||
calcIsAttackCriticalBowDetour = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
#include <jit/x86/x86_macros.h>
|
||||
#include "CDetour/detours.h"
|
||||
|
||||
void InitialiseDetours();
|
||||
void RemoveDetours();
|
||||
bool InitialiseCritDetours();
|
||||
void RemoveCritDetours();
|
||||
|
||||
extern IForward *g_critForward;
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "iplayerinfo.h"
|
||||
#include "sm_trie_tpl.h"
|
||||
#include "criticals.h"
|
||||
#include "holiday.h"
|
||||
#include "CDetour/detours.h"
|
||||
|
||||
/**
|
||||
@@ -108,10 +109,12 @@ bool TF2Tools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
playerhelpers->RegisterCommandTargetProcessor(this);
|
||||
|
||||
g_critForward = forwards->CreateForward("TF2_CalcIsAttackCritical", ET_Hook, 4, NULL, Param_Cell, Param_Cell, Param_String, Param_CellByRef);
|
||||
g_getHolidayForward = forwards->CreateForward("TF2_OnGetHoliday", ET_Event, 1, NULL, Param_CellByRef);
|
||||
|
||||
g_pCVar = icvar;
|
||||
|
||||
m_DetoursEnabled = false;
|
||||
m_CritDetoursEnabled = false;
|
||||
m_GetHolidayDetourEnabled = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -155,6 +158,7 @@ void TF2Tools::SDK_OnUnload()
|
||||
plsys->RemovePluginsListener(this);
|
||||
|
||||
forwards->ReleaseForward(g_critForward);
|
||||
forwards->ReleaseForward(g_getHolidayForward);
|
||||
}
|
||||
|
||||
void TF2Tools::SDK_OnAllLoaded()
|
||||
@@ -297,19 +301,27 @@ bool TF2Tools::ProcessCommandTarget(cmd_target_info_t *info)
|
||||
|
||||
void TF2Tools::OnPluginLoaded(IPlugin *plugin)
|
||||
{
|
||||
if (!m_DetoursEnabled && g_critForward->GetFunctionCount())
|
||||
if (!m_CritDetoursEnabled && g_critForward->GetFunctionCount())
|
||||
{
|
||||
InitialiseDetours();
|
||||
m_DetoursEnabled = true;
|
||||
m_CritDetoursEnabled = InitialiseCritDetours();
|
||||
}
|
||||
if (!m_GetHolidayDetourEnabled && g_getHolidayForward->GetFunctionCount())
|
||||
{
|
||||
m_GetHolidayDetourEnabled = InitialiseGetHolidayDetour();
|
||||
}
|
||||
}
|
||||
|
||||
void TF2Tools::OnPluginUnloaded(IPlugin *plugin)
|
||||
{
|
||||
if (m_DetoursEnabled && !g_critForward->GetFunctionCount())
|
||||
if (m_CritDetoursEnabled && !g_critForward->GetFunctionCount())
|
||||
{
|
||||
RemoveDetours();
|
||||
m_DetoursEnabled = false;
|
||||
RemoveCritDetours();
|
||||
m_CritDetoursEnabled = false;
|
||||
}
|
||||
if (m_GetHolidayDetourEnabled && !g_getHolidayForward->GetFunctionCount())
|
||||
{
|
||||
RemoveGetHolidayDetour();
|
||||
m_GetHolidayDetourEnabled = false;
|
||||
}
|
||||
}
|
||||
int FindResourceEntity()
|
||||
|
||||
@@ -112,7 +112,8 @@ public:
|
||||
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late);
|
||||
#endif
|
||||
private:
|
||||
bool m_DetoursEnabled;
|
||||
bool m_CritDetoursEnabled;
|
||||
bool m_GetHolidayDetourEnabled;
|
||||
};
|
||||
|
||||
enum TFClassType
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
#include "holiday.h"
|
||||
|
||||
CDetour *getHolidayDetour = NULL;
|
||||
|
||||
IForward *g_getHolidayForward = NULL;
|
||||
|
||||
DETOUR_DECL_STATIC0(GetHoliday, int)
|
||||
{
|
||||
int actualres = DETOUR_STATIC_CALL(GetHoliday)();
|
||||
if (!g_getHolidayForward)
|
||||
{
|
||||
g_pSM->LogMessage(myself, "Invalid Forward");
|
||||
return actualres;
|
||||
}
|
||||
|
||||
cell_t result = 0;
|
||||
int newres = actualres;
|
||||
|
||||
g_getHolidayForward->PushCellByRef(&newres);
|
||||
g_getHolidayForward->Execute(&result);
|
||||
|
||||
if (result == Pl_Changed)
|
||||
{
|
||||
return newres;
|
||||
}
|
||||
|
||||
return actualres;
|
||||
}
|
||||
|
||||
bool InitialiseGetHolidayDetour()
|
||||
{
|
||||
getHolidayDetour = DETOUR_CREATE_STATIC(GetHoliday, "GetHoliday");
|
||||
|
||||
if (getHolidayDetour != NULL)
|
||||
{
|
||||
getHolidayDetour->EnableDetour();
|
||||
return true;
|
||||
}
|
||||
|
||||
g_pSM->LogError(myself, "GetHoliday detour failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
void RemoveGetHolidayDetour()
|
||||
{
|
||||
getHolidayDetour->Destroy();
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod Team Fortress 2 Extension
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||
* this exception to all derivative works. AlliedModders LLC defines further
|
||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||
* or <http://www.sourcemod.net/license.php>.
|
||||
*
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_SOURCEMOD_HOLIDAY_H_
|
||||
#define _INCLUDE_SOURCEMOD_HOLIDAY_H_
|
||||
|
||||
#include "extension.h"
|
||||
#include <jit/jit_helpers.h>
|
||||
#include <jit/x86/x86_macros.h>
|
||||
#include "CDetour/detours.h"
|
||||
|
||||
bool InitialiseGetHolidayDetour();
|
||||
void RemoveGetHolidayDetour();
|
||||
|
||||
extern IForward *g_getHolidayForward;
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_HOLIDAY_H_
|
||||
@@ -194,6 +194,10 @@
|
||||
RelativePath="..\extension.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\holiday.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\natives.cpp"
|
||||
>
|
||||
@@ -220,6 +224,10 @@
|
||||
RelativePath="..\extension.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\holiday.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\RegNatives.h"
|
||||
>
|
||||
|
||||
+120
-9
@@ -34,6 +34,57 @@
|
||||
#include "time.h"
|
||||
#include "RegNatives.h"
|
||||
|
||||
// native TF2_MakeBleed(client, attacker, Float:duration)
|
||||
cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
|
||||
// CTFPlayerShared::MakeBleed(CTFPlayer*, CTFWeaponBase*, float)
|
||||
if(!pWrapper)
|
||||
{
|
||||
REGISTER_NATIVE_ADDR("MakeBleed",
|
||||
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; \
|
||||
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;
|
||||
if (!(pEntity = UTIL_GetCBaseEntity(params[1], true)))
|
||||
{
|
||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
||||
}
|
||||
|
||||
CBaseEntity *pAttacker;
|
||||
if (!(pAttacker = UTIL_GetCBaseEntity(params[2], true)))
|
||||
{
|
||||
return pContext->ThrowNativeError("Client index %d is not valid", params[2]);
|
||||
}
|
||||
|
||||
void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset);
|
||||
|
||||
unsigned char vstk[sizeof(void *) + 2*sizeof(CBaseEntity *) + sizeof(float)];
|
||||
unsigned char *vptr = vstk;
|
||||
|
||||
*(void **)vptr = obj;
|
||||
vptr += sizeof(void *);
|
||||
*(CBaseEntity **)vptr = pAttacker;
|
||||
vptr += sizeof(CBaseEntity *);
|
||||
*(CBaseEntity **)vptr = NULL;
|
||||
vptr += sizeof(CBaseEntity *);
|
||||
*(float *)vptr = sp_ctof(params[3]);
|
||||
|
||||
pWrapper->Execute(vstk, NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// native TF2_Burn(client, target)
|
||||
cell_t TF2_Burn(IPluginContext *pContext, const cell_t *params)
|
||||
@@ -92,18 +143,24 @@ cell_t TF2_Disguise(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
|
||||
//CTFPlayerShared::Disguise(int, int)
|
||||
//CTFPlayerShared::Disguise(int, int, CTFPlayer *)
|
||||
if (!pWrapper)
|
||||
{
|
||||
REGISTER_NATIVE_ADDR("Disguise",
|
||||
PassInfo pass[2]; \
|
||||
PassInfo pass[4]; \
|
||||
pass[0].flags = PASSFLAG_BYVAL; \
|
||||
pass[0].size = sizeof(int); \
|
||||
pass[0].type = PassType_Basic; \
|
||||
pass[1].flags = PASSFLAG_BYVAL; \
|
||||
pass[1].size = sizeof(int); \
|
||||
pass[1].type = PassType_Basic; \
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 2))
|
||||
pass[2].flags = PASSFLAG_BYVAL; \
|
||||
pass[2].size = sizeof(CBaseEntity *); \
|
||||
pass[2].type = PassType_Basic; \
|
||||
pass[3].flags = PASSFLAG_BYVAL; \
|
||||
pass[3].size = sizeof(bool); \
|
||||
pass[3].type = PassType_Basic; \
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 4))
|
||||
}
|
||||
|
||||
CBaseEntity *pEntity;
|
||||
@@ -113,8 +170,15 @@ cell_t TF2_Disguise(IPluginContext *pContext, const cell_t *params)
|
||||
}
|
||||
|
||||
void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset);
|
||||
|
||||
CBaseEntity *pTarget = NULL;
|
||||
// Compatibility fix for the newly-added target parameter
|
||||
if (params[0] >= 4 && params[4] > 0 && !(pTarget = UTIL_GetCBaseEntity(params[4], true)))
|
||||
{
|
||||
return pContext->ThrowNativeError("Target client index %d is not valid", params[1]);
|
||||
}
|
||||
|
||||
unsigned char vstk[sizeof(void *) + 2*sizeof(int)];
|
||||
unsigned char vstk[sizeof(void *) + 2*sizeof(int) + sizeof(bool)];
|
||||
unsigned char *vptr = vstk;
|
||||
|
||||
|
||||
@@ -123,7 +187,11 @@ cell_t TF2_Disguise(IPluginContext *pContext, const cell_t *params)
|
||||
*(int *)vptr = params[2];
|
||||
vptr += sizeof(int);
|
||||
*(int *)vptr = params[3];
|
||||
|
||||
vptr += sizeof(int);
|
||||
*(CBaseEntity **)vptr = pTarget;
|
||||
vptr += sizeof(CBaseEntity *);
|
||||
*(bool *)vptr = true;
|
||||
|
||||
pWrapper->Execute(vstk, NULL);
|
||||
|
||||
return 1;
|
||||
@@ -203,15 +271,18 @@ cell_t TF2_RemoveCondition(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
|
||||
// CTFPlayerShared::RemoveCond(int)
|
||||
// CTFPlayerShared::RemoveCond(int, bool)
|
||||
if (!pWrapper)
|
||||
{
|
||||
REGISTER_NATIVE_ADDR("RemoveCondition",
|
||||
PassInfo pass[1]; \
|
||||
PassInfo pass[2]; \
|
||||
pass[0].flags = PASSFLAG_BYVAL; \
|
||||
pass[0].size = sizeof(int); \
|
||||
pass[0].type = PassType_Basic; \
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 1))
|
||||
pass[1].flags = PASSFLAG_BYVAL; \
|
||||
pass[1].size = sizeof(bool); \
|
||||
pass[1].type = PassType_Basic; \
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 2))
|
||||
}
|
||||
|
||||
CBaseEntity *pEntity;
|
||||
@@ -222,12 +293,14 @@ cell_t TF2_RemoveCondition(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset);
|
||||
|
||||
unsigned char vstk[sizeof(void *) + sizeof(int)];
|
||||
unsigned char vstk[sizeof(void *) + sizeof(int) + sizeof(bool)];
|
||||
unsigned char *vptr = vstk;
|
||||
|
||||
*(void **)vptr = obj;
|
||||
vptr += sizeof(void *);
|
||||
*(int *)vptr = params[2];
|
||||
vptr += sizeof(int);
|
||||
*(bool *)vptr = false;
|
||||
|
||||
pWrapper->Execute(vstk, NULL);
|
||||
|
||||
@@ -407,6 +480,42 @@ cell_t TF2_GetClass(IPluginContext *pContext, const cell_t *params)
|
||||
return (cell_t)ClassnameToType(str);
|
||||
}
|
||||
|
||||
// native TF2_IsPlayerInDuel(client)
|
||||
cell_t TF2_IsPlayerInDuel(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
|
||||
// DuelMiniGame_IsPlayerInDuel(CTFPlayer *)
|
||||
if (!pWrapper)
|
||||
{
|
||||
REGISTER_NATIVE_ADDR("IsPlayerInDuel",
|
||||
PassInfo pass[1]; \
|
||||
pass[0].flags = PASSFLAG_BYVAL; \
|
||||
pass[0].size = sizeof(CBaseEntity *); \
|
||||
pass[0].type = PassType_Basic; \
|
||||
PassInfo ret; \
|
||||
ret.flags = PASSFLAG_BYVAL; \
|
||||
ret.size = sizeof(bool); \
|
||||
ret.type = PassType_Basic; \
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &ret, pass, 1))
|
||||
}
|
||||
|
||||
CBaseEntity *pPlayer;
|
||||
if (!(pPlayer = UTIL_GetCBaseEntity(params[1], true)))
|
||||
{
|
||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
||||
}
|
||||
|
||||
unsigned char vstk[sizeof(CBaseEntity *)];
|
||||
unsigned char *vptr = vstk;
|
||||
*(CBaseEntity **)vptr = pPlayer;
|
||||
|
||||
bool retValue;
|
||||
pWrapper->Execute(vstk, &retValue);
|
||||
|
||||
return (retValue) ? 1 : 0;
|
||||
}
|
||||
|
||||
sp_nativeinfo_t g_TFNatives[] =
|
||||
{
|
||||
{"TF2_IgnitePlayer", TF2_Burn},
|
||||
@@ -421,5 +530,7 @@ sp_nativeinfo_t g_TFNatives[] =
|
||||
{"TF2_RemoveCondition", TF2_RemoveCondition},
|
||||
{"TF2_SetPlayerPowerPlay", TF2_SetPowerplayEnabled},
|
||||
{"TF2_StunPlayer", TF2_StunPlayer},
|
||||
{"TF2_MakeBleed", TF2_MakeBleed},
|
||||
{"TF2_IsPlayerInDuel", TF2_IsPlayerInDuel},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
"engine" "orangebox_valve"
|
||||
"engine" "left4dead"
|
||||
"engine" "left4dead2"
|
||||
"engine" "alienswarm"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
@@ -140,6 +141,10 @@
|
||||
"game" "zps"
|
||||
"game" "gesource"
|
||||
"game" "RnLBeta"
|
||||
"game" "fas"
|
||||
"game" "fistful_of_frags"
|
||||
"game" "dinodday"
|
||||
"game" "esmod"
|
||||
}
|
||||
|
||||
"Keys"
|
||||
@@ -167,6 +172,8 @@
|
||||
"game" "obsidian"
|
||||
"game" "cstrike"
|
||||
"game" "RnLBeta"
|
||||
"game" "fistful_of_frags"
|
||||
"game" "dinodday"
|
||||
}
|
||||
|
||||
"Keys"
|
||||
@@ -195,6 +202,11 @@
|
||||
"game" "zps"
|
||||
"game" "gesource"
|
||||
"game" "RnLBeta"
|
||||
"game" "fas"
|
||||
"game" "fistful_of_frags"
|
||||
"game" "swarm"
|
||||
"game" "dinodday"
|
||||
"game" "esmod"
|
||||
}
|
||||
|
||||
"Keys"
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "hl2mp"
|
||||
"game" "ship"
|
||||
"game" "insurgency"
|
||||
"game" "sourceforts"
|
||||
@@ -26,7 +25,7 @@
|
||||
"game" "hidden"
|
||||
"game" "zombie_master"
|
||||
"game" "NeotokyoSource"
|
||||
"game" "cspromod"
|
||||
"game" "esmod"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
|
||||
@@ -19,12 +19,15 @@
|
||||
"game" "ageofchivalry"
|
||||
"game" "zps"
|
||||
"game" "bg2"
|
||||
"game" "garrysmod"
|
||||
"game" "pvkii"
|
||||
"game" "gesource"
|
||||
"game" "empires"
|
||||
"game" "RnLBeta"
|
||||
"game" "obsidian"
|
||||
"game" "synergy"
|
||||
"game" "fas"
|
||||
"game" "fistful_of_frags"
|
||||
"game" "cspromod"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
"game" "cstrike"
|
||||
"game" "garrysmod"
|
||||
"game" "hl2mp"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Do not edit this file. Any changes will be overwritten by the gamedata
|
||||
* updater or by upgrading your SourceMod install.
|
||||
*
|
||||
* To override data in this file, create a subdirectory named "custom" and
|
||||
* place your own gamedata file(s) inside of it. Such files will be parsed
|
||||
* after SM's own.
|
||||
*
|
||||
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
|
||||
*/
|
||||
|
||||
"Games"
|
||||
{
|
||||
/* CGlobalEntityList */
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "swarm"
|
||||
"game" "dinodday"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
/* Offset into LevelShutdown */
|
||||
"gEntList"
|
||||
{
|
||||
"windows" "11"
|
||||
}
|
||||
|
||||
"EntInfo"
|
||||
{
|
||||
"windows" "4"
|
||||
}
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
"LevelShutdown"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xE8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,11 @@
|
||||
"engine" "left4dead2"
|
||||
}
|
||||
|
||||
"engine.swarm.txt"
|
||||
{
|
||||
"engine" "alienswarm"
|
||||
}
|
||||
|
||||
"engine.ep2.txt"
|
||||
{
|
||||
"engine" "orangebox"
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "hl2mp"
|
||||
"game" "ship"
|
||||
"game" "!Dystopia"
|
||||
"game" "insurgency"
|
||||
@@ -26,7 +25,7 @@
|
||||
"game" "hidden"
|
||||
"game" "zombie_master"
|
||||
"game" "NeotokyoSource"
|
||||
"game" "cspromod"
|
||||
"game" "esmod"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
@@ -74,7 +73,6 @@
|
||||
"#supported"
|
||||
{
|
||||
"game" "garrysmod"
|
||||
"game" "hl2mp"
|
||||
"game" "ship"
|
||||
"game" "!Dystopia"
|
||||
"game" "sourceforts"
|
||||
@@ -122,7 +120,6 @@
|
||||
"#supported"
|
||||
{
|
||||
"game" "garrysmod"
|
||||
"game" "hl2mp"
|
||||
"game" "ship"
|
||||
"game" "sourceforts"
|
||||
"game" "FortressForever"
|
||||
@@ -149,7 +146,6 @@
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "hl2mp"
|
||||
"game" "sourceforts"
|
||||
"game" "synergy"
|
||||
"game" "hidden"
|
||||
@@ -228,7 +224,6 @@
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "hl2mp"
|
||||
"game" "NeotokyoSource"
|
||||
"game" "zombie_master"
|
||||
}
|
||||
|
||||
@@ -21,9 +21,11 @@
|
||||
"game" "empires"
|
||||
"game" "synergy"
|
||||
"game" "bg2"
|
||||
"game" "garrysmod"
|
||||
"game" "pvkii"
|
||||
"game" "gesource"
|
||||
"game" "fas"
|
||||
"game" "fistful_of_frags"
|
||||
"game" "cspromod"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
@@ -71,8 +73,9 @@
|
||||
"#supported"
|
||||
{
|
||||
"game" "ageofchivalry"
|
||||
"game" "zps"
|
||||
"game" "pvkii"
|
||||
"game" "fistful_of_frags"
|
||||
"game" "cspromod"
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
@@ -98,8 +101,9 @@
|
||||
"#supported"
|
||||
{
|
||||
"game" "ageofchivalry"
|
||||
"game" "zps"
|
||||
"game" "pvkii"
|
||||
"game" "fistful_of_frags"
|
||||
"game" "cspromod"
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
@@ -124,11 +128,13 @@
|
||||
"game" "empires"
|
||||
"game" "synergy"
|
||||
"game" "bg2"
|
||||
"game" "garrysmod"
|
||||
"game" "pvkii"
|
||||
"game" "gesource"
|
||||
"game" "RnLBeta"
|
||||
"game" "obsidian"
|
||||
"game" "fas"
|
||||
"game" "fistful_of_frags"
|
||||
"game" "cspromod"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
@@ -219,6 +225,7 @@
|
||||
"#supported"
|
||||
{
|
||||
"game" "ageofchivalry"
|
||||
"game" "cspromod"
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
"game" "cstrike"
|
||||
"game" "garrysmod"
|
||||
"game" "hl2mp"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
@@ -68,6 +70,7 @@
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
"game" "cstrike"
|
||||
"game" "hl2mp"
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
@@ -95,6 +98,7 @@
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
"game" "cstrike"
|
||||
"game" "hl2mp"
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
@@ -117,6 +121,8 @@
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
"game" "cstrike"
|
||||
"game" "garrysmod"
|
||||
"game" "hl2mp"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
@@ -209,6 +215,7 @@
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
"game" "cstrike"
|
||||
"game" "hl2mp"
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
@@ -243,7 +250,7 @@
|
||||
"SetUserCvar"
|
||||
{
|
||||
"windows" "17"
|
||||
"linux" "56"
|
||||
"linux" "57"
|
||||
}
|
||||
/**
|
||||
* Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
/**
|
||||
* Do not edit this file. Any changes will be overwritten by the gamedata
|
||||
* updater or by upgrading your SourceMod install.
|
||||
*
|
||||
* To override data in this file, create a subdirectory named "custom" and
|
||||
* place your own gamedata file(s) inside of it. Such files will be parsed
|
||||
* after SM's own.
|
||||
*
|
||||
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
|
||||
*/
|
||||
|
||||
"Games"
|
||||
{
|
||||
/* General Temp Entities */
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "swarm"
|
||||
"game" "dinodday"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
/* Offset into CBaseTempEntity constructor */
|
||||
"s_pTempEntities"
|
||||
{
|
||||
"windows" "17"
|
||||
}
|
||||
"GetTEName"
|
||||
{
|
||||
"windows" "4"
|
||||
}
|
||||
"GetTENext"
|
||||
{
|
||||
"windows" "8"
|
||||
}
|
||||
"TE_GetServerClass"
|
||||
{
|
||||
"windows" "0"
|
||||
}
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
"CBaseTempEntity"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x8B\xC1\x8B\x4C\x24\x04\xC7\x00\x2A\x2A\x2A\x2A\x89\x48\x04\x8B\x15\x2A\x2A\x2A\x2A\x89\x50\x08\xA3\x2A\x2A\x2A\x2A\xC2\x04\x00"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Create Entity Signatures */
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "swarm"
|
||||
"game" "dinodday"
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
"DispatchSpawn"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\x74\x24\x10\x85\xF6\x57\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x2A\x8B\xCB"
|
||||
}
|
||||
"CreateEntityByName"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x56\x8B\x74\x24\x0C\x83\xFE\xFF\x57\x8B\x7C\x24\x0C\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x2A\x56\xFF\xD2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* CGlobalEntityList */
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "swarm"
|
||||
"game" "dinodday"
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
/* Functions in CGlobalEntityList */
|
||||
"FindEntityByClassname"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x85\xC9\x57\x74\x2E\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x83\xF8\xFF\x75\x10\xB8\xFF\x1F\x00\x00\x83\xC0\x01\xC1\xE0\x04\x8B\x3C\x30\xEB\x16\x25\xFF\xFF\x00\x00\x83\xC0\x01\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x34\x8B"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* General GameRules */
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "swarm"
|
||||
"game" "dinodday"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
/* Offset into CreateGameRulesObject */
|
||||
"g_pGameRules"
|
||||
{
|
||||
"windows" "2"
|
||||
}
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
/* This signature sometimes has multiple matches, but this
|
||||
* does not matter as g_pGameRules is involved in all of them.
|
||||
* The same g_pGameRules offset applies to each match.
|
||||
*
|
||||
* Sometimes this block of bytes is at the beginning of the static
|
||||
* CreateGameRulesObject function and sometimes it is in the middle
|
||||
* of an entirely different function. This depends on the game.
|
||||
*/
|
||||
"CreateGameRulesObject"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* IServer interface pointer */
|
||||
"#default"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
/* Signature for the beginning of IVEngineServer::CreateFakeClient.
|
||||
*
|
||||
* The engine binary is not actually scanned in order to look for
|
||||
* this. SourceHook is used to used to determine the address of the
|
||||
* function and this signature is used to verify that it contains
|
||||
* the expected code. A pointer to sv (IServer interface) is used
|
||||
* here.
|
||||
*/
|
||||
"CreateFakeClient_Windows" "\x8B\x44\x24\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8"
|
||||
}
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
/* Offset into IVEngineServer::CreateFakeClient */
|
||||
"sv"
|
||||
{
|
||||
"windows" "6"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* EntityFactoryDictionary function */
|
||||
"#default"
|
||||
{
|
||||
"Signatures"
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* CBaseEntityOutput::FireOutput */
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "swarm"
|
||||
"game" "dinodday"
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6"
|
||||
}
|
||||
}
|
||||
"Offsets"
|
||||
{
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* SetUserInfo data */
|
||||
"#default"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
/**
|
||||
* CBaseClient::SetUserCVar(char const*,char const*);
|
||||
* Linux offset straight from VTable dump.
|
||||
* Windows offset is crazy. Found the windows SetName function using string "(%d)%-.*s" (aD_S in IDA)
|
||||
* Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
|
||||
*/
|
||||
"SetUserCvar"
|
||||
{
|
||||
/* Not 100% sure on this, why would windows change and not linux - TEST ME */
|
||||
"windows" "17"
|
||||
}
|
||||
/**
|
||||
* Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
|
||||
* Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
|
||||
* Linux: mov byte ptr [esi+0B0h], 0
|
||||
* Win: mov byte ptr [esi+0B0h], 0
|
||||
*
|
||||
* L4D2/Swarm: This has been moved into CBaseClient::UpdateUserSettings(), rest of the details are still relevant.
|
||||
*/
|
||||
"InfoChanged"
|
||||
{
|
||||
"windows" "176"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
"Games"
|
||||
{
|
||||
/* Alien Swarm */
|
||||
"swarm"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "219"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "222"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "111"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "144"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "135"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "39"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "34"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "33"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "31"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
"windows" "26"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "36"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "442"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,140 +1,94 @@
|
||||
"Games"
|
||||
{
|
||||
/* CSpromod 1.04 */
|
||||
/* CSpromod 1.05 */
|
||||
"cspromod"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "330"
|
||||
"linux" "331"
|
||||
"windows" "353"
|
||||
"linux" "354"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "226"
|
||||
"linux" "227"
|
||||
"windows" "239"
|
||||
"linux" "240"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "224"
|
||||
"linux" "225"
|
||||
"windows" "237"
|
||||
"linux" "238"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "188"
|
||||
"linux" "189"
|
||||
"windows" "194"
|
||||
"linux" "195"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "189"
|
||||
"linux" "190"
|
||||
"windows" "198"
|
||||
"linux" "199"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "98"
|
||||
"linux" "99"
|
||||
"windows" "101"
|
||||
"linux" "102"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "358"
|
||||
"linux" "359"
|
||||
"windows" "389"
|
||||
"linux" "389"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "126"
|
||||
"linux" "127"
|
||||
"windows" "131"
|
||||
"linux" "132"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "118"
|
||||
"linux" "119"
|
||||
"windows" "123"
|
||||
"linux" "124"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "35"
|
||||
"linux" "36"
|
||||
"windows" "34"
|
||||
"linux" "35"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "31"
|
||||
"linux" "30"
|
||||
"windows" "29"
|
||||
"linux" "28"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "30"
|
||||
"linux" "31"
|
||||
"windows" "28"
|
||||
"linux" "29"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "29"
|
||||
"linux" "32"
|
||||
"windows" "27"
|
||||
"linux" "30"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
"windows" "25"
|
||||
"linux" "26"
|
||||
"windows" "23"
|
||||
"linux" "24"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "217"
|
||||
"linux" "218"
|
||||
"windows" "230"
|
||||
"linux" "231"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "32"
|
||||
"linux" "33"
|
||||
"windows" "31"
|
||||
"linux" "32"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "348"
|
||||
"linux" "349"
|
||||
}
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
"linux" "6"
|
||||
}
|
||||
"g_pGameRules"
|
||||
{
|
||||
"windows" "2"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\x71\x2A\x85\xF6"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
"DispatchSpawn"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_Z13DispatchSpawnP11CBaseEntity"
|
||||
"windows" "\x53\x55\x56\x8B\x74\x2A\x2A\x85\xF6\x57\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x2A\x2A\x8B\xCB\xFF"
|
||||
}
|
||||
"CreateEntityByName"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_Z18CreateEntityByNamePKci"
|
||||
"windows" "\x56\x8B\x74\x2A\x2A\x83\xFE\xFF\x57\x8B\x7C\x2A\x2A\x74\x2A\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x2A\x2A\x56\xFF\xD2"
|
||||
}
|
||||
"FindEntityByClassname"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x2A\x85\xC9\x57\x74\x2A\x8B\x01\x8B\x50\x2A\xFF\xD2\x8B\x00\x25\xFF\x2A\x2A\x2A\x83\xC0\x2A\xC1\xE0\x2A\x8B\x3C\x30\xEB\x2A\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5C\x2A\x2A\x8B\x2D\x2A\x2A\x2A\x2A\xEB\x2A\x8D\x2A\x2A\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\xC4\x2A\xEB\x11\x39"
|
||||
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
||||
}
|
||||
"CreateGameRulesObject"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
|
||||
}
|
||||
"g_pGameRules"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@g_pGameRules"
|
||||
"windows" "373"
|
||||
"linux" "374"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,68 +26,68 @@
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "386"
|
||||
"linux" "387"
|
||||
"windows" "390"
|
||||
"linux" "391"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "259"
|
||||
"linux" "260"
|
||||
"windows" "262"
|
||||
"linux" "263"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "257"
|
||||
"linux" "258"
|
||||
"windows" "260"
|
||||
"linux" "261"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "202"
|
||||
"linux" "203"
|
||||
"windows" "204"
|
||||
"linux" "205"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "206"
|
||||
"linux" "207"
|
||||
"windows" "208"
|
||||
"linux" "209"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "105"
|
||||
"linux" "106"
|
||||
"windows" "106"
|
||||
"linux" "107"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "426"
|
||||
"linux" "426"
|
||||
"windows" "431"
|
||||
"linux" "431"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "137"
|
||||
"linux" "138"
|
||||
"windows" "138"
|
||||
"linux" "139"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "128"
|
||||
"linux" "129"
|
||||
"windows" "129"
|
||||
"linux" "130"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "34"
|
||||
"linux" "35"
|
||||
"windows" "35"
|
||||
"linux" "36"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "29"
|
||||
"linux" "28"
|
||||
"windows" "30"
|
||||
"linux" "29"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "28"
|
||||
"linux" "29"
|
||||
"windows" "29"
|
||||
"linux" "30"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "27"
|
||||
"linux" "30"
|
||||
"windows" "28"
|
||||
"linux" "31"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
@@ -96,18 +96,18 @@
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "250"
|
||||
"linux" "251"
|
||||
"windows" "253"
|
||||
"linux" "254"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "31"
|
||||
"linux" "32"
|
||||
"windows" "32"
|
||||
"linux" "33"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "404"
|
||||
"linux" "405"
|
||||
"windows" "408"
|
||||
"linux" "409"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
"Games"
|
||||
{
|
||||
/* Dino D-Day */
|
||||
"dinodday"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "422"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "286"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "275"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "219"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "222"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "111"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "466"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "144"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "135"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "39"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "34"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "33"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "31"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
"windows" "26"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "278"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "36"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "442"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,68 +18,68 @@
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "385"
|
||||
"linux" "386"
|
||||
"windows" "389"
|
||||
"linux" "390"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "259"
|
||||
"linux" "260"
|
||||
"windows" "262"
|
||||
"linux" "263"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "257"
|
||||
"linux" "258"
|
||||
"windows" "260"
|
||||
"linux" "261"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "202"
|
||||
"linux" "203"
|
||||
"windows" "204"
|
||||
"linux" "205"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "206"
|
||||
"linux" "207"
|
||||
"windows" "208"
|
||||
"linux" "209"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "105"
|
||||
"linux" "106"
|
||||
"windows" "106"
|
||||
"linux" "107"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "422"
|
||||
"linux" "423"
|
||||
"windows" "427"
|
||||
"linux" "428"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "137"
|
||||
"linux" "138"
|
||||
"windows" "138"
|
||||
"linux" "139"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "128"
|
||||
"linux" "129"
|
||||
"windows" "129"
|
||||
"linux" "130"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "34"
|
||||
"linux" "35"
|
||||
"windows" "35"
|
||||
"linux" "36"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "29"
|
||||
"linux" "28"
|
||||
"windows" "30"
|
||||
"linux" "29"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "28"
|
||||
"linux" "29"
|
||||
"windows" "29"
|
||||
"linux" "30"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "27"
|
||||
"linux" "30"
|
||||
"windows" "28"
|
||||
"linux" "31"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
@@ -88,18 +88,18 @@
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "250"
|
||||
"linux" "251"
|
||||
"windows" "253"
|
||||
"linux" "254"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "31"
|
||||
"linux" "32"
|
||||
"windows" "32"
|
||||
"linux" "33"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "403"
|
||||
"linux" "404"
|
||||
"windows" "407"
|
||||
"linux" "408"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
"Games"
|
||||
{
|
||||
/* Empires 2.25b */
|
||||
/* Empires 2.31a */
|
||||
"empires"
|
||||
{
|
||||
|
||||
@@ -19,28 +19,28 @@
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "353"
|
||||
"linux" "354"
|
||||
"windows" "357"
|
||||
"linux" "358"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "240"
|
||||
"linux" "241"
|
||||
"windows" "244"
|
||||
"linux" "245"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "238"
|
||||
"linux" "239"
|
||||
"windows" "242"
|
||||
"linux" "243"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "195"
|
||||
"linux" "196"
|
||||
"windows" "199"
|
||||
"linux" "200"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "199"
|
||||
"linux" "200"
|
||||
"windows" "203"
|
||||
"linux" "204"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
@@ -49,18 +49,18 @@
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "392"
|
||||
"linux" "392"
|
||||
"windows" "396"
|
||||
"linux" "396"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "132"
|
||||
"linux" "133"
|
||||
"windows" "136"
|
||||
"linux" "137"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "124"
|
||||
"linux" "125"
|
||||
"windows" "128"
|
||||
"linux" "129"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
@@ -94,44 +94,55 @@
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "231"
|
||||
"linux" "232"
|
||||
"windows" "235"
|
||||
"linux" "236"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "372"
|
||||
"linux" "373"
|
||||
"windows" "376"
|
||||
"linux" "377"
|
||||
}
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
"linux" "10"
|
||||
"windows" "9"
|
||||
"linux" "6"
|
||||
}
|
||||
|
||||
/* Offset into CBaseTempEntity constructor */
|
||||
"s_pTempEntities"
|
||||
{
|
||||
"windows" "19"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"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"
|
||||
}
|
||||
"DispatchSpawn"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\x74\x24\x10\x57\x85\xF6\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x64\x8B\xCB"
|
||||
"windows" "\x55\x8B\xEC\x51\x53\x56\x8B\x75\x2A\x57\x85\xF6\x0F\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x8B"
|
||||
"linux" "@_Z13DispatchSpawnP11CBaseEntity"
|
||||
}
|
||||
"CreateEntityByName"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x56\x8B\x74\x24\x0C\x57\x8B\x7C\x24\x0C\x83\xFE\xFF\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x54\x56\xFF\xD2"
|
||||
"windows" "\x55\x8B\xEC\x56\x8B\x2A\x2A\x57\x8B\x2A\x2A\x83\x2A\x2A\x74\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x2A\x56\xFF\xD2"
|
||||
"linux" "@_Z18CreateEntityByNamePKci"
|
||||
}
|
||||
"FindEntityByClassname"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x57\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x40\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5C\x24\x18\x8B\x2D\x2A\x2A\x2A\x2A\x8D\xA4\x24\x00\x00\x00\x00\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\xC4\x04\xEB\x2A\x39\x2A\x2A\x74\x2A\x53"
|
||||
"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\x2A\x2A\x2A\x2A\x40\x03\xC0\x8B\x3C\xC6\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\x11\x39"
|
||||
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
||||
}
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x55\x8B\xEC\x83\x2A\x2A\x81\xEC\x2A\x2A\x2A\x2A\x53\x56\x8B\x71\x2A\x57\x89"
|
||||
"windows" "\x55\x8B\xEC\x81\x2A\x2A\x2A\x2A\x2A\x53\x56\x8B\x71\x2A\x57\x89\x2A\x2A\xC7"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* Do not edit this file. Any changes will be overwritten by the gamedata
|
||||
* updater or by upgrading your SourceMod install.
|
||||
*
|
||||
* To override data in this file, create a subdirectory named "custom" and
|
||||
* place your own gamedata file(s) inside of it. Such files will be parsed
|
||||
* after SM's own.
|
||||
*
|
||||
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
|
||||
*/
|
||||
|
||||
"Games"
|
||||
{
|
||||
/* Eternal Silence */
|
||||
"esmod"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
/* CBasePlayer */
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "333"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "231"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "229"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "193"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "194"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "100"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "361"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "128"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "120"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "33"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "32"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "31"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "37"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
"windows" "27"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "222"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "34"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "304"
|
||||
}
|
||||
|
||||
|
||||
/* Offset into CreateGameRulesObject */
|
||||
"g_pGameRules"
|
||||
{
|
||||
"windows" "2"
|
||||
}
|
||||
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
"linux" "6"
|
||||
}
|
||||
}
|
||||
|
||||
"Signatures"
|
||||
{
|
||||
"CreateGameRulesObject"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\c2A\x2A\x6A\x01\xFF"
|
||||
}
|
||||
"FindEntityByClassname"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\xF1\x8B\x2A\x2A\x2A\x85\xC9\x57\x74\x2A\x8B\x01\x8B\x2A\x2A\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x83\xC0\x01\xC1\xE0\x04\x8B\x3C\x30\xEB\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\xEB\x2A\x8D\x2A\x2A\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\x2A\x2A\xEB\x2A\x39"
|
||||
}
|
||||
"DispatchSpawn"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\x2A\x2A\x2A\x85\xF6\x57\x0F\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x03\x8B"
|
||||
}
|
||||
"CreateEntityByName"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x56\x8B\x2A\x2A\x2A\x83\xFE\xFF\x57\x8B\x2A\x2A\x2A\x74\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x01\x8B\x2A\x2A\x56\xFF\xD2"
|
||||
}
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\x2A\x2A\x85\xF6\x57"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
/**
|
||||
* Do not edit this file. Any changes will be overwritten by the gamedata
|
||||
* updater or by upgrading your SourceMod install.
|
||||
*
|
||||
* To override data in this file, create a subdirectory named "custom" and
|
||||
* place your own gamedata file(s) inside of it. Such files will be parsed
|
||||
* after SM's own.
|
||||
*
|
||||
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
|
||||
*/
|
||||
|
||||
"Games"
|
||||
{
|
||||
/* Firearms: Source */
|
||||
"fas"
|
||||
{
|
||||
|
||||
"Offsets"
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "354"
|
||||
"linux" "355"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "240"
|
||||
"linux" "241"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "238"
|
||||
"linux" "239"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "193"
|
||||
"linux" "194"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "197"
|
||||
"linux" "208"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "100"
|
||||
"linux" "101"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "396"
|
||||
"linux" "396"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "130"
|
||||
"linux" "131"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "122"
|
||||
"linux" "123"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "29"
|
||||
"linux" "28"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "28"
|
||||
"linux" "29"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "27"
|
||||
"linux" "30"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "34"
|
||||
"linux" "35"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "31"
|
||||
"linux" "32"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
"windows" "23"
|
||||
"linux" "24"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "231"
|
||||
"linux" "232"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "374"
|
||||
"linux" "375"
|
||||
}
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
"linux" "10"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"DispatchSpawn"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\x74\x24\x10\x57\x85\xF6\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x64\x8B\xCB"
|
||||
"linux" "@_Z13DispatchSpawnP11CBaseEntity"
|
||||
}
|
||||
"CreateEntityByName"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x56\x8B\x74\x24\x0C\x57\x8B\x7C\x24\x0C\x83\xFE\xFF\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x54\x56\xFF\xD2"
|
||||
"linux" "@_Z18CreateEntityByNamePKci"
|
||||
}
|
||||
"FindEntityByClassname"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x57\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x40\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5C\x24\x18\x8B\x2D\x2A\x2A\x2A\x2A\x8D\xA4\x24\x00\x00\x00\x00\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\xC4\x04\xEB\x2A\x39\x2A\x2A\x74\x2A\x53"
|
||||
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
||||
}
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\x71\x2A\x57\x89\x2A\x2A\x2A\xC7"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
/**
|
||||
* Do not edit this file. Any changes will be overwritten by the gamedata
|
||||
* updater or by upgrading your SourceMod install.
|
||||
*
|
||||
* To override data in this file, create a subdirectory named "custom" and
|
||||
* place your own gamedata file(s) inside of it. Such files will be parsed
|
||||
* after SM's own.
|
||||
*
|
||||
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
|
||||
*/
|
||||
|
||||
"Games"
|
||||
{
|
||||
/* Fistful of Frags */
|
||||
"fistful_of_frags"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "349"
|
||||
"linux" "350"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "237"
|
||||
"linux" "238"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "235"
|
||||
"linux" "236"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "196"
|
||||
"linux" "197"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "100"
|
||||
"linux" "101"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "388"
|
||||
"linux" "388"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "129"
|
||||
"linux" "130"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "121"
|
||||
"linux" "122"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "34"
|
||||
"linux" "35"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "29"
|
||||
"linux" "28"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "28"
|
||||
"linux" "29"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "27"
|
||||
"linux" "30"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
"windows" "23"
|
||||
"linux" "24"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "228"
|
||||
"linux" "229"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "31"
|
||||
"linux" "32"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "368"
|
||||
"linux" "369"
|
||||
}
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
"linux" "10"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\x71\x2A\x85\xF6\x57"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,84 +11,100 @@
|
||||
|
||||
"Games"
|
||||
{
|
||||
/* Garry's Mod 10 - Windows only
|
||||
* This mod is not officially supported
|
||||
*/
|
||||
/* Garry's Mod - No symbol names in linux bin */
|
||||
"garrysmod"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "391"
|
||||
"windows" "431"
|
||||
"linux" "432"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "279"
|
||||
"windows" "304"
|
||||
"linux" "305"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "277"
|
||||
"windows" "302"
|
||||
"linux" "303"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "228"
|
||||
"windows" "240"
|
||||
"linux" "241"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "232"
|
||||
"windows" "244"
|
||||
"linux" "245"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "101"
|
||||
"windows" "107"
|
||||
"linux" "108"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "429"
|
||||
"windows" "470"
|
||||
"linux" "470"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "131"
|
||||
"windows" "139"
|
||||
"linux" "140"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "123"
|
||||
"windows" "130"
|
||||
"linux" "131"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "34"
|
||||
"windows" "35"
|
||||
"linux" "36"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "29"
|
||||
"windows" "30"
|
||||
"linux" "29"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "28"
|
||||
"windows" "29"
|
||||
"linux" "30"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "27"
|
||||
"windows" "28"
|
||||
"linux" "31"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
"windows" "23"
|
||||
"linux" "24"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "270"
|
||||
"windows" "295"
|
||||
"linux" "296"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "31"
|
||||
"windows" "32"
|
||||
"linux" "33"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "409"
|
||||
"windows" "449"
|
||||
"linux" "450"
|
||||
}
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
"linux" "6"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
@@ -97,21 +113,25 @@
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\x74\x24\x10\x57\x85\xF6\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x64\x8B\xCB"
|
||||
"linux" "@_Z13DispatchSpawnP11CBaseEntity"
|
||||
}
|
||||
"CreateEntityByName"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x56\x8B\x74\x24\x0C\x57\x8B\x7C\x24\x0C\x83\xFE\xFF\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x54\x56\xFF\xD2"
|
||||
"windows" "\x53\x8B\x2A\x2A\x2A\x56\x8B\x2A\x2A\x2A\x57\x83\xFE\xFF\x74\x2A\x8B\x0D\x2A\x2A\x2A\x2A\x8B"
|
||||
"linux" "@_Z18CreateEntityByNamePKci"
|
||||
}
|
||||
"FindEntityByClassname"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x57\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x40\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5C\x24\x18\x8B\x2D\x2A\x2A\x2A\x2A\x8D\xA4\x24\x00\x00\x00\x00\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\xC4\x04\xEB\x2A\x39\x2A\x2A\x74\x2A\x53"
|
||||
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
||||
}
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\x71\x2A\x57\x89"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "351"
|
||||
"linux" "352"
|
||||
"windows" "352"
|
||||
"linux" "353"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
@@ -36,8 +36,8 @@
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "392"
|
||||
"linux" "392"
|
||||
"windows" "393"
|
||||
"linux" "393"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
@@ -86,39 +86,48 @@
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "371"
|
||||
"linux" "372"
|
||||
"windows" "372"
|
||||
"linux" "373"
|
||||
}
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
"windows" "9"
|
||||
"linux" "10"
|
||||
}
|
||||
"s_pTempEntities"
|
||||
{
|
||||
"windows" "19"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"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"
|
||||
}
|
||||
"FindEntityByClassname"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x2A\x2A\x57\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\xFF\xD2\x8B\x00\x25\x2A\x2A\x2A\x2A\x40\xC1\xE0\x2A\x8B\x3C\x30\xEB\x2A\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5C\x2A\x2A\x8B\x2D\x2A\x2A\x2A\x2A\x8D\xA4\x2A\x2A\x2A\x2A\x2A\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\xC4\x2A\xEB\x2A\x39"
|
||||
"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"
|
||||
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
||||
}
|
||||
"CreateEntityByName"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_Z18CreateEntityByNamePKci"
|
||||
"windows" "\x56\x8B\x74\x24\x2A\x57\x8B\x7C\x24\x2A\x83\xFE\xFF\x74\x2A\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x2A\x56\xFF\xD2"
|
||||
"windows" "\x55\x8B\xEC\x56\x8B\x2A\x2A\x57\x8B\x2A\x2A\x83\x2A\x2A\x74\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x2A\x56\xFF\xD2"
|
||||
}
|
||||
"DispatchSpawn"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_Z13DispatchSpawnP11CBaseEntity"
|
||||
"windows" "\x53\x55\x56\x8B\x74\x2A\x2A\x57\x85\xF6\x0F\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x2A\x8B\xCB"
|
||||
"windows" "\x55\x8B\xEC\x51\x53\x56\x8B\x75\x2A\x57\x85\xF6\x0F\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x8B"
|
||||
}
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x57\x89"
|
||||
"windows" "\x55\x8B\xEC\x81\x2A\x2A\x2A\x2A\x2A\x53\x56\x8B\x71\x2A\x57\x89\x2A\x2A\xC7"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,48 +18,48 @@
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "328"
|
||||
"linux" "329"
|
||||
"windows" "389"
|
||||
"linux" "390"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "226"
|
||||
"linux" "227"
|
||||
"windows" "262"
|
||||
"linux" "263"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "224"
|
||||
"linux" "225"
|
||||
"windows" "260"
|
||||
"linux" "261"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "188"
|
||||
"linux" "189"
|
||||
"windows" "204"
|
||||
"linux" "205"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "189"
|
||||
"linux" "190"
|
||||
"windows" "208"
|
||||
"linux" "209"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "98"
|
||||
"linux" "99"
|
||||
"windows" "106"
|
||||
"linux" "107"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "356"
|
||||
"linux" "357"
|
||||
"windows" "428"
|
||||
"linux" "428"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "126"
|
||||
"linux" "127"
|
||||
"windows" "138"
|
||||
"linux" "139"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "118"
|
||||
"linux" "119"
|
||||
"windows" "129"
|
||||
"linux" "130"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
@@ -68,28 +68,28 @@
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "31"
|
||||
"linux" "30"
|
||||
"windows" "30"
|
||||
"linux" "29"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "30"
|
||||
"linux" "31"
|
||||
"windows" "29"
|
||||
"linux" "30"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "29"
|
||||
"linux" "32"
|
||||
"windows" "28"
|
||||
"linux" "31"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
"windows" "25"
|
||||
"linux" "26"
|
||||
"windows" "23"
|
||||
"linux" "24"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "217"
|
||||
"linux" "218"
|
||||
"windows" "253"
|
||||
"linux" "254"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
@@ -98,8 +98,8 @@
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "346"
|
||||
"linux" "347"
|
||||
"windows" "407"
|
||||
"linux" "408"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,63 +18,63 @@
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "385"
|
||||
"linux" "386"
|
||||
"windows" "389"
|
||||
"linux" "390"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "259"
|
||||
"linux" "259"
|
||||
"windows" "262"
|
||||
"linux" "263"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "257"
|
||||
"linux" "258"
|
||||
"windows" "260"
|
||||
"linux" "261"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "202"
|
||||
"linux" "203"
|
||||
"windows" "204"
|
||||
"linux" "205"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "206"
|
||||
"linux" "207"
|
||||
"windows" "208"
|
||||
"linux" "209"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "105"
|
||||
"linux" "106"
|
||||
"windows" "106"
|
||||
"linux" "107"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "425"
|
||||
"linux" "425"
|
||||
"windows" "430"
|
||||
"linux" "430"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "137"
|
||||
"linux" "138"
|
||||
"windows" "138"
|
||||
"linux" "139"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "128"
|
||||
"linux" "129"
|
||||
"windows" "129"
|
||||
"linux" "130"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "29"
|
||||
"linux" "28"
|
||||
"windows" "30"
|
||||
"linux" "29"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "28"
|
||||
"linux" "29"
|
||||
"windows" "29"
|
||||
"linux" "30"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "27"
|
||||
"linux" "30"
|
||||
"windows" "28"
|
||||
"linux" "31"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
@@ -83,23 +83,23 @@
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "34"
|
||||
"linux" "35"
|
||||
"windows" "35"
|
||||
"linux" "36"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "250"
|
||||
"linux" "251"
|
||||
"windows" "253"
|
||||
"linux" "254"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "31"
|
||||
"linux" "32"
|
||||
"windows" "32"
|
||||
"linux" "33"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "403"
|
||||
"linux" "404"
|
||||
"windows" "407"
|
||||
"linux" "408"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "397"
|
||||
"linux" "397"
|
||||
"windows" "399"
|
||||
"linux" "399"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
@@ -96,13 +96,23 @@
|
||||
"windows" "32"
|
||||
"linux" "33"
|
||||
}
|
||||
"PlayerRunCmd"
|
||||
{
|
||||
"windows" "375"
|
||||
"linux" "376"
|
||||
}
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
"linux" "10"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"FindEntityByClassname"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x2A\x2A\x8B\x00\x25\xFF\x0F\x00\x00\x40\xC1\xC1\xE0\x04\x8B\x2A\x2A\xEB\x2A\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5C\x24\x2A\x8B\x2D\x2A\x2A\x2A\x2A\x8D\xA4\x24\x00\x00\x00\x00\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\xC4\x2A\xEB\x2A\x39"
|
||||
"windows" "\x53\x55\x56\x8B\xF1\x8B\x2A\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\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8D\x2A\x2A\x2A\x2A\x2A\x2A\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\xC4\x2A\xEB\x2A\x39"
|
||||
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
||||
}
|
||||
"CreateEntityByName"
|
||||
@@ -116,7 +126,13 @@
|
||||
"library" "server"
|
||||
"linux" "@_Z13DispatchSpawnP11CBaseEntity"
|
||||
"windows" "\x53\x55\x56\x8B\x74\x2A\x2A\x57\x85\xF6\x0F\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x2A\x8B\xCB"
|
||||
}
|
||||
}
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\x71\x2A\x57\x89"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
"engine" "left4dead2"
|
||||
}
|
||||
|
||||
"engine.swarm.txt"
|
||||
{
|
||||
"engine" "alienswarm"
|
||||
}
|
||||
|
||||
"engine.ep2.txt"
|
||||
{
|
||||
"engine" "orangebox"
|
||||
@@ -154,4 +159,24 @@
|
||||
{
|
||||
"game" "RnLBeta"
|
||||
}
|
||||
"game.fas.txt"
|
||||
{
|
||||
"game" "fas"
|
||||
}
|
||||
"game.fof.txt"
|
||||
{
|
||||
"game" "fistful_of_frags"
|
||||
}
|
||||
"game.alienswarm.txt"
|
||||
{
|
||||
"game" "swarm"
|
||||
}
|
||||
"game.dinodday.txt"
|
||||
{
|
||||
"game" "dinodday"
|
||||
}
|
||||
"game.esmod.txt"
|
||||
{
|
||||
"game" "esmod"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
"RoundRespawn"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x56\x8B\xF1\x8B\x06\x8B\x2A\x2A\x2A\x2A\x2A\xFF\xD2\x8B\x2A\x2A\x2A\x2A\x2A\x85"
|
||||
"windows" "\x55\x8B\xEC\x51\x89\x2A\x2A\x8B\x2A\x2A\x8B\x10\x8B"
|
||||
"linux" "@_ZN9CCSPlayer12RoundRespawnEv"
|
||||
}
|
||||
"SwitchTeam"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x83\xEC\x10\x56\x57\x8B\x7C\x24\x1C\x57\x8B\xF1\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\x85\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x83\xFF\x03\x74\x09\x83\xFF\x02\x0F\x2A\x2A\x2A\x2A\x2A\x8B\xCE\xE8\x2A\x2A\x2A\x2A\x3B"
|
||||
"windows" "\x55\x8B\xEC\x83\xEC\x2A\x89\x4D\x2A\x8B\x45\x2A\x50\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\x85\xC0\x74"
|
||||
"linux" "@_ZN9CCSPlayer10SwitchTeamEi"
|
||||
}
|
||||
}
|
||||
|
||||
+31
-12
@@ -18,20 +18,20 @@
|
||||
"Burn"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x56\x8B\xF1\x8B\x8E\x2A\x2A\x00\x00\x8B\x01\x8B\x90\x2A\x2A\x00\x00\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x8B"
|
||||
"windows" "\x51\x56\x8B\xF1\x8B\x8E\x2A\x2A\x00\x00\x8B\x01\x8B\x90\x2A\x2A\x00\x00\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x57\x8D\xBE\x2A\x2A\x2A\x2A\x6A"
|
||||
"linux" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase"
|
||||
}
|
||||
"RemoveDisguise"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x51\x56\x8B\xF1\x8B\x2A\x2A\x2A\x2A\x2A\x57\x8B\x2A\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x3B\xF8"
|
||||
"windows" "\x51\x56\x8B\xF1\x8B\x8E\x2A\x2A\x2A\x2A\x57\x8B\xBE\x2A\x2A\x2A\x2A\xE8"
|
||||
"linux" "@_ZN15CTFPlayerShared14RemoveDisguiseEv"
|
||||
}
|
||||
"Disguise"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x56\x8B\xF1\x8B\x8E\x2A\x2A\x00\x00\xE8\x2A\x2A\x2A\x2A\x8B\x8E\x2A\x2A\x00\x00\x8B\x89\x2A\x2A\x00\x00"
|
||||
"linux" "@_ZN15CTFPlayerShared8DisguiseEii"
|
||||
"windows" "\x51\x53\x56\x8B\xF1\x8B\x8E\x2A\x2A\x00\x00\xE8\x2A\x2A\x2A\x2A\x8B\xD8\x8B\x86\x2A\x2A\x00\x00\x8B\x80"
|
||||
"linux" "@_ZN15CTFPlayerShared8DisguiseEiiP9CTFPlayerb"
|
||||
}
|
||||
"CalcCritical"
|
||||
{
|
||||
@@ -49,7 +49,7 @@
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_ZN14CTFCompoundBow26CalcIsAttackCriticalHelperEv"
|
||||
"windows" "\xE8\x2A\x2A\x2A\x2A\x85\xC0\x74\x14\x6A\x0B"
|
||||
"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"
|
||||
{
|
||||
@@ -60,14 +60,14 @@
|
||||
"AddCondition"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x8B\xCF\xBA\x01\x00\x00\x00\xD3\xE2\x8D\x46\x2A\x8D\x4C\x2A\x2A\x51\x0B\x10"
|
||||
"linux" "@_ZN15CTFPlayerShared7AddCondEif"
|
||||
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x83\xFF\x2A\x8B\xF1\x7C\x2A\x8D\x9E\x2A\x2A\x2A\x2A\x8D\x6F\x2A\xEB\x2A\x8D\x9E\x2A\x2A\x2A\x2A\x8B\xEF\x8B\x86\x2A\x2A\x2A\x2A\xD9"
|
||||
"linux" "@_ZN15CTFPlayerShared7AddCondE7ETFCondf"
|
||||
}
|
||||
"RemoveCondition"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x8B\xCF\xBA\x01\x00\x00\x00\xD3\xE2\x8D\x46\x2A\x8D\x4C\x2A\x2A\x51\xF7\xD2"
|
||||
"linux" "@_ZN15CTFPlayerShared10RemoveCondEi"
|
||||
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x8B\xF1\x57\x8D\x8E\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x74\x2A\x5F"
|
||||
"linux" "@_ZN15CTFPlayerShared10RemoveCondE7ETFCondb"
|
||||
}
|
||||
"SetPowerplayEnabled"
|
||||
{
|
||||
@@ -78,16 +78,35 @@
|
||||
"StunPlayer"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x51\xD9\x2A\x2A\x2A\x2A\x2A\x56\x83\xEC\x2A\xD9\x2A\x2A\x2A\x8B\xF1\xD9\xEE\xD9\x2A\x2A\x2A\xD9\xE8"
|
||||
"windows" "\x51\xD9\x2A\x2A\x2A\x2A\x2A\x56\x57\x83\xEC\x2A\xD9\x2A\x2A\x2A\x8B\xF1\xD9\xEE\xD9\x2A\x2A\x2A\xD9\xE8\xD9"
|
||||
"linux" "@_ZN15CTFPlayerShared10StunPlayerEffiP9CTFPlayer"
|
||||
}
|
||||
"GetHoliday"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x57\x6A\x00\xE8\x2A\x2A\x2A\x2A\x89"
|
||||
"linux" "@_Z15UTIL_GetHolidayv"
|
||||
}
|
||||
"MakeBleed"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x51\x56\x8B\xF1\x8B\x8E\x2A\x2A\x2A\x2A\x8B\x01\x8B\x90\x2A\x2A\x2A\x2A\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x6A\x19\x8D"
|
||||
"linux" "@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasef"
|
||||
}
|
||||
"IsPlayerInDuel"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x83\xEC\x08\x2A\x2A\x2A\x2A\x33\xC0\x89\x04\x24\x89\x44\x24\x04\x8D\x04\x24\x50\x2A\x2A\x2A\x2A\x2A\x84\xC0\x2A\x2A\x83\xC4\x08\xC3"
|
||||
"linux" "@_Z21DuelMiniGame_IsInDuelP9CTFPlayer"
|
||||
}
|
||||
}
|
||||
"Offsets"
|
||||
{
|
||||
"ForceRespawn"
|
||||
{
|
||||
"windows" "313"
|
||||
"linux" "314"
|
||||
"windows" "317"
|
||||
"linux" "318"
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-1
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 sw=4 tw=99 noet :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -69,6 +69,7 @@
|
||||
#define FILENAME_1_6_L4D "sourcemod.2.l4d" PLATFORM_EXT
|
||||
#define FILENAME_1_6_DARKM "sourcemod.2.darkm" PLATFORM_EXT
|
||||
#define FILENAME_1_6_L4D2 "sourcemod.2.l4d2" PLATFORM_EXT
|
||||
#define FILENAME_1_6_SWARM "sourcemod.2.swarm" PLATFORM_EXT
|
||||
|
||||
HINSTANCE g_hCore = NULL;
|
||||
bool load_attempted = false;
|
||||
@@ -235,6 +236,11 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co
|
||||
filename = FILENAME_1_6_L4D2;
|
||||
break;
|
||||
}
|
||||
case SOURCE_ENGINE_ALIENSWARM:
|
||||
{
|
||||
filename = FILENAME_1_6_SWARM;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return NULL;
|
||||
|
||||
+1
-1
@@ -220,7 +220,7 @@ public Action:Command_AddBan(client, args)
|
||||
/* Get time */
|
||||
if ((len = BreakString(arg_string, time, sizeof(time))) == -1)
|
||||
{
|
||||
ReplyToCommand(client, "t[SM] Usage: sm_addban <time> <steamid> [reason]");
|
||||
ReplyToCommand(client, "[SM] Usage: sm_addban <time> <steamid> [reason]");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
total_len += len;
|
||||
|
||||
+1
-1
@@ -173,7 +173,7 @@ public ConVarChange_Alltalk(Handle:convar, const String:oldValue[], const String
|
||||
{
|
||||
SetClientListeningFlags(i, VOICE_NORMAL);
|
||||
}
|
||||
else
|
||||
else if (!IsPlayerAlive(i))
|
||||
{
|
||||
if (mode == 1)
|
||||
{
|
||||
|
||||
+20
-10
@@ -58,11 +58,11 @@ new Handle:hTopMenu = INVALID_HANDLE;
|
||||
#define SOUND_FREEZE "physics/glass/glass_impact_bullet4.wav"
|
||||
|
||||
// Following are model indexes for temp entities
|
||||
new g_BeamSprite;
|
||||
new g_BeamSprite2;
|
||||
new g_HaloSprite;
|
||||
new g_GlowSprite;
|
||||
new g_ExplosionSprite;
|
||||
new g_BeamSprite = -1;
|
||||
new g_BeamSprite2 = -1;
|
||||
new g_HaloSprite = -1;
|
||||
new g_GlowSprite = -1;
|
||||
new g_ExplosionSprite = -1;
|
||||
|
||||
// Basic color arrays for temp entities
|
||||
new redColor[4] = {255, 75, 75, 255};
|
||||
@@ -169,11 +169,21 @@ public OnMapStart()
|
||||
PrecacheSound(SOUND_BOOM, true);
|
||||
PrecacheSound(SOUND_FREEZE, true);
|
||||
|
||||
g_BeamSprite = PrecacheModel("materials/sprites/laser.vmt");
|
||||
g_BeamSprite2 = PrecacheModel("sprites/bluelight1.vmt");
|
||||
g_HaloSprite = PrecacheModel("materials/sprites/halo01.vmt");
|
||||
g_GlowSprite = PrecacheModel("sprites/blueglow2.vmt");
|
||||
g_ExplosionSprite = PrecacheModel("sprites/sprite_fire01.vmt");
|
||||
new sdkversion = GuessSDKVersion();
|
||||
if (sdkversion == SOURCE_SDK_LEFT4DEAD || sdkversion == SOURCE_SDK_LEFT4DEAD2)
|
||||
{
|
||||
g_BeamSprite = PrecacheModel("materials/sprites/laserbeam.vmt");
|
||||
g_HaloSprite = PrecacheModel("materials/sprites/glow01.vmt");
|
||||
}
|
||||
else
|
||||
{
|
||||
g_BeamSprite = PrecacheModel("materials/sprites/laser.vmt");
|
||||
g_HaloSprite = PrecacheModel("materials/sprites/halo01.vmt");
|
||||
g_BeamSprite2 = PrecacheModel("sprites/bluelight1.vmt");
|
||||
g_GlowSprite = PrecacheModel("sprites/blueglow2.vmt");
|
||||
g_ExplosionSprite = PrecacheModel("sprites/sprite_fire01.vmt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public OnMapEnd()
|
||||
|
||||
@@ -134,8 +134,11 @@ public Action:Timer_FireBomb(Handle:timer, any:value)
|
||||
}
|
||||
else
|
||||
{
|
||||
TE_SetupExplosion(vec, g_ExplosionSprite, 0.1, 1, 0, GetConVarInt(g_Cvar_FireBombRadius), 5000);
|
||||
TE_SendToAll();
|
||||
if (g_ExplosionSprite > -1)
|
||||
{
|
||||
TE_SetupExplosion(vec, g_ExplosionSprite, 0.1, 1, 0, GetConVarInt(g_Cvar_FireBombRadius), 5000);
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
|
||||
@@ -186,7 +186,15 @@ public Action:Timer_Freeze(Handle:timer, any:value)
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
|
||||
TE_SetupGlowSprite(vec, g_GlowSprite, 0.95, 1.5, 50);
|
||||
if (g_GlowSprite > -1)
|
||||
{
|
||||
TE_SetupGlowSprite(vec, g_GlowSprite, 0.95, 1.5, 50);
|
||||
}
|
||||
else
|
||||
{
|
||||
TE_SetupGlowSprite(vec, g_HaloSprite, 0.95, 1.5, 50);
|
||||
}
|
||||
|
||||
TE_SendToAll();
|
||||
|
||||
return Plugin_Continue;
|
||||
@@ -241,8 +249,11 @@ public Action:Timer_FreezeBomb(Handle:timer, any:value)
|
||||
}
|
||||
else
|
||||
{
|
||||
TE_SetupExplosion(vec, g_ExplosionSprite, 5.0, 1, 0, GetConVarInt(g_Cvar_FreezeBombRadius), 5000);
|
||||
TE_SendToAll();
|
||||
if (g_ExplosionSprite > -1)
|
||||
{
|
||||
TE_SetupExplosion(vec, g_ExplosionSprite, 5.0, 1, 0, GetConVarInt(g_Cvar_FreezeBombRadius), 5000);
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
EmitAmbientSound(SOUND_BOOM, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
|
||||
@@ -275,7 +286,14 @@ public Action:Timer_FreezeBomb(Handle:timer, any:value)
|
||||
continue;
|
||||
}
|
||||
|
||||
TE_SetupBeamPoints(vec, pos, g_BeamSprite2, g_HaloSprite, 0, 1, 0.7, 20.0, 50.0, 1, 1.5, blueColor, 10);
|
||||
if (g_BeamSprite2 > -1)
|
||||
{
|
||||
TE_SetupBeamPoints(vec, pos, g_BeamSprite2, g_HaloSprite, 0, 1, 0.7, 20.0, 50.0, 1, 1.5, blueColor, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
TE_SetupBeamPoints(vec, pos, g_BeamSprite, g_HaloSprite, 0, 1, 0.7, 20.0, 50.0, 1, 1.5, blueColor, 10);
|
||||
}
|
||||
TE_SendToAll();
|
||||
|
||||
FreezeClient(i, GetConVarInt(g_Cvar_FreezeDuration));
|
||||
|
||||
@@ -127,8 +127,11 @@ public Action:Timer_TimeBomb(Handle:timer, any:value)
|
||||
}
|
||||
else
|
||||
{
|
||||
TE_SetupExplosion(vec, g_ExplosionSprite, 5.0, 1, 0, GetConVarInt(g_Cvar_TimeBombRadius), 5000);
|
||||
TE_SendToAll();
|
||||
if (g_ExplosionSprite > -1)
|
||||
{
|
||||
TE_SetupExplosion(vec, g_ExplosionSprite, 5.0, 1, 0, GetConVarInt(g_Cvar_TimeBombRadius), 5000);
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
EmitAmbientSound(SOUND_BOOM, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
|
||||
@@ -166,8 +169,12 @@ public Action:Timer_TimeBomb(Handle:timer, any:value)
|
||||
damage = RoundToFloor(damage * ((GetConVarFloat(g_Cvar_TimeBombRadius) - distance) / GetConVarFloat(g_Cvar_TimeBombRadius)));
|
||||
|
||||
SlapPlayer(i, damage, false);
|
||||
TE_SetupExplosion(pos, g_ExplosionSprite, 0.05, 1, 0, 1, 1);
|
||||
TE_SendToAll();
|
||||
|
||||
if (g_ExplosionSprite > -1)
|
||||
{
|
||||
TE_SetupExplosion(pos, g_ExplosionSprite, 0.05, 1, 0, 1, 1);
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
/* ToDo
|
||||
new Float:dir[3];
|
||||
|
||||
@@ -516,6 +516,15 @@ native bool:FindFlagByName(const String:name[], &AdminFlag:flag);
|
||||
*/
|
||||
native bool:FindFlagByChar(c, &AdminFlag:flag);
|
||||
|
||||
/**
|
||||
* Finds a flag char by a gived admin flag.
|
||||
*
|
||||
* @param flag Flag to look up.
|
||||
* @param c Variable to store flag char.
|
||||
* @return True on success, false if not found.
|
||||
*/
|
||||
native bool:FindFlagChar(AdminFlag:flag, &c);
|
||||
|
||||
/**
|
||||
* Converts a string of flag characters to a bit string.
|
||||
*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* SourceMod (C)2004-2011 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This file is part of the SourceMod/SourcePawn SDK.
|
||||
@@ -241,7 +241,7 @@ native GetClientCookieTime(client, Handle:cookie);
|
||||
/**
|
||||
* Do not edit below this line!
|
||||
*/
|
||||
public Extension:__ext_clientprefs =
|
||||
public Extension:__ext_cprefs =
|
||||
{
|
||||
name = "Client Preferences",
|
||||
file = "clientprefs.ext",
|
||||
@@ -252,3 +252,21 @@ public Extension:__ext_clientprefs =
|
||||
required = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_EXTENSIONS
|
||||
public __ext_cprefs_SetNTVOptional()
|
||||
{
|
||||
MarkNativeAsOptional("RegClientCookie");
|
||||
MarkNativeAsOptional("FindClientCookie");
|
||||
MarkNativeAsOptional("SetClientCookie");
|
||||
MarkNativeAsOptional("GetClientCookie");
|
||||
MarkNativeAsOptional("AreClientCookiesCached");
|
||||
MarkNativeAsOptional("SetCookiePrefabMenu");
|
||||
MarkNativeAsOptional("SetCookieMenuItem");
|
||||
MarkNativeAsOptional("ShowCookieMenu");
|
||||
MarkNativeAsOptional("GetCookieIterator");
|
||||
MarkNativeAsOptional("ReadCookieIterator");
|
||||
MarkNativeAsOptional("GetCookieAccess");
|
||||
MarkNativeAsOptional("GetClientCookieTime");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -53,7 +53,7 @@ enum NetFlow
|
||||
* not be used in OnPluginStart().
|
||||
*/
|
||||
|
||||
#define MAXPLAYERS 64 /**< Maximum number of players SourceMod supports */
|
||||
#define MAXPLAYERS 65 /**< Maximum number of players SourceMod supports */
|
||||
#define MAX_NAME_LENGTH 32 /**< Maximum buffer required to store a client name */
|
||||
|
||||
public const MaxClients; /**< Maximum number of players the server supports (dynamic) */
|
||||
|
||||
+23
-17
@@ -473,9 +473,8 @@ native bool:GetConVarBool(Handle:convar);
|
||||
/**
|
||||
* Sets the boolean value of a console variable.
|
||||
*
|
||||
* Note: The replicate and notify params are ignored on the engines for Episode 2/Orange Box
|
||||
* and Left 4 Dead. These engines automatically replicates and notifies as soon as the convar
|
||||
* is changed.
|
||||
* Note: The replicate and notify params are only relevant for the original, Dark Messiah, and
|
||||
* Episode 1 engines. Newer engines automatically do these things when the convar value is changed.
|
||||
*
|
||||
* @param convar Handle to the convar.
|
||||
* @param value New boolean value.
|
||||
@@ -501,9 +500,8 @@ native GetConVarInt(Handle:convar);
|
||||
/**
|
||||
* Sets the integer value of a console variable.
|
||||
*
|
||||
* Note: The replicate and notify params are ignored on the engines for Episode 2/Orange Box
|
||||
* and Left 4 Dead. These engines automatically replicates and notifies as soon as the convar
|
||||
* is changed.
|
||||
* Note: The replicate and notify params are only relevant for the original, Dark Messiah, and
|
||||
* Episode 1 engines. Newer engines automatically do these things when the convar value is changed.
|
||||
*
|
||||
* @param convar Handle to the convar.
|
||||
* @param value New integer value.
|
||||
@@ -529,9 +527,8 @@ native Float:GetConVarFloat(Handle:convar);
|
||||
/**
|
||||
* Sets the floating point value of a console variable.
|
||||
*
|
||||
* Note: The replicate and notify params are ignored on the engines for Episode 2/Orange Box
|
||||
* and Left 4 Dead. These engines automatically replicates and notifies as soon as the convar
|
||||
* is changed.
|
||||
* Note: The replicate and notify params are only relevant for the original, Dark Messiah, and
|
||||
* Episode 1 engines. Newer engines automatically do these things when the convar value is changed.
|
||||
*
|
||||
* @param convar Handle to the convar.
|
||||
* @param value New floating point value.
|
||||
@@ -559,9 +556,8 @@ native GetConVarString(Handle:convar, String:value[], maxlength);
|
||||
/**
|
||||
* Sets the string value of a console variable.
|
||||
*
|
||||
* Note: The replicate and notify params are ignored on the engines for Episode 2/Orange Box
|
||||
* and Left 4 Dead. These engines automatically replicates and notifies as soon as the convar
|
||||
* is changed.
|
||||
* Note: The replicate and notify params are only relevant for the original, Dark Messiah, and
|
||||
* Episode 1 engines. Newer engines automatically do these things when the convar value is changed.
|
||||
*
|
||||
* @param convar Handle to the convar.
|
||||
* @param value New string value.
|
||||
@@ -578,9 +574,8 @@ native SetConVarString(Handle:convar, const String:value[], bool:replicate=false
|
||||
/**
|
||||
* Resets the console variable to its default value.
|
||||
*
|
||||
* Note: The replicate and notify params are ignored on the engines for Episode 2/Orange Box
|
||||
* and Left 4 Dead. These engines automatically replicates and notifies as soon as the convar
|
||||
* is changed.
|
||||
* Note: The replicate and notify params are only relevant for the original, Dark Messiah, and
|
||||
* Episode 1 engines. Newer engines automatically do these things when the convar value is changed.
|
||||
*
|
||||
* @param convar Handle to the convar.
|
||||
* @param replicate If set to true, the new convar value will be set on all clients.
|
||||
@@ -593,6 +588,17 @@ native SetConVarString(Handle:convar, const String:value[], bool:replicate=false
|
||||
*/
|
||||
native ResetConVar(Handle:convar, bool:replicate=false, bool:notify=false);
|
||||
|
||||
/**
|
||||
* Retrieves the default string value of a console variable.
|
||||
*
|
||||
* @param convar Handle to the convar.
|
||||
* @param value Buffer to store the default value of the convar.
|
||||
* @param maxlength Maximum length of string buffer.
|
||||
* @return Number of bytes written to the buffer (UTF-8 safe).
|
||||
* @error Invalid or corrupt Handle.
|
||||
*/
|
||||
native GetConVarDefault(Handle:convar, String:value[], maxlength);
|
||||
|
||||
/**
|
||||
* Returns the bitstring of flags on a console variable.
|
||||
*
|
||||
@@ -639,12 +645,12 @@ native SetConVarBounds(Handle:convar, ConVarBounds:type, bool:set, Float:value=0
|
||||
* Retrieves the name of a console variable.
|
||||
*
|
||||
* @param convar Handle to the convar.
|
||||
* @param value Buffer to store the name of the convar.
|
||||
* @param name Buffer to store the name of the convar.
|
||||
* @param maxlength Maximum length of string buffer.
|
||||
* @noreturn
|
||||
* @error Invalid or corrupt Handle.
|
||||
*/
|
||||
native GetConVarName(Handle:convar, const String:name[], maxlength);
|
||||
native GetConVarName(Handle:convar, String:name[], maxlength);
|
||||
|
||||
funcenum ConVarQueryFinished
|
||||
{
|
||||
|
||||
@@ -669,3 +669,18 @@ stock SetEntDataArray(entity, offset, const array[], arraySize, dataSize=4, bool
|
||||
SetEntData(entity, offset + i*dataSize, array[i], dataSize, changeState);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the classname of an entity.
|
||||
* This is like GetEdictClassname(), except it works for ALL
|
||||
* entities, not just edicts.
|
||||
*
|
||||
* @param edict Index of the entity.
|
||||
* @param clsname Buffer to store the classname.
|
||||
* @param maxlength Maximum length of the buffer.
|
||||
* @return True on success, false if there is no classname set.
|
||||
*/
|
||||
stock bool:GetEntityClassname(entity, String:clsname[], maxlength)
|
||||
{
|
||||
return !!GetEntPropString(entity, Prop_Data, "m_iClassname", clsname, maxlength);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,8 @@ enum RenderFx
|
||||
#define IN_GRENADE1 (1 << 23) // grenade 1
|
||||
#define IN_GRENADE2 (1 << 24) // grenade 2
|
||||
|
||||
// CBaseEntity::m_fFlags
|
||||
// Note: these are only for use with GetEntityFlags and SetEntityFlags
|
||||
// and may not match the game's actual, internal m_fFlags values.
|
||||
// PLAYER SPECIFIC FLAGS FIRST BECAUSE WE USE ONLY A FEW BITS OF NETWORK PRECISION
|
||||
#define FL_ONGROUND (1 << 0) // At rest / on the ground
|
||||
#define FL_DUCKING (1 << 1) // Player flag -- Player is fully crouched
|
||||
@@ -159,36 +160,36 @@ enum RenderFx
|
||||
#define FL_DISSOLVING (1 << 28) // We're dissolving!
|
||||
#define FL_TRANSRAGDOLL (1 << 29) // In the process of turning into a client side ragdoll.
|
||||
#define FL_UNBLOCKABLE_BY_PLAYER (1 << 30) // pusher that can't be blocked by the player
|
||||
// END m_fFlags #defines
|
||||
#define FL_FREEZING (1 << 31) // We're becoming frozen!
|
||||
#define FL_EP2V_UNKNOWN1 (1 << 31) // Unknown
|
||||
// END entity flag #defines
|
||||
|
||||
/**
|
||||
* Get an entity's flags.
|
||||
*
|
||||
* @note The game's actual flags are internally translated by SM
|
||||
* to match the entity flags defined above as the actual values
|
||||
* can differ per engine.
|
||||
*
|
||||
* @param entity Entity index.
|
||||
* @return Entity's flags, see m_fFlag defines above
|
||||
* @return Entity's flags, see entity flag defines above.
|
||||
* @error Invalid entity index, or lack of mod compliance.
|
||||
*/
|
||||
stock GetEntityFlags(entity)
|
||||
{
|
||||
static bool:gotconfig = false;
|
||||
static String:datamap[32];
|
||||
|
||||
if (!gotconfig)
|
||||
{
|
||||
new Handle:gc = LoadGameConfigFile("core.games");
|
||||
new bool:exists = GameConfGetKeyValue(gc, "m_fFlags", datamap, sizeof(datamap));
|
||||
CloseHandle(gc);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
strcopy(datamap, sizeof(datamap), "m_fFlags");
|
||||
}
|
||||
|
||||
gotconfig = true;
|
||||
}
|
||||
|
||||
return GetEntProp(entity, Prop_Data, datamap);
|
||||
}
|
||||
native GetEntityFlags(entity);
|
||||
|
||||
/**
|
||||
* Sets an entity's flags.
|
||||
*
|
||||
* @note The entity flags as defined above are internally translated by SM
|
||||
* to match the current game's expected value for the flags as
|
||||
* the actual values can differ per engine.
|
||||
*
|
||||
* @param entity Entity index.
|
||||
* @param flags Entity flags, see entity flag defines above.
|
||||
* @noreturn
|
||||
* @error Invalid entity index, or lack of mod compliance.
|
||||
*/
|
||||
native SetEntityFlags(entity, flags);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
#define SOURCE_SDK_EPISODE2 30 /**< SDK+Engine released after Episode 2/Orange Box */
|
||||
#define SOURCE_SDK_EPISODE2VALVE 35 /**< SDK+Engine released after Episode 2/Orange Box */
|
||||
#define SOURCE_SDK_LEFT4DEAD 40 /**< Engine released after Left 4 Dead (no SDK yet) */
|
||||
#define SOURCE_SDK_LEFT4DEAD2 50 /**< Engine released after Left 4 Dead 2 (no SDK yet) */
|
||||
#define SOURCE_SDK_LEFT4DEAD2 50 /**< Engine released after Left 4 Dead 2 (no SDK yet) */
|
||||
#define SOURCE_SDK_ALIENSWARM 60 /**< SDK+Engine released after Alien Swarm */
|
||||
|
||||
#define MOTDPANEL_TYPE_TEXT 0 /**< Treat msg as plain text */
|
||||
#define MOTDPANEL_TYPE_INDEX 1 /**< Msg is auto determined by the engine */
|
||||
|
||||
@@ -94,3 +94,28 @@ native GetLanguageCount();
|
||||
*/
|
||||
native GetLanguageInfo(language, String:code[]="", codeLen=0, String:name[]="", nameLen=0);
|
||||
|
||||
/**
|
||||
* Sets the language number of a client.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param language Language number.
|
||||
* @noreturn
|
||||
* @error Invalid client index or client not in game.
|
||||
*/
|
||||
native SetClientLanguage(client, language);
|
||||
|
||||
/**
|
||||
* Retrieves the language number from a language code.
|
||||
*
|
||||
* @param code Language code (2-3 characters usually).
|
||||
* @return Language number. -1 if not found.
|
||||
*/
|
||||
native GetLanguageByCode(const String:code[]);
|
||||
|
||||
/**
|
||||
* Retrieves the language number from a language name.
|
||||
*
|
||||
* @param name Language name (case insensitive).
|
||||
* @return Language number. -1 if not found.
|
||||
*/
|
||||
native GetLanguageByName(const String:name[]);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user