CTerrorPlayer::TraceForBuildableButtonUseEnt
0x009ae150 · 453 bytes · __thiscall
_ZN13CTerrorPlayer29TraceForBuildableButtonUseEntEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::TraceForBuildableButtonUseEnt() */
void __thiscall CTerrorPlayer::TraceForBuildableButtonUseEnt(CTerrorPlayer *this)
{
uint uVar1;
CBaseEdict *pCVar2;
CBaseEntity *pCVar3;
int iVar4;
undefined *puVar5;
int iVar6;
uint local_20 [4];
pCVar3 = (CBaseEntity *)
(**(code **)(*(int *)this + 0x6e0))
(this,*(undefined4 *)(player_use_radius._28_4_ + 0x2c),0,0,0,0);
if ((((pCVar3 == (CBaseEntity *)0x0) || (uVar1 = *(uint *)(pCVar3 + 0x118), uVar1 == 0xffffffff))
|| (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar5 + 8) != uVar1 >> 0xc || (*(int *)(puVar5 + 4) == 0)))) {
if ((g_pEntityList == (undefined *)0xfffffffc) || (*(int *)(g_pEntityList + 8) != 0)) {
iVar6 = 0;
}
else {
iVar6 = *(int *)(g_pEntityList + 4);
}
uVar1 = *(uint *)(this + 0x2a90);
if (((uVar1 == 0xffffffff) ||
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(puVar5 + 4);
}
if (iVar6 != iVar4) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x2a90) = 0;
return;
}
}
else {
CHandle<CBaseEntity>::CHandle((CHandle<CBaseEntity> *)local_20,pCVar3);
if ((local_20[0] == 0xffffffff) ||
((puVar5 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc ||
(*(uint *)(puVar5 + 8) != local_20[0] >> 0xc)))) {
iVar6 = 0;
}
else {
iVar6 = *(int *)(puVar5 + 4);
}
uVar1 = *(uint *)(this + 0x2a90);
if (((uVar1 == 0xffffffff) ||
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(puVar5 + 4);
}
if (iVar6 != iVar4) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x2a90) = local_20[0];
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.