Compare commits

...
Author SHA1 Message Date
David Anderson b811336c1e Removed -dev tag for release. 2010-10-17 12:28:04 -07:00
David Anderson 3fc3ab4372 Updated credits. 2010-10-17 12:26:52 -07:00
David Anderson 6434cc7bf0 Updated changelog. 2010-10-17 12:25:29 -07:00
David Anderson d8e3e7e11d Follow-up fixes to database conf reading (bug 4286, r=fyren, a=blocking). 2010-10-16 22:27:34 -07:00
Fyren 061a958b9f Use SH strings for database configs (bug 4286, r=dvander) 2010-10-16 03:55:28 -07:00
Nicholas Hastings 294afcca2a Updated Gmod gamedata (bug 4652, r=fyren). 2010-10-07 18:36:47 -04:00
Nicholas Hastings e8834ed9cb Updated CSS/DODS/TF2/HL2DM CommitSuicide offset (bug 4650, r=fyren). 2010-10-06 20:48:40 -04:00
Scott Ehlert a37e6bbb8b Triggering build against L4D2 SDK changes.
This should fix sm_kick.
2010-10-05 23:30:42 -07:00
Scott Ehlert 4d007d6b2a Triggering build against L4D1 SDK changes. 2010-10-05 20:05:04 -07:00
Fyren 9527457ca0 Fixed 'sm plugins' public command skipping plugins in recommended listing (bug 4501, r=dvander). 2010-10-04 22:40:47 -04:00
Nicholas Hastings f7d3396001 Added one more missing enum value in tf2_stocks. 2010-10-01 15:24:50 -04:00
Nicholas Hastings 55508e0068 Fixed/updated TF2_DisguisePlayer (bug 4641, r=fyren). 2010-10-01 10:47:58 -04:00
Nicholas Hastings cc691da4d0 Updated more TF2 gamedata and fixed RemoveCondition call (bug 4641, r=fyren). 2010-10-01 09:10:44 -04:00
Nicholas Hastings d05d47139d Shortened names of some symbols in tf2_stocks (bug 4642, r=fyren). 2010-10-01 08:53:09 -04:00
Nicholas Hastings 47e02e0f6c Updated TF2 includes with more defined identifiers (bug 4640, r=dvander). 2010-09-30 23:42:31 -04:00
Nicholas Hastings 5202c1361f Updated HL2DM gamedata (bug 4636, r=fyren). 2010-09-30 20:14:01 -04:00
Nicholas Hastings 1d13430519 Updated DODS gamedata (bug 4638, r=fyren). 2010-09-30 17:29:05 -04:00
Nicholas Hastings 1852813741 Updated TF2 gamedata (bug 4635, r=fyren). 2010-09-30 17:28:28 -04:00
Nicholas Hastings d711c17534 Updated CSS gamedata (bug 4637, r=fyren). 2010-09-30 17:27:26 -04:00
Nicholas Hastings 717606deef forcing build since no good snapshot exists for cstrike 2010-09-08 17:06:31 -04:00
Nicholas Hastings 5d01407ad5 Updated cstrike ext gamedata for 2010-08-26 update (bug 4595, r=fyren). 2010-08-26 22:23:32 -04:00
Nicholas Hastings 41fcefad5f Updated Gmod gamedata, including linux support (bug 4569, r=fyren). 2010-08-24 19:24:09 -04:00
Scott Ehlert 01f912611e Added Alien Swarm build config for sample extension (bug 4530, r+a13=psychonic). 2010-08-20 10:44:03 -05:00
Nicholas Hastings f0ad0b110e Merge. 2010-08-19 21:59:11 -04:00
Nicholas Hastings fb35cf52f5 Fixed timeleft not getting reset on Game_Commencing in CS:S (bug 4557, r=fyren). 2010-08-19 21:57:33 -04:00
Scott Ehlert fe435ca0ab Disabled nextmap plugin on Alien Swarm (bug 4571, r+a13=fyren). 2010-08-16 15:49:47 -05:00
Nicholas Hastings f356cb78f9 Fixed typo in 13fd4d07f246 (bug 4542) 2010-08-05 19:25:07 -04:00
Nicholas Hastings e5d1e0b319 Added initial gamedata for Alien Swarm (bug 4530, r=ds). 2010-08-02 12:28:38 -04:00
Erik Minekus 9188e9f6a9 Fixed typos in some usage replies (bug 4552, r=dvander). 2010-08-02 09:45:35 -04:00
Nicholas Hastings 8e72f57333 Fixed Ignite crash on Fistful of Frags (bug 4556, r=fyren). 2010-08-02 09:37:39 -04:00
Nicholas Hastings df1e56e408 Fixed Firearms Source FireOutput signature (bug 4555, r=fyren). 2010-08-02 09:36:15 -04:00
Scott Ehlert 4afbf67ce1 Fixed potential crash with IMemUtils::FindPattern on Linux (bug 4554, r+a13=dvander). 2010-07-31 16:06:16 -05:00
Scott Ehlert 5c1efcb4d6 Fixed missing version string and compile date for MySQL extension (bug 4547, r+a13=dvander). 2010-07-28 14:51:58 -05:00
Scott Ehlert f3fb84d1d0 Added support for Alien Swarm (bug 4530, r=dvander). 2010-07-28 01:25:27 -05:00
Nicholas Hastings 6cae738f1c Added gamedata for Fistful of Frags (bug 3883, r=fyren). 2010-07-26 19:26:32 -04:00
pheadxdll bff4fe01e3 Added TF2_MakeBleed native to TF2 ext (bug 4542, r=fyren,psychonic). 2010-07-26 11:08:39 -04:00
Zach Callear 959c571fc6 Fixed living players hearing dead players if alltalk is disabled while deadtalk is on (bug 4533, r=fyren). 2010-07-26 08:23:49 -04:00
Nicholas Hastings c5c8b90262 Fixed errors and missing effects caused by missing sprites on L4D2 (bug 4512, r=fyren). 2010-07-26 08:15:52 -04:00
Erik Minekus 8744c1871d Added TF2 object stocks (bug 4536, r=psychonic). 2010-07-23 21:24:07 -04:00
Nicholas Hastings 98a1dc7757 Added gamedata for Firearms: Source (bug 4537 r=fyren). 2010-07-23 21:18:48 -04:00
Nicholas Hastings 4064c6f1c2 Added support for logical entities to gamedata for Synergy. (bug 4534, r=fyren) 2010-07-22 21:40:52 -04:00
Nicholas Hastings 04c2e47a5f Updated TF2 conditions enum and defines (bug 4526, r=fyren) 2010-07-20 11:21:37 -04:00
Nicholas Hastings 2f03f53ab1 Merge. 2010-07-18 15:52:28 -04:00
Nicholas Hastings 0d2819e3b5 Fixed PlayerRunCmd being hooked when not used. (bug 3990, r=fyren) 2010-07-18 15:43:56 -04:00
David Anderson 8d16ac2295 Bumped version to 1.3.5-dev. 2010-07-17 23:37:58 -07:00
David Anderson 714e71b6c3 Added tag sourcemod-1.3.4 for changeset 4d6afc42522c 2010-07-17 23:36:54 -07:00
David Anderson 0c16c6ebe9 Bump version from 1.3.4-dev to release. 2010-07-17 22:42:57 -07:00
David Anderson 1b9ce5f484 Updated changelog for 1.3.4. 2010-07-17 22:41:35 -07:00
Nicholas Hastings c4390478fc Fixed TF2 sigs that broke with recent update (bug 4506, r=fyren) 2010-07-08 21:11:39 -04:00
Scott Ehlert 7d97de8a10 Bleh, fixed compiler error in console.inc caused by previous changeset. 2010-07-07 02:29:23 -05:00
Scott Ehlert 51bee0f420 Added GetConVarDefault() native (bug 4502, r+a13=dvander). 2010-07-07 02:10:57 -05:00
Nicholas Hastings 04642a7cc0 Gmod gamedata update (bug 4489, r=fyren) 2010-07-06 07:31:58 -04:00
David Anderson 8a0a911d43 Fixed bogus assert about name lengths (bug 4486, r=fyren). 2010-07-02 18:12:31 -07:00
Scott Ehlert fae6673957 Added MSVC10 project file for sample extension (bug 4521, r+a13=dvander). 2010-07-15 15:21:43 -05:00
Scott Ehlert 63f50b1e73 Oh, fixed Linux build. 2010-07-15 01:04:52 -05:00
Nicholas Hastings f53746f720 Added forward/detour for TF2's GetHoliday function (bug 4462, r=pred, a13=dvander). 2010-07-15 00:58:42 -05:00
Scott Ehlert 5dd18eeaad Appended OS names to package archives (bug 4395, r+a13=dvander). 2010-07-14 23:45:01 -05:00
Scott Ehlert 7316b6255c Updated docs on replicate and notify params for SetConVar* and ResetConVar (bug 4517, r=pred, a13=dvander). 2010-07-14 20:29:53 -05:00
Scott Ehlert eb2605f1a3 Fixed replicate and notify params on SetConVar* and ResetConVar which didn't work on old engine games (bug 4516, r=pred, a13=dvander).
This also fixes an issue where clients could be notified of convar changes twice on newer engines (Orange Box and later).
2010-07-14 20:29:45 -05:00
Scott Ehlert 01a3a09d96 Made name param of GetConVarName() non-const (bug 4515, r=pred, a13=dvander). 2010-07-14 20:29:29 -05:00
Scott Ehlert 01e7fb463b Triggering a build to compile against L4D2 SDK changes (bug 4509). 2010-07-11 03:06:00 -05:00
Nicholas Hastings f8f6f2cf6c Merge. 2010-06-27 19:24:28 -04:00
_KaszpiR_ 99ae90ecc5 Added FindFlagChar native. (bug 3776, r=dvander) 2010-06-27 19:23:50 -04:00
David Anderson d64125ddd4 Added tag sourcemod-1.3.3 for changeset c5062ca82830 2010-06-24 01:42:39 -07:00
David Anderson 7fb3632fd7 Bumped version to 1.3.4-dev. 2010-06-24 01:25:25 -07:00
David Anderson 49e2303a5b Bumped version to 1.3.3 for release. 2010-06-23 23:44:14 -07:00
David Anderson fe0b9f7320 Updated changelog. 2010-06-23 23:43:09 -07:00
David Anderson b16c758f88 Removed code now dead from CS:S Orange Box move (bug 4399, r+a13=ds). 2010-06-23 23:35:28 -07:00
Nicholas Hastings da729c3c08 Removed cstrike ep1 and cstrike_beta builds and references. (bug 4399, r=dvander) 2010-06-23 23:53:16 -04:00
Erik Minekus f1bcb2ad3e Fixed lack of error checking on sm_motd. (bug 4460, r=dvander) 2010-06-23 23:42:22 -04:00
Nicholas Hastings 9270399eb1 Forcing (re)build(?) since Windows had a strange fail. 2010-06-23 10:33:51 -04:00
Nicholas Hastings 76e6edbad4 Cstrike ext now recognizes and loads on cstrike_beta (bug 4399, r=fyren) 2010-06-23 10:12:55 -04:00
devicenull 58ca1508bc Fixed inaccuracy in CommandListener documentation 2010-06-23 09:23:23 -04:00
Greyscale eed1df28ec Removed unnecessary tag from return value of SetArrayCell 2010-06-23 09:17:53 -04:00
Nicholas Hastings a602d7d107 Ep2v cstrike ext now gets added to package. 2010-06-23 09:02:04 -04:00
Nicholas Hastings 9a08986fd1 Silly AMBuild 2010-06-23 08:32:25 -04:00
Nicholas Hastings 5d1820853a Adding building of cstrike ext for ep2v (bug 4399, r=fyren) 2010-06-23 08:29:15 -04:00
Nicholas Hastings 753aced2a3 Added missing TF2 critcola condflag define (bug 4464, r=fyren) 2010-06-22 19:31:33 -04:00
Nicholas Hastings df47457321 Updated TF2 'Burn' signature (bug 4463, r=fyren) 2010-06-22 19:26:07 -04:00
Fyren d9e818e5d9 Possible dynamic array dimension fix (bug 4428, r=dvander) 2010-06-19 15:17:10 -07:00
Nicholas Hastings 47c840c9b4 Fixed outputname null pointer crash in sdktools (bug 4422, r=fyren) 2010-06-14 09:32:50 -04:00
David Anderson 2bfc5d3e1e Fixed switch case comparisons failing with large numbers (bug 4457, r=pred). 2010-06-13 20:26:58 -07:00
Nicholas Hastings 4307c57697 Added missing FireOutput and PlayerRunCmd gamedata for zombie_master (bug 4452, r=fyren) 2010-06-07 19:39:15 -04:00
Nicholas Hastings bff0faff52 Added new player condition (TFCond_CritCola) to tf2.inc. (bug 4447, r=fyren) 2010-06-06 20:55:25 -04:00
Matt Woodrow 749966ae66 Fixed clientprefs deleting cookies twice in rare cases (bug 4412, r=Fyren) 2010-06-07 10:30:33 +12:00
Nicholas Hastings 9f11132fb5 Fixed OnClientConnected forward not firing for bots (bug 4443, r=fyren) 2010-06-06 17:53:38 -04:00
Fyren 2dfbd1fc1f Fix sdktools voice memory corruption (bug 4415, r=dvander) 2010-06-05 23:21:33 -07:00
Nicholas Hastings 7c659837bf Updated Obsidian Conflict gamedata (bug 4439, r=fyren) 2010-06-02 07:54:15 -04:00
Nicholas Hastings 7cf342a1a7 Fixed tf2.inc incorrectly attempting to load tf2 ext on all games (bug 4197, r=fyren) 2010-05-31 16:36:10 -04:00
Scott Ehlert e8d6aab989 Triggering build. 2010-05-29 00:55:06 -05:00
Nicholas Hastings 0819278465 Updated/fixed SourceForts gamedata (bug 4429, r=fyren) 2010-05-28 13:29:13 -04:00
Nicholas Hastings d89c57ba79 Fixed SDKTools sm_dump_datamaps crash on improperly created entities (bug 4424, r=pred) 2010-05-26 08:31:48 -04:00
Nicholas Hastings 23b10fc559 Added gamedata for Resistance and Liberation (bug 4418, r=fyren) 2010-05-21 14:04:19 -04:00
Nicholas Hastings 36e8e881e8 Empires gamedata fixes (bug 4417, r=fyren). 2010-05-21 13:55:29 -04:00
Nicholas Hastings 67011834df Updated gamedata for ep2v cstrike(_beta) (bug 4399, r=fyren) 2010-05-11 20:40:14 -04:00
Scott Ehlert ed9f68814f Added missing -dev back to product.version. 2010-05-13 09:35:30 -05:00
Nicholas Hastings 79a8008280 Fixed TF2 natives not being marked optional when ext not required (bug 4389, r=fyren) 2010-05-10 18:18:34 -04:00
Nicholas Hastings 643dce8cb1 Updated Empires gamedata (bug 4390, r=fyren) 2010-05-08 21:39:50 -04:00
Scott Ehlert 3669b98986 Fixed SendConVarValue() on TF2, DOD:S, L4D, and L4D2 (bug 4273, r=dvander, a=blocking). 2010-05-04 22:49:46 -04:00
David Anderson e075b7b9b2 Bumped version to 1.3.3-dev. 2010-05-02 14:41:51 -07:00
David Anderson b95fda8342 Added tag sourcemod-1.3.2 for changeset a3e8f7a7fdf7 2010-05-02 14:39:43 -07:00
David Anderson 5abec70579 Bumped for release. 2010-05-02 14:16:34 -07:00
Nicholas Hastings 8800d5311c Added TF2_StunPlayer native and TF2_GetPlayerConditionFlags stock to TF2 ext. (bug 4331, r=pred) 2010-03-31 08:51:25 -04:00
Nicholas Hastings 3705210879 Added 4 new natives to TF2 ext. (bug 4166, r=pred)
Added natives for Regenerate, add/remove condition, and SetPlayerPowerPlay. Also updated TF2 test plugin.
2010-03-18 11:35:05 -04:00
Scott Ehlert 5f4befcb6a Argh, really fixed HookEntityOutput() crash on TF2 (bug 4375). 2010-04-30 10:54:34 -04:00
Scott Ehlert 314011f118 Fixed HookEntityOutput() crash with recent updates to TF2 and L4D2 (bug 4375, r=pred, a=blocking). 2010-04-30 03:51:01 -04:00
Fyren a9b7a5dc5c Triggering build 2010-04-29 20:55:16 -07:00
Scott Ehlert 9b78c68b1b Updated sample extension makefiles to compile against latest changes for L4D2 and TF2 (bug 4374, r=dvander). 2010-04-29 16:04:47 -04:00
Nicholas Hastings 328109be1f Fixed SetUserCvar offset for ep2v (bug 4371, r=fyren) 2010-04-29 14:17:44 -04:00
Nicholas Hastings aba0f29666 ep2v gamedata (bug 4371, r=fyren) 2010-04-28 23:48:26 -07:00
Fyren bdefb58e5f ep2v build changes (bug 4371, r=dvander) 2010-04-28 19:44:20 -07:00
David Anderson 7ad3a57c47 Check return value of GetPlayerNetInfo (bug 4315, r=fyren). 2010-04-27 23:40:04 -07:00
Nicholas Hastings 5a2f3cf433 Fixed entity output hooks not working in Insurgency (bug 4365, r=fyren) 2010-04-24 21:10:15 -04:00
Nicholas Hastings fffc27a348 Added obsidian to list of games which support tempents with ep2 gamedata (thread 75480, r=me). 2010-04-24 21:08:13 -04:00
Nicholas Hastings cecb7cb6a2 Fixed functions.inc not having double-include prevention (bug 4342, r=fyren) 2010-04-24 21:05:48 -04:00
Zach Kanzler f5cc5eb757 Fixed IGamePlayer->GetUserId() returning junk (bug 3916, r=fyren) 2010-04-24 21:02:40 -04:00
Nicholas Hastings 689406744b Updated L4D2 gamedata for The Passing update (bug 4361, r=pending) 2010-04-23 12:11:49 -04:00
Nicholas Hastings 603da899b7 Updated Insurgency gamedata for Insurgency 2010-04-19 update (bug 4356, r=fyren) 2010-04-23 10:38:37 -04:00
Fyren 9b4d1f6972 Build stuff for L4D2 DLC (bug 4361, r=what's a review?) 2010-04-23 07:33:58 -07:00
David Anderson d56b222637 Merge backout. 2010-04-23 02:31:15 -04:00
David Anderson dfefda81e1 Backed out changeset 6b5fa86c1a0d (bug 4315). 2010-04-23 02:31:07 -04:00
David Anderson 0c463b1f86 Merge. 2010-04-22 17:55:55 -04:00
David Anderson bf345eea8c Attempting fix for SendConVarValue crash (bug 4315, r=fyren, a13=me). 2010-04-22 17:55:35 -04:00
Nicholas Hastings 5328447b74 Merge 2010-04-19 11:15:51 -04:00
Nicholas Hastings db6881b7e3 Updated Empires gamedata for Empires 2.25a release (bug 4108, r=fyren) 2010-04-19 10:38:50 -04:00
David Anderson 3e96b1617a Added obsidian to list of games which need menu redraws (thread 123237, r=me). 2010-04-04 23:51:20 -07:00
Nicholas Hastings 7ef8b415bb Added Gamerules SDKCall support to CSPromod gamedata (bug 4320, r=pred) 2010-03-23 19:42:58 -04:00
Nicholas Hastings 9a5d6957b9 Fixed bad caller crash with HookEntityOutput (bug 4311, r=fyren) 2010-03-20 11:08:48 -04:00
Nicholas Hastings b5a2ec7a5e Added missing core voting cvars to sourcemod.cfg (bug 4309, r=fyren) 2010-03-11 22:01:11 -05:00
Nicholas Hastings 373136af4e Added missing core voting cvars to sourcemod.cfg (bug 4224, r=pred) 2010-03-11 17:44:41 -05:00
Nicholas Hastings 8673c11341 Fixed incorrect DispatchSpawn signature for ZPS and added ShowMenu and Hudtext support (bug 4279, r=Fyren) 2010-03-09 20:40:06 -05:00
Nicholas Hastings 8c082de148 Re-enabled ShowMenu support for FortressForever (bug 4028, r=dvander) 2010-03-09 18:50:57 -05:00
Nicholas Hastings e62d47a85e Fixed FireOutput signature for FortressForever (bug 4062, r=dvander) 2010-03-09 18:48:03 -05:00
Nicholas Hastings 2d32c587ba Fixed sm_rename on L4D2 on Windows (bug 4131, r=dvander) 2010-03-09 18:44:28 -05:00
Nicholas Hastings 31e29ee94c Fixed inaccurate description for sm_unban (bug 4245, r=dvander) 2010-03-09 18:41:43 -05:00
Nicholas Hastings e95e453258 Fixed CSPromod SDKTools Support (bug 4255, r=dvander) 2010-03-09 18:36:51 -05:00
Nicholas Hastings 48b0f61551 Updated PVKII support for PVKII 2.3 (bug 4276, r=dvander) 2010-03-09 18:30:15 -05:00
Nicholas Hastings ef88fc21a1 Fixed CreateGameRulesObject sig for ZPS (bug 4285, r=dvander). 2010-03-09 18:15:23 -05:00
Erik Minekus 558c8c9745 Fixed Insurgency gamedata file (bug 4282, r+a13=dvander). 2010-02-24 23:41:06 -08:00
Fyren 2f60680cfb maxClients -> MaxClients in sdktools_sound.inc (fix bug 3985, r=psychonicsux) 2010-02-10 10:53:54 -08:00
David Anderson 1ffcf7a664 Bumped version to 1.3.2-dev. 2010-02-09 22:00:28 -08:00
David Anderson c00b688ab7 Added tag sourcemod-1.3.1 for changeset 3f33d01fcc28 2010-02-09 21:59:41 -08:00
129 changed files with 5587 additions and 806 deletions
+1
View File
@@ -6,6 +6,7 @@
# Files generated by Visual Studio
\.aps$
\.ncb$
\.sdf$
\.suo$
\.user$
+4
View File
@@ -4,3 +4,7 @@ e877885fac80be71822641f7a9122cebc9812521 sourcemod-1.1.1
b3ffa8a4511c4eadaf533fc790aa6b14f7f0c6ea sourcemod-1.1.2
3a73bbf60f34befa9b66be03fa5974b394bb3411 sourcemod-1.2.0
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
+20 -8
View File
@@ -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:
@@ -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,8 +205,8 @@ class SM:
else:
staticLibs = os.path.join(sdkPath, 'lib', 'linux')
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
if sdk == 'l4d2':
for i in ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_linux.so', 'tier0_linux.so']:
if sdk == 'ep2v' or sdk == '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)
try:
@@ -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,9 +280,9 @@ class SM:
if not noLink:
if AMBuild.target['platform'] == 'linux':
compiler['POSTLINKFLAGS'][0:0] = ['-lm']
if sdk == 'l4d2':
compiler['POSTLINKFLAGS'][0:0] = ['tier0_linux.so']
compiler['POSTLINKFLAGS'][0:0] = ['vstdlib_linux.so']
if sdk == 'ep2v' or sdk == 'l4d2':
compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so']
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so']
else:
compiler['POSTLINKFLAGS'][0:0] = ['tier0_i486.so']
compiler['POSTLINKFLAGS'][0:0] = ['vstdlib_i486.so']
+87
View File
@@ -2,6 +2,93 @@ SourceMod Changelog
----------------------------
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]
URL: http://wiki.alliedmods.net/SourceMod_1.3.3_Release_Notes
User Changes:
- Added support for CS:S on Orange Box
- Added gamedata for Resistance and Liberation (bug 4418).
- Updated gamedata for SourceForts, Empires, Obsidian Conflict, Zombie Master.
- Fixed memory corruption and leaks with some voice functionality (bug 4415).
- Fixed UI bug in sm_motd (bug 4460).
Developer Changes:
- Added new player condition (TFCond_CritCola, bug 4447).
- Fixed clientprefs deleting cookies twice in rare cases (bug 4412).
- Fixed OnClientConnected forward not firing for bots (bug 4443).
- Fixed sm_dump_datamaps crash (bug 4424).
- Fixed switch case comparisons failing with large numbers (bug 4457).
- Fixed rare crash in output hooks (bug 4422).
- Fixed bug with dynamically sized arrays being sliced (bug 4428).
- Fixed SendConVarValue() on TF2, DOD:S, L4D, and L4D2 (bug 4273).
- Fixed TF2 natives not being marked optional (bug 4389).
----------------------------
SourceMod 1.3.2 [2010-05-02]
URL: http://wiki.alliedmods.net/SourceMod_1.3.2_Release_Notes
User Changes:
- Support for recent TF, DoD, and L4D2 updates (bug 4356, bug 4361, bug 4371, bug 4374, bug 4375).
- Fixed rare crash when replicating cvars to clients (bug 4315).
- Lots of extra game support for Insurgency, ZPS, CSProMod, PVKII, and FortressForever (thanks
Nicholas "psychonic" hastings).
Developer Changes:
- Added TF functions for stunning, conditions, regeneration, and power play (bug 4166, bug 4331).
----------------------------
SourceMod 1.3.1 [2010-02-09]
URL: http://wiki.alliedmods.net/SourceMod_1.3.1_Release_Notes
+28 -3
View File
@@ -80,21 +80,21 @@ sm_reserve_type 0
sm_reserved_slots 0
// Specifies whether or not reserved slots will be hidden (subtracted from max
// slot count). Valid values are 0 (visible) or 1 (hidden).
// slot count). Valid values are 0 (Visible) or 1 (Hidden).
// --
// Requires: reservedslots.smx
// Default: 0
sm_hide_slots 0
// Specifies whether or not non-admins can send messages to admins using
// say_team @<message>. Valid values are 0 (disabled) or 1 (enabled)
// say_team @<message>. Valid values are 0 (Disabled) or 1 (Enabled)
// --
// Requires: basechat.smx
// Default: 1
sm_chat_mode 1
// Specifies whether or not "timeleft" will automaticly be triggered every
// x seconds. Valid values are 0 (disabled) to 1800 seconds.
// x seconds. Valid values are 0 (Disabled) to 1800 seconds.
// --
// Requires: basetriggers.smx
// Default: 0
@@ -107,3 +107,28 @@ sm_timeleft_interval 0
// Requires: basetriggers.smx
// Default: 1
sm_trigger_show 1
// Specifies whether or not to display vote progress to clients in the
// "hint" box (near the bottom of the screen in most games).
// Valid values are 0 (Disabled) or 1 (Enabled).
// --
// Default: 0
sm_vote_progress_hintbox 0
// Specifies whether or not to display vote progress to clients in the
// chat area. Valid values are 0 (Disabled) or 1 (Enabled).
// --
// Default: 0
sm_vote_progress_chat 0
// Specifies whether or not to display vote progress in the server console.
// Valid values are 0 (Disabled) or 1 (Enabled).
// --
// Default: 0
sm_vote_progress_console 0
// Specifies whether or not to display vote progress to clients in the
// client console. Valid values are 0 (Disabled) or 1 (Enabled).
// --
// Default: 0
sm_vote_progress_client_console 0
+36 -36
View File
@@ -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
View File
@@ -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
View File
@@ -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;
+8 -1
View File
@@ -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
View File
@@ -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.
+6 -4
View File
@@ -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;
}
+3 -1
View File
@@ -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_LEFT4DEAD2
#if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
final_addr = g_MemUtils.ResolveSymbol(handle, &s_TempSig.sig[1]);
#else
final_addr = dlsym(handle, &s_TempSig.sig[1]);
+1 -3
View File
@@ -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
@@ -359,13 +359,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();
}
+5 -5
View File
@@ -100,7 +100,7 @@ ifeq "$(ENGINE)" "left4dead2"
CFLAGS += -DSOURCE_ENGINE=6
METAMOD = $(MMSOURCE17)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/left4dead2_demo
SRCDS = $(SRCDS_BASE)/left4dead2
BINARY = sourcemod.2.l4d2.so
override ENGSET = true
endif
@@ -108,8 +108,8 @@ endif
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6
ifeq "$(ENGINE)" "left4dead2"
LINK += $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a vstdlib_linux.so \
tier0_linux.so -static-libgcc
LINK += $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a libvstdlib.so \
libtier0.so -static-libgcc
else
LINK += $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a vstdlib_i486.so \
tier0_i486.so -static-libgcc
@@ -154,8 +154,8 @@ $(BIN_DIR)/%.o: %.c
all: check
mkdir -p $(BIN_DIR)
ifeq "$(ENGINE)" "left4dead2"
ln -sf $(SRCDS)/bin/vstdlib_linux.so vstdlib_linux.so;
ln -sf $(SRCDS)/bin/tier0_linux.so tier0_linux.so;
ln -sf $(SRCDS)/bin/libvstdlib.so libvstdlib.so;
ln -sf $(SRCDS)/bin/libtier0.so libtier0.so;
else
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so;
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so;
+15 -4
View File
@@ -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;
}
}
+23 -3
View File
@@ -466,7 +466,7 @@ bool PlayerManager::OnClientConnect_Post(edict_t *pEntity, const char *pszName,
pListener->OnClientConnected(client);
if (!pPlayer->IsConnected())
{
break;
return true;
}
}
@@ -520,6 +520,11 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
return;
}
}
cell_t res;
OnClientConnected->PushCell(client);
OnClientConnected->Execute(&res, NULL);
/* Now do authorization */
for (iter=m_hooks.begin(); iter!=m_hooks.end(); iter++)
{
@@ -1441,6 +1446,7 @@ CPlayer::CPlayer()
m_TempAdmin = false;
m_Info = NULL;
m_bAdminCheckSignalled = false;
m_UserId = -1;
m_bIsInKickQueue = false;
m_LastPassword.clear();
m_LangId = SOURCEMOD_LANGUAGE_ENGLISH;
@@ -1618,8 +1624,22 @@ void CPlayer::Kick(const char *str)
{
MarkAsBeingKicked();
INetChannel *pNetChan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(m_iIndex));
IClient *pClient = static_cast<IClient *>(pNetChan->GetMsgHandler());
pClient->Disconnect("%s", str);
if (pNetChan == NULL)
{
/* What does this even mean? Hell if I know. */
int userid = GetUserId();
if (userid > 0)
{
char buffer[255];
UTIL_Format(buffer, sizeof(buffer), "kickid %d %s\n", userid, str);
engine->ServerCommand(buffer);
}
}
else
{
IClient *pClient = static_cast<IClient *>(pNetChan->GetMsgHandler());
pClient->Disconnect("%s", str);
}
}
void CPlayer::Authorize_Post()
+1 -1
View File
@@ -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
View File
@@ -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"
+7 -7
View File
@@ -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
View File
@@ -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
+4 -1
View File
@@ -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
+2 -1
View File
@@ -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/");
}
+17
View File
@@ -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},
+56 -61
View File
@@ -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
@@ -45,8 +45,15 @@
#include <sm_trie_tpl.h>
#include "Logger.h"
#include "ConsoleDetours.h"
#include "ConCommandBaseIterator.h"
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
#if SOURCE_ENGINE >= SE_ORANGEBOXVALVE
#define NETMSG_BITS 6
#else
#define NETMSG_BITS 5
#endif
#if SOURCE_ENGINE >= SE_LEFT4DEAD
#define NET_SETCONVAR 6
#else
#define NET_SETCONVAR 5
@@ -67,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
@@ -102,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;
}
}
@@ -114,7 +108,7 @@ public:
{
if (type == htConCmdIter)
{
*pSize = sizeof(ConCmdIter);
*pSize = sizeof(ConCommandBaseIterator);
return true;
}
else if (type == hCmdIterType)
@@ -181,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();
@@ -189,7 +183,7 @@ static void ReplicateConVar(ConVar *pConVar)
char data[256];
bf_write buffer(data, sizeof(data));
buffer.WriteUBitLong(NET_SETCONVAR, 5);
buffer.WriteUBitLong(NET_SETCONVAR, NETMSG_BITS);
buffer.WriteByte(1);
buffer.WriteString(pConVar->GetName());
buffer.WriteString(pConVar->GetString());
@@ -200,8 +194,8 @@ static void ReplicateConVar(ConVar *pConVar)
if (pPlayer && pPlayer->IsInGame() && !pPlayer->IsFakeClient())
{
INetChannel *netchan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(i));
netchan->SendData(buffer);
if (INetChannel *netchan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(i)))
netchan->SendData(buffer);
}
}
}
@@ -355,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))
{
@@ -404,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))
{
@@ -455,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))
{
@@ -486,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))
{
@@ -503,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]);
@@ -1178,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;
@@ -1186,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;
@@ -1212,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)
{
@@ -1232,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;
@@ -1243,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);
@@ -1299,7 +1288,7 @@ static cell_t SendConVarValue(IPluginContext *pContext, const cell_t *params)
char data[256];
bf_write buffer(data, sizeof(data));
buffer.WriteUBitLong(NET_SETCONVAR, 5);
buffer.WriteUBitLong(NET_SETCONVAR, NETMSG_BITS);
buffer.WriteByte(1);
buffer.WriteString(pConVar->GetName());
buffer.WriteString(value);
@@ -1322,6 +1311,11 @@ static cell_t SendConVarValue(IPluginContext *pContext, const cell_t *params)
}
INetChannel *netchan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(params[1]));
if (netchan == NULL)
{
return 0;
}
netchan->SendData(buffer);
return 1;
@@ -1398,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},
+12 -12
View File
@@ -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
@@ -859,7 +859,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 +1003,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 +1092,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:
@@ -1183,7 +1183,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 +1252,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 +1324,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 +1392,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 +1483,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 +1559,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 +1646,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 +1725,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;
}
+4 -2
View File
@@ -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
+37
View File
@@ -720,6 +720,10 @@ static cell_t GetTimeConnected(IPluginContext *pContext, const cell_t *params)
}
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
if (pInfo == NULL)
{
return 0;
}
return sp_ftoc(pInfo->GetTimeConnected());
}
@@ -739,6 +743,10 @@ static cell_t GetDataRate(IPluginContext *pContext, const cell_t *params)
}
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
if (pInfo == NULL)
{
return 0;
}
return pInfo->GetDataRate();
}
@@ -758,6 +766,10 @@ static cell_t IsTimingOut(IPluginContext *pContext, const cell_t *params)
}
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
if (pInfo == NULL)
{
return 1;
}
return pInfo->IsTimingOut() ? 1 : 0;
}
@@ -782,6 +794,10 @@ static cell_t GetLatency(IPluginContext *pContext, const cell_t *params)
}
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
if (pInfo == NULL)
{
return sp_ftoc(-1);
}
if (params[2] == MAX_FLOWS)
{
@@ -815,6 +831,10 @@ static cell_t GetAvgLatency(IPluginContext *pContext, const cell_t *params)
}
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
if (pInfo == NULL)
{
return sp_ftoc(-1);
}
if (params[2] == MAX_FLOWS)
{
@@ -848,6 +868,10 @@ static cell_t GetAvgLoss(IPluginContext *pContext, const cell_t *params)
}
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
if (pInfo == NULL)
{
return sp_ftoc(-1);
}
if (params[2] == MAX_FLOWS)
{
@@ -881,6 +905,10 @@ static cell_t GetAvgChoke(IPluginContext *pContext, const cell_t *params)
}
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
if (pInfo == NULL)
{
return sp_ftoc(-1);
}
if (params[2] == MAX_FLOWS)
{
@@ -914,6 +942,10 @@ static cell_t GetAvgData(IPluginContext *pContext, const cell_t *params)
}
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
if (pInfo == NULL)
{
return 0;
}
if (params[2] == MAX_FLOWS)
{
@@ -948,6 +980,11 @@ static cell_t GetAvgPackets(IPluginContext *pContext, const cell_t *params)
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
if (pInfo == NULL)
{
return 0;
}
if (params[2] == MAX_FLOWS)
{
value = pInfo->GetAvgPackets(FLOW_INCOMING) + pInfo->GetAvgPackets(FLOW_OUTGOING);
+4 -2
View File
@@ -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"
-2
View File
@@ -313,8 +313,6 @@ void CookieManager::ClientConnectCallback(int serial, IQuery *data)
row->GetInt(3, (int *)&access);
parent = CreateCookie(name, desc, access);
cookieTrie.insert(name, parent);
cookieList.push_back(parent);
}
pData->parent = parent;
+6 -6
View File
@@ -1,13 +1,14 @@
# vim: set ts=2 sw=2 tw=99 noet ft=python:
import os
sdk = SM.sdkInfo['ep1']
compiler = SM.DefaultHL2Compiler('extensions/cstrike', 'ep1')
sdk = SM.sdkInfo['ep2v']
compiler = SM.DefaultHL2Compiler('extensions/cstrike', 'ep2v')
name = 'game.cstrike.ext.' + sdk['ext']
extension = AMBuild.AddJob(name)
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
SM.PreSetupHL2Job(extension, binary, 'ep1')
SM.PreSetupHL2Job(extension, binary, 'ep2v')
binary.AddSourceFiles('extensions/cstrike', [
'extension.cpp',
'natives.cpp',
@@ -15,7 +16,6 @@ binary.AddSourceFiles('extensions/cstrike', [
'timeleft.cpp',
'sdk/smsdk_ext.cpp'
])
SM.PostSetupHL2Job(extension, binary, 'ep1')
SM.PostSetupHL2Job(extension, binary, 'ep2v')
SM.AutoVersion('extensions/cstrike', binary)
binary.SendToJob()
binary.SendToJob()
+83 -58
View File
@@ -2,11 +2,11 @@
# Makefile written by David "BAILOPAN" Anderson
SMSDK = ../..
SRCDS_BASE = ~/srcds
HL2SDK_ORIG = ../../../hl2sdk
HL2SDK_OB = ../../../hl2sdk-ob
HL2SDK_OB_VALVE = ../../../hl2sdk-ob-valve
HL2SDK_L4D = ../../../hl2sdk-l4d
HL2SDK_L4D2 = ../../../hl2sdk-l4d2
MMSOURCE17 = ../../../mmsource-1.7
#####################################
@@ -31,75 +31,97 @@ CPP_GCC4_FLAGS = -fvisibility-inlines-hidden
CPP = gcc
override ENGSET = false
ifeq "$(ENGINE)" "original"
HL2SDK = $(HL2SDK_ORIG)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/linux_sdk
CFLAGS += -DSOURCE_ENGINE=1
METAMOD = $(MMSOURCE17)/core-legacy
INCLUDE += -I$(HL2SDK)/public/dlls
SRCDS = $(SRCDS_BASE)
GAMEFIX = 1.ep1
override ENGSET = true
endif
ifeq "$(ENGINE)" "orangebox"
HL2SDK = $(HL2SDK_OB)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=3
METAMOD = $(MMSOURCE17)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/orangebox
GAMEFIX = 2.ep2
override ENGSET = true
endif
ifeq "$(ENGINE)" "orangeboxvalve"
HL2SDK = $(HL2SDK_OB_VALVE)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=4
METAMOD = $(MMSOURCE17)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/orangebox
GAMEFIX = 2.ep2v
override ENGSET = true
endif
ifeq "$(ENGINE)" "left4dead"
HL2SDK = $(HL2SDK_L4D)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=5
METAMOD = $(MMSOURCE17)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/l4d
GAMEFIX = 2.l4d
# Check for valid list of engines
ifneq (,$(filter original orangebox orangeboxvalve left4dead left4dead2,$(ENGINE)))
override ENGSET = true
endif
ifeq "$(ENGINE)" "original"
HL2SDK = $(HL2SDK_ORIG)
CFLAGS += -DSOURCE_ENGINE=1
GAMEFIX = 1.ep1
endif
ifeq "$(ENGINE)" "orangebox"
HL2SDK = $(HL2SDK_OB)
CFLAGS += -DSOURCE_ENGINE=3
GAMEFIX = 2.ep2
endif
ifeq "$(ENGINE)" "orangeboxvalve"
HL2SDK = $(HL2SDK_OB_VALVE)
CFLAGS += -DSOURCE_ENGINE=4
GAMEFIX = 2.ep2v
endif
ifeq "$(ENGINE)" "left4dead"
HL2SDK = $(HL2SDK_L4D)
CFLAGS += -DSOURCE_ENGINE=5
GAMEFIX = 2.l4d
endif
ifeq "$(ENGINE)" "left4dead2"
HL2SDK = $(HL2SDK_L4D2)
CFLAGS += -DSOURCE_ENGINE=6
GAMEFIX = 2.l4d2
endif
HL2PUB = $(HL2SDK)/public
ifeq "$(ENGINE)" "original"
INCLUDE += -I$(HL2SDK)/public/dlls
METAMOD = $(MMSOURCE17)/core-legacy
else
INCLUDE += -I$(HL2SDK)/public/game/server
METAMOD = $(MMSOURCE17)/core
endif
OS := $(shell uname -s)
ifeq "$(OS)" "Darwin"
LIB_EXT = dylib
HL2LIB = $(HL2SDK)/lib/mac
else
LIB_EXT = so
ifeq "$(ENGINE)" "original"
HL2LIB = $(HL2SDK)/linux_sdk
else
HL2LIB = $(HL2SDK)/lib/linux
endif
endif
# if ENGINE is orig, OB, or L4D
ifneq (,$(filter original orangebox left4dead,$(ENGINE)))
LIB_SUFFIX = _i486.$(LIB_EXT)
else
LIB_PREFIX = lib
LIB_SUFFIX = .$(LIB_EXT)
endif
ifeq "$(USEMETA)" "true"
LINK_HL2 = $(HL2LIB)/tier1_i486.a tier0_i486.so
LINK_HL2 = $(LIB_PREFIX)vstdlib$(LIB_SUFFIX) $(LIB_PREFIX)tier0$(LIB_SUFFIX)
LINK += $(LINK_HL2)
INCLUDE += -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
-I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/extensions \
-I$(SMSDK)/public/sourcepawn
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 \
-DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6
else
INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
endif
LINK += -m32 -ldl -lm
CFLAGS += -D_LINUX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
-D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror -mfpmath=sse \
-msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -m32
CFLAGS += -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
-D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror \
-mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -m32
CPPFLAGS += -Wno-non-virtual-dtor -fno-exceptions -fno-rtti
################################################
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
################################################
BINARY = $(PROJECT).ext.$(GAMEFIX).$(LIB_EXT)
ifeq "$(DEBUG)" "true"
BIN_DIR = Debug
CFLAGS += $(C_DEBUG_FLAGS)
@@ -112,13 +134,14 @@ ifeq "$(USEMETA)" "true"
BIN_DIR := $(BIN_DIR).$(ENGINE)
endif
OS := $(shell uname -s)
ifeq "$(OS)" "Darwin"
LINK += -dynamiclib
BINARY = $(PROJECT).ext.$(GAMEFIX).dylib
LIB_EXT = dylib
CFLAGS += -isysroot /Developer/SDKs/MacOSX10.5.sdk
LINK += -dynamiclib -lstdc++ -mmacosx-version-min=10.5
else
LINK += -static-libgcc -shared
BINARY = $(PROJECT).ext.$(GAMEFIX).so
LIB_EXT = so
CFLAGS += -D_LINUX
LINK += -shared
endif
GCC_VERSION := $(shell $(CPP) -dumpversion >&1 | cut -b1)
@@ -127,7 +150,7 @@ ifeq "$(GCC_VERSION)" "4"
CPPFLAGS += $(CPP_GCC4_FLAGS)
endif
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
OBJ_BIN := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
$(BIN_DIR)/%.o: %.cpp
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
@@ -135,18 +158,20 @@ $(BIN_DIR)/%.o: %.cpp
all: check
mkdir -p $(BIN_DIR)/sdk
if [ "$(USEMETA)" = "true" ]; then \
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so; \
ln -sf $(HL2LIB)/$(LIB_PREFIX)vstdlib$(LIB_SUFFIX); \
ln -sf $(HL2LIB)/$(LIB_PREFIX)tier0$(LIB_SUFFIX); \
fi
$(MAKE) -f Makefile extension
check:
if [ "$(USEMETA)" = "true" ] && [ "$(ENGSET)" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
echo "You must supply one of the following values for ENGINE:"; \
echo "left4dead2, left4dead, orangeboxvalve, orangebox, or original"; \
exit 1; \
fi
extension: check $(OBJ_LINUX)
$(CPP) $(INCLUDE) $(OBJ_LINUX) $(LINK) -o $(BIN_DIR)/$(BINARY)
extension: check $(OBJ_BIN)
$(CPP) $(INCLUDE) $(OBJ_BIN) $(LINK) -o $(BIN_DIR)/$(BINARY)
debug:
$(MAKE) -f Makefile all DEBUG=true
-5
View File
@@ -76,11 +76,6 @@ bool CStrike::SDK_OnLoad(char *error, size_t maxlength, bool late)
sharesys->AddNatives(myself, g_CSNatives);
sharesys->RegisterLibrary(myself, "cstrike");
if ((g_msgHintText = usermsgs->GetMessageIndex("HintText")) != -1)
{
sharesys->OverrideNatives(myself, g_CS_PrintHintText);
}
playerhelpers->RegisterCommandTargetProcessor(this);
return true;
-1
View File
@@ -130,6 +130,5 @@ public:
extern IBinTools *g_pBinTools;
extern IGameConfig *g_pGameConf;
extern int g_msgHintText;
extern sp_nativeinfo_t g_CS_PrintHintText[];
#endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
+6
View File
@@ -8,9 +8,11 @@ Global
Debug - Episode1|Win32 = Debug - Episode1|Win32
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32
Release - Episode 1|Win32 = Release - Episode 1|Win32
Release - Old Metamod|Win32 = Release - Old Metamod|Win32
Release - Orange Box|Win32 = Release - Orange Box|Win32
Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode1|Win32.ActiveCfg = Debug - Episode1|Win32
@@ -19,12 +21,16 @@ Global
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.Build.0 = Debug - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.Build.0 = Release - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+163
View File
@@ -343,6 +343,169 @@
/>
</Configuration>
<Configuration
Name="Debug - Orange Box Valve|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;&quot;$(HL2SDKOBVALVE)\public&quot;;&quot;$(HL2SDKOBVALVE)\public\game\server&quot;;&quot;$(HL2SDKOBVALVE)\public\engine&quot;;&quot;$(HL2SDKOBVALVE)\public\tier0&quot;;&quot;$(HL2SDKOBVALVE)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKOBVALVE)\lib\public\tier0.lib&quot; &quot;$(HL2SDKOBVALVE)\lib\public\tier1.lib&quot;"
OutputFile="$(OutDir)\game.cstrike.ext.2.ep2v.dll"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release - Orange Box Valve|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;&quot;$(HL2SDKOBVALVE)\public&quot;;&quot;$(HL2SDKOBVALVE)\public\game\server&quot;;&quot;$(HL2SDKOBVALVE)\public\engine&quot;;&quot;$(HL2SDKOBVALVE)\public\tier0&quot;;&quot;$(HL2SDKOBVALVE)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKOBVALVE)\lib\public\tier0.lib&quot; &quot;$(HL2SDKOBVALVE)\lib\public\tier1.lib&quot;"
OutputFile="$(OutDir)\game.cstrike.ext.2.ep2v.dll"
LinkIncremental="1"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Episode1|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
-44
View File
@@ -71,45 +71,6 @@ inline CBaseEntity *GetCBaseEntity(int num, bool isplayer)
return pUnk->GetBaseEntity();
}
static cell_t CS_PrintHintText(IPluginContext *pContext, const cell_t *params)
{
int client = params[1];
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(params[1]);
if (!pPlayer)
{
return pContext->ThrowNativeError("Client index %d is invalid", client);
}
if (!pPlayer->IsInGame())
{
return pContext->ThrowNativeError("Client %d is not in game", client);
}
g_pSM->SetGlobalTarget(client);
char buffer[192];
g_pSM->FormatString(buffer, sizeof(buffer), pContext, params, 2);
/* Check for an error before printing to the client */
if (pContext->GetLastNativeError() != SP_ERROR_NONE)
{
return 0;
}
bf_write *pBitBuf = usermsgs->StartMessage(g_msgHintText, &params[1], 1, USERMSG_RELIABLE);
if (pBitBuf == NULL)
{
return pContext->ThrowNativeError("Could not send a usermessage");
}
pBitBuf->WriteByte(1);
pBitBuf->WriteString(buffer);
usermsgs->EndMessage();
return 1;
}
static cell_t CS_RespawnPlayer(IPluginContext *pContext, const cell_t *params)
{
static ICallWrapper *pWrapper = NULL;
@@ -166,8 +127,3 @@ sp_nativeinfo_t g_CSNatives[] =
{NULL, NULL}
};
sp_nativeinfo_t g_CS_PrintHintText[] =
{
{"PrintHintText", CS_PrintHintText},
{NULL, NULL},
};
+1 -1
View File
@@ -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;
}
+3 -3
View File
@@ -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;
}
+3 -3
View File
@@ -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
/**
+4 -4
View File
@@ -86,13 +86,13 @@ ifeq "$(ENGINE)" "left4dead2"
CFLAGS += -DSOURCE_ENGINE=6
METAMOD = $(MMSOURCE17)/core
INCLUDE += -I$(HL2SDK)/public/game/server -I$(HL2SDK)/common -I$(HL2SDK)/game/shared
SRCDS = $(SRCDS_BASE)/left4dead2_demo
SRCDS = $(SRCDS_BASE)/left4dead2
GAMEFIX = 2.l4d2
override ENGSET = true
endif
ifeq "$(ENGINE)" "left4dead2"
LINK_HL2 = $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a vstdlib_linux.so tier0_linux.so
LINK_HL2 = $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a libvstdlib.so libtier0.so
else
LINK_HL2 = $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a vstdlib_i486.so tier0_i486.so
endif
@@ -150,8 +150,8 @@ $(BIN_DIR)/%.o: %.cpp
all: check
mkdir -p $(BIN_DIR)/sdk
ifeq "$(ENGINE)" "left4dead2"
ln -sf $(SRCDS)/bin/vstdlib_linux.so vstdlib_linux.so;
ln -sf $(SRCDS)/bin/tier0_linux.so tier0_linux.so;
ln -sf $(SRCDS)/bin/libvstdlib.so libvstdlib.so;
ln -sf $(SRCDS)/bin/libtier0.so libtier0.so;
else
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so;
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so;
+57
View File
@@ -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;
}
+4 -1
View File
@@ -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;
+12 -2
View File
@@ -199,6 +199,11 @@ void EntityOutputManager::ShutdownFireEventDetour()
void EntityOutputManager::FireEventDetour(void *pOutput, CBaseEntity *pActivator, CBaseEntity *pCaller, float fDelay)
{
if (!pCaller)
{
return;
}
char sOutput[20];
Q_snprintf(sOutput, sizeof(sOutput), "%x", pOutput);
@@ -212,6 +217,11 @@ void EntityOutputManager::FireEventDetour(void *pOutput, CBaseEntity *pActivator
{
const char *classname = GetEntityClassname(pCaller);
const char *outputname = FindOutputName(pOutput, pCaller);
if (!outputname)
{
return;
}
pOutputName = FindOutputPointer(classname, outputname, false);
@@ -428,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;
}
@@ -447,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);
+3 -3
View File
@@ -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
+1 -1
View File
@@ -129,7 +129,7 @@ static cell_t PrepSDKCall_SetSignature(IPluginContext *pContext, const cell_t *p
{
return 0;
}
#if SOURCE_ENGINE == SE_LEFT4DEAD2
#if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
s_call_addr = memutils->ResolveSymbol(handle, &sig[1]);
#else
s_call_addr = dlsym(handle, &sig[1]);
+8 -3
View File
@@ -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
}
@@ -811,7 +811,12 @@ CON_COMMAND(sm_dump_datamaps, "Dumps the data map list as a text file")
typedescription_t *datamap = gamehelpers->FindInDataMap(pMap, "m_iEFlags");
int *eflags = (int *)((char *)entity->GetBaseEntity() + datamap->fieldOffset[TD_OFFSET_NORMAL]);
if (!datamap)
{
continue;
}
int *eflags = (int *)((char *)entity->GetBaseEntity() + GetTypeDescOffs(datamap));
*eflags |= (1<<0); // EFL_KILLME
}
+4 -4
View File
@@ -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;
+3 -4
View File
@@ -199,13 +199,13 @@ void SDKTools::OnClientDisconnecting(int client)
g_VoiceMap[i][client] = Listen_Default;
if (DecHookCount())
{
return;
break;
}
}
}
/* Reset this client's mutes, just in case */
memset(&g_ClientMutes[client], 0, sizeof(int) * 65);
/* 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)
@@ -213,7 +213,6 @@ void SDKTools::OnClientDisconnecting(int client)
DecHookCount(g_ClientOverrides[client]);
g_ClientOverrides[client] = 0;
memset(&g_VoiceMap[client], false, sizeof(ListenOverride) * 65);
memset(&g_ClientMutes[client], false, sizeof(bool) * 65);
}
if (g_VoiceFlags[client])
+1
View File
@@ -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'
+1 -1
View File
@@ -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 ###
+2 -2
View File
@@ -188,7 +188,7 @@ DETOUR_DECL_MEMBER0(CalcIsAttackCriticalHelperBow, bool)
}
}
void InitialiseDetours()
void InitialiseCritDetours()
{
calcIsAttackCriticalDetour = DETOUR_CREATE_MEMBER(CalcIsAttackCriticalHelper, "CalcCritical");
calcIsAttackCriticalMeleeDetour = DETOUR_CREATE_MEMBER(CalcIsAttackCriticalHelperMelee, "CalcCriticalMelee");
@@ -222,7 +222,7 @@ void InitialiseDetours()
}
void RemoveDetours()
void RemoveCritDetours()
{
calcIsAttackCriticalDetour->Destroy();
calcIsAttackCriticalMeleeDetour->Destroy();
+2 -2
View File
@@ -37,8 +37,8 @@
#include <jit/x86/x86_macros.h>
#include "CDetour/detours.h"
void InitialiseDetours();
void RemoveDetours();
void InitialiseCritDetours();
void RemoveCritDetours();
extern IForward *g_critForward;
+21 -7
View File
@@ -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,29 @@ 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;
InitialiseCritDetours();
m_CritDetoursEnabled = true;
}
if (!m_GetHolidayDetourEnabled && g_getHolidayForward->GetFunctionCount())
{
InitialiseGetHolidayDetour();
m_GetHolidayDetourEnabled = true;
}
}
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()
+2 -1
View File
@@ -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
+46
View File
@@ -0,0 +1,46 @@
#include "holiday.h"
CDetour *getHolidayDetour = NULL;
IForward *g_getHolidayForward = NULL;
DETOUR_DECL_MEMBER0(GetHoliday, int)
{
int actualres = DETOUR_MEMBER_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;
}
void InitialiseGetHolidayDetour()
{
getHolidayDetour = DETOUR_CREATE_MEMBER(GetHoliday, "GetHoliday");
if (!getHolidayDetour)
{
g_pSM->LogError(myself, "GetHoliday detour failed");
return;
}
getHolidayDetour->EnableDetour();
}
void RemoveGetHolidayDetour()
{
getHolidayDetour->Destroy();
}
+45
View File
@@ -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"
void InitialiseGetHolidayDetour();
void RemoveGetHolidayDetour();
extern IForward *g_getHolidayForward;
#endif //_INCLUDE_SOURCEMOD_HOLIDAY_H_
+8
View File
@@ -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"
>
+270 -3
View File
@@ -34,6 +34,57 @@
#include "time.h"
#include "RegNatives.h"
// native TF2_MakeBleed(client, victim, 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 *pTarget;
if (!(pTarget = 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 = pTarget;
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,21 @@ 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[3]; \
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; \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 3))
}
CBaseEntity *pEntity;
@@ -113,6 +167,13 @@ 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 *vptr = vstk;
@@ -123,6 +184,8 @@ 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;
pWrapper->Execute(vstk, NULL);
@@ -159,6 +222,182 @@ cell_t TF2_RemoveDisguise(IPluginContext *pContext, const cell_t *params)
return 1;
}
cell_t TF2_AddCondition(IPluginContext *pContext, const cell_t *params)
{
static ICallWrapper *pWrapper = NULL;
// CTFPlayerShared::AddCond(int, float)
if (!pWrapper)
{
REGISTER_NATIVE_ADDR("AddCondition",
PassInfo pass[2]; \
pass[0].flags = PASSFLAG_BYVAL; \
pass[0].size = sizeof(int); \
pass[0].type = PassType_Basic; \
pass[1].flags = PASSFLAG_BYVAL; \
pass[1].size = sizeof(float); \
pass[1].type = PassType_Basic; \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 2))
}
CBaseEntity *pEntity;
if (!(pEntity = UTIL_GetCBaseEntity(params[1], true)))
{
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
}
void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset);
unsigned char vstk[sizeof(void *) + sizeof(int) + sizeof(float)];
unsigned char *vptr = vstk;
*(void **)vptr = obj;
vptr += sizeof(void *);
*(int *)vptr = params[2];
vptr += sizeof(int);
*(float *)vptr = *(float *)&params[3];
pWrapper->Execute(vstk, NULL);
return 1;
}
cell_t TF2_RemoveCondition(IPluginContext *pContext, const cell_t *params)
{
static ICallWrapper *pWrapper = NULL;
// CTFPlayerShared::RemoveCond(int, bool)
if (!pWrapper)
{
REGISTER_NATIVE_ADDR("RemoveCondition",
PassInfo pass[2]; \
pass[0].flags = PASSFLAG_BYVAL; \
pass[0].size = sizeof(int); \
pass[0].type = PassType_Basic; \
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;
if (!(pEntity = UTIL_GetCBaseEntity(params[1], true)))
{
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
}
void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset);
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);
return 1;
}
cell_t TF2_StunPlayer(IPluginContext *pContext, const cell_t *params)
{
static ICallWrapper *pWrapper = NULL;
// CTFPlayerShared::StunPlayer(float, float, int, CTFPlayer *)
if (!pWrapper)
{
REGISTER_NATIVE_ADDR("StunPlayer",
PassInfo pass[4]; \
pass[0].flags = PASSFLAG_BYVAL; \
pass[0].size = sizeof(float); \
pass[0].type = PassType_Basic; \
pass[1].flags = PASSFLAG_BYVAL; \
pass[1].size = sizeof(float); \
pass[1].type = PassType_Basic; \
pass[2].flags = PASSFLAG_BYVAL; \
pass[2].size = sizeof(int); \
pass[2].type = PassType_Basic; \
pass[3].flags = PASSFLAG_BYVAL; \
pass[3].size = sizeof(CBaseEntity *); \
pass[3].type = PassType_Basic; \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 4))
}
CBaseEntity *pEntity;
if (!(pEntity = UTIL_GetCBaseEntity(params[1], true)))
{
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
}
bool bByPlayer = (params[5] != 0);
CBaseEntity *pAttacker = NULL;
if (bByPlayer && !(pAttacker = UTIL_GetCBaseEntity(params[5], true)))
{
return pContext->ThrowNativeError("Attacker index %d is not valid", params[5]);
}
void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset);
unsigned char vstk[sizeof(void *) + 2*sizeof(float) + sizeof(int) + sizeof(CBaseEntity *)];
unsigned char *vptr = vstk;
*(void **)vptr = obj;
vptr += sizeof(void *);
*(float *)vptr = sp_ctof(params[2]);
vptr += sizeof(float);
*(float *)vptr = sp_ctof(params[3]);
vptr += sizeof(float);
*(int *)vptr = params[4];
vptr += sizeof(int);
*(CBaseEntity **)vptr = pAttacker;
pWrapper->Execute(vstk, NULL);
return 1;
}
cell_t TF2_SetPowerplayEnabled(IPluginContext *pContext, const cell_t *params)
{
static ICallWrapper *pWrapper = NULL;
// CTFPlayer::SetPowerPlayEnabled(bool)
if (!pWrapper)
{
REGISTER_NATIVE_ADDR("SetPowerplayEnabled",
PassInfo pass[1]; \
pass[0].flags = PASSFLAG_BYVAL; \
pass[0].size = sizeof(bool); \
pass[0].type = PassType_Basic; \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 1))
}
CBaseEntity *pEntity;
if (!(pEntity = UTIL_GetCBaseEntity(params[1], true)))
{
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
}
bool bEnablePP = false;
if (params[2] != 0)
{
bEnablePP = true;
}
unsigned char vstk[sizeof(void *) + sizeof(bool)];
unsigned char *vptr = vstk;
*(void **)vptr = (void *)pEntity;
vptr += sizeof(void *);
*(bool *)vptr = bEnablePP;
pWrapper->Execute(vstk, NULL);
return 1;
}
cell_t TF2_Respawn(IPluginContext *pContext, const cell_t *params)
{
static ICallWrapper *pWrapper = NULL;
@@ -201,6 +440,28 @@ cell_t TF2_Respawn(IPluginContext *pContext, const cell_t *params)
return 1;
}
cell_t TF2_Regenerate(IPluginContext *pContext, const cell_t *params)
{
static ICallWrapper *pWrapper = NULL;
//CTFPlayer::Regenerate()
if (!pWrapper)
{
REGISTER_NATIVE_ADDR("Regenerate",
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, NULL, 0));
}
CBaseEntity *pEntity;
if (!(pEntity = UTIL_GetCBaseEntity(params[1], true)))
{
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
}
pWrapper->Execute(&pEntity, NULL);
return 1;
}
cell_t TF2_GetResourceEntity(IPluginContext *pContext, const cell_t *params)
{
return g_resourceEntity;
@@ -223,5 +484,11 @@ sp_nativeinfo_t g_TFNatives[] =
{"TF2_RemovePlayerDisguise", TF2_RemoveDisguise},
{"TF2_GetResourceEntity", TF2_GetResourceEntity},
{"TF2_GetClass", TF2_GetClass},
{"TF2_RegeneratePlayer", TF2_Regenerate},
{"TF2_AddCondition", TF2_AddCondition},
{"TF2_RemoveCondition", TF2_RemoveCondition},
{"TF2_SetPlayerPowerPlay", TF2_SetPowerplayEnabled},
{"TF2_StunPlayer", TF2_StunPlayer},
{"TF2_MakeBleed", TF2_MakeBleed},
{NULL, NULL}
};
+29 -3
View File
@@ -90,6 +90,7 @@
"engine" "orangebox_valve"
"engine" "left4dead"
"engine" "left4dead2"
"engine" "alienswarm"
}
"Offsets"
@@ -136,6 +137,12 @@
"game" "NeotokyoSource"
"game" "bg2"
"game" "cspromod"
"game" "FortressForever"
"game" "zps"
"game" "gesource"
"game" "RnLBeta"
"game" "fas"
"game" "fistful_of_frags"
}
"Keys"
@@ -156,6 +163,14 @@
"game" "NeotokyoSource"
"game" "bg2"
"game" "cspromod"
"game" "pvkii"
"game" "FortressForever"
"game" "zps"
"game" "gesource"
"game" "obsidian"
"game" "cstrike"
"game" "RnLBeta"
"game" "fistful_of_frags"
}
"Keys"
@@ -180,6 +195,13 @@
"game" "bg2"
"game" "insurgency"
"game" "cspromod"
"game" "pvkii"
"game" "zps"
"game" "gesource"
"game" "RnLBeta"
"game" "fas"
"game" "fistful_of_frags"
"game" "swarm"
}
"Keys"
@@ -188,12 +210,16 @@
}
}
"cstrike"
"#default"
{
"#supported"
{
"game" "cstrike"
}
"Keys"
{
"HintTextPreByte" "yes"
"GameExtension" "game.cstrike"
"GameExtension" "game.cstrike"
}
}
-3
View File
@@ -16,11 +16,8 @@
{
"#supported"
{
"game" "cstrike"
"game" "hl2mp"
"game" "ship"
"game" "insurgency"
"game" "pvkii"
"game" "sourceforts"
"game" "FortressForever"
"game" "empires"
+8 -1
View File
@@ -19,7 +19,14 @@
"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"
}
"Offsets"
+3
View File
@@ -18,6 +18,9 @@
{
"game" "dod"
"game" "tf"
"game" "cstrike"
"game" "garrysmod"
"game" "hl2mp"
}
"Offsets"
+45
View File
@@ -0,0 +1,45 @@
/**
* 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"
}
"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"
}
}
}
}
+5
View File
@@ -25,6 +25,11 @@
"engine" "left4dead2"
}
"engine.swarm.txt"
{
"engine" "alienswarm"
}
"engine.ep2.txt"
{
"engine" "orangebox"
+1 -15
View File
@@ -16,12 +16,9 @@
{
"#supported"
{
"game" "cstrike"
"game" "hl2mp"
"game" "ship"
"game" "!Dystopia"
"game" "insurgency"
"game" "pvkii"
"game" "sourceforts"
"game" "FortressForever"
"game" "synergy"
@@ -75,12 +72,9 @@
{
"#supported"
{
"game" "cstrike"
"game" "garrysmod"
"game" "hl2mp"
"game" "ship"
"game" "!Dystopia"
"game" "pvkii"
"game" "sourceforts"
"game" "FortressForever"
"game" "synergy"
@@ -125,12 +119,8 @@
{
"#supported"
{
"game" "cstrike"
"game" "garrysmod"
"game" "hl2mp"
"game" "ship"
"game" "insurgency"
"game" "pvkii"
"game" "sourceforts"
"game" "FortressForever"
"game" "synergy"
@@ -156,9 +146,6 @@
{
"#supported"
{
"game" "cstrike"
"game" "hl2mp"
"game" "pvkii"
"game" "sourceforts"
"game" "synergy"
"game" "hidden"
@@ -237,9 +224,8 @@
{
"#supported"
{
"game" "cstrike"
"game" "hl2mp"
"game" "NeotokyoSource"
"game" "zombie_master"
}
"Signatures"
{
+14 -4
View File
@@ -21,7 +21,10 @@
"game" "empires"
"game" "synergy"
"game" "bg2"
"game" "garrysmod"
"game" "pvkii"
"game" "gesource"
"game" "fas"
"game" "fistful_of_frags"
}
"Offsets"
@@ -70,7 +73,8 @@
{
"game" "ageofchivalry"
"game" "zps"
"game" "empires"
"game" "pvkii"
"game" "fistful_of_frags"
}
"Signatures"
@@ -97,7 +101,8 @@
{
"game" "ageofchivalry"
"game" "zps"
"game" "empires"
"game" "pvkii"
"game" "fistful_of_frags"
}
"Signatures"
@@ -122,7 +127,12 @@
"game" "empires"
"game" "synergy"
"game" "bg2"
"game" "garrysmod"
"game" "pvkii"
"game" "gesource"
"game" "RnLBeta"
"game" "obsidian"
"game" "fas"
"game" "fistful_of_frags"
}
"Offsets"
+14 -2
View File
@@ -18,6 +18,9 @@
{
"game" "dod"
"game" "tf"
"game" "cstrike"
"game" "garrysmod"
"game" "hl2mp"
}
"Offsets"
@@ -66,6 +69,8 @@
{
"game" "dod"
"game" "tf"
"game" "cstrike"
"game" "hl2mp"
}
"Signatures"
@@ -92,6 +97,8 @@
{
"game" "dod"
"game" "tf"
"game" "cstrike"
"game" "hl2mp"
}
"Signatures"
@@ -113,6 +120,9 @@
{
"game" "dod"
"game" "tf"
"game" "cstrike"
"game" "garrysmod"
"game" "hl2mp"
}
"Offsets"
@@ -204,6 +214,8 @@
{
"game" "dod"
"game" "tf"
"game" "cstrike"
"game" "hl2mp"
}
"Signatures"
{
@@ -219,7 +231,7 @@
"FireOutputBackup"
{
"windows" "6"
"linux" "10"
"linux" "12"
}
}
}
@@ -238,7 +250,7 @@
"SetUserCvar"
{
"windows" "17"
"linux" "55"
"linux" "56"
}
/**
* Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
+8 -8
View File
@@ -225,7 +225,7 @@
"FireOutputBackup"
{
"windows" "6"
"linux" "10"
"linux" "12"
}
}
}
@@ -244,7 +244,7 @@
"SetUserCvar"
{
/* Not 100% sure on this, why would windows change and not linux - TEST ME */
"windows" "18"
"windows" "17"
"linux" "63"
}
/**
@@ -270,8 +270,8 @@
{
"GiveNamedItem"
{
"windows" "505"
"linux" "506"
"windows" "506"
"linux" "507"
}
"RemovePlayerItem"
{
@@ -300,8 +300,8 @@
}
"CommitSuicide"
{
"windows" "473"
"linux" "473"
"windows" "474"
"linux" "474"
}
"GetVelocity"
{
@@ -350,8 +350,8 @@
}
"PlayerRunCmd"
{
"windows" "451"
"linux" "452"
"windows" "452"
"linux" "453"
}
}
}
+279
View File
@@ -0,0 +1,279 @@
/**
* 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"
}
"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"
}
"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"
}
"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"
}
"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"
}
"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"
}
}
}
/* 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"
}
}
}
}
+14
View File
@@ -95,6 +95,10 @@
"windows" "6"
"linux" "6"
}
"g_pGameRules"
{
"windows" "2"
}
}
"Signatures"
{
@@ -122,6 +126,16 @@
"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"
}
}
}
}
+34 -34
View File
@@ -26,88 +26,88 @@
{
"GiveNamedItem"
{
"windows" "329"
"linux" "330"
"windows" "387"
"linux" "388"
}
"RemovePlayerItem"
{
"windows" "226"
"linux" "227"
"windows" "259"
"linux" "260"
}
"Weapon_GetSlot"
{
"windows" "224"
"linux" "225"
"windows" "257"
"linux" "258"
}
"Ignite"
{
"windows" "188"
"linux" "189"
"windows" "202"
"linux" "203"
}
"Extinguish"
{
"windows" "189"
"linux" "190"
"windows" "206"
"linux" "207"
}
"Teleport"
{
"windows" "98"
"linux" "99"
"windows" "105"
"linux" "106"
}
"CommitSuicide"
{
"windows" "357"
"linux" "358"
"windows" "428"
"linux" "428"
}
"GetVelocity"
{
"windows" "126"
"linux" "127"
"windows" "137"
"linux" "138"
}
"EyeAngles"
{
"windows" "118"
"linux" "119"
"windows" "128"
"linux" "129"
}
"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" "250"
"linux" "251"
}
"Activate"
{
"windows" "32"
"linux" "33"
"windows" "31"
"linux" "32"
}
"PlayerRunCmd"
{
"windows" "347"
"linux" "348"
"windows" "405"
"linux" "406"
}
}
}
+20 -20
View File
@@ -18,28 +18,28 @@
{
"GiveNamedItem"
{
"windows" "385"
"linux" "386"
"windows" "386"
"linux" "387"
}
"RemovePlayerItem"
{
"windows" "258"
"linux" "259"
"windows" "259"
"linux" "260"
}
"Weapon_GetSlot"
{
"windows" "256"
"linux" "257"
"windows" "257"
"linux" "258"
}
"Ignite"
{
"windows" "201"
"linux" "202"
"windows" "202"
"linux" "203"
}
"Extinguish"
{
"windows" "205"
"linux" "206"
"windows" "206"
"linux" "207"
}
"Teleport"
{
@@ -48,18 +48,18 @@
}
"CommitSuicide"
{
"windows" "422"
"linux" "423"
"windows" "424"
"linux" "425"
}
"GetVelocity"
{
"windows" "136"
"linux" "137"
"windows" "137"
"linux" "138"
}
"EyeAngles"
{
"windows" "127"
"linux" "128"
"windows" "128"
"linux" "129"
}
"AcceptInput"
{
@@ -88,8 +88,8 @@
}
"WeaponEquip"
{
"windows" "249"
"linux" "250"
"windows" "250"
"linux" "251"
}
"Activate"
{
@@ -98,8 +98,8 @@
}
"PlayerRunCmd"
{
"windows" "403"
"linux" "404"
"windows" "404"
"linux" "405"
}
}
}
+63 -31
View File
@@ -11,7 +11,7 @@
"Games"
{
/* Empires 2.24 */
/* Empires 2.25b */
"empires"
{
@@ -19,48 +19,48 @@
{
"GiveNamedItem"
{
"windows" "354"
"linux" "355"
"windows" "353"
"linux" "354"
}
"RemovePlayerItem"
{
"windows" "241"
"linux" "242"
"windows" "240"
"linux" "241"
}
"Weapon_GetSlot"
{
"windows" "239"
"linux" "240"
"windows" "238"
"linux" "239"
}
"Ignite"
{
"windows" "196"
"linux" "197"
"windows" "195"
"linux" "196"
}
"Extinguish"
{
"windows" "200"
"linux" "201"
"windows" "199"
"linux" "200"
}
"Teleport"
{
"windows" "104"
"linux" "105"
"windows" "103"
"linux" "104"
}
"CommitSuicide"
{
"windows" "401"
"linux" "402"
"windows" "392"
"linux" "392"
}
"GetVelocity"
{
"windows" "133"
"linux" "134"
"windows" "132"
"linux" "133"
}
"EyeAngles"
{
"windows" "125"
"linux" "126"
"windows" "124"
"linux" "125"
}
"DispatchKeyValue"
{
@@ -79,29 +79,61 @@
}
"AcceptInput"
{
"windows" "35"
"linux" "36"
"windows" "34"
"linux" "35"
}
"Activate"
{
"windows" "31"
"linux" "32"
}
"TakeHealth"
{
"windows" "62"
"linux" "63"
}
"ChangeTeam"
{
"windows" "87"
"linux" "88"
}
"SetEntityModel"
{
"windows" "23"
"linux" "24"
}
"WeaponEquip"
{
"windows" "231"
"linux" "232"
}
"PlayerRunCmd"
{
"windows" "372"
"linux" "373"
}
"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" "\x55\x8B\xEC\x83\x2A\x2A\x81\xEC\x2A\x2A\x2A\x2A\x53\x56\x8B\x71\x2A\x57\x89"
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
}
}
}
}
+139
View File
@@ -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"
}
}
}
}
+11
View File
@@ -96,6 +96,11 @@
"windows" "36"
"linux" "37"
}
"FireOutputBackup"
{
"windows" "6"
"linux" "6"
}
}
"Signatures"
@@ -120,6 +125,12 @@
"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\x54\x56\xFF\xD2"
}
"FireOutput"
{
"library" "server"
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\x2A\x2A\x85\xF6\x57"
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
}
}
}
}
+115
View File
@@ -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"
}
}
}
}
+40 -14
View File
@@ -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" "428"
"linux" "429"
}
"RemovePlayerItem"
{
"windows" "279"
"windows" "301"
"linux" "302"
}
"Weapon_GetSlot"
{
"windows" "277"
"windows" "299"
"linux" "300"
}
"Ignite"
{
"windows" "228"
"windows" "238"
"linux" "239"
}
"Extinguish"
{
"windows" "232"
"windows" "242"
"linux" "243"
}
"Teleport"
{
"windows" "101"
"windows" "106"
"linux" "107"
}
"CommitSuicide"
{
"windows" "429"
"windows" "466"
"linux" "466"
}
"GetVelocity"
{
"windows" "131"
"windows" "138"
"linux" "139"
}
"EyeAngles"
{
"windows" "123"
"windows" "129"
"linux" "130"
}
"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" "270"
"windows" "292"
"linux" "293"
}
"Activate"
{
"windows" "31"
"linux" "32"
}
"PlayerRunCmd"
{
"windows" "409"
"windows" "446"
"linux" "447"
}
"FireOutputBackup"
{
"windows" "6"
"linux" "6"
}
}
"Signatures"
@@ -97,21 +113,31 @@
{
"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" "\x55\x89\xE5\x57\x56\x53\x83\xEC\x2A\xE8\x2A\x2A\x2A\x2A\x81\xC3\x2A\x2A\x2A\x2A\x31\xC0\x8B\x75\x2A\x85\xF6\x0F"
}
"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" "\x55\x89\xE5\x57\x56\x53\x83\xEC\x2A\xE8\x2A\x2A\x2A\x2A\x81\xC3\x2A\x2A\x2A\x2A\x8B\x75\x2A\x83\xFE\xFF\x74\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x00\x8B"
}
"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" "\x55\x89\xE5\x57\x56\x53\x83\xEC\x2A\xE8\x2A\x2A\x2A\x2A\x81\xC3\x2A\x2A\x2A\x2A\x8B\x55\x2A\x85\xD2\x74\x75"
}
"FireOutput"
{
"library" "server"
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\x71\x2A\x57\x89"
"linux" "\x55\x89\xE5\x57\x56\x53\x81\xEC\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x81\xC3\x2A\x2A\x2A\x2A\x8B\x45\x2A\x8B\x78\x2A\x85\xFF\x0F"
}
"EntityFactory"
{
"library" "server"
"linux" "\x55\x89\xE5\x57\x56\x53\x83\xEC\x2A\xE8\x2A\x2A\x2A\x2A\x81\xC3\x2A\x2A\x2A\x2A\x8D\x2A\x2A\x2A\x2A\x2A\x80\x2A\x2A\x2A\x2A\x2A\x2A\x74\x2A\x8D\x83\x2A\x2A\x2A\x2A\x83"
}
}
}
+126
View File
@@ -0,0 +1,126 @@
"Games"
{
"gesource"
{
"Offsets"
{
"GiveNamedItem"
{
"windows" "351"
"linux" "352"
}
"RemovePlayerItem"
{
"windows" "239"
"linux" "240"
}
"Weapon_GetSlot"
{
"windows" "237"
"linux" "238"
}
"Ignite"
{
"windows" "194"
"linux" "195"
}
"Extinguish"
{
"windows" "198"
"linux" "199"
}
"Teleport"
{
"windows" "100"
"linux" "101"
}
"CommitSuicide"
{
"windows" "392"
"linux" "392"
}
"GetVelocity"
{
"windows" "130"
"linux" "131"
}
"EyeAngles"
{
"windows" "122"
"linux" "123"
}
"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" "230"
"linux" "231"
}
"Activate"
{
"windows" "31"
"linux" "32"
}
"PlayerRunCmd"
{
"windows" "371"
"linux" "372"
}
"FireOutputBackup"
{
"windows" "6"
"linux" "10"
}
}
"Signatures"
{
"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"
"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"
}
"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"
}
"FireOutput"
{
"library" "server"
"windows" "\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x57\x89"
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
}
}
}
}
+34 -34
View File
@@ -18,88 +18,88 @@
{
"GiveNamedItem"
{
"windows" "328"
"linux" "329"
"windows" "386"
"linux" "387"
}
"RemovePlayerItem"
{
"windows" "226"
"linux" "227"
"windows" "259"
"linux" "260"
}
"Weapon_GetSlot"
{
"windows" "224"
"linux" "225"
"windows" "257"
"linux" "258"
}
"Ignite"
{
"windows" "188"
"linux" "189"
"windows" "202"
"linux" "203"
}
"Extinguish"
{
"windows" "189"
"linux" "190"
"windows" "206"
"linux" "207"
}
"Teleport"
{
"windows" "98"
"linux" "99"
"windows" "105"
"linux" "106"
}
"CommitSuicide"
{
"windows" "356"
"linux" "357"
"windows" "425"
"linux" "425"
}
"GetVelocity"
{
"windows" "126"
"linux" "127"
"windows" "137"
"linux" "138"
}
"EyeAngles"
{
"windows" "118"
"linux" "119"
"windows" "128"
"linux" "129"
}
"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" "250"
"linux" "251"
}
"Activate"
{
"windows" "32"
"linux" "33"
"windows" "31"
"linux" "32"
}
"PlayerRunCmd"
{
"windows" "346"
"linux" "347"
"windows" "404"
"linux" "405"
}
}
}
+16 -12
View File
@@ -11,7 +11,6 @@
"Games"
{
/* Insurgency (2009-07-10) */
"insurgency"
{
"Offsets"
@@ -82,22 +81,21 @@
"windows" "288"
"linux" "289"
}
"PlayerRunCmd"
{
"windows" "274"
"linux" "275"
}
"g_pGameRules"
{
"windows" "2"
}
}
"Signatures"
{
"Offsets"
{
/* Offset into CreateGameRulesObject */
"g_pGameRules"
"FireOutputBackup"
{
"windows" "2"
}
"windows" "6"
"linux" "6"
}
}
"Signatures"
{
"CreateGameRulesObject"
@@ -125,9 +123,15 @@
"CreateEntityByName"
{
"library" "server"
"windows" "\x56\x8B\x74\x24\x0C\x57\x8B\x7C\x24\x0C\x83\x2A\x2A\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x2A\x2A\x56\xFF\xD2\xA3\xCC"
"windows" "\x56\x8B\x74\x24\x0C\x57\x8B\x7C\x24\x0C\x83\x2A\x2A\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x2A\x2A\x56\xFF\xD2\xA3"
"linux" "@_Z18CreateEntityByNamePKci"
}
"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\x24\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"
}
}
}
}
+57 -19
View File
@@ -11,90 +11,128 @@
"Games"
{
/* Obsidian Conflict 1.3 */
/* Obsidian Conflict 1.35 */
"obsidian"
{
"Offsets"
{
"GiveNamedItem"
{
"windows" "350"
"linux" "351"
"windows" "351"
}
"RemovePlayerItem"
{
"windows" "237"
"linux" "238"
}
"Weapon_GetSlot"
{
"windows" "235"
"linux" "236"
}
"Ignite"
{
"windows" "190"
"linux" "191"
}
"Extinguish"
{
"windows" "194"
"linux" "195"
}
"Teleport"
{
"windows" "100"
"linux" "101"
}
"CommitSuicide"
{
"windows" "395"
"linux" "395"
"windows" "396"
}
"GetVelocity"
{
"windows" "127"
"linux" "128"
}
"EyeAngles"
{
"windows" "119"
"linux" "120"
}
"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" "371"
}
/* Offset into CBaseTempEntity constructor (vs2010 moved it!) */
"s_pTempEntities"
{
"windows" "19"
}
"GetTEName"
{
"windows" "4"
}
"GetTENext"
{
"windows" "8"
}
"TE_GetServerClass"
{
"windows" "0"
}
"FireOutputBackup"
{
"windows" "9"
}
}
"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" "\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"
}
"CreateEntityByName"
{
"library" "server"
"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"
}
"FindEntityByClassname"
{
"library" "server"
"windows" "\x55\x8B\xEC\x53\x56\x8B\xF1\x8B\x2A\x2A\x57\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\xFF\xD2\x8B\x00\x25\x2A\x2A\x2A\x2A\x40\x03\xC0\x8B\x3C\xC6\xEB\x2A\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74"
}
"FireOutput"
{
"library" "server"
"windows" "\x55\x8B\xEC\x81\xEC\x2A\x2A\x2A\x2A\x53\x56\x8B\x2A\x2A\x57\x89"
}
}
}
+47 -28
View File
@@ -19,48 +19,48 @@
/* CBasePlayer */
"GiveNamedItem"
{
"windows" "328"
"linux" "329"
"windows" "352"
"linux" "353"
}
"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" "356"
"linux" "357"
"windows" "393"
"linux" "393"
}
"GetVelocity"
{
"windows" "126"
"linux" "127"
"windows" "131"
"linux" "132"
}
"EyeAngles"
{
"windows" "118"
"linux" "119"
"windows" "123"
"linux" "124"
}
"AcceptInput"
{
@@ -69,34 +69,53 @@
}
"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" "24"
"linux" "25"
}
"WeaponEquip"
{
"windows" "217"
"linux" "218"
"windows" "230"
"linux" "231"
}
"Activate"
{
"windows" "32"
"linux" "33"
}
"PlayerRunCmd"
{
"windows" "372"
"linux" "373"
}
"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"
}
}
}
}
+128
View File
@@ -0,0 +1,128 @@
"Games"
{
/* Resistance and Liberation Open Beta 1.1 */
"RnLBeta"
{
"Offsets"
{
"GiveNamedItem"
{
"windows" "356"
}
"RemovePlayerItem"
{
"windows" "238"
}
"Weapon_GetSlot"
{
"windows" "236"
}
"Ignite"
{
"windows" "193"
}
"Extinguish"
{
"windows" "197"
}
"Teleport"
{
"windows" "100"
}
"CommitSuicide"
{
"windows" "397"
}
"GetVelocity"
{
"windows" "130"
}
"EyeAngles"
{
"windows" "122"
}
"AcceptInput"
{
"windows" "34"
}
"DispatchKeyValue"
{
"windows" "29"
}
"DispatchKeyValueFloat"
{
"windows" "28"
}
"DispatchKeyValueVector"
{
"windows" "27"
}
"SetEntityModel"
{
"windows" "23"
}
"WeaponEquip"
{
"windows" "229"
}
"Activate"
{
"windows" "31"
}
"PlayerRunCmd"
{
"windows" "376"
}
/* Offset into CBaseTempEntity constructor (vs2010 moved it!) */
"s_pTempEntities"
{
"windows" "19"
}
"GetTEName"
{
"windows" "4"
}
"GetTENext"
{
"windows" "8"
}
"TE_GetServerClass"
{
"windows" "0"
}
"FireOutputBackup"
{
"windows" "9"
}
}
"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" "\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"
}
"CreateEntityByName"
{
"library" "server"
"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"
}
"FindEntityByClassname"
{
"library" "server"
"windows" "\x55\x8B\xEC\x53\x56\x8B\xF1\x8B\x2A\x2A\x57\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\xFF\xD2\x8B\x00\x25\x2A\x2A\x2A\x2A\x40\x03\xC0\x8B\x3C\xC6\xEB\x2A\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74"
}
"FireOutput"
{
"library" "server"
"windows" "\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6"
}
}
}
}
+6 -1
View File
@@ -12,7 +12,7 @@
"Games"
{
/* SourceForts */
"SourceForts"
"sourceforts"
{
"Offsets"
{
@@ -97,6 +97,11 @@
"windows" "32"
"linux" "33"
}
"PlayerRunCmd"
{
"windows" "346"
"linux" "347"
}
}
}
}
+18 -18
View File
@@ -18,8 +18,8 @@
{
"GiveNamedItem"
{
"windows" "385"
"linux" "386"
"windows" "386"
"linux" "387"
}
"RemovePlayerItem"
{
@@ -28,18 +28,18 @@
}
"Weapon_GetSlot"
{
"windows" "256"
"linux" "257"
"windows" "257"
"linux" "258"
}
"Ignite"
{
"windows" "201"
"linux" "202"
"windows" "202"
"linux" "203"
}
"Extinguish"
{
"windows" "205"
"linux" "206"
"windows" "206"
"linux" "207"
}
"Teleport"
{
@@ -48,18 +48,18 @@
}
"CommitSuicide"
{
"windows" "425"
"linux" "425"
"windows" "427"
"linux" "427"
}
"GetVelocity"
{
"windows" "136"
"linux" "137"
"windows" "137"
"linux" "138"
}
"EyeAngles"
{
"windows" "127"
"linux" "128"
"windows" "128"
"linux" "129"
}
"DispatchKeyValue"
{
@@ -88,8 +88,8 @@
}
"WeaponEquip"
{
"windows" "249"
"linux" "250"
"windows" "250"
"linux" "251"
}
"Activate"
{
@@ -98,8 +98,8 @@
}
"PlayerRunCmd"
{
"windows" "403"
"linux" "404"
"windows" "404"
"linux" "405"
}
}
}
+5
View File
@@ -101,6 +101,11 @@
"windows" "32"
"linux" "33"
}
"PlayerRunCmd"
{
"windows" "347"
"linux" "348"
}
}
"Signatures"
+1 -6
View File
@@ -99,11 +99,6 @@
}
"Signatures"
{
"CreateGameRulesObject"
{
"library" "server"
"windows" "\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2C\x6A\x01"
}
"FindEntityByClassname"
{
"library" "server"
@@ -120,7 +115,7 @@
{
"library" "server"
"linux" "@_Z13DispatchSpawnP11CBaseEntity"
"windows" "\x53\x55\x56\x8B\x74\x24\x10\x2A\x85\xF6\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x60\x8B\xCB"
"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"
}
}
}
+25
View File
@@ -25,6 +25,11 @@
"engine" "left4dead2"
}
"engine.swarm.txt"
{
"engine" "alienswarm"
}
"engine.ep2.txt"
{
"engine" "orangebox"
@@ -142,4 +147,24 @@
{
"game" "bg2"
}
"game.cspromod.txt"
{
"game" "cspromod"
}
"game.gesource.txt"
{
"game" "gesource"
}
"game.rnlbeta.txt"
{
"game" "RnLBeta"
}
"game.fas.txt"
{
"game" "fas"
}
"game.fof.txt"
{
"game" "fistful_of_frags"
}
}
+2 -2
View File
@@ -18,13 +18,13 @@
"RoundRespawn"
{
"library" "server"
"windows" "\x56\x8B\xF1\x8B\x06\xFF\x90\x2A\x04\x00\x00\x8B\x86\x2A\x0D\x00"
"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\x84\xEA\x00\x00\x00\x83\xFF\x03\x74\x09\x83\xFF\x02\x0F\x85\xDC\x00\x00\x00\x8B\xCE\xE8\x2A\x2A\x2A\x2A\x3B\xF8\x0F\x84\xDC\x00\x00\x00\x57\x8B\xCE\xC6\x86\x2A\x2A"
"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"
}
}
+48 -6
View File
@@ -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"
"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" "\x83\xEC\x2A\x53\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" "@_ZN15CTFPlayerShared8DisguiseEiiP9CTFPlayer"
}
"CalcCritical"
{
@@ -51,13 +51,55 @@
"linux" "@_ZN14CTFCompoundBow26CalcIsAttackCriticalHelperEv"
"windows" "\xE8\x2A\x2A\x2A\x2A\x85\xC0\x74\x14\x6A\x0B"
}
"Regenerate"
{
"library" "server"
"windows" "\x83\xEC\x08\xD9\xE8\x53\x55\xD9\x2A\x2A\x2A\x56\x8B\xF1\x8B\x06\x8B\x90"
"linux" "@_ZN9CTFPlayer10RegenerateEv"
}
"AddCondition"
{
"library" "server"
"windows" "\xD9\x44\x2A\x2A\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x8B\x86\x2A\x2A\x2A\x00\x50\x51\xD9\x2A\x2A\x57"
"linux" "@_ZN15CTFPlayerShared7AddCondEif"
}
"RemoveCondition"
{
"library" "server"
"windows" "\x8B\x44\x2A\x2A\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x50\x57\x8D\x8E\x2A\x2A\x2A\x2A\xE8"
"linux" "@_ZN15CTFPlayerShared10RemoveCondEib"
}
"SetPowerplayEnabled"
{
"library" "server"
"windows" "\x80\x7C\x2A\x2A\x2A\x56\x8B\xF1\x74\x2A\xA1\x2A\x2A\x2A\x2A\xD9\x2A\x2A\x57"
"linux" "@_ZN9CTFPlayer19SetPowerplayEnabledEb"
}
"StunPlayer"
{
"library" "server"
"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\xA1\x2A\x2A\x2A\x2A\x83\x2A\x2A\x2A\x56\x8B\xF1\x89\x2A\x2A\x2A\x74\x2A\xB8"
"linux" "@_ZN12CTFGameRules10GetHolidayEv"
}
"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"
}
}
"Offsets"
{
"ForceRespawn"
{
"windows" "312"
"linux" "313"
"windows" "314"
"linux" "315"
}
}
}
+7 -1
View File
@@ -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;
+2 -2
View File
@@ -60,7 +60,7 @@ public OnPluginStart()
LoadTranslations("basebans.phrases");
RegAdminCmd("sm_ban", Command_Ban, ADMFLAG_BAN, "sm_ban <#userid|name> <minutes|0> [reason]");
RegAdminCmd("sm_unban", Command_Unban, ADMFLAG_UNBAN, "sm_unban <steamid>");
RegAdminCmd("sm_unban", Command_Unban, ADMFLAG_UNBAN, "sm_unban <steamid|ip>");
RegAdminCmd("sm_addban", Command_AddBan, ADMFLAG_RCON, "sm_addban <time> <steamid> [reason]");
RegAdminCmd("sm_banip", Command_BanIp, ADMFLAG_BAN, "sm_banip <ip|#userid|name> <time> [reason]");
@@ -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
View File
@@ -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)
{
+6
View File
@@ -210,6 +210,12 @@ public Action:Command_Nextmap(client, args)
public Action:Command_Motd(client, args)
{
if (client == 0)
{
ReplyToCommand(client, "[SM] %t", "Command is in-game only");
return Plugin_Handled;
}
ShowMOTDPanel(client, "Message Of The Day", "motd", MOTDPANEL_TYPE_INDEX);
return Plugin_Handled;
+19 -10
View File
@@ -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,20 @@ 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");
if (GuessSDKVersion() == 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()
+5 -2
View File
@@ -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;
+22 -4
View File
@@ -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));
+11 -4
View File
@@ -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];
+9
View File
@@ -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.
*

Some files were not shown because too many files have changed in this diff Show More