2 Commits
+17 -65
View File
@@ -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",
@@ -262,63 +262,15 @@ static struct SrcdsPatch
}, },
// 14: CGameMovement::LadderMove NOP out player->SetGravity( 0 ); // 14: CGameMovement::LadderMove NOP out player->SetGravity( 0 );
// This is in a cloned function which has a weird symbol (_ZN13CGameMovement10LadderMoveEv_part_0) so I went with the function right before it // This is in a cloned function which has a weird symbol (_ZN13CGameMovement10LadderMoveEv_part_0) so I went with the function right before it
{
"_ZN13CGameMovement12CheckFallingEv",
(unsigned char *)"\xC7\x80\xA4\x02\x00\x00\x00\x00\x00\x00\x8B\x03\x8B\x80",
"xx????????xxxx",
(unsigned char *)"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x8B\x03\x8B\x80",
"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
/*
{
"_ZN14CUtlLinkedListI16CUtlKeyValuePairI19CUtlConstStringBaseIcE7empty_tEtLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS4_tEtEE13AllocInternalEb",
(unsigned char *)"\x74\x0C",
"xx",
(unsigned char *)"\x90\x90",
"bin/dedicated_srv.so"
},
{
"_ZN12CZipPackFile7PrepareExx",
(unsigned char *)"\x0F\x85\x32\x03\x00\x00",
"_ZN14CUtlLinkedListI16CUtlKeyValuePairI19CUtlConstStringBaseIcE7empty_tEtLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS4_tEtEE13AllocInternalEb",
(unsigned char *)"\x0F\x87\x7A\xFF\xFF\xFF",
"xxxxxx",
(unsigned char *)"\xEB\x85\x32\x03\x00\x00" ,
(unsigned char *)"\xEB\x87\x7A\xFF\xFF\xFF",
"bin/dedicated_srv.so"
},
{
"_ZN14CUtlLinkedListI16CUtlKeyValuePairI19CUtlConstStringBaseIcE7empty_tEtLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS4_tEtEE13AllocInternalEb",
(unsigned char *)"\x0F\x84\x9C\x00\x00\x00",
"xxxxxx",
(unsigned char *)"\x90\x90\x90\x90\x90\x90",
"bin/dedicated_srv.so"
},
*/
// 16: should allow people to run around freely after game end, by overwriting pPlayer->AddFlag( FL_FROZEN ); line 3337 in cs_gamerules.cpp
//this change is desired for the new mapvoting feature so that people can still freely move at the end of the map while the vote is running.
{ {
"_ZN12CCSGameRules16GoToIntermissionEv", "_ZN13CGameMovement12CheckFallingEv",
(unsigned char *)"\x74\x0E\x83\xEC\x08\x6A\x40\x50", (unsigned char *)"\xC7\x86\xA4\x02\x00\x00\x00\x00\x00\x00\xE9\x00\xFF\xFF",
"xxxxxxxx", "xx????????x???",
(unsigned char *)"\xEB\x0E\x83\xEC\x08\x6A\x40\x50", (unsigned char *)"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\xE9\x00\xFF\xFF",
"cstrike/bin/server_srv.so" "cstrike/bin/server_srv.so",
}, 0x600
//17 also jump over boolean = true // freeze players while in intermission m_bFreezePeriod = true;
{
"_ZN12CCSGameRules16GoToIntermissionEv",
(unsigned char *)"\x75\x0F\xE8\x69\xCE\xDA\xFF\x8B\x45\x08",
"xxxxxxxxxx",
(unsigned char *)"\xEB\x0F\xE8\x69\xCE\xDA\xFF\x8B\x45\x08",
"cstrike/bin/server_srv.so"
}, },
// 18: Remove weird filename handle check in CZipPackFile::GetFileInfo that broke loading mixed case files in bsp pakfiles // 18: Remove weird filename handle check in CZipPackFile::GetFileInfo that broke loading mixed case files in bsp pakfiles
{ {
"_ZN12CZipPackFile11GetFileInfoEPKcRiRxS2_S2_Rt", "_ZN12CZipPackFile11GetFileInfoEPKcRiRxS2_S2_Rt",
@@ -427,8 +379,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;
@@ -523,20 +475,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;