CPropVehicleDriveable::Think
0x00b337f0 · 425 bytes · __thiscall
_ZN21CPropVehicleDriveable5ThinkEv
Decompiled
undefined (1 param)
/* CPropVehicleDriveable::Think() */
void __thiscall CPropVehicleDriveable::Think(CPropVehicleDriveable *this)
{
uint uVar1;
char cVar2;
int *piVar3;
CBaseEntity *pCVar4;
undefined *puVar5;
undefined4 local_20 [3];
undefined4 local_14;
undefined4 local_10;
CPropVehicle::Think((CPropVehicle *)this);
cVar2 = (**(code **)(*(int *)this + 0x410))(this);
if (cVar2 != '\0') {
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
}
uVar1 = *(uint *)(this + 0x161c);
if ((((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar5 + 4) != 0)) {
piVar3 = (int *)(**(code **)(*(int *)this + 0x18c))(this);
(**(code **)(*piVar3 + 0x9c))(piVar3);
}
if (*(float *)(this + 0x1630) != 0.0) {
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
uVar1 = *(uint *)(this + 0x1620);
if (((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar5 + 8) == uVar1 >> 0xc &&
((piVar3 = *(int **)(puVar5 + 4), piVar3 != (int *)0x0 &&
(*(float *)(this + 0x1630) <= *(float *)(gpGlobals + 0xc) &&
*(float *)(gpGlobals + 0xc) != *(float *)(this + 0x1630))))))) {
local_20[0] = 0;
local_14 = 0xffffffff;
local_10 = 0;
(**(code **)(*piVar3 + 0xb4))(piVar3,"TurnOff",this,this,local_20,3);
uVar1 = *(uint *)(this + 0x1620);
pCVar4 = (CBaseEntity *)0x0;
*(undefined4 *)(this + 0x1630) = 0;
if ((uVar1 != 0xffffffff) &&
((puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)))) {
pCVar4 = *(CBaseEntity **)(puVar5 + 4);
}
UTIL_Remove(pCVar4);
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.