Compare commits

...

62 Commits

Author SHA1 Message Date
David Anderson
d076aca9ea Forgotten file needed version bump. 2010-01-14 22:26:57 -08:00
David Anderson
f824a53f21 Another credits update. 2010-01-14 03:34:26 -08:00
David Anderson
87ca5e6e05 Prep for release. 2010-01-14 03:30:20 -08:00
David Anderson
23af5357c0 Updated credits for 1.3 release. 2010-01-14 03:29:16 -08:00
David Anderson
d6b82d5dcc Updated changelog. 2010-01-14 03:26:16 -08:00
David Anderson
664da97c42 Registering "sm" logs an error, but will not throw. 2010-01-14 01:11:38 -08:00
Greyscale
b6507b12d4 Fixed missing #endif in adminmenu.inc (bug 4216, r+a13=dvander). 2010-01-14 00:22:45 -08:00
David Anderson
a5ab381c0a Fixed command listener spew on server shutdown (bug 4198, r=fyren, a13=blocking). 2010-01-13 21:48:51 -08:00
David Anderson
8ec5e42c7a Merge. 2010-01-11 20:10:57 -08:00
David Anderson
006423dcf2 Triggering build. 2010-01-11 20:10:38 -08:00
Nicholas Hastings
d0f4d943b6 Added missing SDK define for L4D2 (bug 4209, r+a13=dvander). 2010-01-10 17:38:03 -08:00
Nicholas Hastings
2fd9674e09 Follow-up to bug 4194 (r=dvander). 2010-01-10 17:29:32 -08:00
David Anderson
23fca5e645 Merge. 2010-01-10 17:17:22 -08:00
David Anderson
4beb7fe869 Backed out changeset f8861500d3bc (bug 4211). 2010-01-10 17:17:16 -08:00
David Anderson
2e832f2d01 Fixed reentrancy problems with iterators, forwards, and function removals (bug
4059, r=fyren, a13=blocking).
2010-01-10 16:58:17 -08:00
Fyren
43602da743 Fixed GuessSDKVersion() not working on ep2v (bug 4194, r=dvander, a13=blocking). 2010-01-09 11:33:19 -08:00
Nicholas Hastings
763b73b9c5 Fixed SetUserCvar (sm_rename) on TF/DoD Linux (bug 4196, r=dvander, a13=blocking). 2010-01-07 01:26:01 -08:00
Nicholas Hastings
ffb6e84b45 Add Insurgency to list of games that support HUD messages (bug 4136, r+a13=dvander). 2009-12-19 20:42:32 -08:00
David Anderson
025f216e09 Fixed crashes from rare plugin loading errors (bug 4153, r=ds). 2009-12-19 18:19:28 -08:00
David Anderson
603ac75a08 Fixed SourceMod crashing after flushing the profiler (bug 4149, r=ds). 2009-12-19 18:18:17 -08:00
David Anderson
1b07722848 Add ability to change dontBroadcast status on hooked events (bug 3886, r=ds). 2009-12-19 18:16:41 -08:00
Nicholas Hastings
4de8d67e27 Another TF2 gamedata fix (bug 4151, r=dvander). 2009-12-19 12:57:26 -08:00
Nicholas Hastings
83baabe00a Battlegrounds 2 gamedata support (bug 4146, r+a13=dvander). 2009-12-19 00:03:57 -08:00
Nicholas Hastings
3080ca1ccb TF2 gamedata updates (bug 4147, r=dvander). 2009-12-18 22:01:41 -08:00
David Anderson
c3b0f8a4d2 Fixed infinite loop in Windows build failure path (bug 4144, r=ds). 2009-12-14 23:07:54 -08:00
David Anderson
726ee43736 Fixed profiler being set to NULL (bug 4143, r=fyren). 2009-12-14 23:08:15 -08:00
Fyren
8e1f37a5d2 Improve/fix GetEntity (bug 4092, r=pred) 2009-12-15 23:13:53 -08:00
Dog
ce342ef6fc Fixed CommitSuicide offset on DoD:S (bug 4109, r=dvander). 2009-12-14 20:26:45 -08:00
Nicholas Hastings
0a6acda737 Fixed CreateEntityByName for Insurgency (bug 4046, r+a13=dvander). 2009-12-14 20:31:16 -08:00
Nicholas Hastings
c907c723c3 Updated Synergy gamedata (bug 3987, r=dvander). 2009-12-14 20:30:44 -08:00
Nicholas Hastings
479815911d Added HudText support for Zombie Master (bug 4004, r+a13=dvander). 2009-12-14 20:30:04 -08:00
Nicholas Hastings
29954ec122 Added Neotokyo support (bug 4126, r+a13=dvander). 2009-12-14 20:29:23 -08:00
David Anderson
75455b65da Fixed basecomm description spelling (bug 4112, r=me). 2009-12-14 20:27:26 -08:00
Fyren
5688eb55ec Fix wonky handling of path separators for "sm plugins" commands (bug 3857, r=dvander) 2009-11-23 02:27:24 -08:00
Scott Ehlert
2e4aae95db Updated .hgignore to ignore some Windows and OS X files. 2009-11-22 01:39:29 -06:00
Scott Ehlert
cc43b63508 Updated sample_ext and mms_sample_ext for Orange Box Valve and Left 4 Dead 2 (bug 4118, r=pred). 2009-11-22 01:33:08 -06:00
David Anderson
59593a2d5f Use GetVSPInfo() from MM:S 1.8 legacy API (bug 4081, r=ds). 2009-11-20 15:18:58 -06:00
Fyren
e3f5d5b6cf Fix leak in nominations plugin (bug 4104, r=pred) 2009-11-18 15:44:51 -08:00
Fyren
6085125367 Fix rare basevotes map vote problem (bug 3905, r=dvander) 2009-11-18 15:42:21 -08:00
Scott Ehlert
27805463e3 Added IMemoryUtils::ResolveSymbol() for resolving symbols hidden via GCC's -fvisibility=hidden (bug 4091, r=dvander,pred).
Right now, this is only used on L4D2 where it is needed.
2009-11-06 16:24:40 -06:00
David Anderson
45f2b9f8ca Clarified handle invariants in clientprefs.inc (no bug, r=me). 2009-11-04 13:52:12 -05:00
Fyren
2bd979d62e Don't call edict_t::StateChanged(ushort) on L4D2 (bug 4090, r=dvander) 2009-11-01 02:53:34 -08:00
Scott Ehlert
e434c43e28 Use SOURCE_ENGINE_ORANGEBOXVALVE constant from MM:S 1.8 (bug 4087, r=dvander). 2009-10-30 14:04:43 -05:00
Fyren
02922df1cd More L4D2 gamedata changes 2009-10-30 01:24:55 -07:00
Scott Ehlert
035875f5c1 Fixed Windows build, I think. 2009-10-30 00:03:54 -05:00
Fyren
e3a3dda1d8 Typo fix 2009-10-29 20:34:00 -07:00
Scott Ehlert
7187dde64d Changed name in credits. 2009-10-29 17:35:00 -05:00
Matt Woodrow
fd09d7b176 New sdk uses _linux for vstdlib/tier0 2009-10-30 15:20:48 +13:00
Matt Woodrow
4e8fc2749b AMBuild updated to use new MM:S version 2009-10-30 14:58:17 +13:00
Fyren
8b362700ff Updated GuessSDKVersion 2009-10-30 14:34:34 +13:00
Matt Woodrow
e926a3b94b SourceMod MSVC project files updated, windows tested and loading, gamedata fix. 2009-10-30 14:29:45 +13:00
Matt Woodrow
83d1fc9abe L4D2 gamedata updates 2009-10-30 13:27:05 +13:00
Matt Woodrow
d6a5d99e55 AMBuild updated for new L4D2 engine 2009-10-30 13:27:19 +13:00
Fyren
6322a711c2 Inital SM fixes for l4d2 and linux makefile updates 2009-10-30 13:26:13 +13:00
David Anderson
e024871b50 Use GetSourceEngineBuild() from MM:S 1.8 legacy API (bug 4083, r=ds). 2009-10-29 01:33:57 -07:00
David Anderson
b4e939e273 Let SourceMod use OnUnlinkConCommandBase from MM:S 1.8 legacy API (bug 4080, r=ds). 2009-10-29 00:53:31 -07:00
David Anderson
13743376ee Build against MM:S 1.8 with core-legacy (bug 4076, r=ds). 2009-10-28 23:30:52 -07:00
David Anderson
69cfd36054 Fix iloop race when using AddCommandListener and SourceMod unloads (bug 4077, r=pred). 2009-10-29 00:07:15 -07:00
David Anderson
7d15ec4d15 Fixed crash when activating command listeners on EP1 while inside a command callback (bug 4072, r=pred). 2009-10-28 00:50:48 -07:00
David Anderson
b52a10f28b Added feature testing functionality (bug 4021, r=pred). 2009-10-28 00:37:34 -07:00
David Anderson
da7c65f0e3 Fix maphistory command not returning a value (bug 4069, r=pred, a13=blocking). 2009-10-28 01:55:42 -07:00
David Anderson
a5d2945fc5 Added @spec target (bug 2718, r=fyren). 2009-10-27 03:41:36 -07:00
101 changed files with 3681 additions and 470 deletions

View File

@ -13,3 +13,10 @@
/CrazyDebug.*
/Debug.*
/Release.*
# Files generated by Mac OS X Finder
(^|/)\.DS_Store$
# Files generated by Windows Explorer
(^|/)Desktop\.ini$
(^|/)Thumbs\.db$

View File

