Gamedata:
PHP Code:
"Games"
{
"left4dead2"
{
"Addresses"
{
"OnWindupFinished_Sig"
{
"linux"
{
"signature" "CTankClaw::OnWindupFinished"
}
"windows"
{
"signature" "CTankClaw::OnWindupFinished"
}
}
}
"Signatures"
{
"CTankClaw::OnWindupFinished"
{
"library" "server"
"linux" "@_ZN9CTankClaw16OnWindupFinishedEv"
"windows" "\x83\xec\x2a\x53\x56\x57\x8b\xf1\xe8\x2a\x2a\x2a\x2a\x8b\xf8\x33\xdb\x3b\xfb\x0f\x84\x2a\x2a\x2a\x2a\xf3\x0f"
}
}
"Offsets"
{
"ClawTargetScan"
{
"linux" "248"
"windows" "265"
}
"Platform"
{
"linux" "0"
"windows" "1"
}
}
}
}
Plugin is here:
PHP Code:
#pragma semicolon 1
#include <sourcemod>
public Plugin:myinfo =
{
name = "L4D2 Tank Claw Fix",
author = "Jahze(patch data) & Visor(SM)",
description = "Removes the Tank claw's undocumented auto-aiming ability",
version = "0.1",
url = ""
}
public OnPluginStart()
{
new Handle:hGamedata = LoadGameConfigFile("l4d2_notankautoaim");
new Address:pAddress;
if (!hGamedata)
SetFailState("Gamedata 'l4d2_notankautoaim.txt' missing or corrupt");
pAddress = GameConfGetAddress(hGamedata, "OnWindupFinished_Sig");
if (!pAddress)
SetFailState("Couldn't find the 'OnWindupFinished_Sig' address");
new bool:bIsWin = (GameConfGetOffset(hGamedata, "Platform") == 1);
new iOffset = GameConfGetOffset(hGamedata, "ClawTargetScan");
new offsetCheck[2];
new patchBytes[3];
if (bIsWin)
{
offsetCheck = {0x83, 0xEC};
patchBytes = {0xEB, 0x29, -1};
}
else
{
offsetCheck = {0x0F, 0x84};
patchBytes = {0xE9, 0x8B, 0x00};
}
if (LoadFromAddress(pAddress + Address:iOffset, NumberType_Int8) == offsetCheck[0]
&& LoadFromAddress(pAddress + Address:(iOffset + 1), NumberType_Int8) == offsetCheck[1])
{
for (new i = 0; i < sizeof(patchBytes); i++)
{
if (patchBytes[i] < 0) {
break;
}
StoreToAddress(pAddress + Address:(iOffset + i), patchBytes[i], NumberType_Int8);
PrintToServer("Set %x@%i", patchBytes[i], i);
}
}
CloseHandle(hGamedata);
}
Sorry, My English is bad
I hope someone to fix Windows Address
If I make a mistake please delete