CDecal::StaticDecal
0x00b62230 · 443 bytes · __thiscall
_ZN6CDecal11StaticDecalEv
Decompiled
undefined (1 param)
/* CDecal::StaticDecal() */
void __thiscall CDecal::StaticDecal(CDecal *this)
{
code *pcVar1;
CBaseEntity *this_00;
undefined4 uVar2;
int iVar3;
undefined1 *puVar4;
undefined1 *puVar5;
int iVar6;
undefined4 local_44;
float local_34;
undefined4 local_30;
undefined4 local_2c;
float local_28;
undefined4 local_24;
undefined4 local_20;
this_00 = (CBaseEntity *)GetDecalEntityAndPosition(this,(Vector *)&local_34,true);
if (this_00 == (CBaseEntity *)0x0) {
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_44 = 0;
iVar6 = 0;
local_34 = *(float *)(this + 0x2e0);
local_30 = *(undefined4 *)(this + 0x2e4);
local_2c = *(undefined4 *)(this + 0x2e8);
}
else {
if (*(int *)(this_00 + 0x30) == 0) {
iVar6 = 0;
}
else {
iVar6 = *(int *)(this_00 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
local_44 = (**(code **)(*(int *)this_00 + 0x1c))(this_00);
local_28 = local_34;
local_24 = local_30;
local_20 = local_2c;
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
VectorITransform(&local_28,(matrix3x4_t *)(this_00 + 0x28c),&local_34);
pcVar1 = *(code **)(*modelinfo + 0x2c);
uVar2 = CBaseEntity::GetModel(this_00);
iVar3 = (*pcVar1)(modelinfo,uVar2);
if (iVar3 != 1) {
puVar5 = *(undefined1 **)(this_00 + 0x154);
puVar4 = *(undefined1 **)(this_00 + 0x7c);
if (puVar5 == (undefined1 *)0x0) {
puVar5 = &DAT_00d539c2;
}
if (puVar4 == (undefined1 *)0x0) {
puVar4 = &DAT_00d539c2;
}
if (*(int *)(this_00 + 0x30) == 0) {
iVar6 = 0;
}
else {
iVar6 = *(int *)(this_00 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
Warning("Suppressed StaticDecal which would have hit entity %i (class:%s, name:%s) with modelindex = 0\n"
,iVar6,puVar4,puVar5);
goto LAB_00b6232e;
}
}
(**(code **)(*engine + 0xa4))
(engine,(Vector *)&local_34,*(undefined4 *)(this + 0x440),iVar6,local_44,this[0x444]);
LAB_00b6232e:
CBaseEntity::SUB_Remove((CBaseEntity *)this);
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.