CTongue::State_Enter
0x00841950 · 328 bytes · __thiscall
_ZN7CTongue11State_EnterE11TongueState
Decompiled
undefined (2 params)
/* CTongue::State_Enter(TongueState) */
void __thiscall CTongue::State_Enter(CTongue *this,uint param_2)
{
CBaseEdict *this_00;
code *UNRECOVERED_JUMPTABLE;
int iVar1;
undefined1 *puVar2;
longdouble lVar3;
if (*(uint *)(this + 0x4ac) != param_2) {
if (this[0x6c] == (CTongue)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar1 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar1 + 2) = 0;
}
}
else {
this[0x70] = (CTongue)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x4ac) = param_2;
}
puVar2 = (undefined1 *)0x0;
if (param_2 < 5) {
puVar2 = State_LookupInfo(TongueState)::tongueStateInfo + param_2 * 0x1c;
}
*(undefined1 **)(this + 0x4b0) = puVar2;
lVar3 = (longdouble)IntervalTimer::Now();
if ((float)lVar3 != *(float *)(this + 0x4b8)) {
(**(code **)(*(int *)(this + 0x4b4) + 4))(this + 0x4b4,this + 0x4b8);
*(float *)(this + 0x4b8) = (float)lVar3;
}
if (*(int *)(TongueDebug._28_4_ + 0x30) != 0) {
if (*(undefined4 **)(this + 0x4b0) == (undefined4 *)0x0) {
Msg("%f: entering #%d\n",(double)*(float *)(gpGlobals + 0xc),param_2);
}
else {
Msg("%f: entering \'%s\'\n",(double)*(float *)(gpGlobals + 0xc),
**(undefined4 **)(this + 0x4b0));
}
}
iVar1 = *(int *)(this + 0x4b0);
if ((iVar1 != 0) &&
(UNRECOVERED_JUMPTABLE = *(code **)(iVar1 + 4), UNRECOVERED_JUMPTABLE != (code *)0x0)) {
if (((uint)UNRECOVERED_JUMPTABLE & 1) == 0) {
/* WARNING: Could not recover jumptable at 0x00841a4e. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)();
return;
}
/* WARNING: Could not recover jumptable at 0x00841a60. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(UNRECOVERED_JUMPTABLE + *(int *)(this + *(int *)(iVar1 + 8)) + -1))();
return;
}
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.