CBeam::WorldSpaceCenter
0x00428b60 · 288 bytes · __thiscall
_ZNK5CBeam16WorldSpaceCenterEv
Decompiled
undefined (1 param)
/* WARNING: Removing unreachable block (ram,0x00428b91) */
/* WARNING: Removing unreachable block (ram,0x00428c81) */
/* CBeam::WorldSpaceCenter() const */
undefined1 * __thiscall CBeam::WorldSpaceCenter(CBeam *this)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float *pfVar7;
float *pfVar8;
int iVar9;
if ((AllocTempVector()::s_vecTemp == '\0') &&
(iVar9 = __cxa_guard_acquire(&AllocTempVector()::s_vecTemp), iVar9 != 0)) {
__cxa_guard_release(&AllocTempVector()::s_vecTemp);
}
if ((AllocTempVector()::s_nIndex == '\0') &&
(iVar9 = __cxa_guard_acquire(&AllocTempVector()::s_nIndex), iVar9 != 0)) {
AllocTempVector()::s_nIndex = 0;
__cxa_guard_release(&AllocTempVector()::s_nIndex);
}
AllocTempVector()::s_nIndex = AllocTempVector()::s_nIndex + 0x10001 & 0x7f;
LOCK();
UNLOCK();
iVar9 = AllocTempVector()::s_nIndex * 0xc;
pfVar7 = (float *)GetAbsEndPos(this);
pfVar8 = (float *)GetAbsStartPos(this);
fVar1 = *pfVar7;
fVar2 = *pfVar8;
*(float *)(AllocTempVector()::s_vecTemp + iVar9) = fVar1 + fVar2;
fVar3 = pfVar7[1];
fVar4 = pfVar8[1];
*(float *)(AllocTempVector()::s_vecTemp + iVar9 + 4) = fVar3 + fVar4;
fVar5 = pfVar7[2];
fVar6 = pfVar8[2];
*(float *)(AllocTempVector()::s_vecTemp + iVar9) = (fVar1 + fVar2) * 0.5;
*(float *)(AllocTempVector()::s_vecTemp + iVar9 + 4) = (fVar3 + fVar4) * 0.5;
*(float *)(AllocTempVector()::s_vecTemp + iVar9 + 8) = (fVar5 + fVar6) * 0.5;
return AllocTempVector()::s_vecTemp + iVar9;
}
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.