Compare commits

...
Author SHA1 Message Date
Nicholas Hastings b702099530 Merge. 2012-09-03 21:21:07 -04:00
Nicholas Hastings dd0339e05b Updated versioning for 1.4.5 release. 2012-09-03 21:20:44 -04:00
Nicholas Hastings 88ee039ea6 Updated changelog. 2012-09-03 21:20:29 -04:00
Asher Baker 9b965ddfe5 Merge 2012-09-03 20:29:02 +01:00
Asher Baker 6e4dcc9041 Error on access to nested datamap props (bug 5446, r=psychonic). 2012-09-03 20:26:39 +01:00
Nicholas Hastings 71925cd3b2 Updated non-CS:S ep2v gamedata for IServer lookup (bug 5450). 2012-09-03 14:39:26 -04:00
Nicholas Hastings 82160205e5 Fixed typo causing IServer lookup to still fail (bug 5450). 2012-09-03 14:37:45 -04:00
Asher Baker 8307f8fd9b Fixed resolution of GetProfilerTime on non-Windows platforms (r=me). 2012-08-29 16:35:10 +01:00
Nicholas Hastings a62b783c0e riggering build. 2012-08-28 17:49:57 -04:00
Kyle Sanderson 2f86fe58aa Fixed crash in EntProp natives (bug 5297, r=psychonic). 2012-08-28 16:22:33 -04:00
Nicholas Hastings 20d9b28df5 Updated SDKCall SetSignature to use same hidden-symbols engine list as core (bug 5440, r=me). 2012-08-27 19:31:44 -04:00
Nicholas Hastings 4c3fe1a1e7 Updated GMod gamedata (bug 5408). 2012-08-27 18:59:00 -04:00
Nicholas Hastings e95f0f333e Compatibility shim to fix IServer lookup on CS:S (bug 5450, r=asherkin). 2012-08-27 17:52:15 -04:00
Kyle Sanderson 129395c896 Fixed minor memory leaks in cstrike ext (bug 5456, r=psychonic). 2012-08-27 00:57:25 -04:00
Anthony Iacono f2eccadff3 Fixed OnClientConnect blocking not actually functioning (bug 5461, r=psychonic). 2012-08-26 23:33:04 -04:00
Nicholas Hastings 4eafdc2a1e Really fixed issues for today's TF2 engine update (bug 5450). 2012-08-24 01:38:01 -04:00
Nicholas Hastings e4fd32609a Updated gamedata for today's TF2 engine update. 2012-08-24 00:53:26 -04:00
Nicholas Hastings 3f43fca3a9 Fixed GuessSDKVersion output on CS:S with MM:S 1.9+ (r=asherkin). 2012-08-23 13:55:48 -04:00
Nicholas Hastings 0d6b93c5a0 Updated SDKTools IServer finding on Windows for Ep2v and CSS (bug 5450, r=me). 2012-08-23 07:47:44 -04:00
Asher Baker bf4bce8250 Updated cstrike gamedata. 2012-08-22 23:27:16 +01:00
Powerlord 6942614ef9 Updated TFHoliday enum (bug 5436, r=asherkin). 2012-08-21 00:44:44 -04:00
Nicholas Hastings f6c496717c Merge. 2012-08-20 21:56:45 -04:00
Nicholas Hastings 9c69e9e66a Added compatibility shim for MM:S 1.9.0+ (bug 5370, r=asherkin). 2012-08-20 21:56:18 -04:00
Asher Baker b5b5d7e239 Force build. 2012-08-16 02:10:14 +01:00
Nicholas Hastings 6acf264636 Updated HL2DM and DODS gamedata for today's game update. 2012-08-15 23:35:53 +01:00
Nicholas Hastings 52ecfd8b0a Updated tf2 weapon and dmg custom defines, added new round state. 2012-08-15 23:35:53 +01:00
Nicholas Hastings 5b6cb0707c Updated gamedata for latest TF2 update. 2012-08-15 23:35:53 +01:00
Nicholas Hastings a29027a4a3 Updated TF2 ext MakeBleed and Regenerate natives for latest TF2 update. 2012-08-15 23:35:53 +01:00
Nicholas Hastings 691b9d128e Updated defines in tf2_stocks.inc. 2012-08-03 07:56:31 -04:00
Ryan Stecker c9631c19ac Updated TF2 gamedata. 2012-08-02 20:11:02 -04:00
Nicholas Hastings 893b52a1e9 Updated Dino D-Day gamedata (bug 5410). 2012-08-01 22:23:03 -04:00
Nicholas Hastings 527b98661a Updated ZPS gamedata. 2012-07-26 14:09:34 -04:00
Nicholas Hastings 823b0f9702 Triggering build for bug 5391. 2012-07-21 20:43:22 -04:00
Nicholas Hastings bcdc2c3933 Updated DoD:S and HL2:DM gamedata. 2012-07-20 15:43:15 -04:00
Nicholas Hastings bf84e29c4d Updated Nuclear Dawn gamedata. 2012-07-19 20:13:47 -04:00
Nicholas Hastings 4b5c62bd2f Bumping version. 2012-07-03 20:34:50 -04:00
Nicholas Hastings 1dd00127a5 Added tag sourcemod-1.4.4 for changeset 29186166cc99 2012-07-03 20:33:45 -04:00
Nicholas Hastings 8c0a53cfdb Updating versioning for 1.4.4 release. 2012-07-03 18:30:05 -04:00
Nicholas Hastings 5d485df4b8 Updating changelog. 2012-07-03 18:29:39 -04:00
Powerlord 0656857960 Updated TFHoliday enum for latest TF2 updates (bug 5364, r=psychonic). 2012-07-03 18:03:06 -04:00
Nicholas Hastings af69434738 Fixed clientprefs prefab menu double free crash (bug 5374, r=asherkin). 2012-07-03 07:51:12 -04:00
Nicholas Hastings d713c52524 Updated CS:S gamedata. 2012-07-02 23:27:22 -04:00
Brian Simon ef59237dad Fixed NULL ninvoke ptr in sample ext when SMEXT_ENABLE_NINVOKE defined (bug 5340, r=psychonic). 2012-07-01 12:05:21 -04:00
Nicholas Hastings 049f99a658 Updated GMod gamedata. 2012-06-30 09:08:06 -04:00
Nicholas Hastings ffe50ed9f1 Added new TF2 weapon and custom dmg defines. 2012-06-28 11:27:31 -04:00
Nicholas Hastings f2266b45a3 Updated EmitSentence native for sdk change on ep2v. 2012-06-28 11:29:07 -04:00
Nicholas Hastings c5f57cb3e4 Updated TF2, DOD:S, and HL2:DM gamedata. 2012-06-27 23:24:38 -04:00
Nicholas Hastings 21a645e1c6 Another build fix. 2012-06-27 23:17:44 -04:00
Nicholas Hastings e4505b981b Build fix. 2012-06-27 23:14:26 -04:00
Nicholas Hastings 30c9d56e3f Updated Core and SDK Tools for ep2v EmitSound sdk change. 2012-06-27 23:08:54 -04:00
Nicholas Hastings e29cf999a9 Triggering a build. 2012-06-27 22:19:04 -04:00
Nicholas Hastings df9ae818db Updated TF2 gamedata. 2012-06-27 21:41:04 -04:00
Nicholas Hastings f725ee4fb4 Updated Nuclear Dawn gamedata. 2012-06-20 21:00:53 -04:00
Nicholas Hastings ce51189e9a Re-adding -dev tag and bumping version. 2012-06-09 21:45:20 -04:00
Nicholas Hastings 84ffb3de43 Added tag sourcemod-1.4.3 for changeset 608f4c94872e 2012-06-09 21:43:58 -04:00
Nicholas Hastings cc5d87578f Updated changelog and versioning for version 1.4.3. 2012-06-09 20:23:32 -04:00
Asher Baker 123a5c6f66 Worked around possible admin detection issues on newer engines (bug 5327, r=psychonic). 2012-06-09 20:00:55 -04:00
Asher Baker 9e20e01ee4 Lowered default think time to 20ms (bug 4733, r=psychonic). 2012-06-08 20:31:42 -04:00
Asher Baker c275bcdb96 Fixed CStrike extension shutdown crash (bug 5328, r=psychonic). 2012-06-08 20:29:06 -04:00
Nicholas Hastings 0036fe29cd Updated TF2 gamedata. 2012-05-31 22:47:08 -04:00
Nicholas Hastings 6e6655f577 Fixed compile error on gcc. 2012-05-31 07:43:11 -04:00
Nicholas Hastings 66220ba56a Merge. 2012-05-31 07:35:05 -04:00
Nicholas Hastings d0e54cafe7 Fixed crash when passed bad ref in ReferenceToEntity (bug 5330, r=asherkin). 2012-05-31 07:32:07 -04:00
Tony 20bdc2b435 Added GetGameTickCount native (bug 5209, r=psychonic). 2012-05-30 14:14:54 +01:00
Asher Baker ad2650b0aa Fixed intermittent crashes in clientprefs (bug 4660, r=psychonic). 2012-05-29 17:43:33 +01:00
Asher Baker 4ac8430608 Fixed erroneous const-qualification of name param of GetAdminUsername (bug 5267, r=psychonic). 2012-05-28 00:47:55 +01:00
Asher Baker c6405bfb63 Merge. 2012-05-27 01:56:15 +01:00
Ryan Stecker cdbaac15a1 Exposed extensions list to clients (bug 5221, r=asherkin). 2012-05-27 01:44:02 +01:00
Tony d2cf4e3364 Adding missing SetMenuNoVoteButton native declaration (bug 4522, r=asherkin). 2012-05-27 01:40:53 +01:00
Asher Baker bce587edca Fixed possible crash when reloading a plugin with an invalid binary (bug 5288, r=psychonic). 2012-05-27 01:39:05 +01:00
Asher Baker f55a11b8cf Fixed intermittent crash when looking for an invalid signature (bug 5301, r=fyren). 2012-05-27 01:37:23 +01:00
Asher Baker 71f73ddc3a Fixed error when reloading dependant plugins using aliased natives (bug 5302, r=psychonic). 2012-05-27 01:34:46 +01:00
FlaminSarge 693c0cf41b Updated TF2 condition defines (bug 5259, r=psychonic). 2012-05-26 19:17:49 -04:00
FlaminSarge ce77a86808 Fixed client console vote output missing newlines (bug 5205, r=psychonic). 2012-05-26 18:25:28 -04:00
FlaminSarge a8242fd7e3 Fixed client console vote progress not displaying in some cases (bug 5290, r=psychonic). 2012-05-26 16:25:05 -04:00
Nicholas Hastings cfe8757570 Log functions now respect sv_logecho (bug 5135, r=asherkin). 2012-05-24 16:10:01 +01:00
Asher Baker 896d949a82 Made clientprefs attempt to reconnect to the database on map change (bug 4745, r=dvander). 2012-05-24 16:07:10 +01:00
Asher Baker 391807c8ce Updated the location of the blue crab (bug 4959, r=pred). 2012-05-24 16:04:51 +01:00
Asher Baker 39539757cf Fixed typo in logic bridge (bug 5287, r=psychonic). 2012-05-24 15:59:34 +01:00
Asher Baker 479b1e8225 Fixed Float negation operator (bug 5292, r=psychonic). 2012-05-24 15:57:55 +01:00
Nicholas Hastings 956259b336 Updated CS:S gamedata for today's update. 2012-05-22 17:32:04 -04:00
Nicholas Hastings e6b7b79127 Fixed tier0 error and broken SourceTV detection on L4D1 (bug 5216, r=asherkin). 2012-04-28 13:53:33 -04:00
Nicholas Hastings a1f6c94f1e Updated Garry's Mod gamedata. 2012-04-28 13:47:35 -04:00
Asher Baker 5f312fb76e Fixed client serials not being unique on Windows (bug 5285, r=psychonic). 2012-04-26 17:03:44 +01:00
Asher Baker b231caae50 Updated TF2 RemoveDisguise gamedata. 2012-04-18 21:16:01 -04:00
Paul Clothier 5596e65f6d Fixed IServer in SDKTools on Windows. 2012-04-17 22:27:03 -04:00
Nicholas Hastings fc7f7efc4b Fixed tempents gamedata on GMod. 2012-04-18 07:17:18 -04:00
Ryan Stecker 8a73628451 Updated more TF2 gamedata. 2012-04-18 07:12:19 -04:00
Ryan Stecker 1928cb7e33 Updated Windows ep2v tempent gamedata. 2012-04-18 00:16:34 -04:00
Nicholas Hastings 67b7df2a4e Always trust Wazz. 2012-04-17 22:12:44 -04:00
Nicholas Hastings fd5033120a Fixed tempent gamedata on Windows. Fixed cstrike gamedata. 2012-04-17 22:07:25 -04:00
Nicholas Hastings 080ee88b17 Updated more ep2v gamedata. 2012-04-17 21:17:32 -04:00
Paul Clothier 7951515ff3 Updated ep2v and TF2 gamedata. 2012-04-17 21:17:09 -04:00
Nicholas Hastings d1568472c6 Re-adding -dev tag and bumping version. 2012-04-13 22:41:49 -04:00
Nicholas Hastings 227e2e1b0c Added tag sourcemod-1.4.2 for changeset 0026e1394254 2012-04-13 22:40:32 -04:00
Nicholas Hastings 7b0bbbd463 Removing -dev tags from version. 2012-04-13 20:37:24 -04:00
Nicholas Hastings b1a904c7a5 Updated changelog for version 1.4.2. 2012-04-13 20:35:57 -04:00
David Anderson 7a124f2aa2 Fix bug in lower-casing API guarantee (r=fyren). 2012-04-13 16:50:44 -07:00
FlaminSarge b002adc509 Fixed potential player lag issue when "drugged" (bug 5217, r=asherkin). 2012-04-14 00:15:50 +01:00
FlaminSarge 2e34f2e67c Fixed sm_drug not toggling correctly (bug 5218, r=psychonic). 2012-04-14 00:12:56 +01:00
Ryan Stecker 315a5c642e Fixed return value of VoteMenuToAll (bug 5254, r=asherkin). 2012-04-14 00:07:39 +01:00
Drifter 3697bc3866 Fixed crash with StoreToAddress if memory wasn't writable (bug 5252, r=asherkin). 2012-04-14 00:00:25 +01:00
Scott Ehlert a63ea2a68d Fixed build scripts for OS X 10.7 build slave. 2012-03-21 21:35:07 -05:00
Scott Ehlert e299092ff5 Removed hardcoded SDK path for curl on OS X. 2012-03-21 22:04:05 -05:00
Reuben Morais f0b69facb3 Removed hardcoded SDK path on OS X (bug 5032, r=ds). 2012-03-21 21:27:26 -05:00
Reuben Morais ab8563f0d4 Followup, re-added check for invalid HL2SDK paths (bug 5023, r=ds). 2012-03-21 21:25:34 -05:00
Michael Busby 1d666b09e2 Fixed StoreToAddress always writing 32 bits and throwing an error (bug 5248, r=asherkin). 2012-03-11 18:07:24 -05:00
Nicholas Hastings 8fcd0478a1 Added better cross-engine support for finding Valve commandline (bug 5216, r=asherkin). 2012-03-04 15:19:58 -05:00
Nicholas Hastings 3c50ed1cf2 Added new TFHoliday_Christmas to TFHoliday enum (bug 5194, r=asherkin). 2011-12-16 09:43:05 -05:00
Nicholas Hastings 3a28a09f15 Added new TF2 weapon defines (r=me). 2011-12-16 00:24:03 -05:00
Nicholas Hastings 8e8f284cc3 Updated linux CS:S ClanTagOffset gamedata. 2011-12-08 14:52:20 -05:00
Nicholas Hastings fa4e61b877 Bump to 1.4.2-dev. 2011-12-07 22:47:31 -05:00
Nicholas Hastings a39d94ffe9 Added tag sourcemod-1.4.1 for changeset f74e1dea2ef2 2011-12-07 21:12:31 -05:00
61 changed files with 1165 additions and 429 deletions
+4
View File
@@ -4,3 +4,7 @@ e877885fac80be71822641f7a9122cebc9812521 sourcemod-1.1.1
b3ffa8a4511c4eadaf533fc790aa6b14f7f0c6ea sourcemod-1.1.2 b3ffa8a4511c4eadaf533fc790aa6b14f7f0c6ea sourcemod-1.1.2
3a73bbf60f34befa9b66be03fa5974b394bb3411 sourcemod-1.2.0 3a73bbf60f34befa9b66be03fa5974b394bb3411 sourcemod-1.2.0
ddd707c3454c382db5db9d28148cd19227f44759 sourcemod-1.4.0 ddd707c3454c382db5db9d28148cd19227f44759 sourcemod-1.4.0
f74e1dea2ef2c5a12b5238badc0e877106804191 sourcemod-1.4.1
0026e1394254c392244c7b140e3075974ab5a6db sourcemod-1.4.2
608f4c94872e3624404a1d105284163bc57fadf7 sourcemod-1.4.3
29186166cc99e73c61995a0bd0450fc6c36466bc sourcemod-1.4.4
+6 -4
View File
@@ -79,8 +79,9 @@ class SM:
oldhead = head oldhead = head
head, tail = os.path.split(head) head, tail = os.path.split(head)
if i.startswith('HL2SDK'): if i.startswith('HL2SDK'):
(info, sdk) = findDictByKey(self.possibleSdks, 'sdk', i) if head != None and head != oldhead:
self.sdkInfo[sdk] = info (info, sdk) = findDictByKey(self.possibleSdks, 'sdk', i)
self.sdkInfo[sdk] = info
elif head == None or head == oldhead: elif head == None or head == oldhead:
raise Exception('Could not find a valid path for {0}'.format(i)) raise Exception('Could not find a valid path for {0}'.format(i))
AMBuild.cache.CacheVariable(i, path) AMBuild.cache.CacheVariable(i, path)
@@ -119,6 +120,9 @@ class SM:
self.compiler.AddToListVar('CXXFLAGS', '-fno-threadsafe-statics') self.compiler.AddToListVar('CXXFLAGS', '-fno-threadsafe-statics')
self.compiler.AddToListVar('CXXFLAGS', '-Wno-non-virtual-dtor') self.compiler.AddToListVar('CXXFLAGS', '-Wno-non-virtual-dtor')
self.compiler.AddToListVar('CXXFLAGS', '-Wno-overloaded-virtual') self.compiler.AddToListVar('CXXFLAGS', '-Wno-overloaded-virtual')
if (self.vendor == 'gcc' and cxx.majorVersion >= 4 and cxx.minorVersion >= 3) or \
(self.vendor == 'clang' and cxx.majorVersion >= 3):
self.compiler.AddToListVar('CXXFLAGS', '-Wno-delete-non-virtual-dtor')
self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H') self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H')
self.compiler.AddToListVar('CDEFINES', 'GNUC') self.compiler.AddToListVar('CDEFINES', 'GNUC')
if self.vendor == 'gcc': if self.vendor == 'gcc':
@@ -183,8 +187,6 @@ class SM:
if self.vendor == 'clang': if self.vendor == 'clang':
self.compiler.AddToListVar('POSTLINKFLAGS', '-lgcc_eh') self.compiler.AddToListVar('POSTLINKFLAGS', '-lgcc_eh')
elif AMBuild.target['platform'] == 'darwin': elif AMBuild.target['platform'] == 'darwin':
self.compiler.AddToListVar('CFLAGS', ['-isysroot',
'/Developer/SDKs/MacOSX10.5.sdk'])
self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5') self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5')
self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386']) self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386'])
self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++') self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++')
+90
View File
@@ -2,6 +2,96 @@ SourceMod Changelog
----------------------------- -----------------------------
SourceMod 1.4.5 [2012-09-03]
URL: http://wiki.alliedmods.net/SourceMod_1.4.5_Release_Notes
User Changes:
- Updated support for latest Source 2009 engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
- Updated Nuclear Dawn, Dino D-Day, and Zombie Panic gamedata.
- Added compatibility for running on Metamod:Source 1.9.0.
- Fixed very minor memory leaks in CStrike extension (bug 5456) (KyleS).
- Fixed crash from plugins accessing netprops too early (bug 5297) (KyleS).
- Fixed crash from plugins trying to access nested datadesc members (bug 5446).
Developer Changes:
- Added new TF2 weapon and custom dmg defines.
- Added new TF2 TFHoliday value (bug 5436) (Powerlord).
- Fixed IClientListener::InterceptClientConnect not being able to properly block connections (bug 5461) (PimpinJuice).
- Fixed PrepSDKCall_SetSignature native not working with symbol names on L4D2 linux (bug 5440).
- Fixed resolution of GetProfilerTime native on non-Windows platforms.
-----------------------------
SourceMod 1.4.4 [2012-07-03]
URL: http://wiki.alliedmods.net/SourceMod_1.4.4_Release_Notes
User Changes:
- Updated support for latest Source 2009 engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
- Updated Nuclear Dawn gamedata.
- Fixed a crash that could occur when selecting an option on a clientprefs prefab menu (bug 5374).
Developer Changes:
- Added new TF2 weapon and custom dmg defines.
- Added new TF2 TFHoliday value (bug 5364) (Powerlord).
- Updated sample extension to properly fill ninvoke with INativeInvoker ptr (bug 5340) (Afronanny).
-----------------------------
SourceMod 1.4.3 [2012-06-09]
URL: http://wiki.alliedmods.net/SourceMod_1.4.3_Release_Notes
User Changes:
- Updated support for latest OrangeBox engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
- Made clientprefs attempt to reconnect to the database on map change (bug 4745).
- Log functions now respect sv_logecho (bug 5135).
- Fixed client console vote output (bug 5290, bug 5205) (FlaminSarge).
- Fixed error when reloading dependant plugins using aliased natives (bug 5302).
- Fixed intermittent crash when looking for an invalid signature (bug 5301).
- Fixed possible crash when reloading a plugin with an invalid binary (bug 5288).
- Exposed extensions list to clients (bug 5221) (VoiDeD).
- Fixed intermittent crashes in clientprefs (bug 4660).
- Fixed crash when passing an invalid entity reference to ReferenceToEntity (bug 5330).
- Fixed cstrike extension crash on shutdown (bug 5328).
- Lowered threading API think time to 20ms, making threaded MySQL queries complete faster (bug 4733).
Developer Changes:
- Fixed client serials not being unique on Windows (bug 5285).
- Fixed broken SourceTV detection on L4D1 (bug 5216).
- Fixed Float negation operator (bug 5292).
- Updated TF2 condition defines (bug 5259) (FlaminSarge).
- Adding missing SetMenuNoVoteButton native declaration (bug 4522) (GoD-Tony).
- Fixed erroneous const-qualification of name param of GetAdminUsername (bug 5267).
- Added GetGameTickCount native (bug 5209) (GoD-Tony).
-----------------------------
SourceMod 1.4.2 [2011-04-13]
URL: http://wiki.alliedmods.net/SourceMod_1.4.2_Release_Notes
User Changes:
- Updated support for latest OrangeBox engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
- Fixed regression in SourceMod 1.4.0 causing SM to cause load errors on The Ship (bug 5216).
- Fixed toggling and player lag issues with sm_drug command (bugs 5217, 5218) (FlaminSarge).
Developer Changes:
- Updated TF2-specific defines and enums (bug 5194).
- Fixed StoreToAddress always writing 32 bits and throwing an error (bug 5248) (ProdigySim).
- Fixed crash with StoreToAddress if memory wasn't writable (bug 5252) (Dr!fter).
- Fixed return value of VoteMenuToAll (bug 5254) (VoiDeD).
- Fixed bug in command lower-casing API guarantee
-----------------------------
SourceMod 1.4.1 [2011-12-07] SourceMod 1.4.1 [2011-12-07]
URL: http://wiki.alliedmods.net/SourceMod_1.4.1_Release_Notes URL: http://wiki.alliedmods.net/SourceMod_1.4.1_Release_Notes
+5
View File
@@ -664,6 +664,11 @@ cell_t ConsoleDetours::InternalDispatch(int client, const CCommand& args)
char name[255]; char name[255];
const char *realname = args.Arg(0); const char *realname = args.Arg(0);
size_t len = strlen(realname); size_t len = strlen(realname);
// Disallow command strings that are too long, for now.
if (len >= sizeof(name) - 1)
return Pl_Continue;
for (size_t i = 0; i < len; i++) for (size_t i = 0; i < len; i++)
{ {
if (realname[i] >= 'A' && realname[i] <= 'Z') if (realname[i] >= 'A' && realname[i] <= 'Z')
+89
View File
@@ -37,6 +37,7 @@
#include "sourcemm_api.h" #include "sourcemm_api.h"
#include "sm_srvcmds.h" #include "sm_srvcmds.h"
#include "sm_stringutil.h" #include "sm_stringutil.h"
#include "PlayerManager.h"
CExtensionManager g_Extensions; CExtensionManager g_Extensions;
IdentityType_t g_ExtType; IdentityType_t g_ExtType;
@@ -1284,6 +1285,94 @@ void CExtensionManager::OnRootConsoleCommand(const char *cmdname, const CCommand
g_RootMenu.DrawGenericOption("unload", "Unload an extension"); g_RootMenu.DrawGenericOption("unload", "Unload an extension");
} }
void CExtensionManager::ListExtensionsToClient(CPlayer *player, const CCommand &args)
{
char buffer[256];
int numExtensions = m_Libs.size();
edict_t *edict = player->GetEdict();
unsigned int id = 0;
unsigned int start = 0;
if (!numExtensions)
{
ClientConsolePrint(edict, "[SM] No extensions found.");
return;
}
if (args.ArgC() > 2)
{
start = atoi(args.Arg(2));
}
CExtension *ext;
SourceHook::List<CExtension *>::iterator iter;
for (iter = m_Libs.begin();
iter != m_Libs.end();
iter++)
{
ext = (*iter);
char error[255];
if (!ext->IsRunning(error, sizeof(error)))
{
continue;
}
id++;
if (id < start)
{
continue;
}
if (id - start > 10)
{
break;
}
IExtensionInterface *api = ext->GetAPI();
const char *name = api->GetExtensionName();
const char *version = api->GetExtensionVerString();
const char *author = api->GetExtensionAuthor();
const char *description = api->GetExtensionDescription();
size_t len = UTIL_Format(buffer, sizeof(buffer), " \"%s\"", name);
if (version != NULL && IS_STR_FILLED(version))
{
len += UTIL_Format(&buffer[len], sizeof(buffer)-len, " (%s)", version);
}
if (author != NULL && IS_STR_FILLED(author))
{
len += UTIL_Format(&buffer[len], sizeof(buffer)-len, " by %s", author);
}
if (description != NULL && IS_STR_FILLED(description))
{
len += UTIL_Format(&buffer[len], sizeof(buffer)-len, ": %s", description);
}
ClientConsolePrint(edict, "%s", buffer);
}
while (iter != m_Libs.end())
{
char error[255];
if ((*iter)->IsRunning(error, sizeof(error)))
{
break;
}
}
if (iter != m_Libs.end())
{
ClientConsolePrint(edict, "To see more, type \"sm exts %d\"", id);
}
}
CExtension *CExtensionManager::GetExtensionFromIdent(IdentityToken_t *ptr) CExtension *CExtensionManager::GetExtensionFromIdent(IdentityToken_t *ptr)
{ {
if (ptr->type == g_ExtType) if (ptr->type == g_ExtType)
+4
View File
@@ -45,6 +45,8 @@
#include "PluginSys.h" #include "PluginSys.h"
#include "NativeOwner.h" #include "NativeOwner.h"
class CPlayer;
using namespace SourceMod; using namespace SourceMod;
using namespace SourceHook; using namespace SourceHook;
@@ -175,6 +177,8 @@ public:
bool LibraryExists(const char *library); bool LibraryExists(const char *library);
void CallOnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax); void CallOnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax);
void AddRawDependency(IExtension *ext, IdentityToken_t *other, void *iface); void AddRawDependency(IExtension *ext, IdentityToken_t *other, void *iface);
public:
void ListExtensionsToClient(CPlayer *player, const CCommand &args);
public: public:
CExtension *GetExtensionFromIdent(IdentityToken_t *ptr); CExtension *GetExtensionFromIdent(IdentityToken_t *ptr);
void Shutdown(); void Shutdown();
+146 -6
View File
@@ -38,8 +38,28 @@
#include <IGameConfigs.h> #include <IGameConfigs.h>
#include <compat_wrappers.h> #include <compat_wrappers.h>
#include <Logger.h> #include <Logger.h>
#include "LibrarySys.h"
#include "logic_bridge.h" #include "logic_bridge.h"
typedef ICommandLine *(*FakeGetCommandLine)();
#if defined _WIN32
#define TIER0_NAME "tier0.dll"
#define VSTDLIB_NAME "vstdlib.dll"
#elif defined __APPLE__
#define TIER0_NAME "libtier0.dylib"
#define VSTDLIB_NAME "libvstdlib.dylib"
#elif defined __linux__
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_LEFT4DEAD || SOURCE_ENGINE == SE_LEFT4DEAD2
#define TIER0_NAME "libtier0.so"
#define VSTDLIB_NAME "libvstdlib.so"
#else
#define TIER0_NAME "tier0_i486.so"
#define VSTDLIB_NAME "vstdlib_i486.so"
#endif
#endif
CHalfLife2 g_HL2; CHalfLife2 g_HL2;
ConVar *sv_lan = NULL; ConVar *sv_lan = NULL;
@@ -131,6 +151,12 @@ void CHalfLife2::OnSourceModAllInitialized()
} }
void CHalfLife2::OnSourceModAllInitialized_Post() void CHalfLife2::OnSourceModAllInitialized_Post()
{
InitLogicalEntData();
InitCommandLine();
}
void CHalfLife2::InitLogicalEntData()
{ {
char *addr = NULL; char *addr = NULL;
@@ -196,6 +222,64 @@ void CHalfLife2::OnSourceModAllInitialized_Post()
} }
} }
void CHalfLife2::InitCommandLine()
{
char path[PLATFORM_MAX_PATH];
char error[256];
g_SourceMod.BuildPath(Path_Game, path, sizeof(path), "../bin/" TIER0_NAME);
if (!g_LibSys.IsPathFile(path))
{
g_Logger.LogError("Could not find path for: " TIER0_NAME);
return;
}
ILibrary *lib = g_LibSys.OpenLibrary(path, error, sizeof(error));
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine_Tier0");
/* '_Tier0' dropped on Alien Swarm version */
if (m_pGetCommandLine == NULL)
{
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine");
}
if (m_pGetCommandLine == NULL)
{
/* We probably have a Ship engine. */
lib->CloseLibrary();
g_SourceMod.BuildPath(Path_Game, path, sizeof(path), "../bin/" VSTDLIB_NAME);
if (!g_LibSys.IsPathFile(path))
{
g_Logger.LogError("Could not find path for: " VSTDLIB_NAME);
return;
}
if ((lib = g_LibSys.OpenLibrary(path, error, sizeof(error))) == NULL)
{
g_Logger.LogError("Could not load %s: %s", path, error);
return;
}
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine");
if (m_pGetCommandLine == NULL)
{
g_Logger.LogError("Could not locate any command line functionality");
}
lib->CloseLibrary();
}
}
ICommandLine *CHalfLife2::GetValveCommandLine()
{
if (!m_pGetCommandLine)
return NULL;
return ((FakeGetCommandLine)((FakeGetCommandLine *)m_pGetCommandLine))();
}
#if !defined METAMOD_PLAPI_VERSION || PLAPI_VERSION < 11 #if !defined METAMOD_PLAPI_VERSION || PLAPI_VERSION < 11
bool CHalfLife2::IsOriginalEngine() bool CHalfLife2::IsOriginalEngine()
{ {
@@ -245,8 +329,13 @@ bool UTIL_FindInSendTable(SendTable *pTable,
return false; return false;
} }
typedescription_t *UTIL_FindInDataMap(datamap_t *pMap, const char *name) typedescription_t *UTIL_FindInDataMap(datamap_t *pMap, const char *name, bool *isNested)
{ {
if (isNested)
{
*isNested = false;
}
while (pMap) while (pMap)
{ {
for (int i=0; i<pMap->dataNumFields; i++) for (int i=0; i<pMap->dataNumFields; i++)
@@ -261,10 +350,16 @@ typedescription_t *UTIL_FindInDataMap(datamap_t *pMap, const char *name)
} }
if (pMap->dataDesc[i].td) if (pMap->dataDesc[i].td)
{ {
typedescription_t *_td; if (isNested)
if ((_td=UTIL_FindInDataMap(pMap->dataDesc[i].td, name)) != NULL)
{ {
return _td; *isNested = true;
return NULL;
} else { // Use the old behaviour, we dont want to spring this on extensions - even if they're doing bad things.
typedescription_t *_td;
if ((_td=UTIL_FindInDataMap(pMap->dataDesc[i].td, name, isNested)) != NULL)
{
return _td;
}
} }
} }
} }
@@ -357,6 +452,11 @@ SendProp *CHalfLife2::FindInSendTable(const char *classname, const char *offset)
} }
typedescription_t *CHalfLife2::FindInDataMap(datamap_t *pMap, const char *offset) typedescription_t *CHalfLife2::FindInDataMap(datamap_t *pMap, const char *offset)
{
return this->FindInDataMap(pMap, offset, NULL);
}
typedescription_t *CHalfLife2::FindInDataMap(datamap_t *pMap, const char *offset, bool *isNested)
{ {
typedescription_t *td = NULL; typedescription_t *td = NULL;
DataMapTrie &val = m_Maps[pMap]; DataMapTrie &val = m_Maps[pMap];
@@ -367,7 +467,7 @@ typedescription_t *CHalfLife2::FindInDataMap(datamap_t *pMap, const char *offset
} }
if (!sm_trie_retrieve(val.trie, offset, (void **)&td)) if (!sm_trie_retrieve(val.trie, offset, (void **)&td))
{ {
if ((td = UTIL_FindInDataMap(pMap, offset)) != NULL) if ((td = UTIL_FindInDataMap(pMap, offset, isNested)) != NULL)
{ {
sm_trie_insert(val.trie, offset, td); sm_trie_insert(val.trie, offset, td);
} }
@@ -748,6 +848,11 @@ cell_t CHalfLife2::EntityToReference(CBaseEntity *pEntity)
CBaseEntity *CHalfLife2::ReferenceToEntity(cell_t entRef) CBaseEntity *CHalfLife2::ReferenceToEntity(cell_t entRef)
{ {
if ((unsigned)entRef == INVALID_EHANDLE_INDEX)
{
return NULL;
}
CEntInfo *pInfo = NULL; CEntInfo *pInfo = NULL;
if (entRef & (1<<31)) if (entRef & (1<<31))
@@ -757,7 +862,7 @@ CBaseEntity *CHalfLife2::ReferenceToEntity(cell_t entRef)
CBaseHandle hndl(hndlValue); CBaseHandle hndl(hndlValue);
pInfo = LookupEntity(hndl.GetEntryIndex()); pInfo = LookupEntity(hndl.GetEntryIndex());
if (pInfo->m_SerialNumber != hndl.GetSerialNumber()) if (!pInfo || pInfo->m_SerialNumber != hndl.GetSerialNumber())
{ {
return NULL; return NULL;
} }
@@ -920,3 +1025,38 @@ int CHalfLife2::GetSendPropOffset(SendProp *prop)
return prop->GetOffset(); return prop->GetOffset();
} }
const char *CHalfLife2::GetEntityClassname(edict_t * pEdict)
{
if (pEdict == NULL || pEdict->IsFree())
{
return NULL;
}
IServerUnknown *pUnk = pEdict->GetUnknown();
if (pUnk == NULL)
{
return NULL;
}
CBaseEntity * pEntity = pUnk->GetBaseEntity();
if (pEntity == NULL)
{
return NULL;
}
return GetEntityClassname(pEntity);
}
const char *CHalfLife2::GetEntityClassname(CBaseEntity *pEntity)
{
static int offset = -1;
if (offset == -1)
{
datamap_t *pMap = GetDataMap(pEntity);
typedescription_t *pDesc = FindInDataMap(pMap, "m_iClassname");
offset = GetTypeDescOffs(pDesc);
}
return *(const char **)(((unsigned char *)pEntity) + offset);
}
+9
View File
@@ -44,6 +44,7 @@
#include <server_class.h> #include <server_class.h>
#include <datamap.h> #include <datamap.h>
#include <ihandleentity.h> #include <ihandleentity.h>
#include <tier0/icommandline.h>
class CCommand; class CCommand;
@@ -114,6 +115,7 @@ public: //IGameHelpers
datamap_t *GetDataMap(CBaseEntity *pEntity); datamap_t *GetDataMap(CBaseEntity *pEntity);
ServerClass *FindServerClass(const char *classname); ServerClass *FindServerClass(const char *classname);
typedescription_t *FindInDataMap(datamap_t *pMap, const char *offset); typedescription_t *FindInDataMap(datamap_t *pMap, const char *offset);
typedescription_t *FindInDataMap(datamap_t *pMap, const char *offset, bool *isNested);
void SetEdictStateChanged(edict_t *pEdict, unsigned short offset); void SetEdictStateChanged(edict_t *pEdict, unsigned short offset);
bool TextMsg(int client, int dest, const char *msg); bool TextMsg(int client, int dest, const char *msg);
bool HintTextMsg(int client, const char *msg); bool HintTextMsg(int client, const char *msg);
@@ -136,6 +138,9 @@ public: //IGameHelpers
cell_t EntityToBCompatRef(CBaseEntity *pEntity); cell_t EntityToBCompatRef(CBaseEntity *pEntity);
void *GetGlobalEntityList(); void *GetGlobalEntityList();
int GetSendPropOffset(SendProp *prop); int GetSendPropOffset(SendProp *prop);
ICommandLine *GetValveCommandLine();
const char *GetEntityClassname(edict_t *pEdict);
const char *GetEntityClassname(CBaseEntity *pEntity);
public: public:
void AddToFakeCliCmdQueue(int client, int userid, const char *cmd); void AddToFakeCliCmdQueue(int client, int userid, const char *cmd);
void ProcessFakeCliCmdQueue(); void ProcessFakeCliCmdQueue();
@@ -151,6 +156,9 @@ public:
#endif #endif
private: private:
DataTableInfo *_FindServerClass(const char *classname); DataTableInfo *_FindServerClass(const char *classname);
private:
void InitLogicalEntData();
void InitCommandLine();
private: private:
Trie *m_pClasses; Trie *m_pClasses;
List<DataTableInfo *> m_Tables; List<DataTableInfo *> m_Tables;
@@ -163,6 +171,7 @@ private:
CStack<DelayedFakeCliCmd *> m_FreeCmds; CStack<DelayedFakeCliCmd *> m_FreeCmds;
CStack<CachedCommandInfo> m_CommandStack; CStack<CachedCommandInfo> m_CommandStack;
Queue<DelayedKickInfo> m_DelayedKicks; Queue<DelayedKickInfo> m_DelayedKicks;
void *m_pGetCommandLine;
}; };
extern CHalfLife2 g_HL2; extern CHalfLife2 g_HL2;
+7 -1
View File
@@ -265,6 +265,8 @@ void Logger::LogToOpenFileEx(FILE *fp, const char *msg, va_list ap)
return; return;
} }
static ConVar *sv_logecho = icvar->FindVar("sv_logecho");
char buffer[3072]; char buffer[3072];
UTIL_FormatArgs(buffer, sizeof(buffer), msg, ap); UTIL_FormatArgs(buffer, sizeof(buffer), msg, ap);
@@ -275,7 +277,11 @@ void Logger::LogToOpenFileEx(FILE *fp, const char *msg, va_list ap)
strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime); strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime);
fprintf(fp, "L %s: %s\n", date, buffer); fprintf(fp, "L %s: %s\n", date, buffer);
g_SMAPI->ConPrintf("L %s: %s\n", date, buffer);
if (!sv_logecho || sv_logecho->GetBool())
{
g_SMAPI->ConPrintf("L %s: %s\n", date, buffer);
}
} }
void Logger::LogToFileOnlyEx(FILE *fp, const char *msg, va_list ap) void Logger::LogToFileOnlyEx(FILE *fp, const char *msg, va_list ap)
+3
View File
@@ -331,6 +331,9 @@ void BaseMenuStyle::ClientPressedKey(int client, unsigned int key_press)
ATTN_NORM, ATTN_NORM,
0, 0,
PITCH_NORM, PITCH_NORM,
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
0,
#endif
&pos); &pos);
} }
} }
+2 -2
View File
@@ -518,7 +518,7 @@ void VoteMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int ite
m_Votes[item]++; m_Votes[item]++;
m_NumVotes++; m_NumVotes++;
if (sm_vote_chat.GetBool() || sm_vote_console.GetBool()) if (sm_vote_chat.GetBool() || sm_vote_console.GetBool() || sm_vote_client_console.GetBool())
{ {
static char buffer[1024]; static char buffer[1024];
ItemDrawInfo dr; ItemDrawInfo dr;
@@ -560,7 +560,7 @@ void VoteMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int ite
if (sm_vote_client_console.GetBool()) if (sm_vote_client_console.GetBool())
{ {
engine->ClientPrintf(pPlayer->GetEdict(), buffer); ClientConsolePrint(pPlayer->GetEdict(), buffer);
} }
} }
} }
+22 -3
View File
@@ -44,7 +44,6 @@
#include "HalfLife2.h" #include "HalfLife2.h"
#include <inetchannel.h> #include <inetchannel.h>
#include <iclient.h> #include <iclient.h>
#include <tier0/icommandline.h>
#include <IGameConfigs.h> #include <IGameConfigs.h>
#include "ExtensionSys.h" #include "ExtensionSys.h"
#include <sourcemod_version.h> #include <sourcemod_version.h>
@@ -244,7 +243,8 @@ void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int cl
// clientMax will not necessarily be correct here (such as on late SourceTV enable) // clientMax will not necessarily be correct here (such as on late SourceTV enable)
m_maxClients = gpGlobals->maxClients; m_maxClients = gpGlobals->maxClients;
m_bIsSourceTVActive = (tv_enable && tv_enable->GetBool() && CommandLine()->FindParm("-nohltv") == 0); ICommandLine *commandLine = g_HL2.GetValveCommandLine();
m_bIsSourceTVActive = (tv_enable && tv_enable->GetBool() && (!commandLine || commandLine->FindParm("-nohltv") == 0));
m_bIsReplayActive = false; m_bIsReplayActive = false;
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE #if SOURCE_ENGINE == SE_ORANGEBOXVALVE
m_bIsReplayActive = (replay_enable && replay_enable->GetBool()); m_bIsReplayActive = (replay_enable && replay_enable->GetBool());
@@ -451,7 +451,7 @@ bool PlayerManager::OnClientConnect(edict_t *pEntity, const char *pszName, const
pListener = (*iter); pListener = (*iter);
if (!pListener->InterceptClientConnect(client, reject, maxrejectlen)) if (!pListener->InterceptClientConnect(client, reject, maxrejectlen))
{ {
return false; RETURN_META_VALUE(MRES_SUPERCEDE, false);
} }
} }
@@ -745,6 +745,11 @@ void PlayerManager::OnClientCommand(edict_t *pEntity)
g_PluginSys.ListPluginsToClient(pPlayer, args); g_PluginSys.ListPluginsToClient(pPlayer, args);
RETURN_META(MRES_SUPERCEDE); RETURN_META(MRES_SUPERCEDE);
} }
else if (args.ArgC() > 1 && strcmp(args.Arg(1), "exts") == 0)
{
g_Extensions.ListExtensionsToClient(pPlayer, args);
RETURN_META(MRES_SUPERCEDE);
}
else if (args.ArgC() > 1 && strcmp(args.Arg(1), "credits") == 0) else if (args.ArgC() > 1 && strcmp(args.Arg(1), "credits") == 0)
{ {
ClientConsolePrint(pEntity, ClientConsolePrint(pEntity,
@@ -854,6 +859,20 @@ void PlayerManager::OnClientSettingsChanged(edict_t *pEntity)
const char *new_name = info ? info->GetName() : engine->GetClientConVarValue(client, "name"); const char *new_name = info ? info->GetName() : engine->GetClientConVarValue(client, "name");
const char *old_name = pPlayer->m_Name.c_str(); const char *old_name = pPlayer->m_Name.c_str();
#if SOURCE_ENGINE >= SE_LEFT4DEAD
const char *networkid_force;
if ((networkid_force = engine->GetClientConVarValue(client, "networkid_force")) && networkid_force[0] != '\0')
{
unsigned long long *steamId = (unsigned long long *)engine->GetClientSteamID(pEntity);
unsigned int accountId = steamId ? (*steamId & 0xFFFFFFFF) : 0;
g_Logger.LogMessage("\"%s<%d><STEAM_1:%d:%d><>\" has bad networkid (id \"%s\") (ip \"%s\")",
new_name, pPlayer->GetUserId(), accountId & 1, accountId >> 1, networkid_force, pPlayer->GetIPAddress());
pPlayer->Kick("NetworkID spoofing detected.");
RETURN_META(MRES_IGNORED);
}
#endif
if (strcmp(old_name, new_name) != 0) if (strcmp(old_name, new_name) != 0)
{ {
AdminId id = g_Admins.FindAdminByIdentity("name", new_name); AdminId id = g_Admins.FindAdminByIdentity("name", new_name);
+1 -1
View File
@@ -56,7 +56,7 @@ union serial_t
uint32_t value; uint32_t value;
struct struct
{ {
uint8_t index; uint32_t index : 8;
uint32_t serial : 24; uint32_t serial : 24;
} bits; } bits;
}; };
+15 -7
View File
@@ -1005,11 +1005,14 @@ LoadRes CPluginManager::_LoadPlugin(CPlugin **_plugin, const char *path, bool de
pPlugin->m_pRuntime = g_pSourcePawn2->LoadPlugin(co, fullpath, &err); pPlugin->m_pRuntime = g_pSourcePawn2->LoadPlugin(co, fullpath, &err);
if (pPlugin->m_pRuntime == NULL) if (pPlugin->m_pRuntime == NULL)
{ {
UTIL_Format(error, if (error)
maxlength, {
"Unable to load plugin (error %d: %s)", UTIL_Format(error,
err, maxlength,
g_pSourcePawn2->GetErrorString(err)); "Unable to load plugin (error %d: %s)",
err,
g_pSourcePawn2->GetErrorString(err));
}
pPlugin->m_status = Plugin_BadLoad; pPlugin->m_status = Plugin_BadLoad;
} }
else else
@@ -1020,7 +1023,10 @@ LoadRes CPluginManager::_LoadPlugin(CPlugin **_plugin, const char *path, bool de
} }
else else
{ {
UTIL_Format(error, maxlength, "%s", pPlugin->m_errormsg); if (error)
{
UTIL_Format(error, maxlength, "%s", pPlugin->m_errormsg);
}
} }
} }
} }
@@ -1504,7 +1510,9 @@ void CPluginManager::TryRefreshDependencies(CPlugin *pPlugin)
{ {
break; break;
} }
if (native->status == SP_NATIVE_UNBOUND && !(native->flags & SP_NTVFLAG_OPTIONAL)) if (native->status == SP_NATIVE_UNBOUND
&& native->name[0] != '@'
&& !(native->flags & SP_NTVFLAG_OPTIONAL))
{ {
pPlugin->SetErrorState(Plugin_Error, "Native not found: %s", native->name); pPlugin->SetErrorState(Plugin_Error, "Native not found: %s", native->name);
return; return;
+1 -1
View File
@@ -116,7 +116,7 @@ void *MemoryUtils::FindPattern(const void *libPtr, const char *pattern, size_t l
} }
ptr = reinterpret_cast<char *>(lib.baseAddress); ptr = reinterpret_cast<char *>(lib.baseAddress);
end = ptr + lib.memorySize; end = ptr + lib.memorySize - 1;
while (ptr < end) while (ptr < end)
{ {
+1 -1
View File
@@ -62,7 +62,7 @@ IGameHelpers *gamehelpers;
static void AddCorePhraseFile(const char *filename) static void AddCorePhraseFile(const char *filename)
{ {
g_pCorePhrases->AddPhraseFile("antiflood.phrases"); g_pCorePhrases->AddPhraseFile(filename);
} }
static IGameConfig *GetCoreGameConfig() static IGameConfig *GetCoreGameConfig()
+1 -1
View File
@@ -179,7 +179,7 @@ static cell_t GetProfilerTime(IPluginContext *pContext, const cell_t *params)
#else #else
int64_t start_us = int64_t(prof->start.tv_sec) * 1000000 + prof->start.tv_usec; int64_t start_us = int64_t(prof->start.tv_sec) * 1000000 + prof->start.tv_usec;
int64_t stop_us = int64_t(prof->end.tv_sec) * 1000000 + prof->end.tv_usec; int64_t stop_us = int64_t(prof->end.tv_sec) * 1000000 + prof->end.tv_usec;
fTime = double((stop_us - start_us) / 1000) / 1000.0; fTime = double(stop_us - start_us) / 1000000.0;
#endif #endif
return sp_ftoc(fTime); return sp_ftoc(fTime);
+1 -1
View File
@@ -34,7 +34,7 @@
#include "BaseWorker.h" #include "BaseWorker.h"
#define DEFAULT_THINK_TIME_MS 50 #define DEFAULT_THINK_TIME_MS 20
class ThreadWorker : public BaseWorker, public IThread class ThreadWorker : public BaseWorker, public IThread
{ {
+7
View File
@@ -43,6 +43,7 @@
#include "Logger.h" #include "Logger.h"
#include "ExtensionSys.h" #include "ExtensionSys.h"
#include <sm_trie_tpl.h> #include <sm_trie_tpl.h>
#include <sh_memory.h>
#if defined PLATFORM_WINDOWS #if defined PLATFORM_WINDOWS
#include <windows.h> #include <windows.h>
@@ -729,11 +730,17 @@ static cell_t StoreToAddress(IPluginContext *pContext, const cell_t *params)
switch(size) switch(size)
{ {
case NumberType_Int8: case NumberType_Int8:
SourceHook::SetMemAccess(addr, sizeof(uint8_t), SH_MEM_READ|SH_MEM_WRITE|SH_MEM_EXEC);
*reinterpret_cast<uint8_t*>(addr) = data; *reinterpret_cast<uint8_t*>(addr) = data;
break;
case NumberType_Int16: case NumberType_Int16:
SourceHook::SetMemAccess(addr, sizeof(uint16_t), SH_MEM_READ|SH_MEM_WRITE|SH_MEM_EXEC);
*reinterpret_cast<uint16_t*>(addr) = data; *reinterpret_cast<uint16_t*>(addr) = data;
break;
case NumberType_Int32: case NumberType_Int32:
SourceHook::SetMemAccess(addr, sizeof(uint32_t), SH_MEM_READ|SH_MEM_WRITE|SH_MEM_EXEC);
*reinterpret_cast<uint32_t*>(addr) = data; *reinterpret_cast<uint32_t*>(addr) = data;
break;
default: default:
pContext->ThrowNativeError("Invalid number types %d", size); pContext->ThrowNativeError("Invalid number types %d", size);
} }
+34 -74
View File
@@ -325,7 +325,7 @@ static cell_t GetEdictClassname(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Invalid edict (%d - %d)", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Invalid edict (%d - %d)", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
const char *cls = pEdict->GetClassName(); const char *cls = g_HL2.GetEntityClassname(pEdict);
if (!cls || cls[0] == '\0') if (!cls || cls[0] == '\0')
{ {
@@ -812,9 +812,13 @@ static cell_t FindDataMapOffs(IPluginContext *pContext, const cell_t *params)
} }
pContext->LocalToString(params[2], &offset); pContext->LocalToString(params[2], &offset);
if ((td=g_HL2.FindInDataMap(pMap, offset)) == NULL) bool isNested = false;
if ((td=g_HL2.FindInDataMap(pMap, offset, &isNested)) == NULL)
{ {
return -1; if (isNested)
return pContext->ThrowNativeError("Property \"%s\" is not safe to access for entity %d", offset, params[1]);
else
return -1;
} }
if (params[0] == 4) if (params[0] == 4)
@@ -959,12 +963,22 @@ static cell_t SetEntDataString(IPluginContext *pContext, const cell_t *params)
{ \ { \
return pContext->ThrowNativeError("Could not retrieve datamap"); \ return pContext->ThrowNativeError("Could not retrieve datamap"); \
} \ } \
if ((td = g_HL2.FindInDataMap(pMap, prop)) == NULL) \ bool isNested = false; \
if ((td = g_HL2.FindInDataMap(pMap, prop, &isNested)) == NULL) \
{ \ { \
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", \ const char *class_name = g_HL2.GetEntityClassname(pEntity); \
prop, \ if (isNested) \
params[1], \ { \
class_name); \ return pContext->ThrowNativeError("Property \"%s\" not safe to access (entity %d/%s)", \
prop, \
params[1], \
((class_name) ? class_name : "")); \
} else { \
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", \
prop, \
params[1], \
((class_name) ? class_name : "")); \
} \
} }
#define CHECK_SET_PROP_DATA_OFFSET() \ #define CHECK_SET_PROP_DATA_OFFSET() \
@@ -988,10 +1002,11 @@ static cell_t SetEntDataString(IPluginContext *pContext, const cell_t *params)
} \ } \
if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info)) \ if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info)) \
{ \ { \
const char *class_name = g_HL2.GetEntityClassname(pEntity); \
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", \ return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", \
prop, \ prop, \
params[1], \ params[1], \
class_name); \ ((class_name) ? class_name : "")); \
} \ } \
\ \
offset = info.actual_offset; \ offset = info.actual_offset; \
@@ -1082,7 +1097,6 @@ static cell_t GetEntPropArraySize(IPluginContext *pContext, const cell_t *params
{ {
CBaseEntity *pEntity; CBaseEntity *pEntity;
char *prop; char *prop;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
if (!IndexToAThings(params[1], &pEntity, &pEdict)) if (!IndexToAThings(params[1], &pEntity, &pEdict))
@@ -1090,11 +1104,6 @@ static cell_t GetEntPropArraySize(IPluginContext *pContext, const cell_t *params
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1119,10 +1128,11 @@ static cell_t GetEntPropArraySize(IPluginContext *pContext, const cell_t *params
} }
if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info)) if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info))
{ {
const char *class_name = g_HL2.GetEntityClassname(pEntity);
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)",
prop, prop,
params[1], params[1],
class_name); ((class_name) ? class_name : ""));
} }
if (info.prop->GetType() != DPT_DataTable) if (info.prop->GetType() != DPT_DataTable)
@@ -1152,7 +1162,6 @@ static cell_t GetEntProp(IPluginContext *pContext, const cell_t *params)
CBaseEntity *pEntity; CBaseEntity *pEntity;
char *prop; char *prop;
int offset; int offset;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int bit_count; int bit_count;
bool is_unsigned = false; bool is_unsigned = false;
@@ -1168,12 +1177,6 @@ static cell_t GetEntProp(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
/* TODO: Find a way to lookup classname without having an edict - Is this a guaranteed prop? */
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1251,7 +1254,6 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params)
CBaseEntity *pEntity; CBaseEntity *pEntity;
char *prop; char *prop;
int offset; int offset;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int bit_count; int bit_count;
@@ -1266,11 +1268,6 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1339,7 +1336,6 @@ static cell_t GetEntPropFloat(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1353,11 +1349,6 @@ static cell_t GetEntPropFloat(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1404,7 +1395,6 @@ static cell_t SetEntPropFloat(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1418,11 +1408,6 @@ static cell_t SetEntPropFloat(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1474,7 +1459,6 @@ static cell_t GetEntPropEnt(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1488,11 +1472,6 @@ static cell_t GetEntPropEnt(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1538,7 +1517,6 @@ static cell_t SetEntPropEnt(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1552,11 +1530,6 @@ static cell_t SetEntPropEnt(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1623,7 +1596,6 @@ static cell_t GetEntPropVector(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1637,11 +1609,6 @@ static cell_t GetEntPropVector(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1695,7 +1662,6 @@ static cell_t SetEntPropVector(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1709,11 +1675,6 @@ static cell_t SetEntPropVector(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1771,7 +1732,6 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
CBaseEntity *pEntity; CBaseEntity *pEntity;
char *prop; char *prop;
int offset; int offset;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
bool bIsStringIndex; bool bIsStringIndex;
@@ -1786,11 +1746,6 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
bIsStringIndex = false; bIsStringIndex = false;
@@ -1849,10 +1804,11 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
} }
if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info)) if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info))
{ {
const char *class_name = g_HL2.GetEntityClassname(pEntity);
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)",
prop, prop,
params[1], params[1],
class_name); ((class_name) ? class_name : ""));
} }
offset = info.actual_offset; offset = info.actual_offset;
@@ -1923,9 +1879,13 @@ static cell_t SetEntPropString(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Unable to retrieve GetDataDescMap offset"); return pContext->ThrowNativeError("Unable to retrieve GetDataDescMap offset");
} }
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
if ((td=g_HL2.FindInDataMap(pMap, prop)) == NULL) bool isNested = false;
if ((td=g_HL2.FindInDataMap(pMap, prop, &isNested)) == NULL)
{ {
return pContext->ThrowNativeError("Property \"%s\" not found for entity %d", prop, params[1]); if (isNested)
return pContext->ThrowNativeError("Property \"%s\" is not safe to access for entity %d", prop, params[1]);
else
return pContext->ThrowNativeError("Property \"%s\" not found for entity %d", prop, params[1]);
} }
if (td->fieldType != FIELD_CHARACTER) if (td->fieldType != FIELD_CHARACTER)
{ {
+11
View File
@@ -87,6 +87,11 @@ static cell_t GetGameTime(IPluginContext *pContext, const cell_t *params)
return sp_ftoc(gpGlobals->curtime); return sp_ftoc(gpGlobals->curtime);
} }
static cell_t GetGameTickCount(IPluginContext *pContext, const cell_t *params)
{
return gpGlobals->tickcount;
}
static cell_t CreateFakeClient(IPluginContext *pContext, const cell_t *params) static cell_t CreateFakeClient(IPluginContext *pContext, const cell_t *params)
{ {
if (!g_SourceMod.IsMapRunning()) if (!g_SourceMod.IsMapRunning())
@@ -446,6 +451,10 @@ static cell_t smn_IsPlayerAlive(IPluginContext *pContext, const cell_t *params)
} }
} }
#ifndef SOURCE_ENGINE_CSS
#define SOURCE_ENGINE_CSS 13
#endif
static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params) static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
{ {
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11 #if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
@@ -468,6 +477,7 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
return 32; return 32;
case SOURCE_ENGINE_EYE: case SOURCE_ENGINE_EYE:
return 33; return 33;
case SOURCE_ENGINE_CSS:
case SOURCE_ENGINE_ORANGEBOXVALVE: case SOURCE_ENGINE_ORANGEBOXVALVE:
return 35; return 35;
case SOURCE_ENGINE_LEFT4DEAD: case SOURCE_ENGINE_LEFT4DEAD:
@@ -520,6 +530,7 @@ REGISTER_NATIVES(halflifeNatives)
{"GetGameDescription", GetGameDescription}, {"GetGameDescription", GetGameDescription},
{"GetGameFolderName", GetGameFolderName}, {"GetGameFolderName", GetGameFolderName},
{"GetGameTime", GetGameTime}, {"GetGameTime", GetGameTime},
{"GetGameTickCount", GetGameTickCount},
{"GetRandomFloat", GetRandomFloat}, {"GetRandomFloat", GetRandomFloat},
{"GetRandomInt", GetRandomInt}, {"GetRandomInt", GetRandomInt},
{"IsDedicatedServer", IsDedicatedServer}, {"IsDedicatedServer", IsDedicatedServer},
+1 -1
View File
@@ -396,7 +396,7 @@ void CookieManager::OnPluginDestroyed(IPlugin *plugin)
{ {
ItemDrawInfo draw; ItemDrawInfo draw;
const char *info = clientMenu->GetItemInfo(i, &draw); const char *info = clientMenu->GetItemInfo(i, &draw);
AutoMenuData *data = (AutoMenuData *)strtol(info, NULL, 16); AutoMenuData *data = (AutoMenuData *)strtoul(info, NULL, 16);
if (data->handler->forward != NULL) if (data->handler->forward != NULL)
{ {
+28 -2
View File
@@ -105,6 +105,7 @@ bool ClientPrefs::SDK_OnLoad(char *error, size_t maxlength, bool late)
sharesys->AddNatives(myself, g_ClientPrefNatives); sharesys->AddNatives(myself, g_ClientPrefNatives);
sharesys->RegisterLibrary(myself, "clientprefs"); sharesys->RegisterLibrary(myself, "clientprefs");
identity = sharesys->CreateIdentity(sharesys->CreateIdentType("ClientPrefs"), this);
g_CookieManager.cookieDataLoadedForward = forwards->CreateForward("OnClientCookiesCached", ET_Ignore, 1, NULL, Param_Cell); g_CookieManager.cookieDataLoadedForward = forwards->CreateForward("OnClientCookiesCached", ET_Ignore, 1, NULL, Param_Cell);
g_CookieType = handlesys->CreateType("Cookie", g_CookieType = handlesys->CreateType("Cookie",
@@ -124,7 +125,7 @@ bool ClientPrefs::SDK_OnLoad(char *error, size_t maxlength, bool late)
NULL); NULL);
IMenuStyle *style = menus->GetDefaultStyle(); IMenuStyle *style = menus->GetDefaultStyle();
g_CookieManager.clientMenu = style->CreateMenu(&g_Handler, NULL); g_CookieManager.clientMenu = style->CreateMenu(&g_Handler, identity);
g_CookieManager.clientMenu->SetDefaultTitle("Client Settings:"); g_CookieManager.clientMenu->SetDefaultTitle("Client Settings:");
plsys->AddPluginsListener(&g_CookieManager); plsys->AddPluginsListener(&g_CookieManager);
@@ -191,10 +192,17 @@ void ClientPrefs::SDK_OnUnload()
forwards->ReleaseForward(g_CookieManager.cookieDataLoadedForward); forwards->ReleaseForward(g_CookieManager.cookieDataLoadedForward);
g_CookieManager.clientMenu->Destroy(); HandleSecurity sec = HandleSecurity(identity, identity);
HandleError err = handlesys->FreeHandle(g_CookieManager.clientMenu->GetHandle(), &sec);
if (HandleError_None != err)
{
g_pSM->LogError(myself, "Error %d when attempting to free client menu handle", err);
}
phrases->Destroy(); phrases->Destroy();
sharesys->DestroyIdentity( identity );
plsys->RemovePluginsListener(&g_CookieManager); plsys->RemovePluginsListener(&g_CookieManager);
playerhelpers->RemoveClientListener(&g_CookieManager); playerhelpers->RemoveClientListener(&g_CookieManager);
@@ -202,6 +210,19 @@ void ClientPrefs::SDK_OnUnload()
cookieMutex->DestroyThis(); cookieMutex->DestroyThis();
} }
void ClientPrefs::OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax)
{
if (Database == NULL && !databaseLoading)
{
g_pSM->LogMessage(myself, "Attempting to reconnect to database...");
databaseLoading = true;
TQueryOp *op = new TQueryOp(Query_Connect, 0);
dbi->AddToThreadQueue(op, PrioQueue_High);
}
}
void ClientPrefs::DatabaseConnect() void ClientPrefs::DatabaseConnect()
{ {
char error[256]; char error[256];
@@ -457,6 +478,11 @@ bool Translate(char *buffer,
return true; return true;
} }
IdentityToken_t *ClientPrefs::GetIdentity() const
{
return identity;
}
const char *ClientPrefs::GetExtensionVerString() const char *ClientPrefs::GetExtensionVerString()
{ {
return SM_FULL_VERSION; return SM_FULL_VERSION;
+5
View File
@@ -87,6 +87,8 @@ public:
const char *GetExtensionVerString(); const char *GetExtensionVerString();
const char *GetExtensionDateString(); const char *GetExtensionDateString();
virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax);
void DatabaseConnect(); void DatabaseConnect();
bool AddQueryToQueue(TQueryOp *query); bool AddQueryToQueue(TQueryOp *query);
@@ -138,6 +140,8 @@ public:
*/ */
//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength); //virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength);
#endif #endif
public:
IdentityToken_t *GetIdentity() const;
public: public:
IDBDriver *Driver; IDBDriver *Driver;
IDatabase *Database; IDatabase *Database;
@@ -150,6 +154,7 @@ public:
private: private:
SourceHook::List<TQueryOp *> cachedQueries; SourceHook::List<TQueryOp *> cachedQueries;
IMutex *queryMutex; IMutex *queryMutex;
IdentityToken_t *identity;
}; };
class CookieTypeHandler : public IHandleTypeDispatch class CookieTypeHandler : public IHandleTypeDispatch
+10 -5
View File
@@ -40,7 +40,7 @@ void ClientMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int i
const char *info = menu->GetItemInfo(item, &draw); const char *info = menu->GetItemInfo(item, &draw);
AutoMenuData *data = (AutoMenuData *)strtol(info, NULL, 16); AutoMenuData *data = (AutoMenuData *)strtoul(info, NULL, 16);
if (data->handler->forward != NULL) if (data->handler->forward != NULL)
{ {
@@ -57,7 +57,7 @@ void ClientMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int i
return; return;
} }
IBaseMenu *submenu = menus->GetDefaultStyle()->CreateMenu(&g_AutoHandler, NULL); IBaseMenu *submenu = menus->GetDefaultStyle()->CreateMenu(&g_AutoHandler, g_ClientPrefs.GetIdentity());
char message[256]; char message[256];
@@ -94,7 +94,7 @@ unsigned int ClientMenuHandler::OnMenuDisplayItem(IBaseMenu *menu,
const char *info = menu->GetItemInfo(item, &draw); const char *info = menu->GetItemInfo(item, &draw);
AutoMenuData *data = (AutoMenuData *)strtol(info, NULL, 16); AutoMenuData *data = (AutoMenuData *)strtoul(info, NULL, 16);
if (data->handler->forward != NULL) if (data->handler->forward != NULL)
{ {
@@ -122,7 +122,7 @@ void AutoMenuHandler::OnMenuSelect(SourceMod::IBaseMenu *menu, int client, unsig
const char *info = menu->GetItemInfo(item, &draw); const char *info = menu->GetItemInfo(item, &draw);
AutoMenuData *data = (AutoMenuData *)strtol(info, NULL, 16); AutoMenuData *data = (AutoMenuData *)strtoul(info, NULL, 16);
switch (data->type) switch (data->type)
{ {
@@ -175,5 +175,10 @@ void AutoMenuHandler::OnMenuSelect(SourceMod::IBaseMenu *menu, int client, unsig
void AutoMenuHandler::OnMenuEnd(IBaseMenu *menu, MenuEndReason reason) void AutoMenuHandler::OnMenuEnd(IBaseMenu *menu, MenuEndReason reason)
{ {
menu->Destroy(true); HandleSecurity sec = HandleSecurity(g_ClientPrefs.GetIdentity(), g_ClientPrefs.GetIdentity());
HandleError err = handlesys->FreeHandle(menu->GetHandle(), &sec);
if (HandleError_None != err)
{
g_pSM->LogError(myself, "Error %d when attempting to free automenu handle", err);
}
} }
+2
View File
@@ -47,4 +47,6 @@ void RegNatives::UnregisterAll()
{ {
(*iter)->Destroy(); (*iter)->Destroy();
} }
m_List.clear();
} }
+5 -5
View File
@@ -206,17 +206,17 @@ static cell_t CS_DropWeapon(IPluginContext *pContext, const cell_t *params)
} }
//Psychonic is awesome for this //Psychonic is awesome for this
sm_sendprop_info_t *spi = new sm_sendprop_info_t; sm_sendprop_info_t spi;
IServerUnknown *pUnk = (IServerUnknown *)pWeapon; IServerUnknown *pUnk = (IServerUnknown *)pWeapon;
IServerNetworkable *pNet = pUnk->GetNetworkable(); IServerNetworkable *pNet = pUnk->GetNetworkable();
if (!UTIL_FindDataTable(pNet->GetServerClass()->m_pTable, "DT_WeaponCSBase", spi, 0)) if (!UTIL_FindDataTable(pNet->GetServerClass()->m_pTable, "DT_WeaponCSBase", &spi, 0))
return pContext->ThrowNativeError("Entity index %d is not a weapon", params[2]); return pContext->ThrowNativeError("Entity index %d is not a weapon", params[2]);
if (!gamehelpers->FindSendPropInfo("CBaseCombatWeapon", "m_hOwnerEntity", spi)) if (!gamehelpers->FindSendPropInfo("CBaseCombatWeapon", "m_hOwnerEntity", &spi))
return pContext->ThrowNativeError("Invalid entity index %d for weapon", params[2]); return pContext->ThrowNativeError("Invalid entity index %d for weapon", params[2]);
CBaseHandle &hndl = *(CBaseHandle *)((uint8_t *)pWeapon + spi->actual_offset); CBaseHandle &hndl = *(CBaseHandle *)((uint8_t *)pWeapon + spi.actual_offset);
if (params[1] != hndl.GetEntryIndex()) if (params[1] != hndl.GetEntryIndex())
return pContext->ThrowNativeError("Weapon %d is not owned by client %d", params[2], params[1]); return pContext->ThrowNativeError("Weapon %d is not owned by client %d", params[2], params[1]);
@@ -312,7 +312,7 @@ static cell_t CS_GetTranslatedWeaponAlias(IPluginContext *pContext, const cell_t
pContext->LocalToString(params[2], &dest); pContext->LocalToString(params[2], &dest);
pContext->LocalToString(params[1], &weapon); pContext->LocalToString(params[1], &weapon);
char *ret = new char[128]; char *ret = NULL;
unsigned char vstk[sizeof(char *)]; unsigned char vstk[sizeof(char *)];
unsigned char *vptr = vstk; unsigned char *vptr = vstk;
-1
View File
@@ -20,7 +20,6 @@ def BuildCURL():
env = os.environ.copy() env = os.environ.copy()
env['CFLAGS'] = '-m32' env['CFLAGS'] = '-m32'
if AMBuild.target['platform'] == 'darwin': if AMBuild.target['platform'] == 'darwin':
env['CFLAGS'] += ' -isysroot /Developer/SDKs/MacOSX10.5.sdk'
env['LDFLAGS'] = '-mmacosx-version-min=10.5' env['LDFLAGS'] = '-mmacosx-version-min=10.5'
else: else:
env['CFLAGS'] += ' -D_GNU_SOURCE' env['CFLAGS'] += ' -D_GNU_SOURCE'
+1 -1
View File
@@ -129,7 +129,7 @@ static cell_t PrepSDKCall_SetSignature(IPluginContext *pContext, const cell_t *p
{ {
return 0; return 0;
} }
#if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD2) #if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
s_call_addr = memutils->ResolveSymbol(handle, &sig[1]); s_call_addr = memutils->ResolveSymbol(handle, &sig[1]);
#else #else
s_call_addr = dlsym(handle, &sig[1]); s_call_addr = dlsym(handle, &sig[1]);
+12 -2
View File
@@ -125,6 +125,7 @@ void GetIServer()
int offset; int offset;
void *vfunc = NULL; void *vfunc = NULL;
#if SOURCE_ENGINE != SE_ORANGEBOXVALVE
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11 #if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
/* Get the CreateFakeClient function pointer */ /* Get the CreateFakeClient function pointer */
if (!(vfunc=SH_GET_ORIG_VFNPTR_ENTRY(engine, &IVEngineServer::CreateFakeClient))) if (!(vfunc=SH_GET_ORIG_VFNPTR_ENTRY(engine, &IVEngineServer::CreateFakeClient)))
@@ -142,7 +143,8 @@ void GetIServer()
void **vtable = *reinterpret_cast<void ***>(enginePatch->GetThisPtr() + info.thisptroffs + info.vtbloffs); void **vtable = *reinterpret_cast<void ***>(enginePatch->GetThisPtr() + info.thisptroffs + info.vtbloffs);
vfunc = vtable[info.vtblindex]; vfunc = vtable[info.vtblindex];
} }
#endif #endif // defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
#endif // SOURCE_ENGINE != SE_ORANGEBOXVALVE
/* Get signature string for IVEngineServer::CreateFakeClient() */ /* Get signature string for IVEngineServer::CreateFakeClient() */
sigstr = g_pGameConf->GetKeyValue("CreateFakeClient_Windows"); sigstr = g_pGameConf->GetKeyValue("CreateFakeClient_Windows");
@@ -154,12 +156,20 @@ void GetIServer()
/* Convert signature string to signature bytes */ /* Convert signature string to signature bytes */
siglen = UTIL_StringToSignature(sigstr, sig, sizeof(sig)); siglen = UTIL_StringToSignature(sigstr, sig, sizeof(sig));
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
vfunc = memutils->FindPattern(engine, sig, siglen);
if (!vfunc)
{
return;
}
#else
/* Check if we're on the expected function */ /* Check if we're on the expected function */
if (!UTIL_VerifySignature(vfunc, sig, siglen)) if (!UTIL_VerifySignature(vfunc, sig, siglen))
{ {
return; return;
} }
#endif
/* Get the offset into CreateFakeClient */ /* Get the offset into CreateFakeClient */
if (!g_pGameConf->GetOffset("sv", &offset)) if (!g_pGameConf->GetOffset("sv", &offset))
+5
View File
@@ -528,7 +528,12 @@ static cell_t SlapPlayer(IPluginContext *pContext, const cell_t *params)
CellRecipientFilter rf; CellRecipientFilter rf;
rf.SetToReliable(true); rf.SetToReliable(true);
rf.Initialize(player_list, total_players); rf.Initialize(player_list, total_players);
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, 0, &pos);
#else
engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, &pos); engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, &pos);
#endif
} }
} }
+128
View File
@@ -33,8 +33,13 @@
#include <IForwardSys.h> #include <IForwardSys.h>
SH_DECL_HOOK8_void(IVEngineServer, EmitAmbientSound, SH_NOATTRIB, 0, int, const Vector &, const char *, float, soundlevel_t, int, int, float); SH_DECL_HOOK8_void(IVEngineServer, EmitAmbientSound, SH_NOATTRIB, 0, int, const Vector &, const char *, float, soundlevel_t, int, int, float);
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
SH_DECL_HOOK15_void(IEngineSound, EmitSound, SH_NOATTRIB, 0, IRecipientFilter &, int, int, const char *, float, float, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
SH_DECL_HOOK15_void(IEngineSound, EmitSound, SH_NOATTRIB, 1, IRecipientFilter &, int, int, const char *, float, soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
#else
SH_DECL_HOOK14_void(IEngineSound, EmitSound, SH_NOATTRIB, 0, IRecipientFilter &, int, int, const char *, float, float, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int); SH_DECL_HOOK14_void(IEngineSound, EmitSound, SH_NOATTRIB, 0, IRecipientFilter &, int, int, const char *, float, float, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
SH_DECL_HOOK14_void(IEngineSound, EmitSound, SH_NOATTRIB, 1, IRecipientFilter &, int, int, const char *, float, soundlevel_t, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int); SH_DECL_HOOK14_void(IEngineSound, EmitSound, SH_NOATTRIB, 1, IRecipientFilter &, int, int, const char *, float, soundlevel_t, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
#endif
bool g_InSoundHook = false; bool g_InSoundHook = false;
@@ -252,10 +257,17 @@ void SoundHooks::OnEmitAmbientSound(int entindex, const Vector &pos, const char
} }
} }
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
float flVolume, soundlevel_t iSoundlevel, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
float soundtime, int speakerentity)
#else
void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample, void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
float flVolume, soundlevel_t iSoundlevel, int iFlags, int iPitch, const Vector *pOrigin, float flVolume, soundlevel_t iSoundlevel, int iFlags, int iPitch, const Vector *pOrigin,
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions, const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
float soundtime, int speakerentity) float soundtime, int speakerentity)
#endif
{ {
SoundHookIter iter; SoundHookIter iter;
IPluginFunction *pFunc; IPluginFunction *pFunc;
@@ -293,6 +305,15 @@ void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChann
{ {
CellRecipientFilter crf; CellRecipientFilter crf;
crf.Initialize(players, size); crf.Initialize(players, size);
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
RETURN_META_NEWPARAMS(
MRES_IGNORED,
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float, soundlevel_t,
int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int)>(&IEngineSound::EmitSound),
(crf, iEntIndex, iChannel, buffer, flVolume, iSoundlevel, iFlags, iPitch, iSpecialDSP, pOrigin,
pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
);
#else
RETURN_META_NEWPARAMS( RETURN_META_NEWPARAMS(
MRES_IGNORED, MRES_IGNORED,
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float, soundlevel_t, static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float, soundlevel_t,
@@ -300,15 +321,23 @@ void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChann
(crf, iEntIndex, iChannel, buffer, flVolume, iSoundlevel, iFlags, iPitch, pOrigin, (crf, iEntIndex, iChannel, buffer, flVolume, iSoundlevel, iFlags, iPitch, pOrigin,
pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity) pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
); );
#endif
} }
} }
} }
} }
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
float flVolume, float flAttenuation, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
float soundtime, int speakerentity)
#else
void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample, void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
float flVolume, float flAttenuation, int iFlags, int iPitch, const Vector *pOrigin, float flVolume, float flAttenuation, int iFlags, int iPitch, const Vector *pOrigin,
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions, const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
float soundtime, int speakerentity) float soundtime, int speakerentity)
#endif
{ {
SoundHookIter iter; SoundHookIter iter;
IPluginFunction *pFunc; IPluginFunction *pFunc;
@@ -347,6 +376,15 @@ void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChan
{ {
CellRecipientFilter crf; CellRecipientFilter crf;
crf.Initialize(players, size); crf.Initialize(players, size);
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
RETURN_META_NEWPARAMS(
MRES_IGNORED,
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float, float,
int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int)>(&IEngineSound::EmitSound),
(crf, iEntIndex, iChannel, buffer, flVolume, SNDLVL_TO_ATTN(static_cast<soundlevel_t>(sndlevel)),
iFlags, iPitch, iSpecialDSP, pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
);
#else
RETURN_META_NEWPARAMS( RETURN_META_NEWPARAMS(
MRES_IGNORED, MRES_IGNORED,
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float, float, static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float, float,
@@ -354,6 +392,7 @@ void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChan
(crf, iEntIndex, iChannel, buffer, flVolume, SNDLVL_TO_ATTN(static_cast<soundlevel_t>(sndlevel)), (crf, iEntIndex, iChannel, buffer, flVolume, SNDLVL_TO_ATTN(static_cast<soundlevel_t>(sndlevel)),
iFlags, iPitch, pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity) iFlags, iPitch, pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
); );
#endif
} }
} }
} }
@@ -547,6 +586,48 @@ static cell_t EmitSound(IPluginContext *pContext, const cell_t *params)
player[0] = cl_array[i]; player[0] = cl_array[i];
crf.Reset(); crf.Reset();
crf.Initialize(player, 1); crf.Initialize(player, 1);
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
if (g_InSoundHook)
{
SH_CALL(enginesoundPatch,
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float,
soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int)>
(&IEngineSound::EmitSound))
(crf,
player[0],
channel,
sample,
vol,
(soundlevel_t)level,
flags,
pitch,
0,
pOrigin,
pDir,
pOrigVec,
updatePos,
soundtime,
speakerentity);
}
else
{
engsound->EmitSound(crf,
player[0],
channel,
sample,
vol,
(soundlevel_t)level,
flags,
pitch,
0,
pOrigin,
pDir,
pOrigVec,
updatePos,
soundtime,
speakerentity);
}
#else
if (g_InSoundHook) if (g_InSoundHook)
{ {
SH_CALL(enginesoundPatch, SH_CALL(enginesoundPatch,
@@ -585,8 +666,51 @@ static cell_t EmitSound(IPluginContext *pContext, const cell_t *params)
soundtime, soundtime,
speakerentity); speakerentity);
} }
#endif
} }
} else { } else {
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
if (g_InSoundHook)
{
SH_CALL(enginesoundPatch,
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float,
soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int)>
(&IEngineSound::EmitSound))
(crf,
entity,
channel,
sample,
vol,
(soundlevel_t)level,
flags,
pitch,
0,
pOrigin,
pDir,
pOrigVec,
updatePos,
soundtime,
speakerentity);
}
else
{
engsound->EmitSound(crf,
entity,
channel,
sample,
vol,
(soundlevel_t)level,
flags,
pitch,
0,
pOrigin,
pDir,
pOrigVec,
updatePos,
soundtime,
speakerentity);
}
#else
if (g_InSoundHook) if (g_InSoundHook)
{ {
SH_CALL(enginesoundPatch, SH_CALL(enginesoundPatch,
@@ -625,6 +749,7 @@ static cell_t EmitSound(IPluginContext *pContext, const cell_t *params)
soundtime, soundtime,
speakerentity); speakerentity);
} }
#endif
} }
return 1; return 1;
@@ -714,6 +839,9 @@ static cell_t EmitSentence(IPluginContext *pContext, const cell_t *params)
(soundlevel_t)level, (soundlevel_t)level,
flags, flags,
pitch, pitch,
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
0,
#endif
pOrigin, pOrigin,
pDir, pDir,
pOrigVec, pOrigVec,
+11
View File
@@ -52,6 +52,16 @@ public:
bool RemoveHook(int type, IPluginFunction *pFunc); bool RemoveHook(int type, IPluginFunction *pFunc);
void OnEmitAmbientSound(int entindex, const Vector &pos, const char *samp, float vol, void OnEmitAmbientSound(int entindex, const Vector &pos, const char *samp, float vol,
soundlevel_t soundlevel, int fFlags, int pitch, float delay); soundlevel_t soundlevel, int fFlags, int pitch, float delay);
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
void OnEmitSound(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume,
soundlevel_t iSoundlevel, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
float soundtime, int speakerentity);
void OnEmitSound2(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume,
float flAttenuation, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
float soundtime, int speakerentity);
#else
void OnEmitSound(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume, void OnEmitSound(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume,
soundlevel_t iSoundlevel, int iFlags, int iPitch, const Vector *pOrigin, soundlevel_t iSoundlevel, int iFlags, int iPitch, const Vector *pOrigin,
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions, const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
@@ -60,6 +70,7 @@ public:
float flAttenuation, int iFlags, int iPitch, const Vector *pOrigin, float flAttenuation, int iFlags, int iPitch, const Vector *pOrigin,
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions, const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
float soundtime, int speakerentity); float soundtime, int speakerentity);
#endif
private: private:
size_t _FillInPlayers(int *pl_array, IRecipientFilter *pFilter); size_t _FillInPlayers(int *pl_array, IRecipientFilter *pFilter);
void _IncRefCounter(int type); void _IncRefCounter(int type);
+1 -1
View File
@@ -451,6 +451,6 @@ TFClassType ClassnameToType(const char *classname)
/** /**
* A picture of a blue crab given to me as a gift and stored here for safe keeping * A picture of a blue crab given to me as a gift and stored here for safe keeping
* *
* http://www.democracycellproject.net/blog/archives/Clown%20car.jpg * http://sourcemod.net/Clown%20car.jpg
*/ */
+23 -6
View File
@@ -39,11 +39,11 @@ cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
{ {
static ICallWrapper *pWrapper = NULL; static ICallWrapper *pWrapper = NULL;
// CTFPlayerShared::MakeBleed(CTFPlayer*, CTFWeaponBase*, float) // CTFPlayerShared::MakeBleed(CTFPlayer*, CTFWeaponBase*, float, int=4)
if(!pWrapper) if(!pWrapper)
{ {
REGISTER_NATIVE_ADDR("MakeBleed", REGISTER_NATIVE_ADDR("MakeBleed",
PassInfo pass[3]; \ PassInfo pass[4]; \
pass[0].flags = PASSFLAG_BYVAL; \ pass[0].flags = PASSFLAG_BYVAL; \
pass[0].size = sizeof(CBaseEntity *); \ pass[0].size = sizeof(CBaseEntity *); \
pass[0].type = PassType_Basic; \ pass[0].type = PassType_Basic; \
@@ -53,7 +53,10 @@ cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
pass[2].flags = PASSFLAG_BYVAL; \ pass[2].flags = PASSFLAG_BYVAL; \
pass[2].size = sizeof(float); \ pass[2].size = sizeof(float); \
pass[2].type = PassType_Basic; \ pass[2].type = PassType_Basic; \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 3)) pass[3].flags = PASSFLAG_BYVAL; \
pass[3].size = sizeof(int); \
pass[3].type = PassType_Basic; \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 4))
} }
CBaseEntity *pEntity; CBaseEntity *pEntity;
@@ -80,6 +83,8 @@ cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
*(CBaseEntity **)vptr = NULL; *(CBaseEntity **)vptr = NULL;
vptr += sizeof(CBaseEntity *); vptr += sizeof(CBaseEntity *);
*(float *)vptr = sp_ctof(params[3]); *(float *)vptr = sp_ctof(params[3]);
vptr += sizeof(float);
*(int *)vptr = 4;
pWrapper->Execute(vstk, NULL); pWrapper->Execute(vstk, NULL);
@@ -449,12 +454,16 @@ cell_t TF2_Regenerate(IPluginContext *pContext, const cell_t *params)
{ {
static ICallWrapper *pWrapper = NULL; static ICallWrapper *pWrapper = NULL;
//CTFPlayer::Regenerate() //CTFPlayer::Regenerate( bool=true )
if (!pWrapper) if (!pWrapper)
{ {
REGISTER_NATIVE_ADDR("Regenerate", REGISTER_NATIVE_ADDR("Regenerate",
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, NULL, 0)); 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; CBaseEntity *pEntity;
@@ -462,7 +471,15 @@ cell_t TF2_Regenerate(IPluginContext *pContext, const cell_t *params)
{ {
return pContext->ThrowNativeError("Client index %d is not valid", params[1]); return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
} }
pWrapper->Execute(&pEntity, NULL);
unsigned char vstk[sizeof(void *) + sizeof(bool)];
unsigned char *vptr = vstk;
*(void **)vptr = (void *)pEntity;
vptr += sizeof(void *);
*(bool *)vptr = true;
pWrapper->Execute(vstk, NULL);
return 1; return 1;
} }
+75 -21
View File
@@ -18,9 +18,8 @@
{ {
"game" "dod" "game" "dod"
"game" "tf" "game" "tf"
"game" "cstrike"
"game" "garrysmod"
"game" "hl2mp" "game" "hl2mp"
"game" "cstrike"
} }
"Offsets" "Offsets"
@@ -28,7 +27,7 @@
/* Offset into CBaseTempEntity constructor */ /* Offset into CBaseTempEntity constructor */
"s_pTempEntities" "s_pTempEntities"
{ {
"windows" "17" "windows" "19"
} }
"GetTEName" "GetTEName"
{ {
@@ -55,7 +54,7 @@
"CBaseTempEntity" "CBaseTempEntity"
{ {
"library" "server" "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" "windows" "\x55\x8B\xEC\x8B\xC1\x8B\x4D\x2A\xC7\x00\x2A\x2A\x2A\x2A\x89\x48"
} }
"s_pTempEntities" "s_pTempEntities"
{ {
@@ -65,7 +64,7 @@
} }
} }
} }
/* CGlobalEntityList */ /* CGlobalEntityList */
"#default" "#default"
{ {
@@ -73,8 +72,9 @@
{ {
"game" "dod" "game" "dod"
"game" "tf" "game" "tf"
"game" "cstrike"
"game" "hl2mp" "game" "hl2mp"
"game" "cstrike"
"game" "garrysmod"
} }
"Signatures" "Signatures"
@@ -83,7 +83,7 @@
"FindEntityByClassname" "FindEntityByClassname"
{ {
"library" "server" "library" "server"
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x85\xC9\x57\x74\x19\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x83\xC0\x01\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x39\x8B\x5C\x24\x18\x8B\x2D\x2A\x2A\x2A\x2A\xEB\x03" "windows" "\x55\x8B\xEC\x53\x56\x8B\xF1\x8B\x4D\x2A\x85\xC9\x57\x74\x2A\x8B\x01\x8B\x50\x2A\xFF\xD2\x8B\x00\x25\x2A\x2A\x2A\x2A\x83\xC0\x2A\xC1\xE0\x04\x8B\x3C\x30\xEB\x2A\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5D\x2A\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x15\x2A\x2A\x2A\x2A\x83\xC4\x2A\xEB\x2A\x39"
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc" "linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
"mac" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc" "mac" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
} }
@@ -138,17 +138,21 @@
/* IServer interface pointer */ /* IServer interface pointer */
"#default" "#default"
{ {
"#supported"
{
"game" "dod"
"game" "tf"
"game" "hl2mp"
"game" "garrysmod"
}
"Keys" "Keys"
{ {
/* Signature for the beginning of IVEngineServer::CreateFakeClient. /* Signature for the beginning of IVEngineServer::CreateFakeClientEx.
* * (Must be unique!)
* 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"
"CreateFakeClient_Windows" "\x55\x8B\xEC\x8B\x2A\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x85\xC0\x75"
} }
"Offsets" "Offsets"
@@ -156,7 +160,7 @@
/* Offset into IVEngineServer::CreateFakeClient */ /* Offset into IVEngineServer::CreateFakeClient */
"sv" "sv"
{ {
"windows" "6" "windows" "8"
} }
} }
@@ -172,9 +176,50 @@
} }
} }
"#default"
{
"#supported"
{
"game" "cstrike"
}
"Keys"
{
/* Signature for the beginning of IVEngineServer::CreateFakeClientEx.
* (Must be unique!)
*/
"CreateFakeClient_Windows" "\x55\x8B\xEC\x8B\x2A\x2A\x8A\x2A\x2A\x51\xB9\x2A\x2A\x2A\x2A\xA2"
}
"Offsets"
{
"sv"
{
"windows" "11"
}
}
"Signatures"
{
"sv"
{
"library" "engine"
"linux" "@sv"
"mac" "@sv"
}
}
}
/* EntityFactoryDictionary function */ /* EntityFactoryDictionary function */
"#default" "#default"
{ {
"#supported"
{
"game" "tf"
"game" "dod"
"game" "hl2mp"
}
"Signatures" "Signatures"
{ {
"EntityFactory" "EntityFactory"
@@ -194,15 +239,15 @@
{ {
"game" "dod" "game" "dod"
"game" "tf" "game" "tf"
"game" "cstrike"
"game" "hl2mp" "game" "hl2mp"
"game" "cstrike"
} }
"Signatures" "Signatures"
{ {
"FireOutput" "FireOutput"
{ {
"library" "server" "library" "server"
"windows" "\x81\xEC\x2A\x2A\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6" "windows" "\x55\x8B\xEC\x81\xEC\x2A\x2A\x2A\x2A\x53\x56\x8B\x71\x2A\x85\xF6"
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f" "linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
"mac" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f" "mac" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
} }
@@ -212,6 +257,15 @@
/* SetUserInfo data */ /* SetUserInfo data */
"#default" "#default"
{ {
"#supported"
{
"game" "dod"
"game" "tf"
"game" "garrysmod"
"game" "hl2mp"
"game" "cstrike"
}
"Offsets" "Offsets"
{ {
/** /**
@@ -222,9 +276,9 @@
*/ */
"SetUserCvar" "SetUserCvar"
{ {
"windows" "17" "windows" "18"
"linux" "57" "linux" "58"
"mac" "57" "mac" "58"
} }
/** /**
* Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made. * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
+42 -42
View File
@@ -28,87 +28,87 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "392" "windows" "396"
"linux" "393" "linux" "397"
"mac" "393" "mac" "397"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
"windows" "263" "windows" "266"
"linux" "264" "linux" "267"
"mac" "264" "mac" "267"
} }
"Weapon_GetSlot" "Weapon_GetSlot"
{ {
"windows" "261" "windows" "264"
"linux" "262" "linux" "265"
"mac" "262" "mac" "265"
} }
"Ignite" "Ignite"
{ {
"windows" "204" "windows" "207"
"linux" "205" "linux" "208"
"mac" "205" "mac" "208"
} }
"Extinguish" "Extinguish"
{ {
"windows" "208" "windows" "211"
"linux" "209" "linux" "212"
"mac" "209" "mac" "212"
} }
"Teleport" "Teleport"
{ {
"windows" "106" "windows" "107"
"linux" "107" "linux" "108"
"mac" "107" "mac" "108"
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "433" "windows" "437"
"linux" "433" "linux" "437"
"mac" "433" "mac" "437"
} }
"GetVelocity" "GetVelocity"
{ {
"windows" "138" "windows" "139"
"linux" "139" "linux" "140"
"mac" "139" "mac" "140"
} }
"EyeAngles" "EyeAngles"
{ {
"windows" "129" "windows" "130"
"linux" "130" "linux" "131"
"mac" "130" "mac" "131"
} }
"AcceptInput" "AcceptInput"
{ {
"windows" "35" "windows" "36"
"linux" "36" "linux" "37"
"mac" "36" "mac" "37"
} }
"SetEntityModel" "SetEntityModel"
{ {
"windows" "23" "windows" "24"
"linux" "24" "linux" "25"
"mac" "24" "mac" "25"
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "254" "windows" "257"
"linux" "255" "linux" "258"
"mac" "255" "mac" "258"
} }
"Activate" "Activate"
{ {
"windows" "32" "windows" "33"
"linux" "33" "linux" "34"
"mac" "33" "mac" "34"
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "410" "windows" "414"
"linux" "411" "linux" "415"
"mac" "411" "mac" "415"
} }
} }
} }
+3 -3
View File
@@ -7,7 +7,7 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "423" "windows" "424"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
@@ -31,7 +31,7 @@
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "468" "windows" "469"
} }
"GetVelocity" "GetVelocity"
{ {
@@ -59,7 +59,7 @@
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "444" "windows" "445"
} }
} }
+42 -42
View File
@@ -18,87 +18,87 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "391" "windows" "395"
"linux" "392" "linux" "396"
"mac" "392" "mac" "396"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
"windows" "263" "windows" "266"
"linux" "264" "linux" "267"
"mac" "264" "mac" "267"
} }
"Weapon_GetSlot" "Weapon_GetSlot"
{ {
"windows" "261" "windows" "264"
"linux" "262" "linux" "265"
"mac" "262" "mac" "265"
} }
"Ignite" "Ignite"
{ {
"windows" "204" "windows" "207"
"linux" "205" "linux" "208"
"mac" "205" "mac" "208"
} }
"Extinguish" "Extinguish"
{ {
"windows" "208" "windows" "211"
"linux" "209" "linux" "212"
"mac" "209" "mac" "212"
} }
"Teleport" "Teleport"
{ {
"windows" "106" "windows" "107"
"linux" "107" "linux" "108"
"mac" "107" "mac" "108"
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "429" "windows" "433"
"linux" "430" "linux" "434"
"mac" "430" "mac" "434"
} }
"GetVelocity" "GetVelocity"
{ {
"windows" "138" "windows" "139"
"linux" "139" "linux" "140"
"mac" "139" "mac" "140"
} }
"EyeAngles" "EyeAngles"
{ {
"windows" "129" "windows" "130"
"linux" "130" "linux" "131"
"mac" "130" "mac" "131"
} }
"AcceptInput" "AcceptInput"
{ {
"windows" "35" "windows" "36"
"linux" "36" "linux" "37"
"mac" "36" "mac" "37"
} }
"SetEntityModel" "SetEntityModel"
{ {
"windows" "23" "windows" "24"
"linux" "24" "linux" "25"
"mac" "24" "mac" "25"
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "254" "windows" "257"
"linux" "255" "linux" "258"
"mac" "255" "mac" "258"
} }
"Activate" "Activate"
{ {
"windows" "32" "windows" "33"
"linux" "33" "linux" "34"
"mac" "33" "mac" "34"
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "409" "windows" "413"
"linux" "410" "linux" "414"
"mac" "410" "mac" "414"
} }
} }
+107 -48
View File
@@ -11,109 +11,168 @@
"Games" "Games"
{ {
/* Garry's Mod - No symbol names in linux bin */ /* Garry's Mod */
"garrysmod" "garrysmod"
{ {
"Offsets" "Offsets"
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "433" "windows" "437"
"linux" "434" "linux" "438"
"mac" "434" "mac" "438"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
"windows" "305" "windows" "308"
"linux" "306" "linux" "309"
"mac" "306" "mac" "309"
} }
"Weapon_GetSlot" "Weapon_GetSlot"
{ {
"windows" "303" "windows" "306"
"linux" "304" "linux" "307"
"mac" "304" "mac" "307"
} }
"Ignite" "Ignite"
{ {
"windows" "240" "windows" "243"
"linux" "241" "linux" "244"
"mac" "241" "mac" "244"
} }
"Extinguish" "Extinguish"
{ {
"windows" "244" "windows" "247"
"linux" "245" "linux" "248"
"mac" "245" "mac" "248"
} }
"Teleport" "Teleport"
{ {
"windows" "107" "windows" "108"
"linux" "108" "linux" "109"
"mac" "108" "mac" "109"
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "472" "windows" "476"
"linux" "472" "linux" "476"
"mac" "472" "mac" "476"
} }
"GetVelocity" "GetVelocity"
{ {
"windows" "139" "windows" "140"
"linux" "140" "linux" "141"
"mac" "140" "mac" "141"
} }
"EyeAngles" "EyeAngles"
{ {
"windows" "130" "windows" "131"
"linux" "131" "linux" "132"
"mac" "131" "mac" "132"
} }
"AcceptInput" "AcceptInput"
{ {
"windows" "35" "windows" "36"
"linux" "36" "linux" "37"
"mac" "36" "mac" "37"
} }
"SetEntityModel" "SetEntityModel"
{ {
"windows" "23" "windows" "24"
"linux" "24" "linux" "25"
"mac" "24" "mac" "25"
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "296" "windows" "299"
"linux" "297" "linux" "300"
"mac" "297" "mac" "300"
} }
"Activate" "Activate"
{ {
"windows" "32" "windows" "33"
"linux" "33" "linux" "34"
"mac" "33" "mac" "34"
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "451" "windows" "455"
"linux" "452" "linux" "456"
"mac" "452" "mac" "456"
} }
} }
}
"garrysmod"
{
"Offsets"
{
/* Offset into func at "CBaseTempEntity" signature */
"s_pTempEntities"
{
"windows" "8"
}
"GetTEName"
{
"windows" "4"
"linux" "4"
"mac" "4"
}
"GetTENext"
{
"windows" "8"
"linux" "8"
"mac" "8"
}
"TE_GetServerClass"
{
"windows" "0"
"linux" "0"
"mac" "0"
}
}
"Signatures" "Signatures"
{ {
"FindEntityByClassname" /* This isn't CBaseTempEntity::CBaseTempEntity on gmod, it's a randon one of now many, many funcs that have
* the s_pTempEntities ptr available due to inlining
*/
"CBaseTempEntity"
{ {
"library" "server" "library" "server"
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x57\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x40\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5C\x24\x18\x8B\x2D\x2A\x2A\x2A\x2A\x8D\xA4\x24\x00\x00\x00\x00\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\xC4\x04\xEB\x2A\x39\x2A\x2A\x74\x2A\x53" "windows" "\x55\x8B\xEC\x51\x0F\x57\xC0\xA1\x2A\x2A\x2A\x2A\x8D\x4D\xFC\xA3"
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
"mac" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
} }
"s_pTempEntities"
{
"library" "server"
"linux" "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
"mac" "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
}
}
}
"garrysmod"
{
"Signatures"
{
"EntityFactory"
{
"library" "server"
"windows" "\x55\x8B\xEC\x51\x56\x8D\x2A\x2A\xBE\x2A\x2A\x2A\x2A\xC7\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\xC7\x2A\x2A\x2A\x2A\x2A\x2A\xE8"
"linux" "@_Z23EntityFactoryDictionaryv"
"mac" "@_Z23EntityFactoryDictionaryv"
}
}
}
"garrysmod"
{
"Signatures"
{
"FireOutput" "FireOutput"
{ {
"library" "server" "library" "server"
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\x71\x2A\x57\x89" "windows" "\x55\x8B\xEC\x83\x2A\x2A\x81\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x53\x56\x8B\x2A\x2A\x85\xF6\x57"
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f" "linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
"mac" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f" "mac" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
} }
+42 -42
View File
@@ -18,87 +18,87 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "391" "windows" "395"
"linux" "392" "linux" "396"
"mac" "392" "mac" "396"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
"windows" "263" "windows" "266"
"linux" "264" "linux" "267"
"mac" "264" "mac" "267"
} }
"Weapon_GetSlot" "Weapon_GetSlot"
{ {
"windows" "261" "windows" "264"
"linux" "262" "linux" "265"
"mac" "262" "mac" "265"
} }
"Ignite" "Ignite"
{ {
"windows" "204" "windows" "207"
"linux" "205" "linux" "208"
"mac" "205" "mac" "208"
} }
"Extinguish" "Extinguish"
{ {
"windows" "208" "windows" "211"
"linux" "209" "linux" "212"
"mac" "209" "mac" "212"
} }
"Teleport" "Teleport"
{ {
"windows" "106" "windows" "107"
"linux" "107" "linux" "108"
"mac" "107" "mac" "108"
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "430" "windows" "434"
"linux" "430" "linux" "434"
"mac" "430" "mac" "434"
} }
"GetVelocity" "GetVelocity"
{ {
"windows" "138" "windows" "139"
"linux" "139" "linux" "140"
"mac" "139" "mac" "140"
} }
"EyeAngles" "EyeAngles"
{ {
"windows" "129" "windows" "130"
"linux" "130" "linux" "131"
"mac" "130" "mac" "131"
} }
"AcceptInput" "AcceptInput"
{ {
"windows" "35" "windows" "36"
"linux" "36" "linux" "37"
"mac" "36" "mac" "37"
} }
"SetEntityModel" "SetEntityModel"
{ {
"windows" "23" "windows" "24"
"linux" "24" "linux" "25"
"mac" "24" "mac" "25"
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "254" "windows" "257"
"linux" "255" "linux" "258"
"mac" "255" "mac" "258"
} }
"Activate" "Activate"
{ {
"windows" "32" "windows" "33"
"linux" "33" "linux" "34"
"mac" "33" "mac" "34"
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "409" "windows" "413"
"linux" "410" "linux" "414"
"mac" "410" "mac" "414"
} }
} }
} }
+42 -42
View File
@@ -18,87 +18,87 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "391" "windows" "395"
"linux" "392" "linux" "396"
"mac" "392" "mac" "396"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
"windows" "263" "windows" "266"
"linux" "264" "linux" "267"
"mac" "264" "mac" "267"
} }
"Weapon_GetSlot" "Weapon_GetSlot"
{ {
"windows" "261" "windows" "264"
"linux" "262" "linux" "265"
"mac" "262" "mac" "265"
} }
"Ignite" "Ignite"
{ {
"windows" "204" "windows" "207"
"linux" "205" "linux" "208"
"mac" "205" "mac" "208"
} }
"Extinguish" "Extinguish"
{ {
"windows" "208" "windows" "211"
"linux" "209" "linux" "212"
"mac" "209" "mac" "212"
} }
"Teleport" "Teleport"
{ {
"windows" "106" "windows" "107"
"linux" "107" "linux" "108"
"mac" "107" "mac" "108"
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "432" "windows" "436"
"linux" "432" "linux" "436"
"mac" "432" "mac" "436"
} }
"GetVelocity" "GetVelocity"
{ {
"windows" "138" "windows" "139"
"linux" "139" "linux" "140"
"mac" "139" "mac" "140"
} }
"EyeAngles" "EyeAngles"
{ {
"windows" "129" "windows" "130"
"linux" "130" "linux" "131"
"mac" "130" "mac" "131"
} }
"SetEntityModel" "SetEntityModel"
{ {
"windows" "23" "windows" "24"
"linux" "24" "linux" "25"
"mac" "24" "mac" "25"
} }
"AcceptInput" "AcceptInput"
{ {
"windows" "35" "windows" "36"
"linux" "36" "linux" "37"
"mac" "36" "mac" "37"
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "254" "windows" "257"
"linux" "255" "linux" "258"
"mac" "255" "mac" "258"
} }
"Activate" "Activate"
{ {
"windows" "32" "windows" "33"
"linux" "33" "linux" "34"
"mac" "33" "mac" "34"
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "409" "windows" "413"
"linux" "410" "linux" "414"
"mac" "410" "mac" "414"
} }
} }
+16 -16
View File
@@ -18,28 +18,28 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "356" "windows" "357"
"linux" "357" "linux" "358"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
"windows" "243" "windows" "246"
"linux" "244" "linux" "247"
} }
"Weapon_GetSlot" "Weapon_GetSlot"
{ {
"windows" "238" "windows" "241"
"linux" "239" "linux" "242"
} }
"Ignite" "Ignite"
{ {
"windows" "195" "windows" "198"
"linux" "196" "linux" "199"
} }
"Extinguish" "Extinguish"
{ {
"windows" "199" "windows" "202"
"linux" "200" "linux" "203"
} }
"Teleport" "Teleport"
{ {
@@ -48,8 +48,8 @@
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "399" "windows" "402"
"linux" "399" "linux" "402"
} }
"GetVelocity" "GetVelocity"
{ {
@@ -73,8 +73,8 @@
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "231" "windows" "234"
"linux" "232" "linux" "235"
} }
"Activate" "Activate"
{ {
@@ -83,8 +83,8 @@
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "375" "windows" "376"
"linux" "376" "linux" "377"
} }
} }
"Signatures" "Signatures"
+4 -4
View File
@@ -32,7 +32,7 @@
"ClanTagOffset" "ClanTagOffset"
{ {
"windows" "24" "windows" "24"
"linux" "41" "linux" "42"
"mac" "29" "mac" "29"
} }
} }
@@ -76,21 +76,21 @@
"TerminateRound" "TerminateRound"
{ {
"library" "server" "library" "server"
"windows" "\x83\xEC\x2A\x53\x8B\x5C\x2A\x2A\x55\x56\x57\x33\xF6\x8B\xE9\x33" "windows" "\x55\x8B\xEC\x83\xEC\x2A\x53\x8B\x2A\x2A\x56\x57\x33\xFF\x83"
"linux" "@_ZN12CCSGameRules14TerminateRoundEfi" "linux" "@_ZN12CCSGameRules14TerminateRoundEfi"
"mac" "@_ZN12CCSGameRules14TerminateRoundEfi" "mac" "@_ZN12CCSGameRules14TerminateRoundEfi"
} }
"GetTranslatedWeaponAlias" "GetTranslatedWeaponAlias"
{ {
"library" "server" "library" "server"
"windows" "\x56\x57\x8B\x7C\x2A\x2A\x33\xF6\xEB\x2A\x2A\x2A\x00\x00\x00\x00\x8B\x04\x2A\x2A\x2A\x2A\x2A\x57\x50\xE8\x2A\x2A\x2A\x00\x83\xC4\x08\x85\xC0\x74\x2A\x83\x2A\x01\x83\x2A\x2A\x72\x2A\x8B\xC7\x5F\x5E" "windows" "\x55\x8B\xEC\x56\x57\x8B\x2A\x2A\x33\xF6\x8D\x2A\x00\x00\x00\x00\x8B\x04\xF5\x2A\x2A\x2A\x2A\x57\x50\xE8\x2A\x2A\x2A\x2A\x83\xC4\x2A\x85\xC0\x74\x2A\x83\xC6\x01\x83\x2A\x1A"
"linux" "@_Z24GetTranslatedWeaponAliasPKc" "linux" "@_Z24GetTranslatedWeaponAliasPKc"
"mac" "@_Z24GetTranslatedWeaponAliasPKc" "mac" "@_Z24GetTranslatedWeaponAliasPKc"
} }
"GetWeaponInfo" "GetWeaponInfo"
{ {
"library" "server" "library" "server"
"windows" "\x8B\x4C\x2A\x2A\x85\xC9\x75\x2A\x33\xC0\xC3" "windows" "\x55\x8B\xEC\x8B\x4D\x2A\x85\xC9\x75\x2A\x33\xC0\x5D\xC3\x83\xF9\x2A\x7C\x2A\x69\xC9\x2A\x2A\x00\x00"
"linux" "@_Z13GetWeaponInfo10CSWeaponID" "linux" "@_Z13GetWeaponInfo10CSWeaponID"
"mac" "@_Z13GetWeaponInfo10CSWeaponID" "mac" "@_Z13GetWeaponInfo10CSWeaponID"
} }
+21 -21
View File
@@ -18,21 +18,21 @@
"Burn" "Burn"
{ {
"library" "server" "library" "server"
"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" "windows" "\x55\x8B\xEC\x51\x56\x8B\xF1\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x01\x8B\x2A\x2A\x2A\x2A\x2A\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x57\x8D"
"linux" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase" "linux" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase"
"mac" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase" "mac" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase"
} }
"RemoveDisguise" "RemoveDisguise"
{ {
"library" "server" "library" "server"
"windows" "\x51\x56\x8B\xF1\x8B\x8E\x2A\x2A\x2A\x2A\x57\x8B\xBE\x2A\x2A\x2A\x2A\xE8" "windows" "\x55\x8B\xEC\x83\xEC\x08\x53\x56\x8B\xF1\x57\x8D\x9E"
"linux" "@_ZN15CTFPlayerShared14RemoveDisguiseEv" "linux" "@_ZN15CTFPlayerShared14RemoveDisguiseEv"
"mac" "@_ZN15CTFPlayerShared14RemoveDisguiseEv" "mac" "@_ZN15CTFPlayerShared14RemoveDisguiseEv"
} }
"Disguise" "Disguise"
{ {
"library" "server" "library" "server"
"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" "windows" "\x55\x8B\xEC\x51\x53\x56\x8B\xF1\x8B\x2A\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x8B\xD8\x8B"
"linux" "@_ZN15CTFPlayerShared8DisguiseEiiP9CTFPlayerb" "linux" "@_ZN15CTFPlayerShared8DisguiseEiiP9CTFPlayerb"
"mac" "@_ZN15CTFPlayerShared8DisguiseEiiP9CTFPlayerb" "mac" "@_ZN15CTFPlayerShared8DisguiseEiiP9CTFPlayerb"
} }
@@ -41,14 +41,14 @@
"library" "server" "library" "server"
"linux" "@_ZN13CTFWeaponBase26CalcIsAttackCriticalHelperEv" "linux" "@_ZN13CTFWeaponBase26CalcIsAttackCriticalHelperEv"
"mac" "@_ZN13CTFWeaponBase26CalcIsAttackCriticalHelperEv" "mac" "@_ZN13CTFWeaponBase26CalcIsAttackCriticalHelperEv"
"windows" "\x55\x8B\xEC\x83\x2A\x2A\x83\x2A\x2A\x53\x56\x57\x6A\x00\x68\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\x6A" "windows" "\x53\x8B\xDC\x83\xEC\x08\x83\xE4\x2A\x83\xC4\x2A\x55\x8B\x6B\x2A\x89\x6C\x24\x2A\x8B\xEC\x83\xEC\x2A\x56\x57\x6A\x00"
} }
"CalcCriticalMelee" "CalcCriticalMelee"
{ {
"library" "server" "library" "server"
"linux" "@_ZN18CTFWeaponBaseMelee26CalcIsAttackCriticalHelperEv" "linux" "@_ZN18CTFWeaponBaseMelee26CalcIsAttackCriticalHelperEv"
"mac" "@_ZN18CTFWeaponBaseMelee26CalcIsAttackCriticalHelperEv" "mac" "@_ZN18CTFWeaponBaseMelee26CalcIsAttackCriticalHelperEv"
"windows" "\x51\x53\x56\x8B\xF1\xE8\x2A\x2A\x2A\x2A\x8B\xD8\x85\xDB\x74\x2A\x8B\x03\x8B" "windows" "\x55\x8B\xEC\x51\x53\x56\x8B\xF1\xE8\x2A\x2A\x2A\x2A\x8B\xD8\x85\xDB\x74\x2A\x8B\x03"
} }
"CalcCriticalBow" "CalcCriticalBow"
{ {
@@ -60,63 +60,63 @@
"Regenerate" "Regenerate"
{ {
"library" "server" "library" "server"
"windows" "\x83\xEC\x08\xF3\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\xF1\x8B" "windows" "\x55\x8B\xEC\x83\xEC\x2A\xF3\x0F\x2A\x2A\x2A\x2A\x2A\x2A\x53\x56\x8B\xF1\x8B"
"linux" "@_ZN9CTFPlayer10RegenerateEv" "linux" "@_ZN9CTFPlayer10RegenerateEb"
"mac" "@_ZN9CTFPlayer10RegenerateEv" "mac" "@_ZN9CTFPlayer10RegenerateEb"
} }
"AddCondition" "AddCondition"
{ {
"library" "server" "library" "server"
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x83\xFF\x2A\x8B\xF1\x7C\x2A\x8D\x9E\x2A\x2A\x2A\x2A\x8D\x6F\x2A\xEB\x2A\x8D\x9E\x2A\x2A\x2A\x2A\x8B\xEF\x8B\x86\x2A\x2A\x2A\x2A\xD9" "windows" "\x55\x8B\xEC\x83\xEC\x2A\x53\x56\x57\x8B\x7D\x2A\x83\xFF\x2A\x8B\xF1\x7C\x2A\x8D\x47\x2A\x8D\x9E\x2A\x2A\x2A\x2A\x89\x45\x2A\xEB\x2A\x8D\x9E\x2A\x2A\x2A\x2A\x89\x7D\x2A\x8B\x8E\x2A\x2A\x2A\x2A\xD9"
"linux" "@_ZN15CTFPlayerShared7AddCondE7ETFCondf" "linux" "@_ZN15CTFPlayerShared7AddCondE7ETFCondf"
"mac" "@_ZN15CTFPlayerShared7AddCondE7ETFCondf" "mac" "@_ZN15CTFPlayerShared7AddCondE7ETFCondf"
} }
"RemoveCondition" "RemoveCondition"
{ {
"library" "server" "library" "server"
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x83\xFF\x20\x8B\xF1\x7C\x2A\x8D\x9E\x2A\x2A\x2A\x2A\x8D\x6F\x2A\xEB\x2A\x8D\x9E\x2A\x2A\x2A\x2A\x8B\xEF\x8B\x2A\x2A\x2A\x50\x57\x8D" "windows" "\x55\x8B\xEC\x83\xEC\x2A\x53\x56\x57\x8B\x7D\x2A\x83\xFF\x2A\x8B\xF1\x7C\x2A\x8D\x47\x2A\x8D\x9E\x2A\x2A\x2A\x2A\x89\x45\x2A\xEB\x2A\x8D\x9E\x2A\x2A\x2A\x2A\x89\x7D\x2A\x8B\x4D"
"linux" "@_ZN15CTFPlayerShared10RemoveCondE7ETFCondb" "linux" "@_ZN15CTFPlayerShared10RemoveCondE7ETFCondb"
"mac" "@_ZN15CTFPlayerShared10RemoveCondE7ETFCondb" "mac" "@_ZN15CTFPlayerShared10RemoveCondE7ETFCondb"
} }
"SetPowerplayEnabled" "SetPowerplayEnabled"
{ {
"library" "server" "library" "server"
"windows" "\x80\x7C\x2A\x2A\x2A\x56\x8B\xF1\x74\x2A\x57\x8D\x44\x24\x2A\x50" "windows" "\x55\x8B\xEC\x80\x7D\x2A\x2A\x56\x8B\xF1\x74\x2A\x57\x8D\x45"
"linux" "@_ZN9CTFPlayer19SetPowerplayEnabledEb" "linux" "@_ZN9CTFPlayer19SetPowerplayEnabledEb"
"mac" "@_ZN9CTFPlayer19SetPowerplayEnabledEb" "mac" "@_ZN9CTFPlayer19SetPowerplayEnabledEb"
} }
"SetInWaitingForPlayers" "SetInWaitingForPlayers"
{ {
"library" "server" "library" "server"
"windows" "\x56\x8B\xF1\xE8\x2A\x2A\x2A\x2A\x84\xC0\x0F\x85\x2A\x2A\x2A\x2A\xA1" "windows" "\x55\x8B\xEC\x56\x8B\xF1\xE8\x2A\x2A\x2A\x2A\x84\xC0\x0F\x85\x2A\x2A\x2A\x2A\xA1\x2A\x2A\x2A\x2A"
"linux" "@_ZN24CTeamplayRoundBasedRules22SetInWaitingForPlayersEb" "linux" "@_ZN24CTeamplayRoundBasedRules22SetInWaitingForPlayersEb"
"mac" "@_ZN24CTeamplayRoundBasedRules22SetInWaitingForPlayersEb" "mac" "@_ZN24CTeamplayRoundBasedRules22SetInWaitingForPlayersEb"
} }
"StunPlayer" "StunPlayer"
{ {
"library" "server" "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" "windows" "\x55\x8B\xEC\x51\xD9\x05\x2A\x2A\x2A\x2A\x56\x57\x83\xEC\x14"
"linux" "@_ZN15CTFPlayerShared10StunPlayerEffiP9CTFPlayer" "linux" "@_ZN15CTFPlayerShared10StunPlayerEffiP9CTFPlayer"
"mac" "@_ZN15CTFPlayerShared10StunPlayerEffiP9CTFPlayer" "mac" "@_ZN15CTFPlayerShared10StunPlayerEffiP9CTFPlayer"
} }
"IsHolidayActive" "IsHolidayActive"
{ {
"library" "server" "library" "server"
"windows" "\x80\x2A\x2A\x2A\x2A\x2A\x00\x75\x2A\xE8\x2A\x2A\x2A\x2A\x8B\x54\x2A\x2A\x8B" "windows" "\x55\x8B\xEC\x80\x3D\x2A\x2A\x2A\x2A\x2A\x75\x2A\xE8"
"linux" "@_Z20UTIL_IsHolidayActivei" "linux" "@_Z20UTIL_IsHolidayActivei"
"mac" "@_Z20UTIL_IsHolidayActivei" "mac" "@_Z20UTIL_IsHolidayActivei"
} }
"MakeBleed" "MakeBleed"
{ {
"library" "server" "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" "windows" "\x55\x8B\xEC\x51\x56\x8B\xF1\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x01\x8B\x2A\x2A\x2A\x2A\x2A\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x6A\x19"
"linux" "@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasef" "linux" "@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasefi"
"mac" "@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasef" "mac" "@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasefi"
} }
"IsPlayerInDuel" "IsPlayerInDuel"
{ {
"library" "server" "library" "server"
"windows" "\x83\xEC\x08\x2A\x2A\x2A\x2A\x33\xC0\x89\x04\x24\x89\x44\x24\x04\x8D\x04\x24\x50\x2A\x2A\x2A\x2A\x2A\x84\xC0\x2A\x2A\x83\xC4\x08\xC3" "windows" "\x55\x8B\xEC\x83\xEC\x2A\x8B\x4D\x2A\x33\xC0\x89\x45\x2A\x89\x45"
"linux" "@_Z21DuelMiniGame_IsInDuelP9CTFPlayer" "linux" "@_Z21DuelMiniGame_IsInDuelP9CTFPlayer"
"mac" "@_Z21DuelMiniGame_IsInDuelP9CTFPlayer" "mac" "@_Z21DuelMiniGame_IsInDuelP9CTFPlayer"
} }
@@ -125,9 +125,9 @@
{ {
"ForceRespawn" "ForceRespawn"
{ {
"windows" "318" "windows" "321"
"linux" "319" "linux" "322"
"mac" "319" "mac" "322"
} }
} }
} }
+10
View File
@@ -77,6 +77,11 @@
#define FILENAME_1_6_BGT "sourcemod.2.bgt" PLATFORM_EXT #define FILENAME_1_6_BGT "sourcemod.2.bgt" PLATFORM_EXT
#define FILENAME_1_6_EYE "sourcemod.2.eye" PLATFORM_EXT #define FILENAME_1_6_EYE "sourcemod.2.eye" PLATFORM_EXT
// Shim for compatibility with MM:S 1.9.0+
#ifndef SOURCE_ENGINE_CSS
#define SOURCE_ENGINE_CSS 13
#endif
HINSTANCE g_hCore = NULL; HINSTANCE g_hCore = NULL;
bool load_attempted = false; bool load_attempted = false;
@@ -257,6 +262,11 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co
filename = FILENAME_1_6_EYE; filename = FILENAME_1_6_EYE;
break; break;
} }
case SOURCE_ENGINE_CSS:
{
filename = FILENAME_1_6_EP2VALVE;
break;
}
default: default:
{ {
return NULL; return NULL;
+3 -8
View File
@@ -43,14 +43,12 @@ KillDrug(client)
{ {
KillDrugTimer(client); KillDrugTimer(client);
new Float:pos[3];
GetClientAbsOrigin(client, pos);
new Float:angs[3]; new Float:angs[3];
GetClientEyeAngles(client, angs); GetClientEyeAngles(client, angs);
angs[2] = 0.0; angs[2] = 0.0;
TeleportEntity(client, pos, angs, NULL_VECTOR); TeleportEntity(client, NULL_VECTOR, angs, NULL_VECTOR);
new clients[2]; new clients[2];
clients[0] = client; clients[0] = client;
@@ -144,15 +142,12 @@ public Action:Timer_Drug(Handle:timer, any:client)
return Plugin_Handled; return Plugin_Handled;
} }
new Float:pos[3];
GetClientAbsOrigin(client, pos);
new Float:angs[3]; new Float:angs[3];
GetClientEyeAngles(client, angs); GetClientEyeAngles(client, angs);
angs[2] = g_DrugAngles[GetRandomInt(0,100) % 20]; angs[2] = g_DrugAngles[GetRandomInt(0,100) % 20];
TeleportEntity(client, pos, angs, NULL_VECTOR); TeleportEntity(client, NULL_VECTOR, angs, NULL_VECTOR);
new clients[2]; new clients[2];
clients[0] = client; clients[0] = client;
@@ -264,7 +259,7 @@ public Action:Command_Drug(client, args)
{ {
decl String:arg2[2]; decl String:arg2[2];
GetCmdArg(2, arg2, sizeof(arg2)); GetCmdArg(2, arg2, sizeof(arg2));
if (arg2[0]) if (StringToInt(arg2))
{ {
toggle = 1; toggle = 1;
} }
+1 -1
View File
@@ -347,7 +347,7 @@ native AdminId:CreateAdmin(const String:name[]="");
* @param maxlength Maximum size of string buffer. * @param maxlength Maximum size of string buffer.
* @return Number of bytes written. * @return Number of bytes written.
*/ */
native GetAdminUsername(AdminId:id, const String:name[], maxlength); native GetAdminUsername(AdminId:id, String:name[], maxlength);
/** /**
* Binds an admin to an identity for fast lookup later on. The bind must be unique. * Binds an admin to an identity for fast lookup later on. The bind must be unique.
+1 -1
View File
@@ -263,7 +263,7 @@ stock Float:operator--(Float:oper)
stock Float:operator-(Float:oper) stock Float:operator-(Float:oper)
{ {
return oper^Float:((-1)^((-1)/2)); /* IEEE values are sign/magnitude */ return oper^Float:cellmin; /* IEEE values are sign/magnitude */
} }
stock Float:operator*(Float:oper1, oper2) stock Float:operator*(Float:oper1, oper2)
+7
View File
@@ -127,6 +127,13 @@ native Float:GetEngineTime();
*/ */
native Float:GetGameTime(); native Float:GetGameTime();
/**
* Returns the game's internal tick count.
*
* @return Game tick count.
*/
native GetGameTickCount();
/** /**
* Returns the game description from the mod. * Returns the game description from the mod.
* *
+11 -1
View File
@@ -404,6 +404,16 @@ native bool:GetMenuExitBackButton(Handle:menu);
*/ */
native SetMenuExitBackButton(Handle:menu, bool:button); native SetMenuExitBackButton(Handle:menu, bool:button);
/**
* Sets whether or not the menu has a "no vote" button in slot 1.
* By default, menus do not have a no vote button.
*
* @param menu Menu Handle.
* @param button True to enable the button, false to remove it.
* @return True if allowed; false on failure.
* @error Invalid Handle.
*/
native bool:SetMenuNoVoteButton(Handle:menu, bool:button);
/** /**
* Cancels a menu from displaying on all clients. While the * Cancels a menu from displaying on all clients. While the
@@ -489,7 +499,7 @@ native bool:VoteMenu(Handle:menu, clients[], numClients, time, flags=0);
* in progress. * in progress.
* @error Invalid Handle. * @error Invalid Handle.
*/ */
stock VoteMenuToAll(Handle:menu, time, flags=0) stock bool:VoteMenuToAll(Handle:menu, time, flags=0)
{ {
new total; new total;
decl players[MaxClients]; decl players[MaxClients];
+3
View File
@@ -66,6 +66,9 @@ enum RoundState {
//Game is over, doing bonus round stuff //Game is over, doing bonus round stuff
RoundState_Bonus, RoundState_Bonus,
//Between rounds
RoundState_BetweenRounds,
}; };
/** /**
+7 -1
View File
@@ -115,13 +115,19 @@ enum TFCond
TFCond_CritOnWin, TFCond_CritOnWin,
TFCond_CritOnFlagCapture, TFCond_CritOnFlagCapture,
TFCond_CritOnKill, TFCond_CritOnKill,
TFCond_RestrictToMelee TFCond_RestrictToMelee,
TFCond_CritMmmph = 44,
TFCond_DefenseBuffMmmph,
}; };
enum TFHoliday enum TFHoliday
{ {
TFHoliday_Birthday = 1, TFHoliday_Birthday = 1,
TFHoliday_Halloween, TFHoliday_Halloween,
TFHoliday_Christmas,
TFHoliday_MeetThePyro,
TFHoliday_MannVsMachine,
TFHoliday_FullMoon, TFHoliday_FullMoon,
TFHoliday_HalloweenOrFullMoon, TFHoliday_HalloweenOrFullMoon,
}; };
+14
View File
@@ -132,6 +132,12 @@ enum {
TF_CUSTOM_PLASMA_GIB, TF_CUSTOM_PLASMA_GIB,
TF_CUSTOM_PRACTICE_STICKY, TF_CUSTOM_PRACTICE_STICKY,
TF_CUSTOM_EYEBALL_ROCKET, TF_CUSTOM_EYEBALL_ROCKET,
TF_CUSTOM_HEADSHOT_DECAPITATION,
TF_CUSTOM_TAUNT_ARMAGEDDON,
TF_CUSTOM_FLARE_PELLET,
TF_CUSTOM_CLEAVER,
TF_CUSTOM_CLEAVER_CRIT,
TF_CUSTOM_SAPPER_RECORDER_DEATH,
}; };
// Weapon codes as used in some events, such as player_death // Weapon codes as used in some events, such as player_death
@@ -218,6 +224,14 @@ enum {
TF_WEAPON_RAYGUN, TF_WEAPON_RAYGUN,
TF_WEAPON_PARTICLE_CANNON, TF_WEAPON_PARTICLE_CANNON,
TF_WEAPON_MECHANICAL_ARM, TF_WEAPON_MECHANICAL_ARM,
TF_WEAPON_DRG_POMSON,
TF_WEAPON_BAT_GIFTWRAP,
TF_WEAPON_GRENADE_ORNAMENT,
TF_WEAPON_RAYGUN_REVENGE,
TF_WEAPON_PEP_BRAWLER_BLASTER,
TF_WEAPON_CLEAVER,
TF_WEAPON_GRENADE_CLEAVER,
TF_WEAPON_ROCKETPACK,
}; };
// TF2 Weapon Slots for GetPlayerWeaponSlot // TF2 Weapon Slots for GetPlayerWeaponSlot
+2 -2
View File
@@ -37,6 +37,6 @@
#define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */ #define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */
#define SOURCEMOD_V_MINOR 4 /**< SourceMod Minor version */ #define SOURCEMOD_V_MINOR 4 /**< SourceMod Minor version */
#define SOURCEMOD_V_RELEASE 1 /**< SourceMod Release version */ #define SOURCEMOD_V_RELEASE 5 /**< SourceMod Release version */
#define SOURCEMOD_VERSION "1.4.1" /**< SourceMod version string (major.minor.release.build) */ #define SOURCEMOD_VERSION "1.4.5" /**< SourceMod version string (major.minor.release.build) */
+1 -1
View File
@@ -1 +1 @@
1.4.1 1.4.5
+9 -1
View File
@@ -40,12 +40,13 @@
*/ */
#define SMINTERFACE_GAMEHELPERS_NAME "IGameHelpers" #define SMINTERFACE_GAMEHELPERS_NAME "IGameHelpers"
#define SMINTERFACE_GAMEHELPERS_VERSION 7 #define SMINTERFACE_GAMEHELPERS_VERSION 8
class CBaseEntity; class CBaseEntity;
class CBaseHandle; class CBaseHandle;
class SendProp; class SendProp;
class ServerClass; class ServerClass;
class ICommandLine;
struct edict_t; struct edict_t;
struct datamap_t; struct datamap_t;
struct typedescription_t; struct typedescription_t;
@@ -284,6 +285,13 @@ namespace SourceMod
* @return True on success, false on failure. * @return True on success, false on failure.
*/ */
virtual bool HintTextMsg(int client, const char *msg) =0; virtual bool HintTextMsg(int client, const char *msg) =0;
/**
* @brief Retrieves the Valve command line pointer.
*
* @return ICommandLine ptr or NULL if not found.
*/
virtual ICommandLine *GetValveCommandLine() =0;
}; };
} }
+3
View File
@@ -191,6 +191,9 @@ bool SDKExtension::OnExtensionLoad(IExtension *me, IShareSys *sys, char *error,
#if defined SMEXT_ENABLE_TRANSLATOR #if defined SMEXT_ENABLE_TRANSLATOR
SM_GET_IFACE(TRANSLATOR, translator); SM_GET_IFACE(TRANSLATOR, translator);
#endif #endif
#if defined SMEXT_ENABLE_NINVOKE
SM_GET_IFACE(NINVOKE, ninvoke);
#endif
#if defined SMEXT_ENABLE_ROOTCONSOLEMENU #if defined SMEXT_ENABLE_ROOTCONSOLEMENU
SM_GET_IFACE(ROOTCONSOLE, rootconsole); SM_GET_IFACE(ROOTCONSOLE, rootconsole);
#endif #endif
+4 -2
View File
@@ -20,7 +20,7 @@ Pants will save us from certain death.
Invaders' blood marches through my veins, like GIANT RADIOACTIVE RUBBER PANTS! Invaders' blood marches through my veins, like GIANT RADIOACTIVE RUBBER PANTS!
THE PANTS COMMAND COMMAND ME! DO NOT IGNORE MY VEINS. THE PANTS COMMAND COMMAND ME! DO NOT IGNORE MY VEINS.
This file sure has gotten big. This file sure has gotten big.
sawce loves anime, sushi, and macs applesawce loves anime, sushi, and macs
u u
not me not me
skull man was here skull man was here
@@ -34,7 +34,7 @@ On The Patty Winters Show this morning were descendants of members of the Donner
Everything outside of this is like a movie I once saw. Everything outside of this is like a movie I once saw.
THIS IS NOT AN EXIT. THIS IS NOT AN EXIT.
ABANDON ALL HOPE YE WHO ENTER HERE. ABANDON ALL HOPE YE WHO ENTER HERE.
egg! egg!!
blimey blimey
crab crab
jibbly jibbly jibbly jibbly jibbly jibbly
@@ -51,3 +51,5 @@ clobstermonkey
that thing that thing
clobber build because amx.h changed (sigh) clobber build because amx.h changed (sigh)
a dead fish a dead fish
BuildBot is very well-written, stable, enterprise software.
I'm on a plane.
+3 -3
View File
@@ -47,12 +47,12 @@ if ($reconf) {
$argn = $#ARGV + 1; $argn = $#ARGV + 1;
print "Attempting to reconfigure...\n"; print "Attempting to reconfigure...\n";
if ($argn > 0 && $^O !~ /MSWin/) { if ($argn > 0 && $^O !~ /MSWin/) {
$result = `CC=$ARGV[0] CXX=$ARGV[0] python3.1 ../build/configure.py --enable-optimize`; $result = `CC=$ARGV[0] CXX=$ARGV[0] python3 ../build/configure.py --enable-optimize`;
} else { } else {
if ($^O eq "linux") { if ($^O eq "linux") {
$result = `CC=gcc-4.4 CXX=gcc-4.4 python3.1 ../build/configure.py --enable-optimize`; $result = `CC=gcc-4.4 CXX=gcc-4.4 python3 ../build/configure.py --enable-optimize`;
} elsif ($^O eq "darwin") { } elsif ($^O eq "darwin") {
$result = `CC=gcc-4.2 CXX=gcc-4.2 python3.1 ../build/configure.py --enable-optimize`; $result = `CC=clang CXX=clang python3 ../build/configure.py --enable-optimize`;
} else { } else {
$result = `C:\\Python31\\Python.exe ..\\build\\configure.py --enable-optimize`; $result = `C:\\Python31\\Python.exe ..\\build\\configure.py --enable-optimize`;
} }
+1 -1
View File
@@ -11,7 +11,7 @@ require 'helpers.pm';
chdir('../../../OUTPUT'); chdir('../../../OUTPUT');
if ($^O eq "linux" || $^O eq "darwin") { if ($^O eq "linux" || $^O eq "darwin") {
system("python3.1 build.py 2>&1"); system("python3 build.py 2>&1");
} else { } else {
system("C:\\Python31\\python.exe build.py 2>&1"); system("C:\\Python31\\python.exe build.py 2>&1");
} }