Fix Formatting C:
This commit is contained in:
+24
-24
@@ -258,7 +258,7 @@ static struct SrcdsPatch
|
||||
(unsigned char *)"\xEB\x23\x89\xD0\x25\x00\x00\x00\x00\xC1\xE0\x04",
|
||||
"cstrike/bin/server_srv.so"
|
||||
},
|
||||
// 14: CGameMovement::LadderMove NOP out player->SetGravity( 0 );
|
||||
// 14: CGameMovement::LadderMove NOP out player->SetGravity( 0 );
|
||||
{
|
||||
"_ZN13CGameMovement10LadderMoveEv",
|
||||
(unsigned char *)"\xC7\x80\x78\x02\x00\x00\x00\x00\x00\x00",
|
||||
@@ -267,13 +267,13 @@ static struct SrcdsPatch
|
||||
"cstrike/bin/server_srv.so"
|
||||
},
|
||||
|
||||
// 15: I CUtlLinkedList<T,S,ML,I,M>::AllocInternal( bool multilist )
|
||||
//skip CUtlLinkedList overflow! (exhausted memory allocator) and CUtlLinkedList overflow! (exhausted index range)
|
||||
//this avoids crashing when loading over 64k strings into stringpool. Custom assets in maps lead towards the limit. jenz- December 2023
|
||||
// \x90 prevent green,
|
||||
// \xEB prevent red
|
||||
/*
|
||||
{
|
||||
// 15: I CUtlLinkedList<T,S,ML,I,M>::AllocInternal( bool multilist )
|
||||
//skip CUtlLinkedList overflow! (exhausted memory allocator) and CUtlLinkedList overflow! (exhausted index range)
|
||||
//this avoids crashing when loading over 64k strings into stringpool. Custom assets in maps lead towards the limit. jenz- December 2023
|
||||
// \x90 prevent green,
|
||||
// \xEB prevent red
|
||||
/*
|
||||
{
|
||||
"_ZN14CUtlLinkedListI16CUtlKeyValuePairI19CUtlConstStringBaseIcE7empty_tEtLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS4_tEtEE13AllocInternalEb",
|
||||
(unsigned char *)"\x74\x0C",
|
||||
"xx",
|
||||
@@ -298,7 +298,7 @@ static struct SrcdsPatch
|
||||
"bin/dedicated_srv.so"
|
||||
},
|
||||
|
||||
*/
|
||||
*/
|
||||
};
|
||||
|
||||
class CBaseEntity;
|
||||
@@ -368,7 +368,7 @@ DETOUR_DECL_MEMBER1(DETOUR_InputTestActivator, void, inputdata_t *, inputdata)
|
||||
DETOUR_MEMBER_CALL(DETOUR_InputTestActivator)(inputdata);
|
||||
}
|
||||
|
||||
const char *pszNonEdicts[] =
|
||||
const char *pszNonEdicts[] =
|
||||
{
|
||||
"game_score",
|
||||
"game_text",
|
||||
@@ -388,11 +388,11 @@ DETOUR_DECL_MEMBER1(DETOUR_PostConstructor, void, const char *, szClassname)
|
||||
VPROF_ENTER_SCOPE("CSSFixes::DETOUR_PostConstructor");
|
||||
|
||||
CBaseEntity *pEntity = (CBaseEntity *)this;
|
||||
|
||||
|
||||
static datamap_t *pMap = gamehelpers->GetDataMap(pEntity);
|
||||
static typedescription_t *td = gamehelpers->FindInDataMap(pMap, "m_iEFlags");
|
||||
static uint32 offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||
|
||||
|
||||
if(strncasecmp(szClassname, "info_player_", 12) == 0)
|
||||
{
|
||||
// Spawnpoints don't need edicts...
|
||||
@@ -401,11 +401,11 @@ DETOUR_DECL_MEMBER1(DETOUR_PostConstructor, void, const char *, szClassname)
|
||||
// Only CT spawnpoints
|
||||
if(strcasecmp(szClassname, "info_player_terrorist") == 0)
|
||||
szClassname = "info_player_counterterrorist";
|
||||
|
||||
|
||||
DETOUR_MEMBER_CALL(DETOUR_PostConstructor)(szClassname);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Remove edicts for a bunch of entities that REALLY don't need them
|
||||
for (int i = 0; i < sizeof(pszNonEdicts)/sizeof(*pszNonEdicts); i++)
|
||||
{
|
||||
@@ -416,7 +416,7 @@ DETOUR_DECL_MEMBER1(DETOUR_PostConstructor, void, const char *, szClassname)
|
||||
}
|
||||
|
||||
DETOUR_MEMBER_CALL(DETOUR_PostConstructor)(szClassname);
|
||||
|
||||
|
||||
VPROF_EXIT_SCOPE();
|
||||
}
|
||||
|
||||
@@ -488,7 +488,7 @@ DETOUR_DECL_MEMBER2(DETOUR_KeyValue, bool, const char *, szKeyName, const char *
|
||||
{
|
||||
VPROF_ENTER_SCOPE("CSSFixes::DETOUR_KeyValue");
|
||||
|
||||
CBaseEntity *pEntity = (CBaseEntity *)this;
|
||||
CBaseEntity *pEntity = (CBaseEntity *)this;
|
||||
|
||||
// Fix crash bug in engine
|
||||
if(strcasecmp(szKeyName, "angle") == 0)
|
||||
@@ -509,9 +509,9 @@ DETOUR_DECL_MEMBER2(DETOUR_KeyValue, bool, const char *, szKeyName, const char *
|
||||
if(pClassname && strcasecmp(pClassname, "func_buyzone") == 0)
|
||||
szValue = "3";
|
||||
}
|
||||
else if(strcasecmp(szKeyName, "absvelocity") == 0)
|
||||
{
|
||||
static int m_AbsVelocity_offset = 0;
|
||||
else if(strcasecmp(szKeyName, "absvelocity") == 0)
|
||||
{
|
||||
static int m_AbsVelocity_offset = 0;
|
||||
|
||||
if (!m_AbsVelocity_offset)
|
||||
{
|
||||
@@ -527,10 +527,10 @@ DETOUR_DECL_MEMBER2(DETOUR_KeyValue, bool, const char *, szKeyName, const char *
|
||||
|
||||
Vector *vecAbsVelocity = (Vector*)((uint8_t*)pEntity + m_AbsVelocity_offset);
|
||||
vecAbsVelocity->Init(tmp[0], tmp[1], tmp[2]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool bHandled = DETOUR_MEMBER_CALL(DETOUR_KeyValue)(szKeyName, szValue);
|
||||
|
||||
|
||||
VPROF_EXIT_SCOPE();
|
||||
|
||||
return bHandled;
|
||||
@@ -696,7 +696,7 @@ bool CSSFixes::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
{
|
||||
srand((unsigned int)time(NULL));
|
||||
|
||||
g_iMaxPlayers = playerhelpers->GetMaxClients();
|
||||
g_iMaxPlayers = playerhelpers->GetMaxClients();
|
||||
|
||||
char conf_error[255] = "";
|
||||
if(!gameconfs->LoadGameConfigFile("CSSFixes", &g_pGameConf, conf_error, sizeof(conf_error)))
|
||||
@@ -889,7 +889,7 @@ bool CSSFixes::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
if(found)
|
||||
break;
|
||||
|
||||
snprintf(error, maxlength, "Could not find patch signature for symbol: %s", pPatch->pSignature);
|
||||
snprintf(error, maxlength, "Could not find patch signature for symbol: %s", pPatch->pSignature);
|
||||
SDK_OnUnload();
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user