TankAttack::OnMoveToFailure
0x00ae1090 · 192 bytes · __cdecl
_ZN10TankAttack15OnMoveToFailureEP4TankPK4Path17MoveToFailureType
Decompiled
undefined (3 params)
/* TankAttack::OnMoveToFailure(Tank*, Path const*, MoveToFailureType) */
undefined4 *
TankAttack::OnMoveToFailure
(undefined4 *param_1,int param_2,undefined4 param_3,int *param_4,int param_5)
{
CBaseEntity *pCVar1;
longdouble lVar2;
if (*(float *)(param_2 + 0x486c) <= 0.0) {
lVar2 = (longdouble)IntervalTimer::Now();
if ((float)lVar2 != *(float *)(param_2 + 0x486c)) {
(**(code **)(*(int *)(param_2 + 0x4868) + 4))(param_2 + 0x4868,param_2 + 0x486c);
*(float *)(param_2 + 0x486c) = (float)lVar2;
}
}
if (param_5 == 0) {
pCVar1 = (CBaseEntity *)0x0;
if (param_4 != (int *)0x0) {
pCVar1 = (CBaseEntity *)(**(code **)(*param_4 + 0x1c))(param_4);
}
CTerrorGameRules::IncreaseSurvivalExploitAmount(g_pGameRules,3.2,pCVar1);
}
*param_1 = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 1;
return param_1;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.