@ -17,6 +17,8 @@ class SM:
'name': 'ORANGEBOXVALVE'}
self.sdkInfo['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '5',
'name': 'LEFT4DEAD'}
self.sdkInfo['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '6',
'name': 'LEFT4DEAD2'}
if AMBuild.target['platform'] == 'windows':
self.sdkInfo['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2',
'name': 'DARKMESSIAH'}
@ -26,11 +28,12 @@ class SM:
self.compiler.DetectAll(AMBuild)
#Detect variables
envvars = { 'MMSOURCE17': 'mmsource-1.7',
envvars = { 'MMSOURCE18': 'mmsource-1.8',
'HL2SDK': 'hl2sdk',
'HL2SDKOB': 'hl2sdk-ob',
'HL2SDKL4D': 'hl2sdk-l4d',
'HL2SDKOBVALVE': 'hl2sdk-ob-valve',
'HL2SDKL4D2': 'hl2sdk-l4d2',
'MYSQL5': 'mysql-5.0'
}
@ -46,12 +49,14 @@ class SM:
raise Exception('Path for {0} was not found: {1}'.format(i, path))
else:
head = os.getcwd()
while head != None and head != '/':
oldhead = None
while head != None and head != oldhead:
path = os.path.join(head, envvars[i])
if os.path.isdir(path):
break
oldhead = head
head, tail = os.path.split(head)
if head == None or head == '/':
if head == None or head == oldhead:
raise Exception('Could not find a valid path for {0}'.format(i))
AMBuild.cache.CacheVariable(i, path)
@ -156,7 +161,7 @@ class SM:
self.compiler.AddToListVar('RCINCLUDES', os.path.join(AMBuild.sourceFolder, 'public'))
self.compiler.AddToListVar('RCINCLUDES',
os.path.join(AMBuild.outputFolder, 'includes'))
self.mmsPath = AMBuild.cache['MMSOURCE17']
self.mmsPath = AMBuild.cache['MMSOURCE18']
def DefaultCompiler(self):
return self.compiler.Clone()
@ -195,13 +200,22 @@ class SM:
else:
staticLibs = os.path.join(sdkPath, 'lib', 'linux')
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
for i in ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_i486.so', 'tier0_i486.so']:
link = os.path.join(workFolder, i)
target = os.path.join(staticLibs, i)
try:
os.lstat(link)
except:
job.AddCommand(SymlinkCommand(link, target))
if sdk == 'l4d2':
for i in ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_linux.so', 'tier0_linux.so']:
link = os.path.join(workFolder, i)
target = os.path.join(staticLibs, i)
try:
os.lstat(link)
except:
job.AddCommand(SymlinkCommand(link, target))
else:
for i in ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_i486.so', 'tier0_i486.so']:
link = os.path.join(workFolder, i)
target = os.path.join(staticLibs, i)
try:
os.lstat(link)
except:
job.AddCommand(SymlinkCommand(link, target))
elif AMBuild.target['platform'] == 'windows':
for lib in ['tier0', 'tier1', 'vstdlib', 'mathlib']:
libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
@ -254,8 +268,12 @@ class SM:
if not noLink:
if AMBuild.target['platform'] == 'linux':
compiler['POSTLINKFLAGS'][0:0] = ['-lm']
compiler['POSTLINKFLAGS'][0:0] = ['tier0_i486.so']
compiler['POSTLINKFLAGS'][0:0] = ['vstdlib_i486.so']
if sdk == 'l4d2':
compiler['POSTLINKFLAGS'][0:0] = ['tier0_linux.so']
compiler['POSTLINKFLAGS'][0:0] = ['vstdlib_linux.so']
else:
compiler['POSTLINKFLAGS'][0:0] = ['tier0_i486.so']
compiler['POSTLINKFLAGS'][0:0] = ['vstdlib_i486.so']
return compiler

View File

@ -2,6 +2,135 @@ SourceMod Changelog
----------------------------
SourceMod 1.3.0 [2010-01-15]
URL: http://wiki.alliedmods.net/SourceMod_1.3.0_Release_Notes
Major Features:
* Left 4 Dead 2 support
* Non-networked entity support
User Changes:
- Added Left 4 Dead 2 support (bug 4075).
- Added much richer voting progress feedback (bug 1997).
- Improved support for various third-party games (Nicholas "psychonic" Hastings).
- Added @spec target (bug 2718).
- Added sm_resetcvar command (bug 3636).
- Added "motd" chat trigger (bug 2694).
- Updated GeoIP to OCT-2009.
- Fixed rare map vote error (bug 3905).
- Fixed small leak in the nominations plugin (bug 4104).
- Fixed last client being excluded from some command effects (bug 3984).
- Fixed crashes in plugin [|un|re]loading (bug 4034, bug 4038, bug 4044, bug 4153).
- Special target "@me" is now filtered for certain statuses properly (bug 4000).
- Improved non-admin to admin chat (bug 3844).
- Removed "auto.*" extension folders (bug 3949).
Developer Changes:
- Added non-networked entity support (bug 2459).
- Added improved random number generator (bug 3831).
- Added GetClientCookieTime native (bug 3736).
- Added AskPluginLoad2 callback (bug 3716).
- Added PlayerRunCmd callback (bug 3289).
- Added PointOutsideWorld native (bug 3906).
- Added API for "blanket" command hooks (bug 4015).
- Added ability to test for SourceMod features (bug 4021).
- Added ability to change broadcast status on hooked events (bug 3886).
- OnClientCommand no longer receives unconnected clients (bug 3732).
- Fixed various bugs in client listening API (bug 3818).
- Fixed crash in BanClient (bug 3912).
- Fixed various crashes in self-removing callbacks (bug 4059).
- Fixed rare HUD text crash on TF (bug 4016).
- Fixed OnConfigsExecuted not running on EP1 games with large configs (bug 3828).
- Fixed entity output hooks not working (bug 3988).
- Gamedata folder matches are now case-insensitive (bug 3913).
- Blocked plugins from hooking "sm" command (bug 4013).
----------------------------
SourceMod 1.2.4 [2009-10-03]
URL: http://wiki.alliedmods.net/SourceMod_1.2.4_Release_Notes
- Updated for L4D changes (bugs 4032, 4033, 4035).
- Updated GeoLite Country database for GeoIP extension.
- Fixed crash when block-loading more than eight plugins (bug 4034).
- Fixed rare crash in hudtext code on TF (bug 4016).
- Fixed crash when reloading a blocked plugin failed (bug 4038).
- Fixed Huntsman not firing critical callback on TF (bug 3927).
- Registering the "sm" command no longer has any effect (bug 4013).
- Fixed translation bug in extension API (bug 4010).
----------------------------
SourceMod 1.2.3 [2009-08-28]
URL: http://wiki.alliedmods.net/SourceMod_1.2.3_Release_Notes
- Fix extension filename lookup. (bug 3975).
----------------------------
SourceMod 1.2.2 [2009-08-28]
URL: http://wiki.alliedmods.net/SourceMod_1.2.2_Release_Notes
- Removed auto folders. (bug 3949).
- Added PointOutsideWorld native to sdktools. (bug 3906).
- Added "motd" chat trigger to basetriggers. (bug 2694).
- Added manual extension reloading command to root console menu. (bug 3934)
- Fixed 'list' type custom menu entries overwriting admin restrictions. (bug 3783).
- Added sm_resetcvar command to basecommands. (bug 3636).
- Updated gamedata for DOD:S. (bug 3948).
- Updated gamedata for TF2. (bug 3948).
- Added new .ep2v build config for valve OB based games. (bug 3948).
- Fixed incorrect escaping in clientprefs SQLite queries. (bug 3904)
- Updated gamedata for Synergy. (bug 3315).
- Upgraded to pcre-7.9 (bug 3923).
- Switched Insurgency chat printing to SayText. (bug 3738).
- Updated gamedata for Insurgency. (bug 3511).
- Updated gamedata for ZM. (bug 3746).
- Updated gamedata for Empires. (bug 3500).
- Updated gamedata for ZPS. (bug 3877).
- Updated gamedata for AoC. (bug 3891).
- Fixed RemovePlayerDisguise signature for TF2. (bug 3892).
----------------------------
SourceMod 1.2.1 [2009-05-31]
URL: http://wiki.alliedmods.net/SourceMod_1.2.1_Release_Notes
- Updated SDKTools for latest Team Fortress update.
- Added L4D handling to GuessSDKVersion() (bug 3842).
- Updated Zombie Panic Source offsets (bug 3632).
- Fixed crash when clientprefs saw disconnect from 64th client (bug 3821).
- Fixed Plugin_Handled acting like a Stop in usermsg hooks (bug 3685).
- Fixed early tv_enable causing crashes (bug 3766).
- Fixed unhook event crash (bug 3814).
- Fixed compiler reading uninitialized strings while processing varargs (bug 3811).
- Fixed compiler choosing whether to emit stradjust.pri on dynamic arrays based on uninitialized memory (bug 3810).
- Fixed Windows L4D CreateFakeClient signature (bug 3792).
- Fixed sm_slap for EP1 games (bug 3768).
- Fixed casting problems in TextParsers breaking TrimString for non-ASCII characters (bug 3800).
- Fixed OnClientConnect rejectmsg handling, improved doc (bug 3690).
- Fixed clientprefs not loading cookies for clients on late load (bug 3735).
- Fixed GetCommandFlags on original engine games (bug 3759).
- Fixed compiler asserting when returning a string literal (bug 3836).
- Fixed compiler erroring when tagging functions for string return (bug 3837).
- Fixed compiler not handling constant chained relational operators correctly (bug 3838).
- Fixed revote bug and inflexibilities in RedrawClientVoteMenu (bug 3834).
- Fixed auto update URL being set too late (bug 3699).
- Disabled nextmap in Synergy and Dystopia (bug 3687, bug 3741).
- Removed unnecessary SSE optimizations from msvc9 project files (bug 3756).
- Removed short-lived tag system (bug 3751).
- Removed the alive check from sm_rename. (bug 3698).
- Switched FortressForever to Valve menus (bug 3819).
----------------------------
SourceMod 1.2.0 [2009-03-05]
URL: http://wiki.alliedmods.net/SourceMod_1.2.0_Release_Notes

View File

@ -33,7 +33,7 @@
class ConCommandBaseIterator
{
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
ICvarIteratorInternal *cvarIter;
#else
ConCommandBase *cvarIter;
@ -42,7 +42,7 @@ class ConCommandBaseIterator
public:
ConCommandBaseIterator()
{
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
cvarIter = icvar->FactoryInternalIterator();
cvarIter->SetFirst();
#else
@ -52,14 +52,14 @@ public:
~ConCommandBaseIterator()
{
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
g_pMemAlloc->Free(cvarIter);
#endif
}
inline bool IsValid()
{
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
return cvarIter->IsValid();
#else
return cvarIter != NULL;
@ -68,7 +68,7 @@ public:
inline void Next()
{
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
cvarIter->Next();
#else
cvarIter = const_cast<ConCommandBase*>(cvarIter->GetNext());
@ -77,7 +77,7 @@ public:
inline ConCommandBase *Get()
{
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
return cvarIter->Get();
#else
return cvarIter;

View File

@ -58,6 +58,40 @@ const ParamType CONVARCHANGE_PARAMS[] = {Param_Cell, Param_String, Param_String}
typedef List<const ConVar *> ConVarList;
KTrie<ConVarInfo *> convar_cache;
class ConVarReentrancyGuard
{
ConVar *cvar;
ConVarReentrancyGuard *up;
public:
static ConVarReentrancyGuard *chain;
ConVarReentrancyGuard(ConVar *cvar)
: cvar(cvar), up(chain)
{
chain = this;
}
~ConVarReentrancyGuard()
{
assert(chain == this);
chain = up;
}
static bool IsCvarInChain(ConVar *cvar)
{
ConVarReentrancyGuard *guard = chain;
while (guard != NULL)
{
if (guard->cvar == cvar)
return true;
guard = guard->up;
}
return false;
}
};
ConVarReentrancyGuard *ConVarReentrancyGuard::chain = NULL;
ConVarManager::ConVarManager() : m_ConVarType(0), m_bIsDLLQueryHooked(false), m_bIsVSPQueryHooked(false)
{
}
@ -182,7 +216,7 @@ void ConVarManager::OnSourceModVSPReceived()
}
/* For later MM:S versions, use the updated API, since it's cleaner. */
#if defined METAMOD_PLAPI_VERSION
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
int engine = g_SMAPI->GetSourceEngineBuild();
if (engine == SOURCE_ENGINE_ORIGINAL || vsp_version < 2)
{
@ -536,7 +570,8 @@ void ConVarManager::UnhookConVarChange(ConVar *pConVar, IPluginFunction *pFuncti
}
/* If the forward now has 0 functions in it... */
if (pForward->GetFunctionCount() == 0)
if (pForward->GetFunctionCount() == 0 &&
!ConVarReentrancyGuard::IsCvarInChain(pConVar))
{
/* Free this forward */
g_Forwards.ReleaseForward(pForward);
@ -647,6 +682,8 @@ void ConVarManager::OnConVarChanged(ConVar *pConVar, const char *oldValue)
if (pForward != NULL)
{
ConVarReentrancyGuard guard(pConVar);
/* Now call forwards in plugins that have hooked this */
pForward->PushCell(pInfo->handle);
pForward->PushString(oldValue);

View File

@ -31,7 +31,7 @@
/**
* On SourceHook v4.3 or lower, there are no DVP hooks. Very sad, right?
* Only do this on newer version. For the older code, we'll do an incredibly
* Only do this on newer versions. For the older code, we'll do an incredibly
* hacky detour.
*
* The idea of the "non-hacky" (yeah... no) code is that every unique
@ -49,6 +49,7 @@
#include "ConCmdManager.h"
#include "HalfLife2.h"
#include "ConCommandBaseIterator.h"
#include "ShareSys.h"
#if defined PLATFORM_LINUX
# include <dlfcn.h>
@ -63,8 +64,13 @@
# else
SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
# endif
#elif SH_IMPL_VERSION == 3
extern bool __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
#else
# if SH_IMPL_VERSION >= 4
extern int __SourceHook_FHVPAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>,bool);
extern int __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
# else
extern bool __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
# endif
extern bool __SourceHook_FHRemoveConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
#endif
@ -150,7 +156,10 @@ class GenericCommandHooker : public IConCommandLinkListener
while (iter != vtables.end())
{
if ((*iter).refcount)
{
iter++;
continue;
}
/* Damn it. This event happens AFTER the plugin has unloaded!
* There's two options. Remove the hook now and hope SH's memory
* protection will prevent a crash. Otherwise, we can wait until
@ -283,6 +292,23 @@ class GenericCommandHooker
Patch cgc;
public:
static void DelayedActivation(void *inparam)
{
GenericCommandHooker *cdtrs = reinterpret_cast<GenericCommandHooker*>(inparam);
/* Safe to re-enter because the frame queue is lock+swapped. */
if ((!cdtrs->ces.applied || !cdtrs->cgc.applied) &&
g_HL2.PeekCommandStack() != NULL)
{
g_SourceMod.AddFrameAction(GenericCommandHooker::DelayedActivation, cdtrs);
return;
}
if (!cdtrs->ces.applied)
cdtrs->ApplyPatch(&cdtrs->ces);
if (!cdtrs->cgc.applied)
cdtrs->ApplyPatch(&cdtrs->cgc);
}
bool Enable()
{
const char *platform = NULL;
@ -320,6 +346,12 @@ public:
if (!PrepPatch("CGameClient::ExecuteString", "CGC", platform, &cgc))
return false;
if (g_HL2.PeekCommandStack() != NULL)
{
g_SourceMod.AddFrameAction(GenericCommandHooker::DelayedActivation, this);
return true;
}
ApplyPatch(&ces);
ApplyPatch(&cgc);
@ -531,10 +563,12 @@ void DummyHook()
* BEGIN THE ACTUALLY GENERIC CODE.
*/
#define FEATURECAP_COMMANDLISTENER "command listener"
static GenericCommandHooker s_GenericHooker;
ConsoleDetours g_ConsoleDetours;
ConsoleDetours::ConsoleDetours() : triedToEnable(false), isEnabled(false)
ConsoleDetours::ConsoleDetours() : status(FeatureStatus_Unknown)
{
}
@ -542,6 +576,7 @@ void ConsoleDetours::OnSourceModAllInitialized()
{
m_pForward = g_Forwards.CreateForwardEx("OnAnyCommand", ET_Hook, 3, NULL, Param_Cell,
Param_String, Param_Cell);
g_ShareSys.AddCapabilityProvider(NULL, this, FEATURECAP_COMMANDLISTENER);
}
void ConsoleDetours::OnSourceModShutdown()
@ -559,18 +594,23 @@ void ConsoleDetours::OnSourceModShutdown()
s_GenericHooker.Disable();
}
bool ConsoleDetours::IsAvailable()
FeatureStatus ConsoleDetours::GetFeatureStatus(FeatureType type, const char *name)
{
if (triedToEnable)
return isEnabled;
isEnabled = s_GenericHooker.Enable();
triedToEnable = true;
return isEnabled;
return GetStatus();
}
FeatureStatus ConsoleDetours::GetStatus()
{
if (status == FeatureStatus_Unknown)
{
status = s_GenericHooker.Enable() ? FeatureStatus_Available : FeatureStatus_Unavailable;
}
return status;
}
bool ConsoleDetours::AddListener(IPluginFunction *fun, const char *command)
{
if (!IsAvailable())
if (GetStatus() != FeatureStatus_Available)
return false;
if (command == NULL)

View File

@ -36,7 +36,9 @@
#include "ForwardSys.h"
#include <sm_trie_tpl.h>
class ConsoleDetours : public SMGlobalClass
class ConsoleDetours :
public SMGlobalClass,
public IFeatureProvider
{
friend class PlayerManager;
friend class GenericCommandHooker;
@ -50,6 +52,8 @@ public:
public: //SMGlobalClass
void OnSourceModAllInitialized();
void OnSourceModShutdown();
public: //IFeatureProvider
FeatureStatus GetFeatureStatus(FeatureType type, const char *name);
public:
bool AddListener(IPluginFunction *fun, const char *command);
bool RemoveListener(IPluginFunction *fun, const char *command);
@ -60,15 +64,14 @@ private:
#else
static cell_t Dispatch(ConCommand *pBase);
#endif
bool IsAvailable();
public:
inline bool IsEnabled()
FeatureStatus GetStatus();
bool IsEnabled()
{
return isEnabled;
return status == FeatureStatus_Available;
}
private:
bool triedToEnable;
bool isEnabled;
FeatureStatus status;
IChangeableForward *m_pForward;
KTrie<Listener*> m_CmdLookup;
List<Listener*> m_Listeners;

View File

@ -68,7 +68,11 @@ void Hook_ExecDispatchPre(const CCommand &cmd)
SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
void Hook_ExecDispatchPre()
#else
extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
# if SH_IMPL_VERSION >= 4
extern int __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
# else
extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
# endif
extern bool __SourceHook_FHRemoveConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
void Hook_ExecDispatchPre()
#endif

View File

@ -1,5 +1,5 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
@ -42,6 +42,20 @@ SH_DECL_HOOK2(IGameEventManager2, FireEvent, SH_NOATTRIB, 0, bool, IGameEvent *,
const ParamType GAMEEVENT_PARAMS[] = {Param_Cell, Param_String, Param_Cell};
typedef List<EventHook *> EventHookList;
class EventForwardFilter : public IForwardFilter
{
EventInfo *pEventInfo;
public:
EventForwardFilter(EventInfo *pEventInfo) : pEventInfo(pEventInfo)
{
}
void Preprocess(IPluginFunction *fun, FwdParamInfo *params)
{
params[2].val = pEventInfo->bDontBroadcast ? 1 : 0;
}
};
EventManager::EventManager() : m_EventType(0)
{
/* Create an event lookup trie */
@ -327,6 +341,7 @@ EventInfo *EventManager::CreateEvent(IPluginContext *pContext, const char *name,
pInfo->pEvent = pEvent;
pInfo->pOwner = pContext->GetIdentity();
pInfo->bDontBroadcast = false;
return pInfo;
}
@ -365,6 +380,7 @@ bool EventManager::OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast)
IChangeableForward *pForward;
const char *name;
cell_t res = Pl_Continue;
bool broadcast = bDontBroadcast;
/* The engine accepts NULL without crashing, so to prevent a crash in SM we ignore these */
if (!pEvent)
@ -390,10 +406,16 @@ bool EventManager::OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast)
HandleSecurity sec(NULL, g_pCoreIdent);
Handle_t hndl = g_HandleSys.CreateHandle(m_EventType, &info, NULL, g_pCoreIdent, NULL);
info.bDontBroadcast = bDontBroadcast;
EventForwardFilter filter(&info);
pForward->PushCell(hndl);
pForward->PushString(name);
pForward->PushCell(bDontBroadcast);
pForward->Execute(&res, NULL);
pForward->Execute(&res, &filter);
broadcast = info.bDontBroadcast;
g_HandleSys.FreeHandle(hndl, &sec);
}
@ -414,6 +436,9 @@ bool EventManager::OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast)
m_EventStack.push(NULL);
}
if (broadcast != bDontBroadcast)
RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, true, &IGameEventManager2::FireEvent, (pEvent, broadcast));
RETURN_META_VALUE(MRES_IGNORED, true);
}
@ -441,6 +466,7 @@ bool EventManager::OnFireEvent_Post(IGameEvent *pEvent, bool bDontBroadcast)
{
if (pHook->postCopy)
{
info.bDontBroadcast = bDontBroadcast;
info.pEvent = m_EventCopies.front();
info.pOwner = NULL;
hndl = g_HandleSys.CreateHandle(m_EventType, &info, NULL, g_pCoreIdent, NULL);

View File

@ -53,6 +53,7 @@ struct EventInfo
}
IGameEvent *pEvent;
IdentityToken_t *pOwner;
bool bDontBroadcast;
};
struct EventHook

View File

@ -63,6 +63,8 @@ CRemoteExtension::CRemoteExtension(IExtensionInterface *pAPI, const char *filena
#if defined METAMOD_PLAPI_VERSION
#if SOURCE_ENGINE == SE_LEFT4DEAD
#define GAMEFIX "2.l4d"
#elif SOURCE_ENGINE == SE_LEFT4DEAD2
#define GAMEFIX "2.l4d2"
#elif SOURCE_ENGINE == SE_ORANGEBOX
#define GAMEFIX "2.ep2"
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
@ -71,7 +73,7 @@ CRemoteExtension::CRemoteExtension(IExtensionInterface *pAPI, const char *filena
#define GAMEFIX "2.darkm"
#else
#define GAMEFIX "2.ep1"
#endif //SOURCE_ENGINE == SE_LEFT4DEAD
#endif //(SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
#else //METAMOD_PLAPI_VERSION
#define GAMEFIX "1.ep1"
#endif //METAMOD_PLAPI_VERSION

View File

@ -1,5 +1,5 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
@ -255,6 +255,7 @@ CForward *CForward::CreateForward(const char *name, ExecType et, unsigned int nu
}
CForward *pForward = g_Forwards.ForwardMake();
pForward->m_IterGuard = NULL;
pForward->m_curparam = 0;
pForward->m_ExecType = et;
snprintf(pForward->m_name, FORWARDS_NAME_MAX, "%s", name ? name : "");
@ -294,7 +295,7 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
cell_t high_result = 0;
cell_t low_result = 0;
int err;
unsigned int failed=0, success=0;
unsigned int success=0;
unsigned int num_params = m_curparam;
FwdParamInfo temp_info[SP_MAX_EXEC_PARAMS];
FwdParamInfo *param;
@ -304,10 +305,15 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
memcpy(temp_info, m_params, sizeof(m_params));
m_curparam = 0;
for (iter=m_functions.begin(); iter!=m_functions.end(); iter++)
FuncIteratorGuard guard(&m_IterGuard, &iter);
while (iter != m_functions.end())
{
func = (*iter);
if (filter)
filter->Preprocess(func, temp_info);
for (unsigned int i=0; i<num_params; i++)
{
int err = SP_ERROR_PARAM;
@ -359,11 +365,7 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
}
/* Call the function and deal with the return value. */
if ((err=func->Execute(&cur_result)) != SP_ERROR_NONE)
{
failed++;
}
else
if ((err=func->Execute(&cur_result)) == SP_ERROR_NONE)
{
success++;
switch (m_ExecType)
@ -403,6 +405,9 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
}
}
}
if (!guard.Triggered())
iter++;
}
done:
@ -682,6 +687,7 @@ bool CForward::RemoveFunction(IPluginFunction *func)
{
if ((*iter) == func)
{
m_IterGuard->FixIteratorChain(iter);
found = true;
lst->erase(iter);
break;

View File

@ -61,6 +61,58 @@ struct FwdParamInfo
ParamType pushedas;
};
class SourceMod::IForwardFilter
{
public:
virtual void Preprocess(IPluginFunction *fun, FwdParamInfo *params)
{
}
};
class FuncIteratorGuard
{
bool triggered;
FuncIteratorGuard **pprev;
FuncIter *iter;
FuncIteratorGuard *next;
public:
FuncIteratorGuard(FuncIteratorGuard **pprev, FuncIter *iter)
: triggered(false), pprev(pprev), iter(iter), next(*pprev)
{
*pprev = this;
}
~FuncIteratorGuard()
{
*pprev = next;
}
inline bool Triggered()
{
bool t = triggered;
triggered = false;
return t;
}
/**
* This should not read from |this| before the NULL check, because FwdSys
* can call (NULL)->FixIteratorChain().
*/
void FixIteratorChain(FuncIter &other)
{
FuncIteratorGuard *guard = this;
while (guard != NULL)
{
if (*guard->iter == other)
{
*(guard->iter) = ++(*(guard->iter));
guard->triggered = true;
}
guard = guard->next;
}
}
};
class CForward : public IChangeableForward
{
public: //ICallable
@ -103,6 +155,7 @@ protected:
*/
mutable List<IPluginFunction *> m_functions;
mutable List<IPluginFunction *> m_paused;
FuncIteratorGuard *m_IterGuard;
/* Type and name information */
FwdParamInfo m_params[SP_MAX_EXEC_PARAMS];

View File

@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@ -25,8 +25,6 @@
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include <string.h>
@ -117,6 +115,8 @@ static bool DoesEngineMatch(const char *value)
if (strcmp(value, "orangebox_valve") == 0)
#elif SOURCE_ENGINE == SE_LEFT4DEAD
if (strcmp(value, "left4dead") == 0)
#elif SOURCE_ENGINE == SE_LEFT4DEAD2
if (strcmp(value, "left4dead2") == 0)
#else
#error "Unknown engine type"
#endif
@ -504,7 +504,11 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states)
void *handle = dlopen(info.dli_fname, RTLD_NOW);
if (handle)
{
#if SOURCE_ENGINE == SE_LEFT4DEAD2
final_addr = g_MemUtils.ResolveSymbol(handle, &s_TempSig.sig[1]);
#else
final_addr = dlsym(handle, &s_TempSig.sig[1]);
#endif
dlclose(handle);
} else {
g_Logger.LogError("[SM] Unable to load library \"%s\" (gameconf \"%s\")",

View File

@ -96,14 +96,16 @@ CHalfLife2::~CHalfLife2()
CSharedEdictChangeInfo *g_pSharedChangeInfo = NULL;
#endif
#if !defined METAMOD_PLAPI_VERSION || PLAPI_VERSION < 11
bool is_original_engine = false;
#endif
void CHalfLife2::OnSourceModStartup(bool late)
{
#if SOURCE_ENGINE != SE_DARKMESSIAH
/* The Ship currently is the only known game to use an older version of the engine */
#if defined METAMOD_PLAPI_VERSION
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
if (g_SMAPI->GetSourceEngineBuild() == SOURCE_ENGINE_ORIGINAL)
#else
if (strcasecmp(g_SourceMod.GetGameFolderName(), "ship") == 0)
@ -172,7 +174,7 @@ void CHalfLife2::OnSourceModAllInitialized_Post()
}
}
#if !defined METAMOD_PLAPI_VERSION
#if !defined METAMOD_PLAPI_VERSION || PLAPI_VERSION < 11
bool CHalfLife2::IsOriginalEngine()
{
return is_original_engine;
@ -357,11 +359,13 @@ void CHalfLife2::SetEdictStateChanged(edict_t *pEdict, unsigned short offset)
#if SOURCE_ENGINE != SE_DARKMESSIAH
if (g_pSharedChangeInfo != NULL)
{
#if SOURCE_ENGINE != SE_LEFT4DEAD2
if (offset)
{
pEdict->StateChanged(offset);
}
else
#endif
{
pEdict->StateChanged();
}
@ -543,7 +547,7 @@ bool CHalfLife2::IsLANServer()
bool CHalfLife2::KVLoadFromFile(KeyValues *kv, IBaseFileSystem *filesystem, const char *resourceName, const char *pathID)
{
#if defined METAMOD_PLAPI_VERSION
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
if (g_SMAPI->GetSourceEngineBuild() == SOURCE_ENGINE_ORIGINAL)
#else
if (strcasecmp(g_SourceMod.GetGameFolderName(), "ship") == 0)
@ -668,7 +672,10 @@ edict_t *CHalfLife2::GetHandleEntity(CBaseHandle &hndl)
edict_t *pStoredEdict;
CBaseEntity *pStoredEntity;
pStoredEdict = GetEntity(index, &pStoredEntity);
if (!IndexToAThings(index, &pStoredEntity, &pStoredEdict))
{
return NULL;
}
if (pStoredEdict == NULL || pStoredEntity == NULL)
{

View File

@ -145,7 +145,7 @@ public:
const char *CurrentCommandName();
void AddDelayedKick(int client, int userid, const char *msg);
void ProcessDelayedKicks();
#if !defined METAMOD_PLAPI_VERSION
#if !defined METAMOD_PLAPI_VERSION || PLAPI_VERSION < 11
bool IsOriginalEngine();
#endif
private:
@ -166,6 +166,6 @@ private:
extern CHalfLife2 g_HL2;
edict_t *GetEntity(cell_t num, CBaseEntity **pData);
bool IndexToAThings(cell_t, CBaseEntity **pEntData, edict_t **pEdictData);
#endif //_INCLUDE_SOURCEMOD_CHALFLIFE2_H_

View File

@ -7,7 +7,8 @@ HL2SDK_ORIG = ../../hl2sdk
HL2SDK_OB = ../../hl2sdk-ob
HL2SDK_OB_VALVE = ../../hl2sdk-ob-valve
HL2SDK_L4D = ../../hl2sdk-l4d
MMSOURCE17 = ../../mmsource-1.7
HL2SDK_L4D2 = ../../hl2sdk-l4d2
MMSOURCE17 = ../../mmsource-central
#####################################
### EDIT BELOW FOR OTHER PROJECTS ###
@ -92,11 +93,27 @@ ifeq "$(ENGINE)" "left4dead"
BINARY = sourcemod.2.l4d.so
override ENGSET = true
endif
ifeq "$(ENGINE)" "left4dead2"
HL2SDK = $(HL2SDK_L4D2)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=6
METAMOD = $(MMSOURCE17)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/left4dead2_demo
BINARY = sourcemod.2.l4d2.so
override ENGSET = true
endif
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6
ifeq "$(ENGINE)" "left4dead2"
LINK += $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a vstdlib_linux.so \
tier0_linux.so -static-libgcc
else
LINK += $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a vstdlib_i486.so \
tier0_i486.so -static-libgcc
endif
INCLUDE += -I. -I.. -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/mathlib -I$(HL2PUB)/vstdlib \
-I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 -I$(METAMOD) -I$(METAMOD)/sourcehook \
@ -136,8 +153,13 @@ $(BIN_DIR)/%.o: %.c
all: check
mkdir -p $(BIN_DIR)
ifeq "$(ENGINE)" "left4dead2"
ln -sf $(SRCDS)/bin/vstdlib_linux.so vstdlib_linux.so;
ln -sf $(SRCDS)/bin/tier0_linux.so tier0_linux.so;
else
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so;
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so;
endif
$(MAKE) -f Makefile sourcemod
check:

View File

@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@ -25,15 +25,14 @@
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include "MemoryUtils.h"
#include "ShareSys.h"
#ifdef PLATFORM_LINUX
#include <string.h>
#include <elf.h>
#include <fcntl.h>
#include <link.h>
#include <sys/mman.h>
#endif
MemoryUtils g_MemUtils;
@ -56,6 +55,17 @@ MemoryUtils::MemoryUtils()
}
#endif
MemoryUtils::~MemoryUtils()
{
#ifdef PLATFORM_LINUX
for (size_t i = 0; i < m_SymTables.size(); i++)
{
delete m_SymTables[i];
}
m_SymTables.clear();
#endif
}
void MemoryUtils::OnSourceModAllInitialized()
{
g_ShareSys.AddInterface(NULL, this);
@ -98,6 +108,149 @@ void *MemoryUtils::FindPattern(const void *libPtr, const char *pattern, size_t l
return NULL;
}
void *MemoryUtils::ResolveSymbol(void *handle, const char *symbol)
{
#ifdef PLATFORM_WINDOWS
return GetProcAddress((HMODULE)handle, symbol);
#elif defined PLATFORM_LINUX
struct link_map *dlmap;
struct stat dlstat;
int dlfile;
uintptr_t map_base;
Elf32_Ehdr *file_hdr;
Elf32_Shdr *sections, *shstrtab_hdr, *symtab_hdr, *strtab_hdr;
Elf32_Sym *symtab;
const char *shstrtab, *strtab;
uint16_t section_count;
uint32_t symbol_count;
LibSymbolTable *libtable;
SymbolTable *table;
Symbol *symbol_entry;
dlmap = (struct link_map *)handle;
symtab_hdr = NULL;
strtab_hdr = NULL;
table = NULL;
/* See if we already have a symbol table for this library */
for (size_t i = 0; i < m_SymTables.size(); i++)
{
libtable = m_SymTables[i];
if (libtable->lib_base == dlmap->l_addr)
{
table = &libtable->table;
break;
}
}
/* If we don't have a symbol table for this library, then create one */
if (table == NULL)
{
libtable = new LibSymbolTable();
libtable->table.Initialize();
libtable->lib_base = dlmap->l_addr;
libtable->last_pos = 0;
table = &libtable->table;
m_SymTables.push_back(libtable);
}
/* See if the symbol is already cached in our table */
symbol_entry = table->FindSymbol(symbol, strlen(symbol));
if (symbol_entry != NULL)
{
return symbol_entry->address;
}
/* If symbol isn't in our table, then we have open the actual library */
dlfile = open(dlmap->l_name, O_RDONLY);
if (dlfile == -1 || fstat(dlfile, &dlstat) == -1)
{
close(dlfile);
return NULL;
}
/* Map library file into memory */
file_hdr = (Elf32_Ehdr *)mmap(NULL, dlstat.st_size, PROT_READ, MAP_PRIVATE, dlfile, 0);
map_base = (uintptr_t)file_hdr;
if (file_hdr == MAP_FAILED)
{
close(dlfile);
return NULL;
}
close(dlfile);
if (file_hdr->e_shoff == 0 || file_hdr->e_shstrndx == SHN_UNDEF)
{
munmap(file_hdr, dlstat.st_size);
return NULL;
}
sections = (Elf32_Shdr *)(map_base + file_hdr->e_shoff);
section_count = file_hdr->e_shnum;
/* Get ELF section header string table */
shstrtab_hdr = &sections[file_hdr->e_shstrndx];
shstrtab = (const char *)(map_base + shstrtab_hdr->sh_offset);
/* Iterate sections while looking for ELF symbol table and string table */
for (uint16_t i = 0; i < section_count; i++)
{
Elf32_Shdr &hdr = sections[i];
const char *section_name = shstrtab + hdr.sh_name;
if (strcmp(section_name, ".symtab") == 0)
{
symtab_hdr = &hdr;
}
else if (strcmp(section_name, ".strtab") == 0)
{
strtab_hdr = &hdr;
}
}
/* Uh oh, we don't have a symbol table or a string table */
if (symtab_hdr == NULL || strtab_hdr == NULL)
{
munmap(file_hdr, dlstat.st_size);
return NULL;
}
symtab = (Elf32_Sym *)(map_base + symtab_hdr->sh_offset);
strtab = (const char *)(map_base + strtab_hdr->sh_offset);
symbol_count = symtab_hdr->sh_size / symtab_hdr->sh_entsize;
/* Iterate symbol table starting from the position we were at last time */
for (uint32_t i = libtable->last_pos; i < symbol_count; i++)
{
Elf32_Sym &sym = symtab[i];
unsigned char sym_type = ELF32_ST_TYPE(sym.st_info);
const char *sym_name = strtab + sym.st_name;
Symbol *cur_sym;
/* Skip symbols that are undefined or do not refer to functions or objects */
if (sym.st_shndx == SHN_UNDEF || (sym_type != STT_FUNC && sym_type != STT_OBJECT))
{
continue;
}
/* Caching symbols as we go along */
cur_sym = table->InternSymbol(sym_name, strlen(sym_name), (void *)(dlmap->l_addr + sym.st_value));
if (strcmp(symbol, sym_name) == 0)
{
symbol_entry = cur_sym;
libtable->last_pos = ++i;
break;
}
}
munmap(file_hdr, dlstat.st_size);
return symbol_entry ? symbol_entry->address : NULL;
#endif
}
bool MemoryUtils::GetLibraryInfo(const void *libPtr, DynLibInfo &lib)
{
unsigned long baseAddr;

View File

@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2000 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@ -25,8 +25,6 @@
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_MEMORYUTILS_H_
@ -34,6 +32,12 @@
#include <IMemoryUtils.h>
#include "sm_globals.h"
#ifdef PLATFORM_LINUX
#include <sh_vector.h>
#include "sm_symtable.h"
using namespace SourceHook;
#endif
using namespace SourceMod;
@ -43,16 +47,34 @@ struct DynLibInfo
size_t memorySize;
};
#ifdef PLATFORM_LINUX
typedef uint32_t Elf32_Addr;
struct LibSymbolTable
{
SymbolTable table;
Elf32_Addr lib_base;
uint32_t last_pos;
};
#endif
class MemoryUtils :
public IMemoryUtils,
public SMGlobalClass
{
public:
~MemoryUtils();
public: // SMGlobalClass
void OnSourceModAllInitialized();
public: // IMemoryUtils
void *FindPattern(const void *libPtr, const char *pattern, size_t len);
void *ResolveSymbol(void *handle, const char *symbol);
public:
bool GetLibraryInfo(const void *libPtr, DynLibInfo &lib);
#ifdef PLATFORM_LINUX
private:
CVector<LibSymbolTable *> m_SymTables;
#endif
};
extern MemoryUtils g_MemUtils;

View File

@ -49,7 +49,11 @@ SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &)
#elif SOURCE_ENGINE == SE_DARKMESSIAH
SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
#else
extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
# if SH_IMPL_VERSION >= 4
extern int __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
# else
extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
#endif
extern bool __SourceHook_FHRemoveConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
#endif

View File

@ -76,7 +76,11 @@ SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &)
#elif SOURCE_ENGINE == SE_DARKMESSIAH
SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
#else
extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
# if SH_IMPL_VERSION >= 4
extern int __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
# else
extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
# endif
extern bool __SourceHook_FHRemoveConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
#endif
@ -690,7 +694,7 @@ void PlayerManager::OnClientCommand(edict_t *pEntity)
ClientConsolePrint(pEntity,
" David \"BAILOPAN\" Anderson, Borja \"faluco\" Ferrer");
ClientConsolePrint(pEntity,
" Scott \"Damaged Soul\" Ehlert, Matt \"pRED\" Woodrow");
" Scott \"DS\" Ehlert, Matt \"pRED\" Woodrow");
ClientConsolePrint(pEntity,
" Michael \"ferret\" McKoy, Pavol \"PM OnoTo\" Marko");
ClientConsolePrint(pEntity,

View File

@ -1125,7 +1125,7 @@ void CPluginManager::LoadAutoPlugin(const char *plugin)
{
g_Logger.LogError("[SM] Failed to load plugin \"%s\": %s", plugin, error);
pl->SetErrorState(
pl->GetStatus() == Plugin_BadLoad ? Plugin_BadLoad : Plugin_Failed,
pl->GetStatus() <= Plugin_Created ? Plugin_BadLoad : pl->GetStatus(),
"%s",
error);
}
@ -2052,7 +2052,7 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c
char pluginfile[256];
const char *ext = g_LibSys.GetFileExtension(filename) ? "" : ".smx";
UTIL_Format(pluginfile, sizeof(pluginfile), "%s%s", filename, ext);
g_SourceMod.BuildPath(Path_None, pluginfile, sizeof(pluginfile), "%s%s", filename, ext);
IPlugin *pl = LoadPlugin(pluginfile, false, PluginType_MapUpdated, error, sizeof(error), &wasloaded);
@ -2099,7 +2099,7 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c
{
char pluginfile[256];
const char *ext = g_LibSys.GetFileExtension(arg) ? "" : ".smx";
UTIL_Format(pluginfile, sizeof(pluginfile), "%s%s", arg, ext);
g_SourceMod.BuildPath(Path_None, pluginfile, sizeof(pluginfile), "%s%s", arg, ext);
if (!sm_trie_retrieve(m_LoadLookup, pluginfile, (void **)&pl))
{
@ -2189,7 +2189,7 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c
{
char pluginfile[256];
const char *ext = g_LibSys.GetFileExtension(arg) ? "" : ".smx";
UTIL_Format(pluginfile, sizeof(pluginfile), "%s%s", arg, ext);
g_SourceMod.BuildPath(Path_None, pluginfile, sizeof(pluginfile), "%s%s", arg, ext);
if (!sm_trie_retrieve(m_LoadLookup, pluginfile, (void **)&pl))
{
@ -2310,7 +2310,7 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c
{
char pluginfile[256];
const char *ext = g_LibSys.GetFileExtension(arg) ? "" : ".smx";
UTIL_Format(pluginfile, sizeof(pluginfile), "%s%s", arg, ext);
g_SourceMod.BuildPath(Path_None, pluginfile, sizeof(pluginfile), "%s%s", arg, ext);
if (!sm_trie_retrieve(m_LoadLookup, pluginfile, (void **)&pl))
{
@ -2321,7 +2321,10 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c
char name[PLATFORM_MAX_PATH];
const sm_plugininfo_t *info = pl->GetPublicInfo();
strcpy(name, (IS_STR_FILLED(info->name)) ? info->name : pl->GetFilename());
if (pl->GetStatus() <= Plugin_Paused)
strcpy(name, (IS_STR_FILLED(info->name)) ? info->name : pl->GetFilename());
else
strcpy(name, pl->GetFilename());
if (ReloadPlugin(pl))
{

View File

@ -47,7 +47,7 @@
#include "sm_trie.h"
#include "sourcemod.h"
#include <IRootConsoleMenu.h>
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
#include "convar_sm_l4d.h"
#elif (SOURCE_ENGINE == SE_ORANGEBOX) || (SOURCE_ENGINE == SE_ORANGEBOXVALVE)
#include "convar_sm_ob.h"

View File

@ -527,3 +527,85 @@ NativeEntry *ShareSystem::AddFakeNative(IPluginFunction *pFunc, const char *name
return pEntry;
}
void ShareSystem::AddCapabilityProvider(IExtension *myself, IFeatureProvider *provider,
const char *name)
{
if (m_caps.retrieve(name) != NULL)
return;
Capability cap;
cap.ext = myself;
cap.provider = provider;
m_caps.insert(name, cap);
}
void ShareSystem::DropCapabilityProvider(IExtension *myself, IFeatureProvider *provider,
const char *name)
{
Capability *pCap = m_caps.retrieve(name);
if (pCap == NULL)
return;
if (pCap->ext != myself || pCap->provider != provider)
return;
m_caps.remove(name);
}
FeatureStatus ShareSystem::TestFeature(IPluginRuntime *pRuntime, FeatureType feature,
const char *name)
{
switch (feature)
{
case FeatureType_Native:
return TestNative(pRuntime, name);
case FeatureType_Capability:
return TestCap(name);
default:
break;
}
return FeatureStatus_Unknown;
}
FeatureStatus ShareSystem::TestNative(IPluginRuntime *pRuntime, const char *name)
{
uint32_t index;
if (pRuntime->FindNativeByName(name, &index) == SP_ERROR_NONE)
{
sp_native_t *native;
if (pRuntime->GetNativeByIndex(index, &native) == SP_ERROR_NONE)
{
if (native->status == SP_NATIVE_BOUND)
return FeatureStatus_Available;
else
return FeatureStatus_Unknown;
}
}
NativeEntry *entry = FindNative(name);
if (entry == NULL)
return FeatureStatus_Unknown;
if ((entry->replacement.owner != NULL || entry->owner != NULL) &&
(entry->replacement.func != NULL || entry->func != NULL))
{
return FeatureStatus_Available;
}
else
{
return FeatureStatus_Unavailable;
}
}
FeatureStatus ShareSystem::TestCap(const char *name)
{
Capability *cap = m_caps.retrieve(name);
if (cap == NULL)
return FeatureStatus_Unknown;
return cap->provider->GetFeatureStatus(FeatureType_Capability, name);
}

View File

@ -87,7 +87,13 @@ struct NativeEntry
FakeNative *fake;
};
class ShareSystem :
struct Capability
{
IExtension *ext;
IFeatureProvider *provider;
};
class ShareSystem :
public IShareSys,
public SMGlobalClass,
public IHandleTypeDispatch
@ -110,6 +116,10 @@ public: //IShareSys
void AddDependency(IExtension *myself, const char *filename, bool require, bool autoload);
void RegisterLibrary(IExtension *myself, const char *name);
void OverrideNatives(IExtension *myself, const sp_nativeinfo_t *natives);
void AddCapabilityProvider(IExtension *myself, IFeatureProvider *provider,
const char *name);
void DropCapabilityProvider(IExtension *myself, IFeatureProvider *provider,
const char *name);
public: //SMGlobalClass
/* Pre-empt in case anything tries to register idents early */
void Initialize();
@ -119,6 +129,9 @@ public: //IHandleTypeDispatch
public:
IdentityToken_t *CreateCoreIdentity();
void RemoveInterfaces(IExtension *pExtension);
FeatureStatus TestFeature(IPluginRuntime *pRuntime, FeatureType feature, const char *name);
FeatureStatus TestNative(IPluginRuntime *pRuntime, const char *name);
FeatureStatus TestCap(const char *name);
public:
inline IdentityToken_t *GetIdentRoot()
{
@ -143,6 +156,7 @@ private:
HandleType_t m_IfaceType;
IdentityType_t m_CoreType;
KTrie<NativeEntry *> m_NtvCache;
KTrie<Capability> m_caps;
};
extern ShareSystem g_ShareSys;

View File

@ -34,7 +34,7 @@
UserMessages g_UserMsgs;
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
SH_DECL_HOOK3(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int, const char *);
#else
SH_DECL_HOOK2(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int);
@ -168,13 +168,13 @@ bf_write *UserMessages::StartMessage(int msg_id, const cell_t players[], unsigne
if (m_CurFlags & USERMSG_BLOCKHOOKS)
{
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
buffer = ENGINE_CALL(UserMessageBegin)(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, g_SMAPI->GetUserMessage(msg_id));
#else
buffer = ENGINE_CALL(UserMessageBegin)(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id);
#endif
} else {
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
buffer = engine->UserMessageBegin(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, g_SMAPI->GetUserMessage(msg_id));
#else
buffer = engine->UserMessageBegin(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id);
@ -316,7 +316,7 @@ void UserMessages::_DecRefCounter()
}
}
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name)
#else
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type)
@ -346,7 +346,7 @@ bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_typ
RETURN_META_VALUE(MRES_IGNORED, NULL);
}
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name)
#else
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type)
@ -500,7 +500,7 @@ void UserMessages::OnMessageEnd_Pre()
{
bf_write *engine_bfw;
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
engine_bfw = ENGINE_CALL(UserMessageBegin)(m_CurRecFilter, m_CurId, g_SMAPI->GetUserMessage(m_CurId));
#else
engine_bfw = ENGINE_CALL(UserMessageBegin)(m_CurRecFilter, m_CurId);

View File

@ -79,7 +79,7 @@ public: //IUserMessages
IUserMessageListener *pListener,
bool intercept=false);
public:
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
bf_write *OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name);
bf_write *OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name);
#else

View File

@ -386,6 +386,9 @@ public:
virtual void SetValue( const char *value );
virtual void SetValue( float value );
virtual void SetValue( int value );
#if SOURCE_ENGINE == SE_LEFT4DEAD2
virtual void SetValue( Color value );
#endif
// Reset to default value
void Revert( void );

View File

@ -126,6 +126,6 @@ private:
prof_point_t m_ProfStart;
};
extern ProfileEngine g_Profiler;
extern IProfiler *sm_profiler;
#endif //_INCLUDE_SOURCEMOD_PLUGIN_PROFILER_H_

View File

@ -35,6 +35,7 @@
#include "common_logic.h"
#include "ThreadSupport.h"
#include "TextParsers.h"
#include "Profiler.h"
sm_core_t smcore;
IHandleSys *handlesys;
@ -52,7 +53,8 @@ IForwardManager *forwardsys;
static sm_logic_t logic =
{
NULL,
g_pThreader
g_pThreader,
sm_profiler
};
static void logic_init(const sm_core_t* core, sm_logic_t* _logic)

View File

@ -104,7 +104,8 @@ static sm_core_t core_bridge =
UTIL_TrimWhitespace,
log_error,
get_cvar_string,
UTIL_Format
UTIL_Format,
UTIL_ReplaceAll
};
void InitLogicBridge()

View File

@ -7,18 +7,21 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
CrazyDebug - Dark Messiah|Win32 = CrazyDebug - Dark Messiah|Win32
CrazyDebug - Episode 1|Win32 = CrazyDebug - Episode 1|Win32
CrazyDebug - Left 4 Dead 2|Win32 = CrazyDebug - Left 4 Dead 2|Win32
CrazyDebug - Left 4 Dead|Win32 = CrazyDebug - Left 4 Dead|Win32
CrazyDebug - Old Metamod|Win32 = CrazyDebug - Old Metamod|Win32
CrazyDebug - Orange Box Valve|Win32 = CrazyDebug - Orange Box Valve|Win32
CrazyDebug - Orange Box|Win32 = CrazyDebug - Orange Box|Win32
Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
Debug - Episode 1|Win32 = Debug - Episode 1|Win32
Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32
Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32
Release - Episode 1|Win32 = Release - Episode 1|Win32
Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32
Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32
Release - Old Metamod|Win32 = Release - Old Metamod|Win32
Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32
@ -29,6 +32,8 @@ Global
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Dark Messiah|Win32.Build.0 = CrazyDebug - Dark Messiah|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Episode 1|Win32.ActiveCfg = CrazyDebug - Episode 1|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Episode 1|Win32.Build.0 = CrazyDebug - Episode 1|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Left 4 Dead 2|Win32.ActiveCfg = CrazyDebug - Left 4 Dead 2|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Left 4 Dead 2|Win32.Build.0 = CrazyDebug - Left 4 Dead 2|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Left 4 Dead|Win32.ActiveCfg = CrazyDebug - Left 4 Dead|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Left 4 Dead|Win32.Build.0 = CrazyDebug - Left 4 Dead|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Old Metamod|Win32.ActiveCfg = CrazyDebug - Old Metamod|Win32
@ -41,6 +46,8 @@ Global
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32
@ -53,6 +60,8 @@ Global
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32

View File

@ -60,6 +60,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -224,6 +225,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -308,6 +310,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -472,6 +475,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -556,6 +560,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -638,6 +643,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -719,6 +725,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -803,6 +810,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -885,6 +893,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -966,6 +975,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -1050,6 +1060,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -1214,6 +1225,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -1298,6 +1310,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -1504,6 +1517,256 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="CrazyDebug - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..\;..\systems;..\..\public;..\..\public\sourcepawn;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\engine&quot;;&quot;$(HL2SDKL4D2)\public\game\server&quot;;&quot;$(HL2SDKL4D2)\public\mathlib&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;;&quot;$(HL2SDKL4D2)\public\vstdlib&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOURCEMOD_MM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;SOURCEMOD_BUILD;SM_DEFAULT_THREADER;SOURCE_ENGINE=6"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\mathlib.lib&quot; dbghelp.lib &quot;Wsock32.lib&quot;"
OutputFile="$(OutDir)\sourcemod.2.l4d2.dll"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..\;..\systems;..\..\public;..\..\public\sourcepawn;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\engine&quot;;&quot;$(HL2SDKL4D2)\public\game\server&quot;;&quot;$(HL2SDKL4D2)\public\mathlib&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;;&quot;$(HL2SDKL4D2)\public\vstdlib&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOURCEMOD_MM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;SOURCEMOD_BUILD;SM_DEFAULT_THREADER;SOURCE_ENGINE=6"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\mathlib.lib&quot; &quot;Wsock32.lib&quot;"
OutputFile="$(OutDir)\sourcemod.2.l4d2.dll"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\;..\systems;..\..\public;..\..\public\sourcepawn;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\engine&quot;;&quot;$(HL2SDKL4D2)\public\game\server&quot;;&quot;$(HL2SDKL4D2)\public\mathlib&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;;&quot;$(HL2SDKL4D2)\public\vstdlib&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOURCEMOD_MM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;SOURCEMOD_BUILD;SM_DEFAULT_THREADER;SOURCE_ENGINE=6"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\mathlib.lib&quot; &quot;Wsock32.lib&quot;"
OutputFile="$(OutDir)\sourcemod.2.l4d2.dll"
LinkIncremental="1"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
@ -1648,6 +1911,22 @@
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug - Left 4 Dead 2|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release - Left 4 Dead 2|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Database.cpp"
@ -1999,6 +2278,10 @@
RelativePath="..\sm_stringutil.h"
>
</File>
<File
RelativePath="..\sm_symtable.h"
>
</File>
<File
RelativePath="..\sm_trie.h"
>

View File

@ -324,14 +324,14 @@ void RootConsoleMenu::OnRootConsoleCommand(const char *cmdname, const CCommand &
{
ConsolePrint(" SourceMod was developed by AlliedModders, LLC.");
ConsolePrint(" Development would not have been possible without the following people:");
ConsolePrint(" David \"BAILOPAN\" Anderson, lead developer");
ConsolePrint(" Borja \"faluco\" Ferrer, core developer");
ConsolePrint(" Scott \"Damaged Soul\" Ehlert, core developer");
ConsolePrint(" Matt \"pRED\" Woodrow, core developer");
ConsolePrint(" Michael \"ferret\" McKoy, plugin developer");
ConsolePrint(" Pavol \"PM OnoTo\" Marko, SourceHook developer");
ConsolePrint(" Special thanks to Viper of GameConnect");
ConsolePrint(" Special thanks to Mani of Mani-Admin-Plugin");
ConsolePrint(" David \"BAILOPAN\" Anderson");
ConsolePrint(" Matt \"pRED\" Woodrow");
ConsolePrint(" Scott \"DS\" Ehlert");
ConsolePrint(" Fyren");
ConsolePrint(" Borja \"faluco\" Ferrer");
ConsolePrint(" Pavol \"PM OnoTo\" Marko");
ConsolePrint(" Special thanks to Liam, psychonic, ferret, and Mani");
ConsolePrint(" Special thanks to Viper and SteamFriends");
ConsolePrint(" http://www.sourcemod.net/");
}
else if (strcmp(cmdname, "version") == 0)

231
core/sm_symtable.h Normal file
View File

@ -0,0 +1,231 @@
/**
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*/
#ifndef _INCLUDE_SOURCEMOD_CORE_SYMBOLTABLE_H_
#define _INCLUDE_SOURCEMOD_CORE_SYMBOLTABLE_H_
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#define KESTRING_TABLE_START_SIZE 65536
struct Symbol
{
size_t length;
uint32_t hash;
void *address;
Symbol *tbl_next;
inline char *buffer()
{
return reinterpret_cast<char *>(this + 1);
}
};
class SymbolTable
{
public:
~SymbolTable()
{
for (uint32_t i = 0; i < nbuckets; i++)
{
Symbol *sym = buckets[i];
while (sym != NULL)
{
Symbol *next = sym->tbl_next;
free(sym);
sym = next;
}
}
free(buckets);
}
bool Initialize()
{
buckets = (Symbol **)malloc(sizeof(Symbol *) * KESTRING_TABLE_START_SIZE);
if (buckets == NULL)
{
return false;
}
memset(buckets, 0, sizeof(Symbol *) * KESTRING_TABLE_START_SIZE);
nbuckets = KESTRING_TABLE_START_SIZE;
nused = 0;
bucketmask = KESTRING_TABLE_START_SIZE - 1;
return true;
}
static inline uint32_t HashString(const char *data, size_t len)
{
#undef get16bits
#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
|| defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
#define get16bits(d) (*((const uint16_t *) (d)))
#endif
#if !defined (get16bits)
#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\
+(uint32_t)(((const uint8_t *)(d))[0]) )
#endif
uint32_t hash = len, tmp;
int rem;
if (len <= 0 || data == NULL)
{
return 0;
}
rem = len & 3;
len >>= 2;
/* Main loop */
for (;len > 0; len--) {
hash += get16bits (data);
tmp = (get16bits (data+2) << 11) ^ hash;
hash = (hash << 16) ^ tmp;
data += 2 * sizeof (uint16_t);
hash += hash >> 11;
}
/* Handle end cases */
switch (rem) {
case 3: hash += get16bits (data);
hash ^= hash << 16;
hash ^= data[sizeof (uint16_t)] << 18;
hash += hash >> 11;
break;
case 2: hash += get16bits (data);
hash ^= hash << 11;
hash += hash >> 17;
break;
case 1: hash += *data;
hash ^= hash << 10;
hash += hash >> 1;
}
/* Force "avalanching" of final 127 bits */
hash ^= hash << 3;
hash += hash >> 5;
hash ^= hash << 4;
hash += hash >> 17;
hash ^= hash << 25;
hash += hash >> 6;
return hash;
#undef get16bits
}
Symbol **FindSymbolBucket(const char *str, size_t len, uint32_t hash)
{
uint32_t bucket = hash & bucketmask;
Symbol **pkvs = &buckets[bucket];
Symbol *kvs = *pkvs;
while (kvs != NULL)
{
if (len == kvs->length && memcmp(str, kvs->buffer(), len * sizeof(char)) == 0)
{
return pkvs;
}
pkvs = &kvs->tbl_next;
kvs = *pkvs;
}
return pkvs;
}
void ResizeSymbolTable()
{
uint32_t xnbuckets = nbuckets * 2;
Symbol **xbuckets = (Symbol **)malloc(sizeof(Symbol *) * xnbuckets);
if (xbuckets == NULL)
{
return;
}
memset(xbuckets, 0, sizeof(Symbol *) * xnbuckets);
uint32_t xbucketmask = xnbuckets - 1;
for (uint32_t i = 0; i < nbuckets; i++)
{
Symbol *sym = buckets[i];
while (sym != NULL)
{
Symbol *next = sym->tbl_next;
uint32_t bucket = sym->hash & xbucketmask;
sym->tbl_next = xbuckets[bucket];
xbuckets[bucket] = sym;
sym = next;
}
}
free(buckets);
buckets = xbuckets;
nbuckets = xnbuckets;
bucketmask = xbucketmask;
}
Symbol *FindSymbol(const char *str, size_t len)
{
uint32_t hash = HashString(str, len);
Symbol **pkvs = FindSymbolBucket(str, len, hash);
return *pkvs;
}
Symbol *InternSymbol(const char* str, size_t len, void *address)
{
uint32_t hash = HashString(str, len);
Symbol **pkvs = FindSymbolBucket(str, len, hash);
if (*pkvs != NULL)
{
return *pkvs;
}
Symbol *kvs = (Symbol *)malloc(sizeof(Symbol) + sizeof(char) * (len + 1));
kvs->length = len;
kvs->hash = hash;
kvs->address = address;
kvs->tbl_next = NULL;
memcpy(kvs + 1, str, sizeof(char) * (len + 1));
*pkvs = kvs;
nused++;
if (nused > nbuckets && nbuckets <= INT_MAX / 2)
{
ResizeSymbolTable();
}
return kvs;
}
private:
uint32_t nbuckets;
uint32_t nused;
uint32_t bucketmask;
Symbol **buckets;
};
#endif //_INCLUDE_SOURCEMOD_CORE_SYMBOLTABLE_H_

View File

@ -46,7 +46,7 @@
#include "Logger.h"
#include "ConsoleDetours.h"
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
#define NET_SETCONVAR 6
#else
#define NET_SETCONVAR 5
@ -69,7 +69,7 @@ struct GlobCmdIter
struct ConCmdIter
{
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
ICvarIteratorInternal *pLast;
#else
const ConCommandBase *pLast;
@ -103,7 +103,7 @@ public:
else if (type == htConCmdIter)
{
ConCmdIter *iter = (ConCmdIter * )object;
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
// ICvarIteratorInternal has no virtual destructor
g_pMemAlloc->Free(iter->pLast);
#endif
@ -670,7 +670,8 @@ static cell_t sm_RegServerCmd(IPluginContext *pContext, const cell_t *params)
if (strcasecmp(name, "sm") == 0)
{
return pContext->ThrowNativeError("Cannot register \"sm\" command");
g_Logger.LogError("Request to register \"sm\" command denied.");
return 0;
}
pContext->LocalToString(params[3], &help);
@ -698,7 +699,8 @@ static cell_t sm_RegConsoleCmd(IPluginContext *pContext, const cell_t *params)
if (strcasecmp(name, "sm") == 0)
{
return pContext->ThrowNativeError("Cannot register \"sm\" command");
g_Logger.LogError("Request to register \"sm\" command denied.");
return 0;
}
pContext->LocalToString(params[3], &help);
@ -729,7 +731,8 @@ static cell_t sm_RegAdminCmd(IPluginContext *pContext, const cell_t *params)
if (strcasecmp(name, "sm") == 0)
{
return pContext->ThrowNativeError("Cannot register \"sm\" command");
g_Logger.LogError("Request to register \"sm\" command denied.");
return 0;
}
pContext->LocalToString(params[4], &help);
@ -1183,7 +1186,7 @@ static cell_t FindFirstConCommand(IPluginContext *pContext, const cell_t *params
pContext->LocalToPhysAddr(params[3], &pIsCmd);
pContext->LocalToPhysAddr(params[4], &pFlags);
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
ICvarIteratorInternal *cvarIter = icvar->FactoryInternalIterator();
cvarIter->SetFirst();
if (!cvarIter->IsValid())
@ -1210,7 +1213,7 @@ static cell_t FindFirstConCommand(IPluginContext *pContext, const cell_t *params
}
pIter = new ConCmdIter;
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
pIter->pLast = cvarIter;
#else
pIter->pLast = pConCmd;
@ -1245,7 +1248,7 @@ static cell_t FindNextConCommand(IPluginContext *pContext, const cell_t *params)
return 0;
}
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
ICvarIteratorInternal *cvarIter = pIter->pLast;
cvarIter->Next();
if (!cvarIter->IsValid())

View File

@ -42,6 +42,7 @@
#include "ForwardSys.h"
#include "Logger.h"
#include "ExtensionSys.h"
#include <sm_trie_tpl.h>
#if defined PLATFORM_WINDOWS
#include <windows.h>
@ -491,6 +492,11 @@ static cell_t LibraryExists(IPluginContext *pContext, const cell_t *params)
char *str;
pContext->LocalToString(params[1], &str);
if (strcmp(str, "__CanTestFeatures__") == 0)
{
return 1;
}
if (g_PluginSys.LibraryExists(str))
{
return 1;
@ -630,6 +636,43 @@ static cell_t VerifyCoreVersion(IPluginContext *pContext, const cell_t *params)
return 4;
}
static cell_t GetFeatureStatus(IPluginContext *pContext, const cell_t *params)
{
FeatureType type = (FeatureType)params[1];
char *name;
pContext->LocalToString(params[2], &name);
return g_ShareSys.TestFeature(pContext->GetRuntime(),type, name);
}
static cell_t RequireFeature(IPluginContext *pContext, const cell_t *params)
{
FeatureType type = (FeatureType)params[1];
char *name;
pContext->LocalToString(params[2], &name);
if (g_ShareSys.TestFeature(pContext->GetRuntime(),type, name) != FeatureStatus_Available)
{
char buffer[255];
char *msg = buffer;
char default_message[255];
CPlugin *pPlugin = g_PluginSys.GetPluginByCtx(pContext->GetContext());
g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 3);
if (pContext->GetLastNativeError() != SP_ERROR_NONE || buffer[0] == '\0')
{
UTIL_Format(default_message, sizeof(default_message), "Feature \"%s\" not available", name);
msg = default_message;
}
pPlugin->SetErrorState(Plugin_Error, "%s", msg);
return pContext->ThrowNativeErrorEx(SP_ERROR_ABORTED, "%s", msg);
}
return 1;
}
REGISTER_NATIVES(coreNatives)
{
{"AutoExecConfig", AutoExecConfig},
@ -654,6 +697,8 @@ REGISTER_NATIVES(coreNatives)
{"GetExtensionFileStatus", GetExtensionFileStatus},
{"FindPluginByNumber", FindPluginByNumber},
{"VerifyCoreVersion", VerifyCoreVersion},
{"GetFeatureStatus", GetFeatureStatus},
{"RequireFeature", RequireFeature},
{NULL, NULL},
};

View File

@ -69,39 +69,36 @@ inline edict_t *BaseEntityToEdict(CBaseEntity *pEntity)
inline edict_t *GetEdict(cell_t num)
{
CBaseEntity *pEntity = g_HL2.ReferenceToEntity(num);
if (!pEntity)
edict_t *pEdict;
if (!IndexToAThings(num, NULL, &pEdict))
{
return 0;
return NULL;
}
return pEdict;
}
edict_t *pEdict = ::BaseEntityToEdict(pEntity);
if (!pEdict || pEdict->IsFree())
inline CBaseEntity *GetEntity(cell_t num)
{
CBaseEntity *pEntity;
if (!IndexToAThings(num, &pEntity, NULL))
{
return NULL;
}
int index = g_HL2.ReferenceToIndex(num);
if (index > 0 && index <= g_Players.GetMaxClients())
{
CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
if (!pPlayer || !pPlayer->IsConnected())
{
return NULL;
}
}
return pEdict;
return pEntity;
}
edict_t *GetEntity(cell_t num, CBaseEntity **pData)
/* Given an entity reference or index, fill out a CBaseEntity and/or edict.
If lookup is successful, returns true and writes back the two parameters.
If lookup fails, returns false and doesn't touch the params. */
bool IndexToAThings(cell_t num, CBaseEntity **pEntData, edict_t **pEdictData)
{
CBaseEntity *pEntity = g_HL2.ReferenceToEntity(num);
if (!pEntity)
{
return 0;
return false;
}
int index = g_HL2.ReferenceToIndex(num);
@ -110,20 +107,35 @@ edict_t *GetEntity(cell_t num, CBaseEntity **pData)
CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
if (!pPlayer || !pPlayer->IsConnected())
{
return NULL;
return false;
}
}
*pData = pEntity;
edict_t *pEdict = ::BaseEntityToEdict(pEntity);
if (!pEdict || pEdict->IsFree())
if (pEntData)
{
return NULL;
*pEntData = pEntity;
}
return pEdict;
if (pEdictData)
{
edict_t *pEdict = ::BaseEntityToEdict(pEntity);
if (pEdict->IsFree())
{
pEdict = NULL;
}
*pEdictData = pEdict;
}
return true;
}
/*
<predcrab> AThings is like guaranteed r+ by dvander though
<predcrab> he wont even read the rest of the patch to nit stuff
<Fyren> Like I wasn't going to r? you anyway!
<predcrab> he still sees!
<predcrab> he's everywhere
*/
class VEmptyClass {};
datamap_t *VGetDataDescMap(CBaseEntity *pThisPtr, int offset)
@ -312,8 +324,7 @@ static cell_t GetEntityNetClass(IPluginContext *pContext, const cell_t *params)
static cell_t GetEntData(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
GetEntity(params[1], &pEntity);
CBaseEntity *pEntity = GetEntity(params[1]);
if (!pEntity)
{
@ -342,9 +353,9 @@ static cell_t GetEntData(IPluginContext *pContext, const cell_t *params)
static cell_t SetEntData(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
edict_t *pEdict = GetEntity(params[1], &pEntity);
edict_t *pEdict;
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -386,8 +397,7 @@ static cell_t SetEntData(IPluginContext *pContext, const cell_t *params)
static cell_t GetEntDataFloat(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
GetEntity(params[1], &pEntity);
CBaseEntity *pEntity = GetEntity(params[1]);
if (!pEntity)
{
@ -408,9 +418,9 @@ static cell_t GetEntDataFloat(IPluginContext *pContext, const cell_t *params)
static cell_t SetEntDataFloat(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
edict_t *pEdict = GetEntity(params[1], &pEntity);
edict_t *pEdict;
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -433,8 +443,7 @@ static cell_t SetEntDataFloat(IPluginContext *pContext, const cell_t *params)
static cell_t GetEntDataVector(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
GetEntity(params[1], &pEntity);
CBaseEntity *pEntity = GetEntity(params[1]);
if (!pEntity)
{
@ -462,9 +471,9 @@ static cell_t GetEntDataVector(IPluginContext *pContext, const cell_t *params)
static cell_t SetEntDataVector(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
edict_t *pEdict = GetEntity(params[1], &pEntity);
edict_t *pEdict;
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -495,8 +504,7 @@ static cell_t SetEntDataVector(IPluginContext *pContext, const cell_t *params)
/* THIS GUY IS DEPRECATED. */
static cell_t GetEntDataEnt(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
GetEntity(params[1], &pEntity);
CBaseEntity *pEntity = GetEntity(params[1]);
if (!pEntity)
{
@ -532,7 +540,10 @@ int CheckBaseHandle(CBaseHandle &hndl)
edict_t *pStoredEdict;
CBaseEntity *pStoredEntity;
pStoredEdict = GetEntity(index, &pStoredEntity);
if (!IndexToAThings(index, &pStoredEntity, &pStoredEdict))
{
return -1;
}
if (pStoredEdict == NULL || pStoredEntity == NULL)
{
@ -556,8 +567,7 @@ int CheckBaseHandle(CBaseHandle &hndl)
static cell_t GetEntDataEnt2(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
GetEntity(params[1], &pEntity);
CBaseEntity *pEntity = GetEntity(params[1]);
if (pEntity == NULL)
{
@ -580,9 +590,9 @@ static cell_t GetEntDataEnt2(IPluginContext *pContext, const cell_t *params)
static cell_t SetEntDataEnt(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
edict_t *pEdict = GetEntity(params[1], &pEntity);
edict_t *pEdict;
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -599,8 +609,7 @@ static cell_t SetEntDataEnt(IPluginContext *pContext, const cell_t *params)
{
hndl.Set(NULL);
} else {
CBaseEntity *pOther;
GetEntity(params[3], &pOther);
CBaseEntity *pOther = GetEntity(params[3]);
if (!pOther)
{
@ -622,9 +631,9 @@ static cell_t SetEntDataEnt(IPluginContext *pContext, const cell_t *params)
static cell_t SetEntDataEnt2(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
edict_t *pEdict = GetEntity(params[1], &pEntity);
edict_t *pEdict;
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -643,8 +652,7 @@ static cell_t SetEntDataEnt2(IPluginContext *pContext, const cell_t *params)
}
else
{
CBaseEntity *pOther;
GetEntity(params[3], &pOther);
CBaseEntity *pOther = GetEntity(params[3]);
if (!pOther)
{
@ -752,7 +760,7 @@ static cell_t FindDataMapOffs(IPluginContext *pContext, const cell_t *params)
datamap_t *pMap;
typedescription_t *td;
char *offset;
GetEntity(params[1], &pEntity);
pEntity = GetEntity(params[1]);
if (!pEntity)
{
@ -856,8 +864,7 @@ static cell_t FindDataMapOffs(IPluginContext *pContext, const cell_t *params)
static cell_t GetEntDataString(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
GetEntity(params[1], &pEntity);
CBaseEntity *pEntity = GetEntity(params[1]);
if (!pEntity)
{
@ -880,9 +887,9 @@ static cell_t GetEntDataString(IPluginContext *pContext, const cell_t *params)
static cell_t SetEntDataString(IPluginContext *pContext, const cell_t *params)
{
CBaseEntity *pEntity;
edict_t *pEdict = GetEntity(params[1], &pEntity);
edict_t *pEdict;
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -968,9 +975,7 @@ static cell_t GetEntProp(IPluginContext *pContext, const cell_t *params)
edict_t *pEdict;
int bit_count;
pEdict = GetEntity(params[1], &pEntity);
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -1060,9 +1065,7 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params)
edict_t *pEdict;
int bit_count;
pEdict = GetEntity(params[1], &pEntity);
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -1150,9 +1153,7 @@ static cell_t GetEntPropFloat(IPluginContext *pContext, const cell_t *params)
const char *class_name;
edict_t *pEdict;
pEdict = GetEntity(params[1], &pEntity);
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -1221,9 +1222,7 @@ static cell_t SetEntPropFloat(IPluginContext *pContext, const cell_t *params)
const char *class_name;
edict_t *pEdict;
pEdict = GetEntity(params[1], &pEntity);
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -1297,9 +1296,7 @@ static cell_t GetEntPropEnt(IPluginContext *pContext, const cell_t *params)
const char *class_name;
edict_t *pEdict;
pEdict = GetEntity(params[1], &pEntity);
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -1367,9 +1364,7 @@ static cell_t SetEntPropEnt(IPluginContext *pContext, const cell_t *params)
const char *class_name;
edict_t *pEdict;
pEdict = GetEntity(params[1], &pEntity);
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -1431,8 +1426,7 @@ static cell_t SetEntPropEnt(IPluginContext *pContext, const cell_t *params)
}
else
{
CBaseEntity *pOther;
GetEntity(params[4], &pOther);
CBaseEntity *pOther = GetEntity(params[4]);
if (!pOther)
{
@ -1459,9 +1453,7 @@ static cell_t GetEntPropVector(IPluginContext *pContext, const cell_t *params)
const char *class_name;
edict_t *pEdict;
pEdict = GetEntity(params[1], &pEntity);
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -1537,9 +1529,7 @@ static cell_t SetEntPropVector(IPluginContext *pContext, const cell_t *params)
const char *class_name;
edict_t *pEdict;
pEdict = GetEntity(params[1], &pEntity);
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -1621,9 +1611,7 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
edict_t *pEdict;
bool bIsStringIndex;
pEdict = GetEntity(params[1], &pEntity);
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}
@ -1711,9 +1699,9 @@ static cell_t SetEntPropString(IPluginContext *pContext, const cell_t *params)
char *prop;
int offset;
int maxlen;
edict_t *pEdict = GetEntity(params[1], &pEntity);
edict_t *pEdict;
if (!pEntity)
if (!IndexToAThings(params[1], &pEntity, &pEdict))
{
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
}

View File

@ -348,6 +348,23 @@ static cell_t sm_SetEventString(IPluginContext *pContext, const cell_t *params)
return 1;
}
static cell_t sm_SetEventBroadcast(IPluginContext *pContext, const cell_t *params)
{
Handle_t hndl = static_cast<Handle_t>(params[1]);
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
}
pInfo->bDontBroadcast = params[2] ? true : false;
return 1;
}
REGISTER_NATIVES(gameEventNatives)
{
{"HookEvent", sm_HookEvent},
@ -365,5 +382,7 @@ REGISTER_NATIVES(gameEventNatives)
{"SetEventInt", sm_SetEventInt},
{"SetEventFloat", sm_SetEventFloat},
{"SetEventString", sm_SetEventString},
{"SetEventBroadcast", sm_SetEventBroadcast},
{NULL, NULL}
};

View File

@ -73,7 +73,12 @@ static cell_t IsDedicatedServer(IPluginContext *pContext, const cell_t *params)
static cell_t GetEngineTime(IPluginContext *pContext, const cell_t *params)
{
#if SOURCE_ENGINE == SE_LEFT4DEAD2
float fTime = Plat_FloatTime();
#else
float fTime = engine->Time();
#endif
return sp_ftoc(fTime);
}
@ -438,28 +443,29 @@ static cell_t smn_IsPlayerAlive(IPluginContext *pContext, const cell_t *params)
static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
{
#if defined METAMOD_PLAPI_VERSION
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
int version = g_SMAPI->GetSourceEngineBuild();
if (version == SOURCE_ENGINE_ORIGINAL)
switch (version)
{
case SOURCE_ENGINE_ORIGINAL:
return 10;
}
else if (version == SOURCE_ENGINE_DARKMESSIAH)
{
return 15;
}
else if (version == SOURCE_ENGINE_EPISODEONE)
{
case SOURCE_ENGINE_EPISODEONE:
return 20;
}
else if (version == SOURCE_ENGINE_ORANGEBOX)
{
# if defined METAMOD_PLAPI_VERSION
/* Newer games. */
case SOURCE_ENGINE_DARKMESSIAH:
return 15;
case SOURCE_ENGINE_ORANGEBOX:
return 30;
}
else if (version == SOURCE_ENGINE_LEFT4DEAD)
{
case SOURCE_ENGINE_ORANGEBOXVALVE:
return 35;
case SOURCE_ENGINE_LEFT4DEAD:
return 40;
case SOURCE_ENGINE_LEFT4DEAD2:
return 50;
# endif
}
#else
if (g_HL2.IsOriginalEngine())

View File

@ -87,7 +87,7 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen
ismm->AddListener(this, this);
#if defined METAMOD_PLAPI_VERSION
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
if ((vsp_interface = g_SMAPI->GetVSPInfo(&vsp_version)) == NULL)
#endif
{
@ -177,7 +177,7 @@ void SourceMod_Core::OnVSPListening(IServerPluginCallbacks *iface)
return;
}
#if defined METAMOD_PLAPI_VERSION
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
if (vsp_version == 0)
{
g_SMAPI->GetVSPInfo(&vsp_version);
@ -205,11 +205,13 @@ void SourceMod_Core::OnVSPListening(IServerPluginCallbacks *iface)
}
}
#if defined METAMOD_PLAPI_VERSION
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
void SourceMod_Core::OnUnlinkConCommandBase(PluginId id, ConCommandBase *pCommand)
{
#if SOURCE_ENGINE < SE_ORANGEBOX
Global_OnUnlinkConCommandBase(pCommand);
#endif
}
#else

View File

@ -32,7 +32,7 @@
#ifndef _INCLUDE_SOURCEMOD_MM_API_H_
#define _INCLUDE_SOURCEMOD_MM_API_H_
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
#include "convar_sm_l4d.h"
#elif (SOURCE_ENGINE == SE_ORANGEBOX) || (SOURCE_ENGINE == SE_ORANGEBOXVALVE)
#include "convar_sm_ob.h"
@ -76,7 +76,7 @@ public:
const char *GetLogTag();
public:
void OnVSPListening(IServerPluginCallbacks *iface);
#if defined METAMOD_PLAPI_VERSION
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
void OnUnlinkConCommandBase(PluginId id, ConCommandBase *pCommand);
#else
void OnPluginUnload(PluginId id);

View File

@ -7,7 +7,8 @@ HL2SDK_ORIG = ../../../hl2sdk
HL2SDK_OB = ../../../hl2sdk-ob
HL2SDK_OB_VALVE = ../../../hl2sdk-ob-valve
HL2SDK_L4D = ../../../hl2sdk-l4d
MMSOURCE17 = ../../../mmsource-1.7
HL2SDK_L4D2 = ../../../hl2sdk-l4d2
MMSOURCE17 = ../../../mmsource-central
#####################################
### EDIT BELOW FOR OTHER PROJECTS ###
@ -79,16 +80,33 @@ ifeq "$(ENGINE)" "left4dead"
USEMETA = true
CFLAGS += -DHOOKING_ENABLED
endif
ifeq "$(ENGINE)" "left4dead2"
HL2SDK = $(HL2SDK_L4D2)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=6
METAMOD = $(MMSOURCE17)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/left4dead2_demo
GAMEFIX = 2.l4d2
override ENGSET = true
USEMETA = true
CFLAGS += -DHOOKING_ENABLED
endif
ifeq "$(USEMETA)" "true"
ifeq "$(ENGINE)" "left4dead2"
LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_linux.so tier0_linux.so
else
LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_i486.so tier0_i486.so
endif
LINK += $(LINK_HL2)
INCLUDE += -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
-I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn \
-I$(SMSDK)/public/extensions -I$(SMSDK)/public/jit -I$(SMSDK)/public/jit/x86
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6
else
INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/extensions -I$(SMSDK)/public/jit \
-I$(SMSDK)/public/jit/x86 -I$(SMSDK)/public/sourcepawn
@ -142,8 +160,13 @@ $(BIN_DIR)/%.o: %.cpp
all: check
mkdir -p $(BIN_DIR)/sdk
if [ "$(USEMETA)" = "true" ]; then \
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so; \
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so; \
if [ "$(ENGINE)" = "left4dead2" ]; then \
ln -sf $(SRCDS)/bin/vstdlib_linux.so vstdlib_linux.so; \
ln -sf $(SRCDS)/bin/tier0_linux.so tier0_linux.so; \
else \
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so; \
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so; \
fi \
fi
$(MAKE) -f Makefile extension

View File

@ -7,12 +7,14 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
Debug - Episode 1|Win32 = Debug - Episode 1|Win32
Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32
Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32
Release - Episode 1|Win32 = Release - Episode 1|Win32
Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32
Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32
Release - Old Metamod|Win32 = Release - Old Metamod|Win32
Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32
@ -23,6 +25,8 @@ Global
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32
@ -35,6 +39,8 @@ Global
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
{E38F65D9-74B2-4373-B46A-DBB76F579F98}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32

View File

@ -974,6 +974,164 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\jit;..\..\..\public\jit\x86;..\..\..\public\extensions;..\..\..\public\sourcepawn;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;BINTOOLS_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;HOOKING_ENABLED;SOURCE_ENGINE=6"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\mathlib.lib&quot;"
OutputFile="$(OutDir)\bintools.ext.2.l4d2.dll"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\jit;..\..\..\public\jit\x86;..\..\..\public\extensions;..\..\..\public\sourcepawn;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BINTOOLS_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;HOOKING_ENABLED;SOURCE_ENGINE=6"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\mathlib.lib&quot;"
OutputFile="$(OutDir)\bintools.ext.2.l4d2.dll"
LinkIncremental="1"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -7,7 +7,8 @@ HL2SDK_ORIG = ../../../hl2sdk
HL2SDK_OB = ../../../hl2sdk-ob
HL2SDK_OB_VALVE = ../../../hl2sdk-ob-valve
HL2SDK_L4D = ../../../hl2sdk-l4d
MMSOURCE17 = ../../../mmsource-1.7
HL2SDK_L4D2 = ../../../hl2sdk-l4d2
MMSOURCE17 = ../../../mmsource-central
#####################################
### EDIT BELOW FOR OTHER PROJECTS ###
@ -78,20 +79,31 @@ ifeq "$(ENGINE)" "left4dead"
GAMEFIX = 2.l4d
override ENGSET = true
endif
ifeq "$(USEMETA)" "true"
LINK_HL2 = $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a vstdlib_i486.so tier0_i486.so
LINK += $(LINK_HL2)
INCLUDE += -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/mathlib -I$(HL2PUB)/tier0 \
-I$(HL2PUB)/tier1 -I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/extensions \
-I$(SMSDK)/public/sourcepawn
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5
else
INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
ifeq "$(ENGINE)" "left4dead2"
HL2SDK = $(HL2SDK_L4D2)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=6
METAMOD = $(MMSOURCE17)/core
INCLUDE += -I$(HL2SDK)/public/game/server -I$(HL2SDK)/common -I$(HL2SDK)/game/shared
SRCDS = $(SRCDS_BASE)/left4dead2_demo
GAMEFIX = 2.l4d2
override ENGSET = true
endif
ifeq "$(ENGINE)" "left4dead2"
LINK_HL2 = $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a vstdlib_linux.so tier0_linux.so
else
LINK_HL2 = $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a vstdlib_i486.so tier0_i486.so
endif
LINK += $(LINK_HL2)
INCLUDE += -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/mathlib -I$(HL2PUB)/tier0 \
-I$(HL2PUB)/tier1 -I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/extensions \
-I$(SMSDK)/public/sourcepawn
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6
LINK += -m32 -ldl -lm
CFLAGS += -D_LINUX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
@ -137,10 +149,13 @@ $(BIN_DIR)/%.o: %.cpp
all: check
mkdir -p $(BIN_DIR)/sdk
if [ "$(USEMETA)" = "true" ]; then \
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so; \
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so; \
fi
ifeq "$(ENGINE)" "left4dead2"
ln -sf $(SRCDS)/bin/vstdlib_linux.so vstdlib_linux.so;
ln -sf $(SRCDS)/bin/tier0_linux.so tier0_linux.so;
else
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so;
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so;
endif
$(MAKE) -f Makefile extension
check:

View File

@ -337,50 +337,75 @@ bool SDKTools::LevelInit(char const *pMapName, char const *pMapEntities, char co
bool SDKTools::ProcessCommandTarget(cmd_target_info_t *info)
{
if (strcmp(info->pattern, "@aim") != 0)
{
return false;
}
IGamePlayer *pAdmin = info->admin ? playerhelpers->GetGamePlayer(info->admin) : NULL;
/* The server can't aim, of course. */
if (pAdmin == NULL)
if (strcmp(info->pattern, "@aim") == 0)
{
return false;
}
/* The server can't aim, of course. */
if (pAdmin == NULL)
{
return false;
}
int player_index;
if ((player_index = GetClientAimTarget(pAdmin->GetEdict(), true)) < 1)
int player_index;
if ((player_index = GetClientAimTarget(pAdmin->GetEdict(), true)) < 1)
{
info->reason = COMMAND_TARGET_NONE;
info->num_targets = 0;
return true;
}
IGamePlayer *pTarget = playerhelpers->GetGamePlayer(player_index);
if (pTarget == NULL)
{
info->reason = COMMAND_TARGET_NONE;
info->num_targets = 0;
return true;
}
info->reason = playerhelpers->FilterCommandTarget(pAdmin, pTarget, info->flags);
if (info->reason != COMMAND_TARGET_VALID)
{
info->num_targets = 0;
return true;
}
info->targets[0] = player_index;
info->num_targets = 1;
info->reason = COMMAND_TARGET_VALID;
info->target_name_style = COMMAND_TARGETNAME_RAW;
snprintf(info->target_name, info->target_name_maxlength, "%s", pTarget->GetName());
return true;
}
else if (strcmp(info->pattern, "@spec") == 0)
{
info->reason = COMMAND_TARGET_NONE;
const char *teamname = tools_GetTeamName(1);
if (strcasecmp(teamname, "spectator") != 0)
return false;
info->num_targets = 0;
for (int i = 1; i <= playerhelpers->GetMaxClients(); i++)
{
IGamePlayer *player = playerhelpers->GetGamePlayer(i);
if (player == NULL || !player->IsInGame())
continue;
IPlayerInfo *plinfo = player->GetPlayerInfo();
if (plinfo == NULL)
continue;
if (plinfo->GetTeamIndex() == 1 &&
playerhelpers->FilterCommandTarget(pAdmin, player, info->flags) ==
COMMAND_TARGET_VALID)
{
info->targets[info->num_targets++] = i;
}
}
info->reason = info->num_targets > 0 ? COMMAND_TARGET_VALID : COMMAND_TARGET_EMPTY_FILTER;
info->target_name_style = COMMAND_TARGETNAME_ML;
snprintf(info->target_name, info->target_name_maxlength, "all spectators");
return true;
}
IGamePlayer *pTarget = playerhelpers->GetGamePlayer(player_index);
if (pTarget == NULL)
{
info->reason = COMMAND_TARGET_NONE;
info->num_targets = 0;
return true;
}
info->reason = playerhelpers->FilterCommandTarget(pAdmin, pTarget, info->flags);
if (info->reason != COMMAND_TARGET_VALID)
{
info->num_targets = 0;
return true;
}
info->targets[0] = player_index;
info->num_targets = 1;
info->reason = COMMAND_TARGET_VALID;
info->target_name_style = COMMAND_TARGETNAME_RAW;
snprintf(info->target_name, info->target_name_maxlength, "%s", pTarget->GetName());
return true;
return false;
}
const char *SDKTools::GetExtensionVerString()

View File

@ -128,6 +128,8 @@ extern ICallWrapper *g_pAcceptInput;
extern SourceHook::CallClass<IVEngineServer> *enginePatch;
extern SourceHook::CallClass<IEngineSound> *enginesoundPatch;
extern const char *tools_GetTeamName(int team);
#include <compat_wrappers.h>
#define ENGINE_CALL(func) SH_CALL(enginePatch, &IVEngineServer::func)

View File

@ -7,12 +7,14 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
Debug - Episode 1|Win32 = Debug - Episode 1|Win32
Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32
Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32
Release - Episode 1|Win32 = Release - Episode 1|Win32
Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32
Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32
Release - Old Metamod|Win32 = Release - Old Metamod|Win32
Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32
@ -23,6 +25,8 @@ Global
{7A740927-C751-4312-BF9D-6367F8C508F8}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32
@ -35,6 +39,8 @@ Global
{7A740927-C751-4312-BF9D-6367F8C508F8}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
{7A740927-C751-4312-BF9D-6367F8C508F8}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32

View File

@ -60,6 +60,7 @@
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -1007,6 +1008,172 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\extensions;..\..\..\public\sourcepawn;&quot;$(HL2SDKL4D2)\common&quot;;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\engine&quot;;&quot;$(HL2SDKL4D2)\public\game\server&quot;;&quot;$(HL2SDKL4D2)\public\mathlib&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\game\shared&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=6"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
AdditionalIncludeDirectories="..\..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\mathlib.lib&quot;"
OutputFile="$(OutDir)\sdktools.ext.2.l4d2.dll"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\extensions;..\..\..\public\sourcepawn;&quot;$(HL2SDKL4D2)\common&quot;;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\engine&quot;;&quot;$(HL2SDKL4D2)\public\game\server&quot;;&quot;$(HL2SDKL4D2)\public\mathlib&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=6"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="BINARY_NAME=\&quot;$(TargetFileName)\&quot;"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\mathlib.lib&quot;"
OutputFile="$(OutDir)\sdktools.ext.2.l4d2.dll"
LinkIncremental="1"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -110,33 +110,39 @@ static cell_t GetTeamCount(IPluginContext *pContext, const cell_t *params)
}
static int g_teamname_offset = -1;
const char *tools_GetTeamName(int team)
{
if (size_t(team) >= g_Teams.size())
return NULL;
if (g_teamname_offset == 0)
return NULL;
if (g_teamname_offset == -1)
{
SendProp *prop = g_pGameHelpers->FindInSendTable(g_Teams[team].ClassName, "m_szTeamname");
if (prop == NULL)
{
g_teamname_offset = 0;
return NULL;
}
g_teamname_offset = prop->GetOffset();
}
return (const char *)((unsigned char *)g_Teams[team].pEnt + g_teamname_offset);
}
static cell_t GetTeamName(IPluginContext *pContext, const cell_t *params)
{
int teamindex = params[1];
if (teamindex >= (int)g_Teams.size() || !g_Teams[teamindex].ClassName)
{
return pContext->ThrowNativeError("Team index %d is invalid", teamindex);
}
if (g_teamname_offset == 0)
{
return pContext->ThrowNativeError("Team names are not available on this game.");
}
if (g_teamname_offset == -1)
{
SendProp *prop = g_pGameHelpers->FindInSendTable(g_Teams[teamindex].ClassName, "m_szTeamname");
if (prop == NULL)
{
g_teamname_offset = 0;
return pContext->ThrowNativeError("Team names are not available on this game.");
}
g_teamname_offset = prop->GetOffset();
}
char *name = (char *)((unsigned char *)g_Teams[teamindex].pEnt + g_teamname_offset);
const char *name = tools_GetTeamName(teamindex);
if (name == NULL)
return pContext->ThrowNativeError("Team names are not available on this game.");
pContext->StringToLocalUTF8(params[2], params[3], name, NULL);

View File

@ -530,7 +530,7 @@ static cell_t smn_TRGetPointContents(IPluginContext *pContext, const cell_t *par
{
mask = enginetrace->GetPointContents(pos);
} else {
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
mask = enginetrace->GetPointContents(pos, 0, &hentity);
#else
mask = enginetrace->GetPointContents(pos, &hentity);

View File

@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod SDKTools Extension
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@ -25,8 +25,6 @@
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include "extension.h"
@ -131,7 +129,11 @@ static cell_t PrepSDKCall_SetSignature(IPluginContext *pContext, const cell_t *p
{
return 0;
}
#if SOURCE_ENGINE == SE_LEFT4DEAD2
s_call_addr = memutils->ResolveSymbol(handle, &sig[1]);
#else
s_call_addr = dlsym(handle, &sig[1]);
#endif
dlclose(handle);
return (s_call_addr != NULL) ? 1 : 0;

View File

@ -126,7 +126,7 @@ void GetIServer()
int offset;
void *vfunc = NULL;
#if defined METAMOD_PLAPI_VERSION
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
/* Get the CreateFakeClient function pointer */
if (!(vfunc=SH_GET_ORIG_VFNPTR_ENTRY(engine, &IVEngineServer::CreateFakeClient)))
{

View File

@ -657,7 +657,7 @@ static cell_t FindEntityByClassname(IPluginContext *pContext, const cell_t *para
return gamehelpers->EntityToBCompatRef(pEntity);
}
#if SOURCE_ENGINE == SE_LEFT4DEAD
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
static cell_t CreateEntityByName(IPluginContext *pContext, const cell_t *params)
{
static ValveCall *pCall = NULL;
@ -713,6 +713,34 @@ static cell_t CreateEntityByName(IPluginContext *pContext, const cell_t *params)
}
#endif
#if SOURCE_ENGINE == SE_LEFT4DEAD2
static cell_t DispatchSpawn(IPluginContext *pContext, const cell_t *params)
{
static ValveCall *pCall = NULL;
if (!pCall)
{
ValvePassInfo pass[3];
InitPass(pass[0], Valve_CBaseEntity, PassType_Basic, PASSFLAG_BYVAL);
InitPass(pass[1], Valve_Bool, PassType_Basic, PASSFLAG_BYVAL);
InitPass(pass[2], Valve_POD, PassType_Basic, PASSFLAG_BYVAL);
if (!CreateBaseCall("DispatchSpawn", ValveCall_Static, &pass[2], pass, 2, &pCall))
{
return pContext->ThrowNativeError("\"DispatchSpawn\" not supported by this mod");
} else if (!pCall) {
return pContext->ThrowNativeError("\"DispatchSpawn\" wrapper failed to initialize");
}
}
int ret;
START_CALL();
DECODE_VALVE_PARAM(1, vparams, 0);
/* All X-refs to DispatchSpawn I checked use true - Unsure of what it does */
*(bool *)(vptr + 4) = true;
FINISH_CALL_SIMPLE(&ret);
return (ret == -1) ? 0 : 1;
}
#else
static cell_t DispatchSpawn(IPluginContext *pContext, const cell_t *params)
{
static ValveCall *pCall = NULL;
@ -736,6 +764,7 @@ static cell_t DispatchSpawn(IPluginContext *pContext, const cell_t *params)
return (ret == -1) ? 0 : 1;
}
#endif
static cell_t DispatchKeyValue(IPluginContext *pContext, const cell_t *params)
{

View File

@ -89,6 +89,7 @@
"engine" "orangebox"
"engine" "orangebox_valve"
"engine" "left4dead"
"engine" "left4dead2"
}
"Offsets"
@ -128,9 +129,12 @@
"game" "diprip"
"game" "synergy"
"game" "left4dead"
"game" "left4dead2"
"game" "obsidian"
"game" "empires"
"game" "gesource"
"game" "NeotokyoSource"
"game" "bg2"
}
"Keys"
@ -148,6 +152,8 @@
"game" "synergy"
"game" "dod"
"game" "empires"
"game" "NeotokyoSource"
"game" "bg2"
}
"Keys"
@ -168,6 +174,9 @@
"game" "tf"
"game" "ageofchivalry"
"game" "obsidian"
"game" "zombie_master"
"game" "bg2"
"game" "insurgency"
}
"Keys"

View File

@ -28,6 +28,7 @@
"game" "synergy"
"game" "hidden"
"game" "zombie_master"
"game" "NeotokyoSource"
}
"Offsets"

View File

@ -18,6 +18,7 @@
{
"game" "ageofchivalry"
"game" "zps"
"game" "bg2"
}
"Offsets"

View File

@ -0,0 +1,51 @@
/**
* Do not edit this file. Any changes will be overwritten by the gamedata
* updater or by upgrading your SourceMod install.
*
* To override data in this file, create a subdirectory named "custom" and
* place your own gamedata file(s) inside of it. Such files will be parsed
* after SM's own.
*
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
*/
"Games"
{
/* CGlobalEntityList */
"#default"
{
"#supported"
{
"game" "left4dead2"
}
"Offsets"
{
/* Offset into LevelShutdown */
"gEntList"
{
"windows" "11"
}
"EntInfo"
{
"windows" "4"
"linux" "4"
}
}
"Signatures"
{
"LevelShutdown"
{
"library" "server"
"windows" "\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xE8"
}
"gEntList"
{
"library" "server"
"linux" "@gEntList"
}
}
}
}

View File

@ -20,6 +20,11 @@
"engine" "left4dead"
}
"engine.l4d2.txt"
{
"engine" "left4dead2"
}
"engine.ep2.txt"
{
"engine" "orangebox"

View File

@ -27,6 +27,7 @@
"game" "synergy"
"game" "hidden"
"game" "zombie_master"
"game" "NeotokyoSource"
}
"Offsets"
@ -84,6 +85,7 @@
"game" "FortressForever"
"game" "synergy"
"game" "hidden"
"game" "NeotokyoSource"
}
"Offsets"
@ -134,6 +136,7 @@
"game" "synergy"
"game" "hidden"
"game" "zombie_master"
"game" "NeotokyoSource"
}
"Signatures"
@ -161,6 +164,7 @@
"game" "synergy"
"game" "hidden"
"game" "FortressForever"
"game" "NeotokyoSource"
}
"Signatures"
@ -236,6 +240,7 @@
{
"game" "cstrike"
"game" "hl2mp"
"game" "NeotokyoSource"
}
"Signatures"
{

View File

@ -20,6 +20,7 @@
"game" "zps"
"game" "empires"
"game" "synergy"
"game" "bg2"
}
"Offsets"
@ -120,6 +121,7 @@
"game" "zps"
"game" "empires"
"game" "synergy"
"game" "bg2"
}
"Offsets"

View File

@ -0,0 +1,358 @@
/**
* Do not edit this file. Any changes will be overwritten by the gamedata
* updater or by upgrading your SourceMod install.
*
* To override data in this file, create a subdirectory named "custom" and
* place your own gamedata file(s) inside of it. Such files will be parsed
* after SM's own.
*
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
*/
"Games"
{
/* Sounds */
"#default"
{
"Keys"
{
"SlapSoundCount" "2"
"SlapSound1" "player/damage1.wav"
"SlapSound2" "player/damage2.wav"
}
}
/* General Temp Entities */
"#default"
{
"#supported"
{
"game" "left4dead2"
}
"Offsets"
{
/* Offset into CBaseTempEntity constructor */
"s_pTempEntities"
{
"windows" "17"
}
"GetTEName"
{
"windows" "4"
"linux" "4"
}
"GetTENext"
{
"windows" "8"
"linux" "8"
}
"TE_GetServerClass"
{
"windows" "0"
"linux" "0"
}
}
"Signatures"
{
"CBaseTempEntity"
{
"library" "server"
"windows" "\x8B\xC1\x8B\x4C\x24\x04\xC7\x00\x2A\x2A\x2A\x2A\x89\x48\x04\x8B\x15\x2A\x2A\x2A\x2A\x89\x50\x08\xA3\x2A\x2A\x2A\x2A\xC2\x04\x00"
}
"s_pTempEntities"
{
"library" "server"
"linux" "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
}
}
}
/* Create Entity Signatures */
"#default"
{
"#supported"
{
"game" "left4dead2"
}
"Signatures"
{
"DispatchSpawn"
{
"library" "server"
"linux" "@_Z13DispatchSpawnP11CBaseEntityb"
"windows" "\x53\x55\x56\x8B\x74\x24\x10\x85\xF6\x57\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x2A\x8B\xCB"
}
"CreateEntityByName"
{
"library" "server"
"linux" "@_Z18CreateEntityByNamePKcib"
"windows" "\x56\x8B\x74\x24\x0C\x83\xFE\xFF\x57\x8B\x7C\x24\x0C\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x2A\x56\xFF\xD2"
}
}
}
/* CGlobalEntityList */
"#default"
{
"#supported"
{
"game" "left4dead2"
}
"Signatures"
{
/* Functions in CGlobalEntityList */
"FindEntityByClassname"
{
"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"
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
}
}
}
/* General GameRules */
"#default"
{
"#supported"
{
"game" "left4dead2"
}
"Offsets"
{
/* Offset into CreateGameRulesObject */
"g_pGameRules"
{
"windows" "2"
}
}
"Signatures"
{
/* This signature sometimes has multiple matches, but this
* does not matter as g_pGameRules is involved in all of them.
* The same g_pGameRules offset applies to each match.
*
* Sometimes this block of bytes is at the beginning of the static
* CreateGameRulesObject function and sometimes it is in the middle
* of an entirely different function. This depends on the game.
*/
"CreateGameRulesObject"
{
"library" "server"
"windows" "\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
}
"g_pGameRules"
{
"library" "server"
"linux" "@g_pGameRules"
}
}
}
/* IServer interface pointer */
"#default"
{
"Keys"
{
/* Signature for the beginning of IVEngineServer::CreateFakeClient.
*
* The engine binary is not actually scanned in order to look for
* this. SourceHook is used to used to determine the address of the
* function and this signature is used to verify that it contains
* the expected code. A pointer to sv (IServer interface) is used
* here.
*/
"CreateFakeClient_Windows" "\x8B\x44\x24\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8"
}
"Offsets"
{
/* Offset into IVEngineServer::CreateFakeClient */
"sv"
{
"windows" "6"
}
}
"Signatures"
{
/* CBaseServer object for IServer interface */
"sv"
{
"library" "engine"
"linux" "@sv"
}
}
}
/* EntityFactoryDictionary function */
"#default"
{
"Signatures"
{
"EntityFactory"
{
"library" "server"
"windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
"linux" "@_Z23EntityFactoryDictionaryv"
}
}
}
/* CBaseEntityOutput::FireOutput */
"#default"
{
"#supported"
{
"game" "left4dead2"
}
"Signatures"
{
"FireOutput"
{
"library" "server"
"windows" "\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6"
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
}
}
"Offsets"
{
"FireOutputBackup"
{
"windows" "6"
"linux" "10"
}
}
}
/* SetUserInfo data */
"#default"
{
"Offsets"
{
/**
* CBaseClient::SetUserCVar(char const*,char const*);
* Linux offset straight from VTable dump.
* Windows offset is crazy. Found the windows SetName function using string "(%d)%-.*s" (aD_S in IDA)
* Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
*/
"SetUserCvar"
{
/* Not 100% sure on this, why would windows change and not linux - TEST ME */
"windows" "18"
"linux" "63"
}
/**
* Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
* Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
* Linux: mov byte ptr [esi+0B0h], 0
* Win: mov byte ptr [esi+0B0h], 0
*
* L4D2: This has been moved into CBaseClient::UpdateUserSettings(), rest of the details are still relevant.
*/
"InfoChanged"
{
"windows" "176"
"linux" "176"
}
}
}
/* Left 4 Dead */
"left4dead2"
{
"Offsets"
{
"GiveNamedItem"
{
"windows" "505"
"linux" "506"
}
"RemovePlayerItem"
{
"windows" "288"
"linux" "289"
}
"Weapon_GetSlot"
{
"windows" "286"
"linux" "287"
}
"Ignite"
{
"windows" "221"
"linux" "222"
}
"Extinguish"
{
"windows" "224"
"linux" "225"
}
"Teleport"
{
"windows" "117"
"linux" "118"
}
"CommitSuicide"
{
"windows" "473"
"linux" "473"
}
"GetVelocity"
{
"windows" "149"
"linux" "150"
}
"EyeAngles"
{
"windows" "140"
"linux" "141"
}
"AcceptInput"
{
"windows" "43"
"linux" "44"
}
"DispatchKeyValue"
{
"windows" "33"
"linux" "32"
}
"DispatchKeyValueFloat"
{
"windows" "32"
"linux" "33"
}
"DispatchKeyValueVector"
{
"windows" "31"
"linux" "34"
}
"SetEntityModel"
{
"windows" "26"
"linux" "27"
}
"WeaponEquip"
{
"windows" "279"
"linux" "280"
}
"Activate"
{
"windows" "35"
"linux" "36"
}
"PlayerRunCmd"
{
"windows" "451"
"linux" "452"
}
}
}
}

View File

@ -49,7 +49,7 @@
"CommitSuicide"
{
"windows" "396"
"linux" "396"
"linux" "397"
}
"GetVelocity"
{

View File

@ -88,9 +88,21 @@
"FireOutput"
{
"library" "server"
"windows" "\x81\xEC\x20\x01\x00\x00\x53\x55\x56\x8B\x71\x14"
"windows" "\x81\xEC\x2A\x01\x00\x00\x53\x55\x56\x8B\x71\x14"
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
}
"DispatchSpawn"
{
"library" "server"
"windows" "\x53\x55\x56\x8B\x74\x24\x10\x57\x85\xF6\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x60"
"linux" "@_Z13DispatchSpawnP11CBaseEntity"
}
"CreateEntityByName"
{
"library" "server"
"windows" "\x56\x8B\x74\x24\x0C\x57\x8B\x7C\x24\x0C\x83\x2A\x2A\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x2A\x2A\x56\xFF\xD2\xA3\xCC"
"linux" "@_Z18CreateEntityByNamePKci"
}
}
}
}

View File

@ -0,0 +1,85 @@
"Games"
{
"NeotokyoSource"
{
"Offsets"
{
"GiveNamedItem"
{
"windows" "330"
}
"RemovePlayerItem"
{
"windows" "227"
}
"Weapon_GetSlot"
{
"windows" "225"
}
"Ignite"
{
"windows" "189"
}
"Extinguish"
{
"windows" "190"
}
"Teleport"
{
"windows" "99"
}
"CommitSuicide"
{
"windows" "360"
}
"GetVelocity"
{
"windows" "127"
}
"EyeAngles"
{
"windows" "119"
}
"AcceptInput"
{
"windows" "35"
}
"DispatchKeyValue"
{
"windows" "31"
}
"DispatchKeyValueFloat"
{
"windows" "30"
}
"DispatchKeyValueVector"
{
"windows" "29"
}
"SetEntityModel"
{
"windows" "25"
}
"WeaponEquip"
{
"windows" "218"
}
"Activate"
{
"windows" "32"
}
"PlayerRunCmd"
{
"windows" "348"
}
}
"Signatures"
{
"LevelShutdown"
{
"library" "server"
"windows" "\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x6A\x00"
}
}
}
}

View File

@ -11,7 +11,7 @@
"Games"
{
/* Synergy Release 11 */
/* Synergy Release 14 */
"synergy"
{
"Offsets"
@ -19,28 +19,28 @@
/* CBasePlayer */
"GiveNamedItem"
{
"windows" "354"
"linux" "355"
"windows" "355"
"linux" "356"
}
"RemovePlayerItem"
{
"windows" "237"
"linux" "238"
"windows" "238"
"linux" "239"
}
"Weapon_GetSlot"
{
"windows" "235"
"linux" "236"
"windows" "236"
"linux" "237"
}
"Ignite"
{
"windows" "192"
"linux" "193"
"windows" "193"
"linux" "194"
}
"Extinguish"
{
"windows" "196"
"linux" "197"
"windows" "197"
"linux" "198"
}
"Teleport"
{
@ -49,18 +49,18 @@
}
"CommitSuicide"
{
"windows" "392"
"linux" "392"
"windows" "396"
"linux" "396"
}
"GetVelocity"
{
"windows" "129"
"linux" "130"
"windows" "130"
"linux" "131"
}
"EyeAngles"
{
"windows" "121"
"linux" "122"
"windows" "122"
"linux" "123"
}
"DispatchKeyValue"
{
@ -89,14 +89,24 @@
}
"WeaponEquip"
{
"windows" "228"
"linux" "229"
"windows" "229"
"linux" "230"
}
"Activate"
{
"windows" "31"
"linux" "32"
}
"RemoveAllItems"
{
"windows" "303"
"linux" "304"
}
"PlayerRunCmd"
{
"windows" "375"
"linux" "376"
}
}
}
}

View File

@ -18,28 +18,28 @@
{
"GiveNamedItem"
{
"windows" "423"
"linux" "427"
"windows" "385"
"linux" "386"
}
"RemovePlayerItem"
{
"windows" "244"
"linux" "245"
"windows" "259"
"linux" "259"
}
"Weapon_GetSlot"
{
"windows" "242"
"linux" "243"
"windows" "256"
"linux" "257"
}
"Ignite"
{
"windows" "199"
"linux" "200"
"windows" "201"
"linux" "202"
}
"Extinguish"
{
"windows" "203"
"linux" "204"
"windows" "205"
"linux" "206"
}
"Teleport"
{
@ -48,8 +48,8 @@
}
"CommitSuicide"
{
"windows" "397"
"linux" "397"
"windows" "425"
"linux" "425"
}
"GetVelocity"
{
@ -88,8 +88,8 @@
}
"WeaponEquip"
{
"windows" "234"
"linux" "235"
"windows" "249"
"linux" "250"
}
"Activate"
{
@ -98,8 +98,8 @@
}
"PlayerRunCmd"
{
"windows" "375"
"linux" "376"
"windows" "403"
"linux" "404"
}
}
}

View File

@ -20,6 +20,11 @@
"engine" "left4dead"
}
"engine.l4d2.txt"
{
"engine" "left4dead2"
}
"engine.ep2.txt"
{
"engine" "orangebox"
@ -130,4 +135,12 @@
{
"game" "ageofchivalry"
}
"game.neotokyo.txt"
{
"game" "NeotokyoSource"
}
"game.bg2.txt"
{
"game" "bg2"
}
}

View File

@ -24,7 +24,7 @@
"RemoveDisguise"
{
"library" "server"
"windows" "\x51\x56\x8B\xF1\x8B\x8E\x0C\x01\x00\x00\x57\x8B\xBE\x94\x00\x00\x00"
"windows" "\x51\x56\x8B\xF1\x8B\x2A\x2A\x2A\x2A\x2A\x57\x8B\x2A\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x3B\xF8"
"linux" "@_ZN15CTFPlayerShared14RemoveDisguiseEv"
}
"Disguise"
@ -56,8 +56,8 @@
{
"ForceRespawn"
{
"windows" "288"
"linux" "289"
"windows" "312"
"linux" "313"
}
}
}

View File

@ -1,7 +1,7 @@
# (C)2004-2008 SourceMod Development Team
# Makefile written by David "BAILOPAN" Anderson
MMSOURCE17 = ../../mmsource-1.7
MMSOURCE17 = ../../mmsource-central
#####################################
### EDIT BELOW FOR OTHER PROJECTS ###

View File

@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@ -25,8 +25,6 @@
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include <ISmmPluginExt.h>
@ -48,8 +46,6 @@
return (c == '/' || c == '\\');
}
#include <Windows.h>
#define TF_PATH "\\tf\\"
#define DOD_PATH "\\dod\\"
#else
#define DLL_EXPORT extern "C" __attribute__((visibility("default")))
#define openlib(lib) dlopen(lib, RTLD_NOW)
@ -63,8 +59,6 @@
return (c == '/');
}
#include <dlfcn.h>
#define TF_PATH "/tf/"
#define DOD_PATH "/dod/"
#endif
#define METAMOD_API_MAJOR 2
@ -74,6 +68,7 @@
#define FILENAME_1_6_EP1 "sourcemod.2.ep1" PLATFORM_EXT
#define FILENAME_1_6_L4D "sourcemod.2.l4d" PLATFORM_EXT
#define FILENAME_1_6_DARKM "sourcemod.2.darkm" PLATFORM_EXT
#define FILENAME_1_6_L4D2 "sourcemod.2.l4d2" PLATFORM_EXT
HINSTANCE g_hCore = NULL;
bool load_attempted = false;
@ -217,12 +212,6 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co
}
case SOURCE_ENGINE_ORANGEBOX:
{
if (strstr(mli->pl_path, TF_PATH) || strstr(mli->pl_path, DOD_PATH))
{
filename = FILENAME_1_6_EP2VALVE;
break;
}
filename = FILENAME_1_6_EP2;
break;
}
@ -236,6 +225,16 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co
filename = FILENAME_1_6_DARKM;
break;
}
case SOURCE_ENGINE_ORANGEBOXVALVE:
{
filename = FILENAME_1_6_EP2VALVE;
break;
}
case SOURCE_ENGINE_LEFT4DEAD2:
{
filename = FILENAME_1_6_L4D2;
break;
}
default:
{
return NULL;

View File

@ -41,7 +41,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LOADER_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -58,6 +58,7 @@
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"
@ -136,6 +137,7 @@
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\public"
/>
<Tool
Name="VCPreLinkEventTool"

View File

@ -42,7 +42,7 @@ public Plugin:myinfo =
{
name = "Basic Comm Control",
author = "AlliedModders LLC",
description = "Provides methods of controllingg communication.",
description = "Provides methods of controlling communication.",
version = SOURCEMOD_VERSION,
url = "http://www.sourcemod.net/"
};

View File

@ -132,8 +132,6 @@ public MenuHandler_Map(Handle:menu, MenuAction:action, param1, param2)
else // no action was selected.
{
/* Re-enable the menu option */
g_VoteMapInUse = false;
ResetMenu();
}
}
@ -187,9 +185,16 @@ public AdminMenu_VoteMap(Handle:topmenu,
}
else if (action == TopMenuAction_SelectOption)
{
g_VoteMapInUse = true;
ResetMenu();
DisplayMenu(g_MapList, param, MENU_TIME_FOREVER);
if (!g_VoteMapInUse)
{
ResetMenu();
g_VoteMapInUse = true;
DisplayMenu(g_MapList, param, MENU_TIME_FOREVER);
}
else
{
PrintToChat(param, "[SM] %T", "Map Vote In Use", param);
}
}
else if (action == TopMenuAction_DrawOption)
{

View File

@ -38,8 +38,9 @@
/* Decide whether topmenus should be required */
#if !defined REQUIRE_PLUGIN
#if defined REQUIRE_EXTENSIONS
#define TEMP_REQUIRE_EXTENSIONS
#undef REQUIRE_EXTENSIONS
#define TEMP_REQUIRE_EXTENSIONS
#undef REQUIRE_EXTENSIONS
#endif
#endif
#include <topmenus>

View File

@ -85,10 +85,14 @@ enum CookieMenuAction
/**
* Creates a new Client preference cookie.
*
* Handles returned by RegClientCookie can be closed via CloseHandle() when
* no longer needed.
*
* @param name Name of the new preference cookie.
* @param description Optional description of the preference cookie.
* @param access What CookieAccess level to assign to this cookie.
* @return A handle to the newly created cookie. If the cookie already exists, a handle to it will still be returned.
* @return A handle to the newly created cookie. If the cookie already
* exists, a handle to it will still be returned.
* @error Cookie name is blank.
*/
native Handle:RegClientCookie(const String:name[], const String:description[], CookieAccess:access);
@ -96,6 +100,9 @@ native Handle:RegClientCookie(const String:name[], const String:description[], C
/**
* Searches for a Client preference cookie.
*
* Handles returned by FindClientCookie can be closed via CloseHandle() when
* no longer needed.
*
* @param name Name of cookie to find.
* @return A handle to the cookie if it is found. INVALID_HANDLE otherwise.
*/

View File

@ -858,6 +858,8 @@ native RemoveServerTag(const String:tag[]);
*/
functag public Action:CommandListener(client, const String:command[], argc);
#define FEATURECAP_COMMANDLISTENER "command listener"
/**
* Adds a callback that will fire when a command is sent to the server.
*
@ -866,6 +868,9 @@ functag public Action:CommandListener(client, const String:command[], argc);
* Using Reg*Cmd to intercept is in poor practice, as it physically creates a
* new command and can slow down dispatch in general.
*
* To see if this feature is available, use FeatureType_Capability and
* FEATURECAP_COMMANDLISTENER.
*
* @param callback Callback.
* @param command Command, or if not specified, a global listener.
* The command is case insensitive.

View File

@ -151,8 +151,22 @@ public Extension:__ext_core =
native VerifyCoreVersion();
/**
* Sets a native as optional, such that if it is unloaded, removed,
* or otherwise non-existent, the plugin will still work. Calling
* removed natives results in a run-time error.
*
* @param name Native name.
* @noreturn
*/
native MarkNativeAsOptional(const String:name[]);
public __ext_core_SetNTVOptional()
{
MarkNativeAsOptional("GetFeatureStatus");
MarkNativeAsOptional("RequireFeature");
MarkNativeAsOptional("AddCommandListener");
MarkNativeAsOptional("RemoveCommandListener");
VerifyCoreVersion();
}

View File

@ -241,3 +241,17 @@ native SetEventString(Handle:event, const String:key[], const String:value[]);
* @error Invalid or corrupt Handle.
*/
native GetEventName(Handle:event, String:name[], maxlength);
/**
* Sets whether an event's broadcasting will be disabled or not.
*
* This has no effect on events Handles that are not from HookEvent
* or HookEventEx callbacks.
*
* @param event Handle to an event from an event hook.
* @param dontBroadcast True to disable broadcasting, false otherwise.
* @noreturn
* @error Invalid Handle.
*/
native SetEventBroadcast(Handle:event, bool:dontBroadcast);

View File

@ -40,7 +40,9 @@
#define SOURCE_SDK_DARKMESSIAH 15 /**< Modified version of original engine used by Dark Messiah (no SDK) */
#define SOURCE_SDK_EPISODE1 20 /**< SDK+Engine released after Episode 1 */
#define SOURCE_SDK_EPISODE2 30 /**< SDK+Engine released after Episode 2/Orange Box */
#define SOURCE_SDK_EPISODE2VALVE 35 /**< SDK+Engine released after Episode 2/Orange Box */
#define SOURCE_SDK_LEFT4DEAD 40 /**< Engine released after Left 4 Dead (no SDK yet) */
#define SOURCE_SDK_LEFT4DEAD2 50 /**< Engine released after Left 4 Dead 2 (no SDK yet) */
#define MOTDPANEL_TYPE_TEXT 0 /**< Treat msg as plain text */
#define MOTDPANEL_TYPE_INDEX 1 /**< Msg is auto determined by the engine */

View File

@ -410,16 +410,6 @@ native GetSysTickCount();
*/
native AutoExecConfig(bool:autoCreate=true, const String:name[]="", const String:folder[]="sourcemod");
/**
* Sets a native as optional, such that if it is unloaded, removed,
* or otherwise non-existent, the plugin will still work. Calling
* removed natives results in a run-time error.
*
* @param name Native name.
* @noreturn
*/
native MarkNativeAsOptional(const String:name[]);
/**
* Registers a library name for identifying as a dependency to
* other plugins.
@ -565,6 +555,81 @@ forward bool:OnClientFloodCheck(client);
*/
forward OnClientFloodResult(client, bool:blocked);
/**
* Feature types.
*/
enum FeatureType
{
/**
* A native function call.
*/
FeatureType_Native,
/**
* A named capability. This is distinctly different from checking for a
* native, because the underlying functionality could be enabled on-demand
* to improve loading time. Thus a native may appear to exist, but it might
* be part of a set of features that are not compatible with the current game
* or version of SourceMod.
*/
FeatureType_Capability
};
/**
* Feature statuses.
*/
enum FeatureStatus
{
/**
* Feature is available for use.
*/
FeatureStatus_Available,
/**
* Feature is not available.
*/
FeatureStatus_Unavailable,
/**
* Feature is not known at all.
*/
FeatureStatus_Unknown
};
/**
* Returns whether "GetFeatureStatus" will work. Using this native
* or this function will not cause SourceMod to fail loading on older versions,
* however, GetFeatureStatus will only work if this function returns true.
*
* @return True if GetFeatureStatus will work, false otherwise.
*/
stock bool:CanTestFeatures()
{
return LibraryExists("__CanTestFeatures__");
}
/**
* Returns whether a feature exists, and if so, whether it is usable.
*
* @param type Feature type.
* @param name Feature name.
* @return Feature status.
*/
native FeatureStatus:GetFeatureStatus(FeatureType:type, const String:name[]);
/**
* Requires that a given feature is available. If it is not, SetFailState()
* is called with the given message.
*
* @param type Feature type.
* @param name Feature name.
* @param fmt Message format string, or empty to use default.
* @param ... Message format parameters, if any.
* @noreturn
*/
native RequireFeature(FeatureType:type, const String:name[],
const String:fmt[]="", any:...);
#include <helpers>
#include <entity>
#include <entity_prop_stocks>

View File

@ -39,4 +39,4 @@
#define SOURCEMOD_V_MINOR 3 /**< SourceMod Minor version */
#define SOURCEMOD_V_RELEASE 0 /**< SourceMod Release version */
#define SOURCEMOD_VERSION "1.3.0-dev" /**< SourceMod version string (major.minor.release.build) */
#define SOURCEMOD_VERSION "1.3.0" /**< SourceMod version string (major.minor.release.build) */

View File

@ -59,7 +59,8 @@ public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
if (StrEqual(game, "left4dead", false)
|| StrEqual(game, "dystopia", false)
|| StrEqual(game, "synergy", false))
|| StrEqual(game, "synergy", false)
|| StrEqual(game, "left4dead2", false))
{
strcopy(error, err_max, "Nextmap is incompatible with this game");
return APLRes_SilentFailure;
@ -195,6 +196,8 @@ public Action:Command_MapHistory(client, args)
lastMapStartTime = startTime;
}
return Plugin_Handled;
}
FormatTimeDuration(String:buffer[], maxlen, time)
@ -220,4 +223,6 @@ FormatTimeDuration(String:buffer[], maxlen, time)
{
return Format(buffer, maxlen, "%is", seconds);
}
return Plugin_Handled;
}

View File

@ -280,7 +280,7 @@ BuildMapMenu()
decl String:map[64];
new Handle:excludeMaps;
new Handle:excludeMaps = INVALID_HANDLE;
decl String:currentMap[32];
if (GetConVarBool(g_Cvar_ExcludeOld))
@ -323,6 +323,11 @@ BuildMapMenu()
}
SetMenuExitButton(g_MapMenu, true);
if (excludeMaps != INVALID_HANDLE)
{
CloseHandle(excludeMaps);
}
}
public Handler_MapSelectMenu(Handle:menu, MenuAction:action, param1, param2)
@ -424,4 +429,4 @@ public Handler_MapSelectMenu(Handle:menu, MenuAction:action, param1, param2)
}
return 0;
}
}

View File

@ -0,0 +1,31 @@
#include <sourcemod>
public OnPluginStart()
{
new Handle:hostname = FindConVar("hostname")
HookConVarChange(hostname, OnChange)
HookEvent("player_team", cb)
RegServerCmd("test_bug4059", Test_Bug)
}
public Action:cb(Handle:event, const String:name[], bool:dontBroadcast)
{
UnhookEvent(name, cb)
PrintToServer("whee")
HookEvent(name, cb)
return Plugin_Handled
}
public OnChange(Handle:convar, const String:oldValue[], const String:newValue[])
{
PrintToServer("called: %x", convar)
UnhookConVarChange(convar, OnChange)
ResetConVar(convar)
HookConVarChange(convar, OnChange)
}
public Action:Test_Bug(args)
{
ServerCommand("hostname \"bug4059\"")
}

View File

@ -0,0 +1,33 @@
public OnPluginStart()
{
RegServerCmd("sm_test_caps1", Test_Caps1);
RegServerCmd("sm_test_caps2", Test_Caps2);
RegServerCmd("sm_test_caps3", Test_Caps3);
}
public Action:Test_Caps1(args)
{
PrintToServer("CanTestFeatures: %d", CanTestFeatures());
PrintToServer("Status PTS: %d", GetFeatureStatus(FeatureType_Native, "PrintToServer"));
PrintToServer("Status ???: %d", GetFeatureStatus(FeatureType_Native, "???"));
PrintToServer("Status CL: %d", GetFeatureStatus(FeatureType_Capability, FEATURECAP_COMMANDLISTENER));
return Plugin_Handled
}
public Action:Test_Caps2(args)
{
RequireFeature(FeatureType_Native, "VerifyCoreVersion");
RequireFeature(FeatureType_Native, "Sally ate a worm");
}
public Action:Test_Caps3(args)
{
RequireFeature(FeatureType_Native, "Sally ate a worm", "oh %s %d no", "yam", 23);
}

View File

@ -1 +1 @@
1.3.0-dev
1.3.0

View File

@ -133,7 +133,7 @@ namespace SourceMod
* Note: This is bumped when IShareSys is changed, because IShareSys
* itself is not versioned.
*/
#define SMINTERFACE_EXTENSIONAPI_VERSION 4
#define SMINTERFACE_EXTENSIONAPI_VERSION 5
/**
* @brief The interface an extension must expose.

View File

@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@ -25,8 +25,6 @@
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_INTERFACE_BINARYUTILS_H_
@ -35,7 +33,7 @@
#include <IShareSys.h>
#define SMINTERFACE_MEMORYUTILS_NAME "IMemoryUtils"
#define SMINTERFACE_MEMORYUTILS_VERSION 1
#define SMINTERFACE_MEMORYUTILS_VERSION 2
/**
* @file IMemoryUtils.h
@ -65,6 +63,19 @@ namespace SourceMod
* @return Pointer to pattern found in memory, NULL if not found.
*/
virtual void *FindPattern(const void *libPtr, const char *pattern, size_t len) =0;
/**
* @brief Retrieves a symbol pointer from a dynamic library.
*
* Note: On Linux, this function is able to resolve symbols that are hidden via GCC's
* -fvisibility=hidden option.
*
* @param handle Operating system specific handle that points to dynamic library.
* This comes from dlopen() on Linux or LoadLibrary() on Windows.
* @param symbol Symbol name.
* @return Symbol pointer, or NULL if not found.
*/
virtual void *ResolveSymbol(void *handle, const char *symbol) =0;
};
}

View File

@ -35,9 +35,6 @@
/**
* @file IShareSys.h
* @brief Defines the Share System, responsible for shared resources and dependencies.
*
* The Share System also manages the Identity_t data type, although this is internally
* implemented with the Handle System.
*/
#include <sp_vm_types.h>
@ -54,6 +51,41 @@ namespace SourceMod
/** Forward declaration from IHandleSys.h */
typedef HandleType_t IdentityType_t;
/**
* @brief Types of features.
*/
enum FeatureType
{
FeatureType_Native, /**< Native functions for plugins. */
FeatureType_Capability /**< Named capabilities. */
};
/**
* @brief Feature presence status codes.
*/
enum FeatureStatus
{
FeatureStatus_Available = 0, /**< Feature is available for use. */
FeatureStatus_Unavailable, /**< Feature is unavailable, but known. */
FeatureStatus_Unknown /**< Feature is not known. */
};
/**
* @brief Provides a capability feature.
*/
class IFeatureProvider
{
public:
/**
* @brief Must return whether a capability is present.
*
* @param type Feature type (FeatureType_Capability right now).
* @param name Feature name.
* @return Feature status code.
*/
virtual FeatureStatus GetFeatureStatus(FeatureType type, const char *name) = 0;
};
/**
* @brief Defines the base functionality required by a shared interface.
*/
@ -221,6 +253,31 @@ namespace SourceMod
* lifetime of the extension.
*/
virtual void OverrideNatives(IExtension *myself, const sp_nativeinfo_t *natives) =0;
/**
* @brief Adds a capability provider. Feature providers are used by
* plugins to determine if a feature exists at runtime. This is
* distinctly different from checking for a native, because natives
* may be backed by underlying functionality which is not available.
*
* @param myself Extension.
* @param provider Feature provider implementation.
* @param name Capibility name.
*/
virtual void AddCapabilityProvider(IExtension *myself,
IFeatureProvider *provider,
const char *name) =0;
/**
* @brief Drops a previously added cap provider.
*
* @param myself Extension.
* @param provider Feature provider implementation.
* @param name Capibility name.
*/
virtual void DropCapabilityProvider(IExtension *myself,
IFeatureProvider *provider,
const char *name) =0;
};
}

