CBreakableSurface::RecalcSupport
0x006b8410 · 631 bytes · __thiscall
_ZN17CBreakableSurface13RecalcSupportEii
Decompiled
undefined (3 params)
/* CBreakableSurface::RecalcSupport(int, int) */
longdouble __thiscall
CBreakableSurface::RecalcSupport(CBreakableSurface *this,int param_1,int param_2)
{
int iVar1;
float fVar2;
float fVar3;
int local_18;
fVar2 = 1.01;
iVar1 = *(int *)(this + 0x500) + -1;
if (iVar1 != param_2) {
fVar2 = *(float *)(this + (param_2 + 0x14d + param_1 * 0x10) * 4);
if (fVar2 <= 0.0) {
fVar2 = 0.0;
}
fVar2 = fVar2 + 0.01;
}
if (param_2 == 0) {
fVar2 = fVar2 + 1.25;
if (param_1 == 0) goto LAB_006b8470;
LAB_006b8629:
fVar3 = *(float *)(this + (param_2 + 0x14c + (param_1 + -1) * 0x10) * 4);
local_18 = *(int *)(this + 0x4fc) + -1;
if (fVar3 <= 0.0) {
fVar3 = 0.0;
}
fVar2 = fVar3 + fVar2;
if (param_1 == local_18) goto LAB_006b865b;
LAB_006b8490:
fVar3 = *(float *)(this + (param_2 + 0x14c + (param_1 + 1) * 0x10) * 4);
if (fVar3 <= 0.0) {
fVar3 = 0.0;
}
fVar3 = fVar3 + fVar2;
}
else {
fVar3 = *(float *)(this + (param_2 + 0x14b + param_1 * 0x10) * 4);
if (fVar3 <= 0.0) {
fVar3 = 0.0;
}
fVar2 = fVar2 + fVar3 * 1.25;
if (param_1 != 0) goto LAB_006b8629;
LAB_006b8470:
fVar2 = fVar2 + 1.0;
local_18 = *(int *)(this + 0x4fc) + -1;
if (param_1 != local_18) goto LAB_006b8490;
LAB_006b865b:
fVar3 = fVar2 + 1.0;
}
if ((param_2 == 0) || (param_1 == 0)) {
fVar2 = fVar3 + 1.0;
if (param_2 != 0) goto LAB_006b84e3;
fVar3 = fVar2 + 1.0;
if (*(int *)(this + 0x500) != 1) {
if (param_1 == local_18) goto LAB_006b8680;
goto LAB_006b855c;
}
}
else {
fVar2 = *(float *)(this + (param_2 + 0x14b + (param_1 + -1) * 0x10) * 4);
if (fVar2 <= 0.0) {
fVar2 = 0.0;
}
fVar2 = fVar2 + fVar3;
LAB_006b84e3:
if (param_1 == local_18) {
fVar3 = fVar2 + 1.0;
if (iVar1 != param_2) {
LAB_006b8680:
fVar3 = fVar3 + 0.25;
goto LAB_006b858b;
}
}
else {
fVar3 = *(float *)(this + (param_2 + 0x14b + (param_1 + 1) * 0x10) * 4);
if (*(float *)(this + (param_2 + 0x14b + (param_1 + 1) * 0x10) * 4) <= 0.0) {
fVar3 = 0.0;
}
fVar3 = fVar3 + fVar2;
if (iVar1 != param_2) {
LAB_006b855c:
fVar2 = 0.0;
if (0.0 <= *(float *)(this + (param_2 + 0x14d + (param_1 + 1) * 0x10) * 4)) {
fVar2 = *(float *)(this + (param_2 + 0x14d + (param_1 + 1) * 0x10) * 4);
}
fVar3 = fVar3 + fVar2 * 0.25;
LAB_006b858b:
if (param_1 != 0) {
fVar2 = *(float *)(this + (param_2 + 0x14d + (param_1 + -1) * 0x10) * 4);
if (fVar2 <= 0.0) {
fVar2 = 0.0;
}
return (longdouble)(fVar3 + fVar2 * 0.25);
}
goto LAB_006b851b;
}
}
}
fVar3 = fVar3 + 0.25;
LAB_006b851b:
return (longdouble)(fVar3 + 0.25);
}
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.