CBeam::RelinkBeam
0x00426b30 · 414 bytes · __thiscall
_ZN5CBeam10RelinkBeamEv
Decompiled
undefined (1 param)
/* CBeam::RelinkBeam() */
void __thiscall CBeam::RelinkBeam(CBeam *this)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float *pfVar6;
float fVar7;
float fVar8;
float fVar9;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
pfVar6 = (float *)GetAbsStartPos(this);
fVar1 = *pfVar6;
fVar7 = pfVar6[1];
fVar2 = pfVar6[2];
pfVar6 = (float *)GetAbsEndPos(this);
fVar3 = pfVar6[1];
fVar4 = *pfVar6;
fVar9 = fVar3;
if (fVar7 <= fVar3) {
fVar9 = fVar7;
}
fVar5 = pfVar6[2];
fVar8 = fVar4;
if (fVar4 <= fVar1) {
fVar8 = fVar1;
fVar1 = fVar4;
}
if (fVar7 <= fVar3) {
fVar7 = fVar3;
}
fVar3 = fVar2;
if (fVar2 <= fVar5) {
fVar3 = fVar5;
fVar5 = fVar2;
}
if (((byte)this[0x14d] & 8) == 0) {
local_34 = *(float *)(this + 0x2e0);
local_28 = fVar8 - local_34;
local_30 = *(float *)(this + 0x2e4);
local_24 = fVar7 - local_30;
local_2c = *(float *)(this + 0x2e8);
local_20 = fVar3 - local_2c;
}
else {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
local_34 = *(float *)(this + 0x2e0);
local_28 = fVar8 - local_34;
local_30 = *(float *)(this + 0x2e4);
local_24 = fVar7 - local_30;
local_2c = *(float *)(this + 0x2e8);
local_20 = fVar3 - local_2c;
if ((*(uint *)(this + 0x14c) & 0x800) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
local_34 = *(float *)(this + 0x2e0);
local_30 = *(float *)(this + 0x2e4);
local_2c = *(float *)(this + 0x2e8);
}
}
local_2c = fVar5 - local_2c;
local_34 = fVar1 - local_34;
local_30 = fVar9 - local_30;
CBaseEntity::SetCollisionBounds((CBaseEntity *)this,(Vector *)&local_34,(Vector *)&local_28);
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.