View File

@ -1,4 +1,4 @@
# (C)2004-2008 SourceMod Development Team
# (C)2004-2009 SourceMod Development Team
# Makefile written by David "BAILOPAN" Anderson
SMSDK = ..
@ -7,7 +7,8 @@ HL2SDK_ORIG = ../../../hl2sdk
HL2SDK_OB = ../../../hl2sdk-ob
HL2SDK_OB_VALVE = ../../../hl2sdk-ob-valve
HL2SDK_L4D = ../../../hl2sdk-l4d
MMSOURCE17 = ../../../mmsource-1.7
HL2SDK_L4D2 = ../../../hl2sdk-l4d2
MMSOURCE18 = ../../../mmsource-1.8
#####################################
### EDIT BELOW FOR OTHER PROJECTS ###
@ -33,9 +34,10 @@ ifeq "$(ENGINE)" "original"
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/linux_sdk
CFLAGS += -DSOURCE_ENGINE=1
METAMOD = $(MMSOURCE17)/core-legacy
METAMOD = $(MMSOURCE18)/core-legacy
INCLUDE += -I$(HL2SDK)/public/dlls
SRCDS = $(SRCDS_BASE)
LIB_SUFFIX = i486
override ENGSET = true
endif
ifeq "$(ENGINE)" "orangebox"
@ -43,9 +45,10 @@ ifeq "$(ENGINE)" "orangebox"
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=3
METAMOD = $(MMSOURCE17)/core
METAMOD = $(MMSOURCE18)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/orangebox
LIB_SUFFIX = i486
override ENGSET = true
endif
ifeq "$(ENGINE)" "orangeboxvalve"
@ -53,9 +56,10 @@ ifeq "$(ENGINE)" "orangeboxvalve"
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=4
METAMOD = $(MMSOURCE17)/core
METAMOD = $(MMSOURCE18)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/orangebox
LIB_SUFFIX = i486
override ENGSET = true
endif
ifeq "$(ENGINE)" "left4dead"
@ -63,15 +67,28 @@ ifeq "$(ENGINE)" "left4dead"
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=5
METAMOD = $(MMSOURCE17)/core
METAMOD = $(MMSOURCE18)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/l4d
LIB_SUFFIX = i486
override ENGSET = true
endif
ifeq "$(ENGINE)" "left4dead2"
HL2SDK = $(HL2SDK_L4D2)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=6
METAMOD = $(MMSOURCE18)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/left4dead2
LIB_SUFFIX = linux
override ENGSET = true
endif
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 \
-DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6
LINK = vstdlib_i486.so tier0_i486.so -m32 -ldl -lm
LINK = vstdlib_$(LIB_SUFFIX).so tier0_$(LIB_SUFFIX).so -m32 -ldl -lm
INCLUDE += -I. -I.. -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
-I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK) -I$(SMSDK)/jit -I$(SMSDK)/jit/x86 \
@ -116,13 +133,14 @@ $(BIN_DIR)/%.o: %.cpp
all: check
mkdir -p $(BIN_DIR)
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so;
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so;
ln -sf $(HL2LIB)/vstdlib_$(LIB_SUFFIX).so
ln -sf $(HL2LIB)/tier0_$(LIB_SUFFIX).so
$(MAKE) -f Makefile mms_ext
check:
if [ "$(ENGSET)" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
echo "You must supply one of the following values for ENGINE:"; \
echo "left4dead2, left4dead, orangeboxvalve, orangebox, or original"; \
exit 1; \
fi

View File

@ -1,4 +1,4 @@
# (C)2004-2008 SourceMod Development Team
# (C)2004-2009 SourceMod Development Team
# Makefile written by David "BAILOPAN" Anderson
SMSDK = ../..
@ -7,7 +7,8 @@ HL2SDK_ORIG = ../../../hl2sdk
HL2SDK_OB = ../../../hl2sdk-ob
HL2SDK_OB_VALVE = ../../../hl2sdk-ob-valve
HL2SDK_L4D = ../../../hl2sdk-l4d
MMSOURCE17 = ../../../mmsource-1.7
HL2SDK_L4D2 = ../../../hl2sdk-l4d2
MMSOURCE18 = ../../../mmsource-1.8
#####################################
### EDIT BELOW FOR OTHER PROJECTS ###
@ -36,9 +37,10 @@ ifeq "$(ENGINE)" "original"
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/linux_sdk
CFLAGS += -DSOURCE_ENGINE=1
METAMOD = $(MMSOURCE17)/core-legacy
METAMOD = $(MMSOURCE18)/core-legacy
INCLUDE += -I$(HL2SDK)/public/dlls
SRCDS = $(SRCDS_BASE)
LIB_SUFFIX = i486
override ENGSET = true
endif
ifeq "$(ENGINE)" "orangebox"
@ -46,9 +48,10 @@ ifeq "$(ENGINE)" "orangebox"
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=3
METAMOD = $(MMSOURCE17)/core
METAMOD = $(MMSOURCE18)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/orangebox
LIB_SUFFIX = i486
override ENGSET = true
endif
ifeq "$(ENGINE)" "orangeboxvalve"
@ -56,9 +59,10 @@ ifeq "$(ENGINE)" "orangeboxvalve"
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=4
METAMOD = $(MMSOURCE17)/core
METAMOD = $(MMSOURCE18)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/orangebox
LIB_SUFFIX = i486
override ENGSET = true
endif
ifeq "$(ENGINE)" "left4dead"
@ -66,20 +70,33 @@ ifeq "$(ENGINE)" "left4dead"
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=5
METAMOD = $(MMSOURCE17)/core
METAMOD = $(MMSOURCE18)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/l4d
LIB_SUFFIX = i486
override ENGSET = true
endif
ifeq "$(ENGINE)" "left4dead2"
HL2SDK = $(HL2SDK_L4D2)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=6
METAMOD = $(MMSOURCE18)/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/left4dead2
LIB_SUFFIX = linux
override ENGSET = true
endif
ifeq "$(USEMETA)" "true"
LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_i486.so tier0_i486.so
LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_$(LIB_SUFFIX).so tier0_$(LIB_SUFFIX).so
LINK += $(LINK_HL2)
INCLUDE += -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
-I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 \
-DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6
else
INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
endif
@ -130,14 +147,15 @@ $(BIN_DIR)/%.o: %.cpp
all: check
mkdir -p $(BIN_DIR)/sdk
if [ "$(USEMETA)" = "true" ]; then \
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so; \
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so; \
ln -sf $(HL2LIB)/vstdlib_$(LIB_SUFFIX).so; \
ln -sf $(HL2LIB)/tier0_$(LIB_SUFFIX).so; \
fi
$(MAKE) -f Makefile extension
check:
if [ "$(USEMETA)" = "true" ] && [ "$(ENGSET)" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
echo "You must supply one of the following values for ENGINE:"; \
echo "left4dead2, left4dead, orangeboxvalve, orangebox, or original"; \
exit 1; \
fi

View File

@ -7,15 +7,19 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
Debug - Episode 1|Win32 = Debug - Episode 1|Win32
Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32
Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32
Debug|Win32 = Debug|Win32
Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32
Release - Episode 1|Win32 = Release - Episode 1|Win32
Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32
Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32
Release - Old Metamod|Win32 = Release - Old Metamod|Win32
Release - Orange Box|Win32 = Release - Orange Box|Win32
Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
@ -23,24 +27,32 @@ Global
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.Build.0 = Debug - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.ActiveCfg = Debug|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.Build.0 = Debug|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.Build.0 = Release - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.ActiveCfg = Release|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection

View File

@ -45,7 +45,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -124,7 +124,7 @@
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;ORANGEBOX_BUILD"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -200,14 +200,14 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE18)\core-legacy&quot;;&quot;$(MMSOURCE18)\core-legacy\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -283,12 +283,12 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE18)\core-legacy&quot;;&quot;$(MMSOURCE18)\core-legacy\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=1"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -365,14 +365,14 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -448,12 +448,12 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -530,14 +530,14 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=3"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -613,12 +613,12 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=3"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -671,6 +671,171 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Orange Box Valve|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOBVALVE)\public&quot;;&quot;$(HL2SDKOBVALVE)\public\engine&quot;;&quot;$(HL2SDKOBVALVE)\public\game\server&quot;;&quot;$(HL2SDKOBVALVE)\public\tier0&quot;;&quot;$(HL2SDKOBVALVE)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=4"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKOBVALVE)\lib\public\tier0.lib&quot; &quot;$(HL2SDKOBVALVE)\lib\public\tier1.lib&quot; &quot;$(HL2SDKOBVALVE)\lib\public\vstdlib.lib&quot;"
OutputFile="$(OutDir)\sample.ext.dll"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release - Orange Box Valve|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOBVALVE)\public&quot;;&quot;$(HL2SDKOBVALVE)\public\engine&quot;;&quot;$(HL2SDKOBVALVE)\public\game\server&quot;;&quot;$(HL2SDKOBVALVE)\public\tier0&quot;;&quot;$(HL2SDKOBVALVE)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=4"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKOBVALVE)\lib\public\tier0.lib&quot; &quot;$(HL2SDKOBVALVE)\lib\public\tier1.lib&quot; &quot;$(HL2SDKOBVALVE)\lib\public\vstdlib.lib&quot;"
OutputFile="$(OutDir)\sample.ext.dll"
LinkIncremental="1"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Left 4 Dead|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
@ -695,14 +860,14 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=4"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=5"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -778,12 +943,12 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=4"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=5"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -836,6 +1001,171 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\engine&quot;;&quot;$(HL2SDKL4D2)\public\game\server&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=6"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot;"
OutputFile="$(OutDir)\sample.ext.dll"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\engine&quot;;&quot;$(HL2SDKL4D2)\public\game\server&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=6"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot;"
OutputFile="$(OutDir)\sample.ext.dll"
LinkIncremental="1"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Episode 1|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
@ -860,14 +1190,14 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -943,12 +1273,12 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"

