CCollisionProperty::ComputeVPhysicsSurroundingBox
0x0042a980 · 596 bytes · __thiscall
_ZN18CCollisionProperty29ComputeVPhysicsSurroundingBoxEP6VectorS1_
Decompiled
undefined (3 params)
/* CCollisionProperty::ComputeVPhysicsSurroundingBox(Vector*, Vector*) */
void __thiscall
CCollisionProperty::ComputeVPhysicsSurroundingBox
(CCollisionProperty *this,Vector *param_1,Vector *param_2)
{
int *piVar1;
code *pcVar2;
int *piVar3;
undefined4 *puVar4;
int iVar5;
undefined4 uVar6;
undefined4 uVar7;
undefined4 uVar8;
float *pfVar9;
longdouble lVar10;
float fVar11;
float local_48;
float local_44;
float local_40;
float local_3c;
float local_38;
float local_34;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
piVar1 = *(int **)(*(int *)(this + 4) + 0x238);
if (piVar1 != (int *)0x0) {
piVar3 = (int *)(**(code **)(*piVar1 + 0x15c))(piVar1);
if (piVar3 != (int *)0x0) {
(**(code **)(*piVar3 + 0x48))(piVar3,&local_3c);
*(float *)param_1 = local_3c;
*(float *)(param_1 + 4) = local_38;
*(float *)(param_1 + 8) = local_34;
*(undefined4 *)param_2 = local_2c;
*(undefined4 *)(param_2 + 4) = local_28;
*(undefined4 *)(param_2 + 8) = local_24;
goto LAB_0042aa05;
}
iVar5 = (**(code **)(*piVar1 + 300))(piVar1);
if (iVar5 != 0) {
pcVar2 = *(code **)(*physcollision + 0x60);
uVar6 = (**(code **)(*(int *)this + 0x24))(this);
uVar7 = (**(code **)(*(int *)this + 0x20))(this);
uVar8 = (**(code **)(*piVar1 + 300))(piVar1);
(*pcVar2)(physcollision,param_1,param_2,uVar8,uVar7,uVar6);
goto LAB_0042aa05;
}
lVar10 = (longdouble)(**(code **)(*piVar1 + 0xac))(piVar1);
if ((float)lVar10 != 0.0) {
lVar10 = (longdouble)(**(code **)(*piVar1 + 0xac))(piVar1);
fVar11 = (float)lVar10;
pfVar9 = (float *)(**(code **)(*(int *)this + 0x20))(this);
*(float *)param_1 = *pfVar9 - fVar11;
*(float *)(param_1 + 4) = pfVar9[1] - fVar11;
*(float *)(param_1 + 8) = pfVar9[2] - fVar11;
pfVar9 = (float *)(**(code **)(*(int *)this + 0x20))(this);
*(float *)param_2 = *pfVar9 + fVar11;
*(float *)(param_2 + 4) = pfVar9[1] + fVar11;
*(float *)(param_2 + 8) = fVar11 + pfVar9[2];
goto LAB_0042aa05;
}
}
puVar4 = (undefined4 *)(**(code **)(*(int *)this + 0x20))(this);
uVar6 = *puVar4;
*(undefined4 *)param_1 = uVar6;
*(undefined4 *)(param_1 + 4) = puVar4[1];
*(undefined4 *)(param_1 + 8) = puVar4[2];
*(undefined4 *)param_2 = uVar6;
*(undefined4 *)(param_2 + 4) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(param_2 + 8) = *(undefined4 *)(param_1 + 8);
LAB_0042aa05:
if (((byte)this[0x20] & 0x80) != 0) {
(**(code **)(*(int *)this + 0xc))(this,&local_48,&local_3c);
fVar11 = *(float *)param_1;
if (local_48 <= *(float *)param_1) {
fVar11 = local_48;
}
*(float *)param_1 = fVar11;
fVar11 = *(float *)(param_1 + 4);
if (local_44 <= *(float *)(param_1 + 4)) {
fVar11 = local_44;
}
*(float *)(param_1 + 4) = fVar11;
fVar11 = *(float *)(param_1 + 8);
if (local_40 <= *(float *)(param_1 + 8)) {
fVar11 = local_40;
}
*(float *)(param_1 + 8) = fVar11;
fVar11 = *(float *)param_2;
if (*(float *)param_2 <= local_3c) {
fVar11 = local_3c;
}
*(float *)param_2 = fVar11;
fVar11 = *(float *)(param_2 + 4);
if (*(float *)(param_2 + 4) <= local_38) {
fVar11 = local_38;
}
*(float *)(param_2 + 4) = fVar11;
fVar11 = *(float *)(param_2 + 8);
if (*(float *)(param_2 + 8) <= local_34) {
fVar11 = local_34;
}
*(float *)(param_2 + 8) = fVar11;
}
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.