CBeam::GetAbsStartPos
0x00426090 · 246 bytes · __thiscall
_ZNK5CBeam14GetAbsStartPosEv
Decompiled
undefined (1 param)
/* CBeam::GetAbsStartPos() const */
CBeam * __thiscall CBeam::GetAbsStartPos(CBeam *this)
{
int iVar1;
byte *pbVar2;
int *piVar3;
uint uVar4;
CBaseEntity *this_00;
byte *pbVar5;
undefined *puVar6;
if (((((*(int *)(this + 0x458) != 2) || (uVar4 = *(uint *)(this + 0x460), uVar4 == 0xffffffff)) ||
(puVar6 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar6 + 8) != uVar4 >> 0xc || (*(int *)(puVar6 + 4) == 0)))) ||
(iVar1 = *(int *)(*(int *)(puVar6 + 4) + 0x30), iVar1 == 0)) goto LAB_004260a4;
pbVar2 = *(byte **)(gpGlobals + 0x58);
uVar4 = iVar1 - (int)pbVar2 >> 4;
if (uVar4 == 0) goto LAB_004260a4;
if (uVar4 < 0x800) {
if (pbVar2 == (byte *)0x0) goto LAB_004260a4;
pbVar5 = pbVar2 + uVar4 * 0x10;
if ((*pbVar5 & 2) != 0) goto LAB_00426120;
}
else {
if (pbVar2 == (byte *)0x0) goto LAB_004260a4;
LAB_00426120:
pbVar5 = pbVar2;
if ((*pbVar2 & 2) != 0) goto LAB_004260a4;
}
piVar3 = *(int **)(pbVar5 + 0xc);
if ((piVar3 != (int *)0x0) &&
(this_00 = (CBaseEntity *)(**(code **)(*piVar3 + 0x18))(piVar3), this_00 != (CBaseEntity *)0x0)
) {
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
return (CBeam *)(this_00 + 0x2e0);
}
LAB_004260a4:
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
return this + 0x2e0;
}
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.