This commit is contained in:
xen
2020-03-25 20:09:12 +02:00
committed by xen
commit 527e7ec05e
420 changed files with 68682 additions and 0 deletions
@@ -0,0 +1,15 @@
"Games"
{
"csgo"
{
"Signatures"
{
"ValidateLineOfSight"
{
"library" "server"
"windows" "\x55\x8B\xEC\x83\xE4\xF8\x81\xEC\xF8\x00\x00\x00\x56\x8B\x75\x08"
"linux" "\x55\x89\xE5\x57\x56\x53\x81\xEC\x7C\x01\x00\x00\x8B\x5D\x0C\x8B\x75\x08"
}
}
}
}
+47
View File
@@ -0,0 +1,47 @@
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdktools>
#include <dhooks>
Handle g_hValidateLineOfSight = null;
public Plugin myinfo = {
name = "[CS:GO] BumpWeapon Fix",
author = "SHUFEN from POSSESSION.tokyo",
description = "Ignore to validate line-of-sight when pick up weapons",
version = "20190331",
url = "https://possession.tokyo"
};
public void OnPluginStart() {
Handle hGameConf = LoadGameConfigFile("BumpWeaponFix.games");
if (hGameConf == null) {
SetFailState("Couldn't load BumpWeaponFix.games game config!");
return;
}
// ValidateLineOfSight
g_hValidateLineOfSight = DHookCreateDetour(Address_Null, CallConv_THISCALL, ReturnType_Bool, ThisPointer_CBaseEntity);
if (!g_hValidateLineOfSight) {
delete hGameConf;
SetFailState("Failed to setup detour for \"ValidateLineOfSight\"");
}
if (!DHookSetFromConf(g_hValidateLineOfSight, hGameConf, SDKConf_Signature, "ValidateLineOfSight")) {
delete hGameConf;
SetFailState("Failed to load \"ValidateLineOfSight\" signature from gamedata");
}
DHookAddParam(g_hValidateLineOfSight, HookParamType_Int);
if (!DHookEnableDetour(g_hValidateLineOfSight, false, Detour_ValidateLineOfSight)) {
delete hGameConf;
SetFailState("Failed to detour \"ValidateLineOfSight\"");
}
delete hGameConf;
}
public MRESReturn Detour_ValidateLineOfSight(Address pThis, Handle hReturn, Handle hParams) {
DHookSetReturn(hReturn, true);
return MRES_ChangedOverride;
}