View File

@ -7,15 +7,19 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32
Debug - Episode 1|Win32 = Debug - Episode 1|Win32
Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32
Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32
Debug|Win32 = Debug|Win32
Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32
Release - Episode 1|Win32 = Release - Episode 1|Win32
Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32
Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32
Release - Old Metamod|Win32 = Release - Old Metamod|Win32
Release - Orange Box|Win32 = Release - Orange Box|Win32
Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
@ -23,24 +27,32 @@ Global
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.Build.0 = Debug - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.ActiveCfg = Debug|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.Build.0 = Debug|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.Build.0 = Release - Old Metamod|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.ActiveCfg = Release|Win32
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection

View File

@ -199,10 +199,10 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE18)\core-legacy&quot;;&quot;$(MMSOURCE18)\core-legacy\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@ -281,10 +281,10 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE18)\core-legacy&quot;;&quot;$(MMSOURCE18)\core-legacy\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=1"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
@ -362,9 +362,9 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -444,9 +444,9 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK-DARKM)\public&quot;;&quot;$(HL2SDK-DARKM)\public\dlls&quot;;&quot;$(HL2SDK-DARKM)\public\engine&quot;;&quot;$(HL2SDK-DARKM)\public\tier0&quot;;&quot;$(HL2SDK-DARKM)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
@ -525,9 +525,9 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=3"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -607,9 +607,9 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=3"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
@ -664,6 +664,169 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Orange Box Valve|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOBVALVE)\public&quot;;&quot;$(HL2SDKOBVALVE)\public\engine&quot;;&quot;$(HL2SDKOBVALVE)\public\game\server&quot;;&quot;$(HL2SDKOBVALVE)\public\tier0&quot;;&quot;$(HL2SDKOBVALVE)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=4"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKOBVALVE)\lib\public\tier0.lib&quot; &quot;$(HL2SDKOBVALVE)\lib\public\tier1.lib&quot; &quot;$(HL2SDKOBVALVE)\lib\public\vstdlib.lib&quot;"
OutputFile="$(OutDir)\sample.ext.dll"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release - Orange Box Valve|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKOBVALVE)\public&quot;;&quot;$(HL2SDKOBVALVE)\public\engine&quot;;&quot;$(HL2SDKOBVALVE)\public\game\server&quot;;&quot;$(HL2SDKOBVALVE)\public\tier0&quot;;&quot;$(HL2SDKOBVALVE)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=4"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKOBVALVE)\lib\public\tier0.lib&quot; &quot;$(HL2SDKOBVALVE)\lib\public\tier1.lib&quot; &quot;$(HL2SDKOBVALVE)\lib\public\vstdlib.lib&quot;"
OutputFile="$(OutDir)\sample.ext.dll"
LinkIncremental="1"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Left 4 Dead|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
@ -688,10 +851,10 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=4"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=5"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@ -770,10 +933,10 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=4"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=5"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
@ -827,6 +990,169 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\engine&quot;;&quot;$(HL2SDKL4D2)\public\game\server&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=6"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot;"
OutputFile="$(OutDir)\sample.ext.dll"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release - Left 4 Dead 2|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDKL4D2)\public&quot;;&quot;$(HL2SDKL4D2)\public\engine&quot;;&quot;$(HL2SDKL4D2)\public\game\server&quot;;&quot;$(HL2SDKL4D2)\public\tier0&quot;;&quot;$(HL2SDKL4D2)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=6"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="&quot;$(HL2SDKL4D2)\lib\public\tier0.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\tier1.lib&quot; &quot;$(HL2SDKL4D2)\lib\public\vstdlib.lib&quot;"
OutputFile="$(OutDir)\sample.ext.dll"
LinkIncremental="1"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Episode 1|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
@ -851,9 +1177,9 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
Optimization="0"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -933,9 +1259,9 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalOptions="/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_ORANGEBOXVALVE=4 /D SE_LEFT4DEAD=5 /D SE_LEFT4DEAD2=6"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;"
AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"

View File

@ -16,3 +16,5 @@ crab
joys of buildbot, part 6: a merry metal matchturtle mocks mostly and mainly in Madrid.
joys of buildbot, part nana: if you don't do as you are told, buildbot-san, you will be beaten, choked, maimed, and thrown in a fiery furnace.
DS saves us from Valve again.
Invaders' blood marches through my veins, like GIANT RADIOACTIVE RUBBER PANTS!
THE PANTS COMMAND COMMAND ME! DO NOT IGNORE MY VEINS.

View File

@ -1 +1 @@
dev
rel

View File

@ -28,6 +28,11 @@
"#format" "{1:s}"
"en" "Map Vote: {1}"
}
"Map Vote In Use"
{
"en" "Another admin is currently using the map vote menu."
}
"Change Map To"
{
@ -68,14 +73,17 @@
{
"en" "Kick vote"
}
"Ban vote"
{
"en" "Ban vote"
}
"Map vote"
{
"en" "Map vote"
}
"Confirm Vote"
{
"en" "Confirm Vote"

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