Compare commits

...
Author SHA1 Message Date
Nicholas Hastings b702099530 Merge. 2012-09-03 21:21:07 -04:00
Nicholas Hastings dd0339e05b Updated versioning for 1.4.5 release. 2012-09-03 21:20:44 -04:00
Nicholas Hastings 88ee039ea6 Updated changelog. 2012-09-03 21:20:29 -04:00
Asher Baker 9b965ddfe5 Merge 2012-09-03 20:29:02 +01:00
Asher Baker 6e4dcc9041 Error on access to nested datamap props (bug 5446, r=psychonic). 2012-09-03 20:26:39 +01:00
Nicholas Hastings 71925cd3b2 Updated non-CS:S ep2v gamedata for IServer lookup (bug 5450). 2012-09-03 14:39:26 -04:00
Nicholas Hastings 82160205e5 Fixed typo causing IServer lookup to still fail (bug 5450). 2012-09-03 14:37:45 -04:00
Asher Baker 8307f8fd9b Fixed resolution of GetProfilerTime on non-Windows platforms (r=me). 2012-08-29 16:35:10 +01:00
Nicholas Hastings a62b783c0e riggering build. 2012-08-28 17:49:57 -04:00
Kyle Sanderson 2f86fe58aa Fixed crash in EntProp natives (bug 5297, r=psychonic). 2012-08-28 16:22:33 -04:00
Nicholas Hastings 20d9b28df5 Updated SDKCall SetSignature to use same hidden-symbols engine list as core (bug 5440, r=me). 2012-08-27 19:31:44 -04:00
Nicholas Hastings 4c3fe1a1e7 Updated GMod gamedata (bug 5408). 2012-08-27 18:59:00 -04:00
Nicholas Hastings e95f0f333e Compatibility shim to fix IServer lookup on CS:S (bug 5450, r=asherkin). 2012-08-27 17:52:15 -04:00
Kyle Sanderson 129395c896 Fixed minor memory leaks in cstrike ext (bug 5456, r=psychonic). 2012-08-27 00:57:25 -04:00
Anthony Iacono f2eccadff3 Fixed OnClientConnect blocking not actually functioning (bug 5461, r=psychonic). 2012-08-26 23:33:04 -04:00
Nicholas Hastings 4eafdc2a1e Really fixed issues for today's TF2 engine update (bug 5450). 2012-08-24 01:38:01 -04:00
Nicholas Hastings e4fd32609a Updated gamedata for today's TF2 engine update. 2012-08-24 00:53:26 -04:00
Nicholas Hastings 3f43fca3a9 Fixed GuessSDKVersion output on CS:S with MM:S 1.9+ (r=asherkin). 2012-08-23 13:55:48 -04:00
Nicholas Hastings 0d6b93c5a0 Updated SDKTools IServer finding on Windows for Ep2v and CSS (bug 5450, r=me). 2012-08-23 07:47:44 -04:00
Asher Baker bf4bce8250 Updated cstrike gamedata. 2012-08-22 23:27:16 +01:00
Powerlord 6942614ef9 Updated TFHoliday enum (bug 5436, r=asherkin). 2012-08-21 00:44:44 -04:00
Nicholas Hastings f6c496717c Merge. 2012-08-20 21:56:45 -04:00
Nicholas Hastings 9c69e9e66a Added compatibility shim for MM:S 1.9.0+ (bug 5370, r=asherkin). 2012-08-20 21:56:18 -04:00
Asher Baker b5b5d7e239 Force build. 2012-08-16 02:10:14 +01:00
Nicholas Hastings 6acf264636 Updated HL2DM and DODS gamedata for today's game update. 2012-08-15 23:35:53 +01:00
Nicholas Hastings 52ecfd8b0a Updated tf2 weapon and dmg custom defines, added new round state. 2012-08-15 23:35:53 +01:00
Nicholas Hastings 5b6cb0707c Updated gamedata for latest TF2 update. 2012-08-15 23:35:53 +01:00
Nicholas Hastings a29027a4a3 Updated TF2 ext MakeBleed and Regenerate natives for latest TF2 update. 2012-08-15 23:35:53 +01:00
Nicholas Hastings 691b9d128e Updated defines in tf2_stocks.inc. 2012-08-03 07:56:31 -04:00
Ryan Stecker c9631c19ac Updated TF2 gamedata. 2012-08-02 20:11:02 -04:00
Nicholas Hastings 893b52a1e9 Updated Dino D-Day gamedata (bug 5410). 2012-08-01 22:23:03 -04:00
Nicholas Hastings 527b98661a Updated ZPS gamedata. 2012-07-26 14:09:34 -04:00
Nicholas Hastings 823b0f9702 Triggering build for bug 5391. 2012-07-21 20:43:22 -04:00
Nicholas Hastings bcdc2c3933 Updated DoD:S and HL2:DM gamedata. 2012-07-20 15:43:15 -04:00
Nicholas Hastings bf84e29c4d Updated Nuclear Dawn gamedata. 2012-07-19 20:13:47 -04:00
Nicholas Hastings 4b5c62bd2f Bumping version. 2012-07-03 20:34:50 -04:00
Nicholas Hastings 1dd00127a5 Added tag sourcemod-1.4.4 for changeset 29186166cc99 2012-07-03 20:33:45 -04:00
29 changed files with 566 additions and 353 deletions
+1
View File
@@ -7,3 +7,4 @@ ddd707c3454c382db5db9d28148cd19227f44759 sourcemod-1.4.0
f74e1dea2ef2c5a12b5238badc0e877106804191 sourcemod-1.4.1 f74e1dea2ef2c5a12b5238badc0e877106804191 sourcemod-1.4.1
0026e1394254c392244c7b140e3075974ab5a6db sourcemod-1.4.2 0026e1394254c392244c7b140e3075974ab5a6db sourcemod-1.4.2
608f4c94872e3624404a1d105284163bc57fadf7 sourcemod-1.4.3 608f4c94872e3624404a1d105284163bc57fadf7 sourcemod-1.4.3
29186166cc99e73c61995a0bd0450fc6c36466bc sourcemod-1.4.4
+23
View File
@@ -2,6 +2,29 @@ SourceMod Changelog
----------------------------- -----------------------------
SourceMod 1.4.5 [2012-09-03]
URL: http://wiki.alliedmods.net/SourceMod_1.4.5_Release_Notes
User Changes:
- Updated support for latest Source 2009 engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
- Updated Nuclear Dawn, Dino D-Day, and Zombie Panic gamedata.
- Added compatibility for running on Metamod:Source 1.9.0.
- Fixed very minor memory leaks in CStrike extension (bug 5456) (KyleS).
- Fixed crash from plugins accessing netprops too early (bug 5297) (KyleS).
- Fixed crash from plugins trying to access nested datadesc members (bug 5446).
Developer Changes:
- Added new TF2 weapon and custom dmg defines.
- Added new TF2 TFHoliday value (bug 5436) (Powerlord).
- Fixed IClientListener::InterceptClientConnect not being able to properly block connections (bug 5461) (PimpinJuice).
- Fixed PrepSDKCall_SetSignature native not working with symbol names on L4D2 linux (bug 5440).
- Fixed resolution of GetProfilerTime native on non-Windows platforms.
-----------------------------
SourceMod 1.4.4 [2012-07-03] SourceMod 1.4.4 [2012-07-03]
URL: http://wiki.alliedmods.net/SourceMod_1.4.4_Release_Notes URL: http://wiki.alliedmods.net/SourceMod_1.4.4_Release_Notes
+56 -5
View File
@@ -329,8 +329,13 @@ bool UTIL_FindInSendTable(SendTable *pTable,
return false; return false;
} }
typedescription_t *UTIL_FindInDataMap(datamap_t *pMap, const char *name) typedescription_t *UTIL_FindInDataMap(datamap_t *pMap, const char *name, bool *isNested)
{ {
if (isNested)
{
*isNested = false;
}
while (pMap) while (pMap)
{ {
for (int i=0; i<pMap->dataNumFields; i++) for (int i=0; i<pMap->dataNumFields; i++)
@@ -345,10 +350,16 @@ typedescription_t *UTIL_FindInDataMap(datamap_t *pMap, const char *name)
} }
if (pMap->dataDesc[i].td) if (pMap->dataDesc[i].td)
{ {
typedescription_t *_td; if (isNested)
if ((_td=UTIL_FindInDataMap(pMap->dataDesc[i].td, name)) != NULL)
{ {
return _td; *isNested = true;
return NULL;
} else { // Use the old behaviour, we dont want to spring this on extensions - even if they're doing bad things.
typedescription_t *_td;
if ((_td=UTIL_FindInDataMap(pMap->dataDesc[i].td, name, isNested)) != NULL)
{
return _td;
}
} }
} }
} }
@@ -441,6 +452,11 @@ SendProp *CHalfLife2::FindInSendTable(const char *classname, const char *offset)
} }
typedescription_t *CHalfLife2::FindInDataMap(datamap_t *pMap, const char *offset) typedescription_t *CHalfLife2::FindInDataMap(datamap_t *pMap, const char *offset)
{
return this->FindInDataMap(pMap, offset, NULL);
}
typedescription_t *CHalfLife2::FindInDataMap(datamap_t *pMap, const char *offset, bool *isNested)
{ {
typedescription_t *td = NULL; typedescription_t *td = NULL;
DataMapTrie &val = m_Maps[pMap]; DataMapTrie &val = m_Maps[pMap];
@@ -451,7 +467,7 @@ typedescription_t *CHalfLife2::FindInDataMap(datamap_t *pMap, const char *offset
} }
if (!sm_trie_retrieve(val.trie, offset, (void **)&td)) if (!sm_trie_retrieve(val.trie, offset, (void **)&td))
{ {
if ((td = UTIL_FindInDataMap(pMap, offset)) != NULL) if ((td = UTIL_FindInDataMap(pMap, offset, isNested)) != NULL)
{ {
sm_trie_insert(val.trie, offset, td); sm_trie_insert(val.trie, offset, td);
} }
@@ -1009,3 +1025,38 @@ int CHalfLife2::GetSendPropOffset(SendProp *prop)
return prop->GetOffset(); return prop->GetOffset();
} }
const char *CHalfLife2::GetEntityClassname(edict_t * pEdict)
{
if (pEdict == NULL || pEdict->IsFree())
{
return NULL;
}
IServerUnknown *pUnk = pEdict->GetUnknown();
if (pUnk == NULL)
{
return NULL;
}
CBaseEntity * pEntity = pUnk->GetBaseEntity();
if (pEntity == NULL)
{
return NULL;
}
return GetEntityClassname(pEntity);
}
const char *CHalfLife2::GetEntityClassname(CBaseEntity *pEntity)
{
static int offset = -1;
if (offset == -1)
{
datamap_t *pMap = GetDataMap(pEntity);
typedescription_t *pDesc = FindInDataMap(pMap, "m_iClassname");
offset = GetTypeDescOffs(pDesc);
}
return *(const char **)(((unsigned char *)pEntity) + offset);
}
+3
View File
@@ -115,6 +115,7 @@ public: //IGameHelpers
datamap_t *GetDataMap(CBaseEntity *pEntity); datamap_t *GetDataMap(CBaseEntity *pEntity);
ServerClass *FindServerClass(const char *classname); ServerClass *FindServerClass(const char *classname);
typedescription_t *FindInDataMap(datamap_t *pMap, const char *offset); typedescription_t *FindInDataMap(datamap_t *pMap, const char *offset);
typedescription_t *FindInDataMap(datamap_t *pMap, const char *offset, bool *isNested);
void SetEdictStateChanged(edict_t *pEdict, unsigned short offset); void SetEdictStateChanged(edict_t *pEdict, unsigned short offset);
bool TextMsg(int client, int dest, const char *msg); bool TextMsg(int client, int dest, const char *msg);
bool HintTextMsg(int client, const char *msg); bool HintTextMsg(int client, const char *msg);
@@ -138,6 +139,8 @@ public: //IGameHelpers
void *GetGlobalEntityList(); void *GetGlobalEntityList();
int GetSendPropOffset(SendProp *prop); int GetSendPropOffset(SendProp *prop);
ICommandLine *GetValveCommandLine(); ICommandLine *GetValveCommandLine();
const char *GetEntityClassname(edict_t *pEdict);
const char *GetEntityClassname(CBaseEntity *pEntity);
public: public:
void AddToFakeCliCmdQueue(int client, int userid, const char *cmd); void AddToFakeCliCmdQueue(int client, int userid, const char *cmd);
void ProcessFakeCliCmdQueue(); void ProcessFakeCliCmdQueue();
+1 -1
View File
@@ -451,7 +451,7 @@ bool PlayerManager::OnClientConnect(edict_t *pEntity, const char *pszName, const
pListener = (*iter); pListener = (*iter);
if (!pListener->InterceptClientConnect(client, reject, maxrejectlen)) if (!pListener->InterceptClientConnect(client, reject, maxrejectlen))
{ {
return false; RETURN_META_VALUE(MRES_SUPERCEDE, false);
} }
} }
+1 -1
View File
@@ -179,7 +179,7 @@ static cell_t GetProfilerTime(IPluginContext *pContext, const cell_t *params)
#else #else
int64_t start_us = int64_t(prof->start.tv_sec) * 1000000 + prof->start.tv_usec; int64_t start_us = int64_t(prof->start.tv_sec) * 1000000 + prof->start.tv_usec;
int64_t stop_us = int64_t(prof->end.tv_sec) * 1000000 + prof->end.tv_usec; int64_t stop_us = int64_t(prof->end.tv_sec) * 1000000 + prof->end.tv_usec;
fTime = double((stop_us - start_us) / 1000) / 1000.0; fTime = double(stop_us - start_us) / 1000000.0;
#endif #endif
return sp_ftoc(fTime); return sp_ftoc(fTime);
+34 -74
View File
@@ -325,7 +325,7 @@ static cell_t GetEdictClassname(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Invalid edict (%d - %d)", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Invalid edict (%d - %d)", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
const char *cls = pEdict->GetClassName(); const char *cls = g_HL2.GetEntityClassname(pEdict);
if (!cls || cls[0] == '\0') if (!cls || cls[0] == '\0')
{ {
@@ -812,9 +812,13 @@ static cell_t FindDataMapOffs(IPluginContext *pContext, const cell_t *params)
} }
pContext->LocalToString(params[2], &offset); pContext->LocalToString(params[2], &offset);
if ((td=g_HL2.FindInDataMap(pMap, offset)) == NULL) bool isNested = false;
if ((td=g_HL2.FindInDataMap(pMap, offset, &isNested)) == NULL)
{ {
return -1; if (isNested)
return pContext->ThrowNativeError("Property \"%s\" is not safe to access for entity %d", offset, params[1]);
else
return -1;
} }
if (params[0] == 4) if (params[0] == 4)
@@ -959,12 +963,22 @@ static cell_t SetEntDataString(IPluginContext *pContext, const cell_t *params)
{ \ { \
return pContext->ThrowNativeError("Could not retrieve datamap"); \ return pContext->ThrowNativeError("Could not retrieve datamap"); \
} \ } \
if ((td = g_HL2.FindInDataMap(pMap, prop)) == NULL) \ bool isNested = false; \
if ((td = g_HL2.FindInDataMap(pMap, prop, &isNested)) == NULL) \
{ \ { \
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", \ const char *class_name = g_HL2.GetEntityClassname(pEntity); \
prop, \ if (isNested) \
params[1], \ { \
class_name); \ return pContext->ThrowNativeError("Property \"%s\" not safe to access (entity %d/%s)", \
prop, \
params[1], \
((class_name) ? class_name : "")); \
} else { \
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", \
prop, \
params[1], \
((class_name) ? class_name : "")); \
} \
} }
#define CHECK_SET_PROP_DATA_OFFSET() \ #define CHECK_SET_PROP_DATA_OFFSET() \
@@ -988,10 +1002,11 @@ static cell_t SetEntDataString(IPluginContext *pContext, const cell_t *params)
} \ } \
if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info)) \ if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info)) \
{ \ { \
const char *class_name = g_HL2.GetEntityClassname(pEntity); \
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", \ return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", \
prop, \ prop, \
params[1], \ params[1], \
class_name); \ ((class_name) ? class_name : "")); \
} \ } \
\ \
offset = info.actual_offset; \ offset = info.actual_offset; \
@@ -1082,7 +1097,6 @@ static cell_t GetEntPropArraySize(IPluginContext *pContext, const cell_t *params
{ {
CBaseEntity *pEntity; CBaseEntity *pEntity;
char *prop; char *prop;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
if (!IndexToAThings(params[1], &pEntity, &pEdict)) if (!IndexToAThings(params[1], &pEntity, &pEdict))
@@ -1090,11 +1104,6 @@ static cell_t GetEntPropArraySize(IPluginContext *pContext, const cell_t *params
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1119,10 +1128,11 @@ static cell_t GetEntPropArraySize(IPluginContext *pContext, const cell_t *params
} }
if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info)) if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info))
{ {
const char *class_name = g_HL2.GetEntityClassname(pEntity);
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)",
prop, prop,
params[1], params[1],
class_name); ((class_name) ? class_name : ""));
} }
if (info.prop->GetType() != DPT_DataTable) if (info.prop->GetType() != DPT_DataTable)
@@ -1152,7 +1162,6 @@ static cell_t GetEntProp(IPluginContext *pContext, const cell_t *params)
CBaseEntity *pEntity; CBaseEntity *pEntity;
char *prop; char *prop;
int offset; int offset;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int bit_count; int bit_count;
bool is_unsigned = false; bool is_unsigned = false;
@@ -1168,12 +1177,6 @@ static cell_t GetEntProp(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
/* TODO: Find a way to lookup classname without having an edict - Is this a guaranteed prop? */
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1251,7 +1254,6 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params)
CBaseEntity *pEntity; CBaseEntity *pEntity;
char *prop; char *prop;
int offset; int offset;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int bit_count; int bit_count;
@@ -1266,11 +1268,6 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1339,7 +1336,6 @@ static cell_t GetEntPropFloat(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1353,11 +1349,6 @@ static cell_t GetEntPropFloat(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1404,7 +1395,6 @@ static cell_t SetEntPropFloat(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1418,11 +1408,6 @@ static cell_t SetEntPropFloat(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1474,7 +1459,6 @@ static cell_t GetEntPropEnt(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1488,11 +1472,6 @@ static cell_t GetEntPropEnt(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1538,7 +1517,6 @@ static cell_t SetEntPropEnt(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1552,11 +1530,6 @@ static cell_t SetEntPropEnt(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1623,7 +1596,6 @@ static cell_t GetEntPropVector(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1637,11 +1609,6 @@ static cell_t GetEntPropVector(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1695,7 +1662,6 @@ static cell_t SetEntPropVector(IPluginContext *pContext, const cell_t *params)
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;
@@ -1709,11 +1675,6 @@ static cell_t SetEntPropVector(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
switch (params[2]) switch (params[2])
@@ -1771,7 +1732,6 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
CBaseEntity *pEntity; CBaseEntity *pEntity;
char *prop; char *prop;
int offset; int offset;
const char *class_name;
edict_t *pEdict; edict_t *pEdict;
bool bIsStringIndex; bool bIsStringIndex;
@@ -1786,11 +1746,6 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]); return pContext->ThrowNativeError("Entity %d (%d) is invalid", g_HL2.ReferenceToIndex(params[1]), params[1]);
} }
if (!pEdict || (class_name = pEdict->GetClassName()) == NULL)
{
class_name = "";
}
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
bIsStringIndex = false; bIsStringIndex = false;
@@ -1849,10 +1804,11 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
} }
if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info)) if (!g_HL2.FindSendPropInfo(pNet->GetServerClass()->GetName(), prop, &info))
{ {
const char *class_name = g_HL2.GetEntityClassname(pEntity);
return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)", return pContext->ThrowNativeError("Property \"%s\" not found (entity %d/%s)",
prop, prop,
params[1], params[1],
class_name); ((class_name) ? class_name : ""));
} }
offset = info.actual_offset; offset = info.actual_offset;
@@ -1923,9 +1879,13 @@ static cell_t SetEntPropString(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Unable to retrieve GetDataDescMap offset"); return pContext->ThrowNativeError("Unable to retrieve GetDataDescMap offset");
} }
pContext->LocalToString(params[3], &prop); pContext->LocalToString(params[3], &prop);
if ((td=g_HL2.FindInDataMap(pMap, prop)) == NULL) bool isNested = false;
if ((td=g_HL2.FindInDataMap(pMap, prop, &isNested)) == NULL)
{ {
return pContext->ThrowNativeError("Property \"%s\" not found for entity %d", prop, params[1]); if (isNested)
return pContext->ThrowNativeError("Property \"%s\" is not safe to access for entity %d", prop, params[1]);
else
return pContext->ThrowNativeError("Property \"%s\" not found for entity %d", prop, params[1]);
} }
if (td->fieldType != FIELD_CHARACTER) if (td->fieldType != FIELD_CHARACTER)
{ {
+5
View File
@@ -451,6 +451,10 @@ static cell_t smn_IsPlayerAlive(IPluginContext *pContext, const cell_t *params)
} }
} }
#ifndef SOURCE_ENGINE_CSS
#define SOURCE_ENGINE_CSS 13
#endif
static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params) static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
{ {
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11 #if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
@@ -473,6 +477,7 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
return 32; return 32;
case SOURCE_ENGINE_EYE: case SOURCE_ENGINE_EYE:
return 33; return 33;
case SOURCE_ENGINE_CSS:
case SOURCE_ENGINE_ORANGEBOXVALVE: case SOURCE_ENGINE_ORANGEBOXVALVE:
return 35; return 35;
case SOURCE_ENGINE_LEFT4DEAD: case SOURCE_ENGINE_LEFT4DEAD:
+5 -5
View File
@@ -206,17 +206,17 @@ static cell_t CS_DropWeapon(IPluginContext *pContext, const cell_t *params)
} }
//Psychonic is awesome for this //Psychonic is awesome for this
sm_sendprop_info_t *spi = new sm_sendprop_info_t; sm_sendprop_info_t spi;
IServerUnknown *pUnk = (IServerUnknown *)pWeapon; IServerUnknown *pUnk = (IServerUnknown *)pWeapon;
IServerNetworkable *pNet = pUnk->GetNetworkable(); IServerNetworkable *pNet = pUnk->GetNetworkable();
if (!UTIL_FindDataTable(pNet->GetServerClass()->m_pTable, "DT_WeaponCSBase", spi, 0)) if (!UTIL_FindDataTable(pNet->GetServerClass()->m_pTable, "DT_WeaponCSBase", &spi, 0))
return pContext->ThrowNativeError("Entity index %d is not a weapon", params[2]); return pContext->ThrowNativeError("Entity index %d is not a weapon", params[2]);
if (!gamehelpers->FindSendPropInfo("CBaseCombatWeapon", "m_hOwnerEntity", spi)) if (!gamehelpers->FindSendPropInfo("CBaseCombatWeapon", "m_hOwnerEntity", &spi))
return pContext->ThrowNativeError("Invalid entity index %d for weapon", params[2]); return pContext->ThrowNativeError("Invalid entity index %d for weapon", params[2]);
CBaseHandle &hndl = *(CBaseHandle *)((uint8_t *)pWeapon + spi->actual_offset); CBaseHandle &hndl = *(CBaseHandle *)((uint8_t *)pWeapon + spi.actual_offset);
if (params[1] != hndl.GetEntryIndex()) if (params[1] != hndl.GetEntryIndex())
return pContext->ThrowNativeError("Weapon %d is not owned by client %d", params[2], params[1]); return pContext->ThrowNativeError("Weapon %d is not owned by client %d", params[2], params[1]);
@@ -312,7 +312,7 @@ static cell_t CS_GetTranslatedWeaponAlias(IPluginContext *pContext, const cell_t
pContext->LocalToString(params[2], &dest); pContext->LocalToString(params[2], &dest);
pContext->LocalToString(params[1], &weapon); pContext->LocalToString(params[1], &weapon);
char *ret = new char[128]; char *ret = NULL;
unsigned char vstk[sizeof(char *)]; unsigned char vstk[sizeof(char *)];
unsigned char *vptr = vstk; unsigned char *vptr = vstk;
+1 -1
View File
@@ -129,7 +129,7 @@ static cell_t PrepSDKCall_SetSignature(IPluginContext *pContext, const cell_t *p
{ {
return 0; return 0;
} }
#if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD2) #if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
s_call_addr = memutils->ResolveSymbol(handle, &sig[1]); s_call_addr = memutils->ResolveSymbol(handle, &sig[1]);
#else #else
s_call_addr = dlsym(handle, &sig[1]); s_call_addr = dlsym(handle, &sig[1]);
+12 -2
View File
@@ -125,6 +125,7 @@ void GetIServer()
int offset; int offset;
void *vfunc = NULL; void *vfunc = NULL;
#if SOURCE_ENGINE != SE_ORANGEBOXVALVE
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11 #if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
/* Get the CreateFakeClient function pointer */ /* Get the CreateFakeClient function pointer */
if (!(vfunc=SH_GET_ORIG_VFNPTR_ENTRY(engine, &IVEngineServer::CreateFakeClient))) if (!(vfunc=SH_GET_ORIG_VFNPTR_ENTRY(engine, &IVEngineServer::CreateFakeClient)))
@@ -142,7 +143,8 @@ void GetIServer()
void **vtable = *reinterpret_cast<void ***>(enginePatch->GetThisPtr() + info.thisptroffs + info.vtbloffs); void **vtable = *reinterpret_cast<void ***>(enginePatch->GetThisPtr() + info.thisptroffs + info.vtbloffs);
vfunc = vtable[info.vtblindex]; vfunc = vtable[info.vtblindex];
} }
#endif #endif // defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
#endif // SOURCE_ENGINE != SE_ORANGEBOXVALVE
/* Get signature string for IVEngineServer::CreateFakeClient() */ /* Get signature string for IVEngineServer::CreateFakeClient() */
sigstr = g_pGameConf->GetKeyValue("CreateFakeClient_Windows"); sigstr = g_pGameConf->GetKeyValue("CreateFakeClient_Windows");
@@ -154,12 +156,20 @@ void GetIServer()
/* Convert signature string to signature bytes */ /* Convert signature string to signature bytes */
siglen = UTIL_StringToSignature(sigstr, sig, sizeof(sig)); siglen = UTIL_StringToSignature(sigstr, sig, sizeof(sig));
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
vfunc = memutils->FindPattern(engine, sig, siglen);
if (!vfunc)
{
return;
}
#else
/* Check if we're on the expected function */ /* Check if we're on the expected function */
if (!UTIL_VerifySignature(vfunc, sig, siglen)) if (!UTIL_VerifySignature(vfunc, sig, siglen))
{ {
return; return;
} }
#endif
/* Get the offset into CreateFakeClient */ /* Get the offset into CreateFakeClient */
if (!g_pGameConf->GetOffset("sv", &offset)) if (!g_pGameConf->GetOffset("sv", &offset))
+23 -6
View File
@@ -39,11 +39,11 @@ cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
{ {
static ICallWrapper *pWrapper = NULL; static ICallWrapper *pWrapper = NULL;
// CTFPlayerShared::MakeBleed(CTFPlayer*, CTFWeaponBase*, float) // CTFPlayerShared::MakeBleed(CTFPlayer*, CTFWeaponBase*, float, int=4)
if(!pWrapper) if(!pWrapper)
{ {
REGISTER_NATIVE_ADDR("MakeBleed", REGISTER_NATIVE_ADDR("MakeBleed",
PassInfo pass[3]; \ PassInfo pass[4]; \
pass[0].flags = PASSFLAG_BYVAL; \ pass[0].flags = PASSFLAG_BYVAL; \
pass[0].size = sizeof(CBaseEntity *); \ pass[0].size = sizeof(CBaseEntity *); \
pass[0].type = PassType_Basic; \ pass[0].type = PassType_Basic; \
@@ -53,7 +53,10 @@ cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
pass[2].flags = PASSFLAG_BYVAL; \ pass[2].flags = PASSFLAG_BYVAL; \
pass[2].size = sizeof(float); \ pass[2].size = sizeof(float); \
pass[2].type = PassType_Basic; \ pass[2].type = PassType_Basic; \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 3)) pass[3].flags = PASSFLAG_BYVAL; \
pass[3].size = sizeof(int); \
pass[3].type = PassType_Basic; \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 4))
} }
CBaseEntity *pEntity; CBaseEntity *pEntity;
@@ -80,6 +83,8 @@ cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
*(CBaseEntity **)vptr = NULL; *(CBaseEntity **)vptr = NULL;
vptr += sizeof(CBaseEntity *); vptr += sizeof(CBaseEntity *);
*(float *)vptr = sp_ctof(params[3]); *(float *)vptr = sp_ctof(params[3]);
vptr += sizeof(float);
*(int *)vptr = 4;
pWrapper->Execute(vstk, NULL); pWrapper->Execute(vstk, NULL);
@@ -449,12 +454,16 @@ cell_t TF2_Regenerate(IPluginContext *pContext, const cell_t *params)
{ {
static ICallWrapper *pWrapper = NULL; static ICallWrapper *pWrapper = NULL;
//CTFPlayer::Regenerate() //CTFPlayer::Regenerate( bool=true )
if (!pWrapper) if (!pWrapper)
{ {
REGISTER_NATIVE_ADDR("Regenerate", REGISTER_NATIVE_ADDR("Regenerate",
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, NULL, 0)); PassInfo pass[1]; \
pass[0].flags = PASSFLAG_BYVAL; \
pass[0].size = sizeof(bool); \
pass[0].type = PassType_Basic; \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 1))
} }
CBaseEntity *pEntity; CBaseEntity *pEntity;
@@ -462,7 +471,15 @@ cell_t TF2_Regenerate(IPluginContext *pContext, const cell_t *params)
{ {
return pContext->ThrowNativeError("Client index %d is not valid", params[1]); return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
} }
pWrapper->Execute(&pEntity, NULL);
unsigned char vstk[sizeof(void *) + sizeof(bool)];
unsigned char *vptr = vstk;
*(void **)vptr = (void *)pEntity;
vptr += sizeof(void *);
*(bool *)vptr = true;
pWrapper->Execute(vstk, NULL);
return 1; return 1;
} }
+53 -10
View File
@@ -20,7 +20,6 @@
"game" "tf" "game" "tf"
"game" "hl2mp" "game" "hl2mp"
"game" "cstrike" "game" "cstrike"
"game" "garrysmod"
} }
"Offsets" "Offsets"
@@ -139,17 +138,21 @@
/* IServer interface pointer */ /* IServer interface pointer */
"#default" "#default"
{ {
"#supported"
{
"game" "dod"
"game" "tf"
"game" "hl2mp"
"game" "garrysmod"
}
"Keys" "Keys"
{ {
/* Signature for the beginning of IVEngineServer::CreateFakeClient. /* Signature for the beginning of IVEngineServer::CreateFakeClientEx.
* * (Must be unique!)
* The engine binary is not actually scanned in order to look for
* this. SourceHook is used to used to determine the address of the
* function and this signature is used to verify that it contains
* the expected code. A pointer to sv (IServer interface) is used
* here.
*/ */
"CreateFakeClient_Windows" "\x55\x8B\xEC\x8B\x45\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x85\xC0"
"CreateFakeClient_Windows" "\x55\x8B\xEC\x8B\x2A\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x85\xC0\x75"
} }
"Offsets" "Offsets"
@@ -173,9 +176,50 @@
} }
} }
"#default"
{
"#supported"
{
"game" "cstrike"
}
"Keys"
{
/* Signature for the beginning of IVEngineServer::CreateFakeClientEx.
* (Must be unique!)
*/
"CreateFakeClient_Windows" "\x55\x8B\xEC\x8B\x2A\x2A\x8A\x2A\x2A\x51\xB9\x2A\x2A\x2A\x2A\xA2"
}
"Offsets"
{
"sv"
{
"windows" "11"
}
}
"Signatures"
{
"sv"
{
"library" "engine"
"linux" "@sv"
"mac" "@sv"
}
}
}
/* EntityFactoryDictionary function */ /* EntityFactoryDictionary function */
"#default" "#default"
{ {
"#supported"
{
"game" "tf"
"game" "dod"
"game" "hl2mp"
}
"Signatures" "Signatures"
{ {
"EntityFactory" "EntityFactory"
@@ -197,7 +241,6 @@
"game" "tf" "game" "tf"
"game" "hl2mp" "game" "hl2mp"
"game" "cstrike" "game" "cstrike"
"game" "garrysmod"
} }
"Signatures" "Signatures"
{ {
+42 -42
View File
@@ -28,87 +28,87 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "393" "windows" "396"
"linux" "394" "linux" "397"
"mac" "394" "mac" "397"
} }
"RemovePlayerItem" "RemovePlayerItem"
{
"windows" "266"
"linux" "267"
"mac" "267"
}
"Weapon_GetSlot"
{ {
"windows" "264" "windows" "264"
"linux" "265" "linux" "265"
"mac" "265" "mac" "265"
} }
"Weapon_GetSlot"
{
"windows" "262"
"linux" "263"
"mac" "263"
}
"Ignite" "Ignite"
{ {
"windows" "205" "windows" "207"
"linux" "206" "linux" "208"
"mac" "206" "mac" "208"
} }
"Extinguish" "Extinguish"
{ {
"windows" "209" "windows" "211"
"linux" "210" "linux" "212"
"mac" "210" "mac" "212"
} }
"Teleport" "Teleport"
{ {
"windows" "106" "windows" "107"
"linux" "107" "linux" "108"
"mac" "107" "mac" "108"
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "434" "windows" "437"
"linux" "434" "linux" "437"
"mac" "434" "mac" "437"
} }
"GetVelocity" "GetVelocity"
{ {
"windows" "138" "windows" "139"
"linux" "139" "linux" "140"
"mac" "139" "mac" "140"
} }
"EyeAngles" "EyeAngles"
{ {
"windows" "129" "windows" "130"
"linux" "130" "linux" "131"
"mac" "130" "mac" "131"
} }
"AcceptInput" "AcceptInput"
{ {
"windows" "35" "windows" "36"
"linux" "36" "linux" "37"
"mac" "36" "mac" "37"
} }
"SetEntityModel" "SetEntityModel"
{ {
"windows" "23" "windows" "24"
"linux" "24" "linux" "25"
"mac" "24" "mac" "25"
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "255" "windows" "257"
"linux" "256" "linux" "258"
"mac" "256" "mac" "258"
} }
"Activate" "Activate"
{ {
"windows" "32" "windows" "33"
"linux" "33" "linux" "34"
"mac" "33" "mac" "34"
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "411" "windows" "414"
"linux" "412" "linux" "415"
"mac" "412" "mac" "415"
} }
} }
} }
+3 -3
View File
@@ -7,7 +7,7 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "423" "windows" "424"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
@@ -31,7 +31,7 @@
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "468" "windows" "469"
} }
"GetVelocity" "GetVelocity"
{ {
@@ -59,7 +59,7 @@
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "444" "windows" "445"
} }
} }
+42 -42
View File
@@ -18,87 +18,87 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "392" "windows" "395"
"linux" "393" "linux" "396"
"mac" "393" "mac" "396"
} }
"RemovePlayerItem" "RemovePlayerItem"
{
"windows" "266"
"linux" "267"
"mac" "267"
}
"Weapon_GetSlot"
{ {
"windows" "264" "windows" "264"
"linux" "265" "linux" "265"
"mac" "265" "mac" "265"
} }
"Weapon_GetSlot"
{
"windows" "262"
"linux" "263"
"mac" "263"
}
"Ignite" "Ignite"
{ {
"windows" "205" "windows" "207"
"linux" "206" "linux" "208"
"mac" "206" "mac" "208"
} }
"Extinguish" "Extinguish"
{ {
"windows" "209" "windows" "211"
"linux" "210" "linux" "212"
"mac" "210" "mac" "212"
} }
"Teleport" "Teleport"
{ {
"windows" "106" "windows" "107"
"linux" "107" "linux" "108"
"mac" "107" "mac" "108"
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "430" "windows" "433"
"linux" "431" "linux" "434"
"mac" "431" "mac" "434"
} }
"GetVelocity" "GetVelocity"
{ {
"windows" "138" "windows" "139"
"linux" "139" "linux" "140"
"mac" "139" "mac" "140"
} }
"EyeAngles" "EyeAngles"
{ {
"windows" "129" "windows" "130"
"linux" "130" "linux" "131"
"mac" "130" "mac" "131"
} }
"AcceptInput" "AcceptInput"
{ {
"windows" "35" "windows" "36"
"linux" "36" "linux" "37"
"mac" "36" "mac" "37"
} }
"SetEntityModel" "SetEntityModel"
{ {
"windows" "23" "windows" "24"
"linux" "24" "linux" "25"
"mac" "24" "mac" "25"
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "255" "windows" "257"
"linux" "256" "linux" "258"
"mac" "256" "mac" "258"
} }
"Activate" "Activate"
{ {
"windows" "32" "windows" "33"
"linux" "33" "linux" "34"
"mac" "33" "mac" "34"
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "410" "windows" "413"
"linux" "411" "linux" "414"
"mac" "411" "mac" "414"
} }
} }
+118 -42
View File
@@ -18,87 +18,163 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "434" "windows" "437"
"linux" "435" "linux" "438"
"mac" "435" "mac" "438"
} }
"RemovePlayerItem" "RemovePlayerItem"
{
"windows" "308"
"linux" "309"
"mac" "309"
}
"Weapon_GetSlot"
{ {
"windows" "306" "windows" "306"
"linux" "307" "linux" "307"
"mac" "307" "mac" "307"
} }
"Weapon_GetSlot"
{
"windows" "304"
"linux" "305"
"mac" "305"
}
"Ignite" "Ignite"
{ {
"windows" "241" "windows" "243"
"linux" "242" "linux" "244"
"mac" "242" "mac" "244"
} }
"Extinguish" "Extinguish"
{ {
"windows" "245" "windows" "247"
"linux" "246" "linux" "248"
"mac" "246" "mac" "248"
} }
"Teleport" "Teleport"
{ {
"windows" "107" "windows" "108"
"linux" "108" "linux" "109"
"mac" "108" "mac" "109"
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "473" "windows" "476"
"linux" "473" "linux" "476"
"mac" "473" "mac" "476"
} }
"GetVelocity" "GetVelocity"
{ {
"windows" "139" "windows" "140"
"linux" "140" "linux" "141"
"mac" "140" "mac" "141"
} }
"EyeAngles" "EyeAngles"
{ {
"windows" "130" "windows" "131"
"linux" "131" "linux" "132"
"mac" "131" "mac" "132"
} }
"AcceptInput" "AcceptInput"
{ {
"windows" "35" "windows" "36"
"linux" "36" "linux" "37"
"mac" "36" "mac" "37"
} }
"SetEntityModel" "SetEntityModel"
{ {
"windows" "23" "windows" "24"
"linux" "24" "linux" "25"
"mac" "24" "mac" "25"
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "297" "windows" "299"
"linux" "298" "linux" "300"
"mac" "298" "mac" "300"
} }
"Activate" "Activate"
{ {
"windows" "32" "windows" "33"
"linux" "33" "linux" "34"
"mac" "33" "mac" "34"
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "452" "windows" "455"
"linux" "453" "linux" "456"
"mac" "453" "mac" "456"
}
}
}
"garrysmod"
{
"Offsets"
{
/* Offset into func at "CBaseTempEntity" signature */
"s_pTempEntities"
{
"windows" "8"
}
"GetTEName"
{
"windows" "4"
"linux" "4"
"mac" "4"
}
"GetTENext"
{
"windows" "8"
"linux" "8"
"mac" "8"
}
"TE_GetServerClass"
{
"windows" "0"
"linux" "0"
"mac" "0"
}
}
"Signatures"
{
/* This isn't CBaseTempEntity::CBaseTempEntity on gmod, it's a randon one of now many, many funcs that have
* the s_pTempEntities ptr available due to inlining
*/
"CBaseTempEntity"
{
"library" "server"
"windows" "\x55\x8B\xEC\x51\x0F\x57\xC0\xA1\x2A\x2A\x2A\x2A\x8D\x4D\xFC\xA3"
}
"s_pTempEntities"
{
"library" "server"
"linux" "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
"mac" "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
}
}
}
"garrysmod"
{
"Signatures"
{
"EntityFactory"
{
"library" "server"
"windows" "\x55\x8B\xEC\x51\x56\x8D\x2A\x2A\xBE\x2A\x2A\x2A\x2A\xC7\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\xC7\x2A\x2A\x2A\x2A\x2A\x2A\xE8"
"linux" "@_Z23EntityFactoryDictionaryv"
"mac" "@_Z23EntityFactoryDictionaryv"
}
}
}
"garrysmod"
{
"Signatures"
{
"FireOutput"
{
"library" "server"
"windows" "\x55\x8B\xEC\x83\x2A\x2A\x81\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x53\x56\x8B\x2A\x2A\x85\xF6\x57"
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
"mac" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
} }
} }
} }
+42 -42
View File
@@ -18,87 +18,87 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "392" "windows" "395"
"linux" "393" "linux" "396"
"mac" "393" "mac" "396"
} }
"RemovePlayerItem" "RemovePlayerItem"
{
"windows" "266"
"linux" "267"
"mac" "267"
}
"Weapon_GetSlot"
{ {
"windows" "264" "windows" "264"
"linux" "265" "linux" "265"
"mac" "265" "mac" "265"
} }
"Weapon_GetSlot"
{
"windows" "262"
"linux" "263"
"mac" "263"
}
"Ignite" "Ignite"
{ {
"windows" "205" "windows" "207"
"linux" "206" "linux" "208"
"mac" "206" "mac" "208"
} }
"Extinguish" "Extinguish"
{ {
"windows" "209" "windows" "211"
"linux" "210" "linux" "212"
"mac" "210" "mac" "212"
} }
"Teleport" "Teleport"
{ {
"windows" "106" "windows" "107"
"linux" "107" "linux" "108"
"mac" "107" "mac" "108"
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "431" "windows" "434"
"linux" "431" "linux" "434"
"mac" "431" "mac" "434"
} }
"GetVelocity" "GetVelocity"
{ {
"windows" "138" "windows" "139"
"linux" "139" "linux" "140"
"mac" "139" "mac" "140"
} }
"EyeAngles" "EyeAngles"
{ {
"windows" "129" "windows" "130"
"linux" "130" "linux" "131"
"mac" "130" "mac" "131"
} }
"AcceptInput" "AcceptInput"
{ {
"windows" "35" "windows" "36"
"linux" "36" "linux" "37"
"mac" "36" "mac" "37"
} }
"SetEntityModel" "SetEntityModel"
{ {
"windows" "23" "windows" "24"
"linux" "24" "linux" "25"
"mac" "24" "mac" "25"
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "255" "windows" "257"
"linux" "256" "linux" "258"
"mac" "256" "mac" "258"
} }
"Activate" "Activate"
{ {
"windows" "32" "windows" "33"
"linux" "33" "linux" "34"
"mac" "33" "mac" "34"
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "410" "windows" "413"
"linux" "411" "linux" "414"
"mac" "411" "mac" "414"
} }
} }
} }
+24 -24
View File
@@ -7,33 +7,33 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "443" "windows" "442"
"linux" "444" "linux" "443"
"mac" "444" "mac" "443"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
"windows" "301" "windows" "300"
"linux" "302" "linux" "301"
"mac" "302" "mac" "301"
} }
"Weapon_GetSlot" "Weapon_GetSlot"
{ {
"windows" "299" "windows" "298"
"linux" "300" "linux" "299"
"mac" "300" "mac" "299"
} }
"Ignite" "Ignite"
{ {
"windows" "234" "windows" "233"
"linux" "235" "linux" "234"
"mac" "235" "mac" "234"
} }
"Extinguish" "Extinguish"
{ {
"windows" "237" "windows" "236"
"linux" "238" "linux" "237"
"mac" "238" "mac" "237"
} }
"Teleport" "Teleport"
{ {
@@ -43,9 +43,9 @@
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "488" "windows" "487"
"linux" "488" "linux" "487"
"mac" "488" "mac" "487"
} }
"GetVelocity" "GetVelocity"
{ {
@@ -73,9 +73,9 @@
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "292" "windows" "291"
"linux" "293" "linux" "292"
"mac" "293" "mac" "292"
} }
"Activate" "Activate"
{ {
@@ -85,9 +85,9 @@
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "466" "windows" "465"
"linux" "467" "linux" "466"
"mac" "467" "mac" "466"
} }
} }
+24 -24
View File
@@ -18,33 +18,33 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "393" "windows" "395"
"linux" "394" "linux" "396"
"mac" "394" "mac" "396"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
"windows" "265" "windows" "266"
"linux" "266" "linux" "267"
"mac" "266" "mac" "267"
} }
"Weapon_GetSlot" "Weapon_GetSlot"
{ {
"windows" "263" "windows" "264"
"linux" "264" "linux" "265"
"mac" "264" "mac" "265"
} }
"Ignite" "Ignite"
{ {
"windows" "206" "windows" "207"
"linux" "207" "linux" "208"
"mac" "207" "mac" "208"
} }
"Extinguish" "Extinguish"
{ {
"windows" "210" "windows" "211"
"linux" "211" "linux" "212"
"mac" "211" "mac" "212"
} }
"Teleport" "Teleport"
{ {
@@ -54,9 +54,9 @@
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "434" "windows" "436"
"linux" "434" "linux" "436"
"mac" "434" "mac" "436"
} }
"GetVelocity" "GetVelocity"
{ {
@@ -84,9 +84,9 @@
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "256" "windows" "257"
"linux" "257" "linux" "258"
"mac" "257" "mac" "258"
} }
"Activate" "Activate"
{ {
@@ -96,9 +96,9 @@
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "411" "windows" "413"
"linux" "412" "linux" "414"
"mac" "412" "mac" "414"
} }
} }
+16 -16
View File
@@ -18,28 +18,28 @@
{ {
"GiveNamedItem" "GiveNamedItem"
{ {
"windows" "356" "windows" "357"
"linux" "357" "linux" "358"
} }
"RemovePlayerItem" "RemovePlayerItem"
{ {
"windows" "243" "windows" "246"
"linux" "244" "linux" "247"
} }
"Weapon_GetSlot" "Weapon_GetSlot"
{ {
"windows" "238" "windows" "241"
"linux" "239" "linux" "242"
} }
"Ignite" "Ignite"
{ {
"windows" "195" "windows" "198"
"linux" "196" "linux" "199"
} }
"Extinguish" "Extinguish"
{ {
"windows" "199" "windows" "202"
"linux" "200" "linux" "203"
} }
"Teleport" "Teleport"
{ {
@@ -48,8 +48,8 @@
} }
"CommitSuicide" "CommitSuicide"
{ {
"windows" "399" "windows" "402"
"linux" "399" "linux" "402"
} }
"GetVelocity" "GetVelocity"
{ {
@@ -73,8 +73,8 @@
} }
"WeaponEquip" "WeaponEquip"
{ {
"windows" "231" "windows" "234"
"linux" "232" "linux" "235"
} }
"Activate" "Activate"
{ {
@@ -83,8 +83,8 @@
} }
"PlayerRunCmd" "PlayerRunCmd"
{ {
"windows" "375" "windows" "376"
"linux" "376" "linux" "377"
} }
} }
"Signatures" "Signatures"
+9 -9
View File
@@ -25,7 +25,7 @@
"RemoveDisguise" "RemoveDisguise"
{ {
"library" "server" "library" "server"
"windows" "\x55\x8B\xEC\x83\xEC\x2A\x56\x8B\xF1\x8B\x2A\x2A\x2A\x2A\x2A\x57\x8B" "windows" "\x55\x8B\xEC\x83\xEC\x08\x53\x56\x8B\xF1\x57\x8D\x9E"
"linux" "@_ZN15CTFPlayerShared14RemoveDisguiseEv" "linux" "@_ZN15CTFPlayerShared14RemoveDisguiseEv"
"mac" "@_ZN15CTFPlayerShared14RemoveDisguiseEv" "mac" "@_ZN15CTFPlayerShared14RemoveDisguiseEv"
} }
@@ -60,9 +60,9 @@
"Regenerate" "Regenerate"
{ {
"library" "server" "library" "server"
"windows" "\x55\x8B\xEC\x83\xEC\x2A\xF3\x0F\x10\x05\x2A\x2A\x2A\x2A\x53\x56\x8B\xF1\x8B\x86" "windows" "\x55\x8B\xEC\x83\xEC\x2A\xF3\x0F\x2A\x2A\x2A\x2A\x2A\x2A\x53\x56\x8B\xF1\x8B"
"linux" "@_ZN9CTFPlayer10RegenerateEv" "linux" "@_ZN9CTFPlayer10RegenerateEb"
"mac" "@_ZN9CTFPlayer10RegenerateEv" "mac" "@_ZN9CTFPlayer10RegenerateEb"
} }
"AddCondition" "AddCondition"
{ {
@@ -110,8 +110,8 @@
{ {
"library" "server" "library" "server"
"windows" "\x55\x8B\xEC\x51\x56\x8B\xF1\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x01\x8B\x2A\x2A\x2A\x2A\x2A\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x6A\x19" "windows" "\x55\x8B\xEC\x51\x56\x8B\xF1\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x01\x8B\x2A\x2A\x2A\x2A\x2A\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x6A\x19"
"linux" "@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasef" "linux" "@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasefi"
"mac" "@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasef" "mac" "@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasefi"
} }
"IsPlayerInDuel" "IsPlayerInDuel"
{ {
@@ -125,9 +125,9 @@
{ {
"ForceRespawn" "ForceRespawn"
{ {
"windows" "320" "windows" "321"
"linux" "321" "linux" "322"
"mac" "321" "mac" "322"
} }
} }
} }
+10
View File
@@ -77,6 +77,11 @@
#define FILENAME_1_6_BGT "sourcemod.2.bgt" PLATFORM_EXT #define FILENAME_1_6_BGT "sourcemod.2.bgt" PLATFORM_EXT
#define FILENAME_1_6_EYE "sourcemod.2.eye" PLATFORM_EXT #define FILENAME_1_6_EYE "sourcemod.2.eye" PLATFORM_EXT
// Shim for compatibility with MM:S 1.9.0+
#ifndef SOURCE_ENGINE_CSS
#define SOURCE_ENGINE_CSS 13
#endif
HINSTANCE g_hCore = NULL; HINSTANCE g_hCore = NULL;
bool load_attempted = false; bool load_attempted = false;
@@ -257,6 +262,11 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co
filename = FILENAME_1_6_EYE; filename = FILENAME_1_6_EYE;
break; break;
} }
case SOURCE_ENGINE_CSS:
{
filename = FILENAME_1_6_EP2VALVE;
break;
}
default: default:
{ {
return NULL; return NULL;
+3
View File
@@ -66,6 +66,9 @@ enum RoundState {
//Game is over, doing bonus round stuff //Game is over, doing bonus round stuff
RoundState_Bonus, RoundState_Bonus,
//Between rounds
RoundState_BetweenRounds,
}; };
/** /**
+1
View File
@@ -127,6 +127,7 @@ enum TFHoliday
TFHoliday_Halloween, TFHoliday_Halloween,
TFHoliday_Christmas, TFHoliday_Christmas,
TFHoliday_MeetThePyro, TFHoliday_MeetThePyro,
TFHoliday_MannVsMachine,
TFHoliday_FullMoon, TFHoliday_FullMoon,
TFHoliday_HalloweenOrFullMoon, TFHoliday_HalloweenOrFullMoon,
}; };
+8
View File
@@ -133,6 +133,11 @@ enum {
TF_CUSTOM_PRACTICE_STICKY, TF_CUSTOM_PRACTICE_STICKY,
TF_CUSTOM_EYEBALL_ROCKET, TF_CUSTOM_EYEBALL_ROCKET,
TF_CUSTOM_HEADSHOT_DECAPITATION, TF_CUSTOM_HEADSHOT_DECAPITATION,
TF_CUSTOM_TAUNT_ARMAGEDDON,
TF_CUSTOM_FLARE_PELLET,
TF_CUSTOM_CLEAVER,
TF_CUSTOM_CLEAVER_CRIT,
TF_CUSTOM_SAPPER_RECORDER_DEATH,
}; };
// Weapon codes as used in some events, such as player_death // Weapon codes as used in some events, such as player_death
@@ -224,6 +229,9 @@ enum {
TF_WEAPON_GRENADE_ORNAMENT, TF_WEAPON_GRENADE_ORNAMENT,
TF_WEAPON_RAYGUN_REVENGE, TF_WEAPON_RAYGUN_REVENGE,
TF_WEAPON_PEP_BRAWLER_BLASTER, TF_WEAPON_PEP_BRAWLER_BLASTER,
TF_WEAPON_CLEAVER,
TF_WEAPON_GRENADE_CLEAVER,
TF_WEAPON_ROCKETPACK,
}; };
// TF2 Weapon Slots for GetPlayerWeaponSlot // TF2 Weapon Slots for GetPlayerWeaponSlot
+2 -2
View File
@@ -37,6 +37,6 @@
#define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */ #define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */
#define SOURCEMOD_V_MINOR 4 /**< SourceMod Minor version */ #define SOURCEMOD_V_MINOR 4 /**< SourceMod Minor version */
#define SOURCEMOD_V_RELEASE 4 /**< SourceMod Release version */ #define SOURCEMOD_V_RELEASE 5 /**< SourceMod Release version */
#define SOURCEMOD_VERSION "1.4.4" /**< SourceMod version string (major.minor.release.build) */ #define SOURCEMOD_VERSION "1.4.5" /**< SourceMod version string (major.minor.release.build) */
+1 -1
View File
@@ -1 +1 @@
1.4.4 1.4.5
+3 -1
View File
@@ -34,7 +34,7 @@ On The Patty Winters Show this morning were descendants of members of the Donner
Everything outside of this is like a movie I once saw. Everything outside of this is like a movie I once saw.
THIS IS NOT AN EXIT. THIS IS NOT AN EXIT.
ABANDON ALL HOPE YE WHO ENTER HERE. ABANDON ALL HOPE YE WHO ENTER HERE.
egg! egg!!
blimey blimey
crab crab
jibbly jibbly jibbly jibbly jibbly jibbly
@@ -51,3 +51,5 @@ clobstermonkey
that thing that thing
clobber build because amx.h changed (sigh) clobber build because amx.h changed (sigh)
a dead fish a dead fish
BuildBot is very well-written, stable, enterprise software.
I'm on a plane.