CSheetSimulator::DetectCollision
0x004b0430 · 366 bytes · __thiscall
_ZN15CSheetSimulator15DetectCollisionEif
Decompiled
undefined (3 params)
/* CSheetSimulator::DetectCollision(int, float) */
void __thiscall CSheetSimulator::DetectCollision(CSheetSimulator *this,int param_1,float param_2)
{
float *pfVar1;
undefined4 *puVar2;
int iVar3;
float *pfVar4;
undefined1 local_70 [24];
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
float local_44;
char local_3a;
char local_39;
(**(code **)(this + 0x48))
(this + 0x60,*(int *)(this + 0x18) + param_1 * 0xc,this + 0x78,this + 0x84,0x400b,
*(undefined4 *)(this + 0x5c),local_70);
iVar3 = *(int *)(this + 0x94);
if (local_44 < 1.0) {
*(undefined1 *)(iVar3 + param_1) = 1;
puVar2 = (undefined4 *)(*(int *)(this + 0x90) + param_1 * 0x14);
*puVar2 = local_58;
puVar2[1] = local_54;
puVar2[2] = local_50;
puVar2[3] = local_4c;
puVar2[4] = local_48;
iVar3 = *(int *)(this + 0x90) + param_1 * 0x14;
*(float *)(iVar3 + 0xc) = *(float *)(iVar3 + 0xc) + param_2;
}
else {
if ((local_3a != '\0') || (local_39 != '\0')) {
*(undefined1 *)(iVar3 + param_1) = 1;
pfVar4 = (float *)(param_1 * 0xc + *(int *)(this + 0x18));
iVar3 = param_1 * 0x14;
pfVar1 = (float *)(*(int *)(this + 0x90) + iVar3);
*pfVar1 = *(float *)(this + 0x60) - *pfVar4;
pfVar1[1] = *(float *)(this + 100) - pfVar4[1];
pfVar1[2] = *(float *)(this + 0x68) - pfVar4[2];
VectorNormalize((Vector *)(*(int *)(this + 0x90) + iVar3));
pfVar1 = (float *)(*(int *)(this + 0x90) + iVar3);
pfVar1[3] = (pfVar1[1] * *(float *)(this + 100) + *pfVar1 * *(float *)(this + 0x60) +
pfVar1[2] * *(float *)(this + 0x68)) - param_2;
*(undefined1 *)(*(int *)(this + 0x90) + 0x10 + iVar3) = 3;
return;
}
*(undefined1 *)(iVar3 + param_1) = 0;
}
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.