CLogicAutosave::InputSaveDangerous
0x006e8090 · 272 bytes · __thiscall
_ZN14CLogicAutosave18InputSaveDangerousER11inputdata_t
Decompiled
undefined (2 params)
/* CLogicAutosave::InputSaveDangerous(inputdata_t&) */
void __thiscall CLogicAutosave::InputSaveDangerous(CLogicAutosave *this,inputdata_t *param_1)
{
CLogicAutosave CVar1;
int iVar2;
float fVar3;
iVar2 = UTIL_PlayerByIndex(1);
if ((((float)g_ServerGameDLL._4_4_ == 0.0) ||
((float)g_ServerGameDLL._4_4_ < *(float *)(gpGlobals + 0xc))) ||
((*(float *)(iVar2 + 0x1d5c) != 0.0 &&
(*(float *)(iVar2 + 0x1d5c) <= *(float *)(gpGlobals + 0xc))))) {
CVar1 = this[0x440];
}
else {
(**(code **)(*engine + 0x94))(engine,"autosavedangerousissafe\n");
CVar1 = this[0x440];
}
if (CVar1 == (CLogicAutosave)0x0) {
if (*(int *)(this + 0x444) <= *(int *)(iVar2 + 0x100)) {
LAB_006e8146:
(**(code **)(*engine + 0x94))(engine,"autosavedangerous\n");
fVar3 = *(float *)(param_1 + 8);
if (*(int *)(param_1 + 0x18) != 1) {
fVar3 = 0.0;
}
g_ServerGameDLL._4_4_ = fVar3 + *(float *)(gpGlobals + 0xc);
g_ServerGameDLL._8_4_ = (float)*(int *)(this + 0x448);
return;
}
}
else {
(**(code **)(*engine + 0x118))(engine);
if (*(int *)(this + 0x444) <= *(int *)(iVar2 + 0x100)) goto LAB_006e8146;
}
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.