forked from CSSZombieEscape/sm-ext-CSSFixes
Disabling terrorist spawnpoint stuff.
This commit is contained in:
parent
303132ef42
commit
5445835070
@ -118,21 +118,21 @@ static struct SrcdsPatch
|
||||
0, 0, 0, false
|
||||
},
|
||||
// 2: only select CT spawnpoints
|
||||
{
|
||||
"_ZN9CCSPlayer19EntSelectSpawnPointEv",
|
||||
(unsigned char *)"\x89\x1C\x24\xE8\x00\x00\x00\x00\x83\xF8\x03\x74\x4B",
|
||||
"xxxx????xxxxx",
|
||||
(unsigned char *)"\x89\x1C\x24\x90\x90\x90\x90\x90\x90\x90\x90\xEB\x4B",
|
||||
0, 0, 0, false
|
||||
},
|
||||
// {
|
||||
// "_ZN9CCSPlayer19EntSelectSpawnPointEv",
|
||||
// (unsigned char *)"\x89\x1C\x24\xE8\x00\x00\x00\x00\x83\xF8\x03\x74\x4B",
|
||||
// "xxxx????xxxxx",
|
||||
// (unsigned char *)"\x89\x1C\x24\x90\x90\x90\x90\x90\x90\x90\x90\xEB\x4B",
|
||||
// 0, 0, 0, false
|
||||
// },
|
||||
// 3: don't check if we have T spawns
|
||||
{
|
||||
"_ZN12CCSGameRules18NeededPlayersCheckERb",
|
||||
(unsigned char *)"\x74\x0E\x8B\x83\x80\x02\x00\x00\x85\xC0\x0F\x85\x9E\x00\x00\x00\xC7\x04\x24\xAC\xF7\x87\x00\xE8\xC2\x82\x91\x00",
|
||||
"xxxxxxxxxxxxxxxx????????????",
|
||||
(unsigned char *)"\x0F\x85\xA8\x00\x00\x00\x8B\x83\x80\x02\x00\x00\x85\xC0\x0F\x85\x9A\x00\x00\x00\x90\x90\x90\x90\x90\x90\x90\x90",
|
||||
0, 0, 0, false
|
||||
},
|
||||
// {
|
||||
// "_ZN12CCSGameRules18NeededPlayersCheckERb",
|
||||
// (unsigned char *)"\x74\x0E\x8B\x83\x80\x02\x00\x00\x85\xC0\x0F\x85\x9E\x00\x00\x00\xC7\x04\x24\xAC\xF7\x87\x00\xE8\xC2\x82\x91\x00",
|
||||
// "xxxxxxxxxxxxxxxx????????????",
|
||||
// (unsigned char *)"\x0F\x85\xA8\x00\x00\x00\x8B\x83\x80\x02\x00\x00\x85\xC0\x0F\x85\x9A\x00\x00\x00\x90\x90\x90\x90\x90\x90\x90\x90",
|
||||
// 0, 0, 0, false
|
||||
// },
|
||||
// 5: disable alive check in point_viewcontrol->Disable
|
||||
{
|
||||
"_ZN14CTriggerCamera7DisableEv",
|
||||
@ -236,8 +236,8 @@ DETOUR_DECL_MEMBER1(DETOUR_PostConstructor, void, const char *, szClassname)
|
||||
*(uint32 *)((intptr_t)pEntity + td->fieldOffset[TD_OFFSET_NORMAL]) |= (1<<9); // EFL_SERVER_ONLY
|
||||
|
||||
// Only CT spawnpoints
|
||||
if(strcasecmp(szClassname, "info_player_terrorist") == 0)
|
||||
szClassname = "info_player_counterterrorist";
|
||||
// if(strcasecmp(szClassname, "info_player_terrorist") == 0)
|
||||
// szClassname = "info_player_counterterrorist";
|
||||
}
|
||||
|
||||
DETOUR_MEMBER_CALL(DETOUR_PostConstructor)(szClassname);
|
||||
@ -249,21 +249,21 @@ DETOUR_DECL_MEMBER2(DETOUR_KeyValue, bool, const char *, szKeyName, const char *
|
||||
if(strcasecmp(szKeyName, "angle") == 0)
|
||||
szKeyName = "angles";
|
||||
|
||||
else if(strcasecmp(szKeyName, "classname") == 0 &&
|
||||
strcasecmp(szValue, "info_player_terrorist") == 0)
|
||||
{
|
||||
// else if(strcasecmp(szKeyName, "classname") == 0 &&
|
||||
// strcasecmp(szValue, "info_player_terrorist") == 0)
|
||||
// {
|
||||
// Only CT spawnpoints
|
||||
szValue = "info_player_counterterrorist";
|
||||
}
|
||||
else if(strcasecmp(szKeyName, "teamnum") == 0 || strcasecmp(szKeyName, "teamnum") == 0 )
|
||||
{
|
||||
CBaseEntity *pEntity = (CBaseEntity *)this;
|
||||
const char *pClassname = gamehelpers->GetEntityClassname(pEntity);
|
||||
|
||||
// szValue = "info_player_counterterrorist";
|
||||
// }
|
||||
// else if(strcasecmp(szKeyName, "teamnum") == 0 || strcasecmp(szKeyName, "teamnum") == 0 )
|
||||
// {
|
||||
// CBaseEntity *pEntity = (CBaseEntity *)this;
|
||||
// const char *pClassname = gamehelpers->GetEntityClassname(pEntity);
|
||||
//
|
||||
// All buyzones should be CT buyzones
|
||||
if(pClassname && strcasecmp(pClassname, "func_buyzone") == 0)
|
||||
szValue = "3";
|
||||
}
|
||||
// if(pClassname && strcasecmp(pClassname, "func_buyzone") == 0)
|
||||
// szValue = "3";
|
||||
// }
|
||||
|
||||
return DETOUR_MEMBER_CALL(DETOUR_KeyValue)(szKeyName, szValue);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user