CTriggerSave::Touch
0x00b153a0 · 329 bytes · __thiscall
_ZN12CTriggerSave5TouchEP11CBaseEntity
Decompiled
undefined (2 params)
/* CTriggerSave::Touch(CBaseEntity*) */
void __thiscall CTriggerSave::Touch(CTriggerSave *this,CBaseEntity *param_1)
{
float fVar1;
char cVar2;
int iVar3;
cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar2 != '\0') {
if (((*(float *)(this + 0x56c) != 0.0) && ((float)g_ServerGameDLL._4_4_ != 0.0)) &&
(*(float *)(gpGlobals + 0xc) <= (float)g_ServerGameDLL._4_4_)) {
iVar3 = UTIL_PlayerByIndex(1);
fVar1 = *(float *)(iVar3 + 0x1d5c);
if ((fVar1 == 0.0) ||
(*(float *)(gpGlobals + 0xc) <= fVar1 && fVar1 != *(float *)(gpGlobals + 0xc))) {
(**(code **)(*engine + 0x94))(engine,"autosavedangerousissafe\n");
}
}
if (this[0x569] != (CTriggerSave)0x0) {
(**(code **)(*engine + 0x118))(engine);
}
UTIL_Remove((CBaseEntity *)this);
if (*(float *)(this + 0x56c) == 0.0) {
/* WARNING: Could not recover jumptable at 0x00b1548c. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*engine + 0x94))();
return;
}
iVar3 = UTIL_PlayerByIndex(1);
if ((iVar3 != 0) && (*(int *)(this + 0x570) <= *(int *)(iVar3 + 0x100))) {
(**(code **)(*engine + 0x94))(engine,"autosavedangerous\n");
g_ServerGameDLL._4_4_ = *(float *)(this + 0x56c) + *(float *)(gpGlobals + 0xc);
}
}
return;
}
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.