Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb56604161 | ||
|
|
3688d62a46 | ||
|
|
537d4be911 | ||
|
|
0718a46b13 | ||
|
|
08566f5559 | ||
|
|
d80aa8b59c | ||
|
|
d0d4aaa912 |
+49
-11
@@ -166,21 +166,21 @@ static struct SrcdsPatch
|
|||||||
"cstrike/bin/server_srv.so"
|
"cstrike/bin/server_srv.so"
|
||||||
},
|
},
|
||||||
// 2: only select CT spawnpoints
|
// 2: only select CT spawnpoints
|
||||||
/*{
|
{
|
||||||
"_ZN9CCSPlayer19EntSelectSpawnPointEv",
|
"_ZN9CCSPlayer19EntSelectSpawnPointEv",
|
||||||
(unsigned char *)"\x74\x57\x83\xEC\x0C\x53\xE8\x6E\x34\xCA\xFF\x83\xC4\x10\x83\xF8\x02\x0F\x84",
|
(unsigned char *)"\x74\x57\x83\xEC\x0C\x53\xE8\x6E\x34\xCA\xFF\x83\xC4\x10\x83\xF8\x02\x0F\x84",
|
||||||
"x?xx?xx????xx?xx?xx",
|
"x?xx?xx????xx?xx?xx",
|
||||||
(unsigned char *)"\xEB\x57\x83\xEC\x0C\x53\xE8\x6E\x34\xCA\xFF\x83\xC4\x10\x83\xF8\x02\x0F\x84",
|
(unsigned char *)"\xEB\x57\x83\xEC\x0C\x53\xE8\x6E\x34\xCA\xFF\x83\xC4\x10\x83\xF8\x02\x0F\x84",
|
||||||
"cstrike/bin/server_srv.so"
|
"cstrike/bin/server_srv.so"
|
||||||
},*/
|
},
|
||||||
// 3: don't check if we have T spawns
|
// 3: don't check if we have T spawns
|
||||||
/*{
|
{
|
||||||
"_ZN12CCSGameRules18NeededPlayersCheckERb",
|
"_ZN12CCSGameRules18NeededPlayersCheckERb",
|
||||||
(unsigned char *)"\x74\x0A\x8B\x83\x94\x02\x00\x00\x85\xC0\x75\x4A\x83\xEC\x0C\x68\xE8\xCF\x93\x00\xE8\xA9\x46\x52\x00\x5A\x59",
|
(unsigned char *)"\x74\x0A\x8B\x83\x94\x02\x00\x00\x85\xC0\x75\x4A\x83\xEC\x0C\x68\xE8\xCF\x93\x00\xE8\xA9\x46\x52\x00\x5A\x59",
|
||||||
"xxxx????xxx?xx?x????x????xx",
|
"xxxx????xxx?xx?x????x????xx",
|
||||||
(unsigned char *)"\x75\x54\x8B\x83\x94\x02\x00\x00\x85\xC0\x75\x4A\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90",
|
(unsigned char *)"\x75\x54\x8B\x83\x94\x02\x00\x00\x85\xC0\x75\x4A\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90",
|
||||||
"cstrike/bin/server_srv.so"
|
"cstrike/bin/server_srv.so"
|
||||||
},*/
|
},
|
||||||
// 5: disable alive check in point_viewcontrol->Disable
|
// 5: disable alive check in point_viewcontrol->Disable
|
||||||
{
|
{
|
||||||
"_ZN14CTriggerCamera7DisableEv",
|
"_ZN14CTriggerCamera7DisableEv",
|
||||||
@@ -271,7 +271,19 @@ static struct SrcdsPatch
|
|||||||
0x600
|
0x600
|
||||||
},
|
},
|
||||||
|
|
||||||
// 18: Remove weird filename handle check in CZipPackFile::GetFileInfo that broke loading mixed case files in bsp pakfiles
|
// 15: bool CZipPackFile::Prepare( int64 fileLen, int64 nFileOfs )
|
||||||
|
//NOPs out lookup.m_hFileName = m_fs->FindOrAddFileName( tmpString ); Line 768
|
||||||
|
//stop the errors CUtlLinkedList overflow! (exhausted memory allocator) and CUtlLinkedList overflow! (exhausted index range)
|
||||||
|
//this avoids crashing due to loading over 65k strings into stringpool. Custom assets in maps lead towards the limit. jenz- December 2023
|
||||||
|
{
|
||||||
|
"_ZN12CZipPackFile7PrepareExx",
|
||||||
|
(unsigned char *)"\x8B\x10\x57\x50\xFF\x92\x8C\x00\x00\x00",
|
||||||
|
"xxxxxxxxxx",
|
||||||
|
(unsigned char *)"\x8B\x10\x57\x50\x31\xC0\x90\x90\x90\x90",
|
||||||
|
"bin/dedicated_srv.so",
|
||||||
|
0x600
|
||||||
|
},
|
||||||
|
// 16: Remove weird filename handle check in CZipPackFile::GetFileInfo that broke loading mixed case files in bsp pakfiles
|
||||||
{
|
{
|
||||||
"_ZN12CZipPackFile11GetFileInfoEPKcRiRxS2_S2_Rt",
|
"_ZN12CZipPackFile11GetFileInfoEPKcRiRxS2_S2_Rt",
|
||||||
(unsigned char *)"\x75\x00\x8B\x09",
|
(unsigned char *)"\x75\x00\x8B\x09",
|
||||||
@@ -330,6 +342,8 @@ CDetour *g_pDetour_CTraceFilterSimple = NULL;
|
|||||||
CDetour *g_pDetour_KeyValue = NULL;
|
CDetour *g_pDetour_KeyValue = NULL;
|
||||||
CDetour *g_pDetour_FireBullets = NULL;
|
CDetour *g_pDetour_FireBullets = NULL;
|
||||||
CDetour *g_pDetour_SwingOrStab = NULL;
|
CDetour *g_pDetour_SwingOrStab = NULL;
|
||||||
|
CDetour *g_pDetour_UTIL_DecalTrace = NULL;
|
||||||
|
|
||||||
int g_SH_SkipTwoEntitiesShouldHitEntity = 0;
|
int g_SH_SkipTwoEntitiesShouldHitEntity = 0;
|
||||||
int g_SH_SimpleShouldHitEntity = 0;
|
int g_SH_SimpleShouldHitEntity = 0;
|
||||||
|
|
||||||
@@ -379,8 +393,8 @@ DETOUR_DECL_MEMBER1(DETOUR_PostConstructor, void, const char *, szClassname)
|
|||||||
*(uint32 *)((intptr_t)pEntity + offset) |= (1<<9); // EFL_SERVER_ONLY
|
*(uint32 *)((intptr_t)pEntity + offset) |= (1<<9); // EFL_SERVER_ONLY
|
||||||
|
|
||||||
// Only CT spawnpoints
|
// Only CT spawnpoints
|
||||||
/*if(strcasecmp(szClassname, "info_player_terrorist") == 0)
|
if(strcasecmp(szClassname, "info_player_terrorist") == 0)
|
||||||
szClassname = "info_player_counterterrorist";*/
|
szClassname = "info_player_counterterrorist";
|
||||||
|
|
||||||
DETOUR_MEMBER_CALL(DETOUR_PostConstructor)(szClassname);
|
DETOUR_MEMBER_CALL(DETOUR_PostConstructor)(szClassname);
|
||||||
return;
|
return;
|
||||||
@@ -475,20 +489,20 @@ DETOUR_DECL_MEMBER2(DETOUR_KeyValue, bool, const char *, szKeyName, const char *
|
|||||||
{
|
{
|
||||||
szKeyName = "angles";
|
szKeyName = "angles";
|
||||||
}
|
}
|
||||||
/*else if(strcasecmp(szKeyName, "classname") == 0 &&
|
else if(strcasecmp(szKeyName, "classname") == 0 &&
|
||||||
strcasecmp(szValue, "info_player_terrorist") == 0)
|
strcasecmp(szValue, "info_player_terrorist") == 0)
|
||||||
{
|
{
|
||||||
// Only CT spawnpoints
|
// Only CT spawnpoints
|
||||||
szValue = "info_player_counterterrorist";
|
szValue = "info_player_counterterrorist";
|
||||||
}*/
|
}
|
||||||
/*else if(strcasecmp(szKeyName, "teamnum") == 0 || strcasecmp(szKeyName, "teamnum") == 0 )
|
else if(strcasecmp(szKeyName, "teamnum") == 0 || strcasecmp(szKeyName, "teamnum") == 0 )
|
||||||
{
|
{
|
||||||
const char *pClassname = gamehelpers->GetEntityClassname(pEntity);
|
const char *pClassname = gamehelpers->GetEntityClassname(pEntity);
|
||||||
|
|
||||||
// All buyzones should be CT buyzones
|
// All buyzones should be CT buyzones
|
||||||
if(pClassname && strcasecmp(pClassname, "func_buyzone") == 0)
|
if(pClassname && strcasecmp(pClassname, "func_buyzone") == 0)
|
||||||
szValue = "3";
|
szValue = "3";
|
||||||
}*/
|
}
|
||||||
else if(strcasecmp(szKeyName, "absvelocity") == 0)
|
else if(strcasecmp(szKeyName, "absvelocity") == 0)
|
||||||
{
|
{
|
||||||
static int m_AbsVelocity_offset = 0;
|
static int m_AbsVelocity_offset = 0;
|
||||||
@@ -535,6 +549,15 @@ DETOUR_DECL_MEMBER3(DETOUR_CTraceFilterSimple, void, const IHandleEntity *, pass
|
|||||||
*(uintptr_t *)this = g_CTraceFilterNoNPCsOrPlayer;
|
*(uintptr_t *)this = g_CTraceFilterNoNPCsOrPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DETOUR_DECL_STATIC2(DETOUR_UTIL_DecalTrace, void, void *, pTrace, char *, decalName)
|
||||||
|
{
|
||||||
|
// to stop grenades from causing "Too many indices for index buffer. Tell a programmer". Grenades cause decals on too many faces for the client to handle.
|
||||||
|
if (strcmp(decalName, "Scorch") == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
DETOUR_STATIC_CALL(DETOUR_UTIL_DecalTrace)(pTrace, decalName);
|
||||||
|
}
|
||||||
|
|
||||||
/* Make bullets ignore teammates */
|
/* Make bullets ignore teammates */
|
||||||
char *g_pPhysboxToClientMap = NULL;
|
char *g_pPhysboxToClientMap = NULL;
|
||||||
bool g_InFireBullets = false;
|
bool g_InFireBullets = false;
|
||||||
@@ -761,6 +784,14 @@ bool CSSFixes::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_pDetour_UTIL_DecalTrace = DETOUR_CREATE_STATIC(DETOUR_UTIL_DecalTrace, "UTIL_DecalTrace");
|
||||||
|
if (g_pDetour_UTIL_DecalTrace == NULL)
|
||||||
|
{
|
||||||
|
snprintf(error, maxlength, "Could not create detour for UTIL_DecalTrace");
|
||||||
|
SDK_OnUnload();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
g_pDetour_InputTestActivator->EnableDetour();
|
g_pDetour_InputTestActivator->EnableDetour();
|
||||||
g_pDetour_PostConstructor->EnableDetour();
|
g_pDetour_PostConstructor->EnableDetour();
|
||||||
g_pDetour_CreateEntityByName->EnableDetour();
|
g_pDetour_CreateEntityByName->EnableDetour();
|
||||||
@@ -770,6 +801,7 @@ bool CSSFixes::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|||||||
g_pDetour_KeyValue->EnableDetour();
|
g_pDetour_KeyValue->EnableDetour();
|
||||||
g_pDetour_FireBullets->EnableDetour();
|
g_pDetour_FireBullets->EnableDetour();
|
||||||
g_pDetour_SwingOrStab->EnableDetour();
|
g_pDetour_SwingOrStab->EnableDetour();
|
||||||
|
g_pDetour_UTIL_DecalTrace->EnableDetour();
|
||||||
|
|
||||||
// Find VTable for CTraceFilterSkipTwoEntities
|
// Find VTable for CTraceFilterSkipTwoEntities
|
||||||
uintptr_t pCTraceFilterSkipTwoEntities;
|
uintptr_t pCTraceFilterSkipTwoEntities;
|
||||||
@@ -972,6 +1004,12 @@ void CSSFixes::SDK_OnUnload()
|
|||||||
g_pDetour_SwingOrStab = NULL;
|
g_pDetour_SwingOrStab = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_pDetour_UTIL_DecalTrace != NULL)
|
||||||
|
{
|
||||||
|
g_pDetour_UTIL_DecalTrace->Destroy();
|
||||||
|
g_pDetour_UTIL_DecalTrace = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if(g_SH_SkipTwoEntitiesShouldHitEntity)
|
if(g_SH_SkipTwoEntitiesShouldHitEntity)
|
||||||
SH_REMOVE_HOOK_ID(g_SH_SkipTwoEntitiesShouldHitEntity);
|
SH_REMOVE_HOOK_ID(g_SH_SkipTwoEntitiesShouldHitEntity);
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,12 @@
|
|||||||
"library" "server"
|
"library" "server"
|
||||||
"linux" "@_ZN6CKnife11SwingOrStabEb"
|
"linux" "@_ZN6CKnife11SwingOrStabEb"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"UTIL_DecalTrace"
|
||||||
|
{
|
||||||
|
"library" "server"
|
||||||
|
"linux" "@_Z15UTIL_DecalTraceP10CGameTracePKc"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user