Skip to content

Instantly share code, notes, and snippets.

"Games"
{
"tf"
{
"Signatures"
{
//Instructions: First find CTFWeaponBaseMelee::Smack() (references "melee_cleave_attack"), then go to the vtable and go 9 functions up (increasing address) and this is the target function
"CTFWeaponBaseMelee::Swing"
{
"library" "server"
@naydef
naydef / vfunc.d
Last active March 28, 2022 14:39
Helper functions for calling C++ virtual functions from the D language
module ndf.vfunc;
import std.traits;
auto thisCall(T, A...)(void* addr, void* thisptr, A args)
if(isFunctionPointer!T)
{
version(Win32)
{
auto func = cast(T)(addr);