RagdollSetupCollisions
0x004a33e0 · 393 bytes · __cdecl
_Z22RagdollSetupCollisionsR9ragdoll_tP10vcollide_ti
Decompiled
undefined (3 params)
/* RagdollSetupCollisions(ragdoll_t&, vcollide_t*, int) */
void RagdollSetupCollisions(ragdoll_t *param_1,vcollide_t *param_2,int param_3)
{
bool bVar1;
char cVar2;
int iVar3;
int *piVar4;
int *piVar5;
char *pcVar6;
ragdoll_t *prVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
undefined4 local_24;
int *local_20;
if ((((*(int *)(param_1 + 0x1c) != 0) || (param_2 == (vcollide_t *)0x0)) ||
(iVar3 = (**(code **)(*physics + 0x2c))(physics,param_3), iVar3 != 0)) ||
(piVar4 = (int *)(**(code **)(*physics + 0x28))(physics,param_3,*(ushort *)param_2 & 0x7fff),
piVar4 == (int *)0x0)) {
return;
}
bVar1 = false;
piVar5 = (int *)(**(code **)(*physcollision + 0xa0))(physcollision,param_2);
do {
cVar2 = (**(code **)(*piVar5 + 0xc))(piVar5);
while( true ) {
if (cVar2 != '\0') {
(**(code **)(*physcollision + 0xa4))(physcollision,piVar5);
if (bVar1) {
return;
}
iVar8 = *(int *)param_1;
iVar3 = 0;
while (iVar11 = iVar3, iVar11 < iVar8) {
iVar3 = iVar11 + 1;
iVar9 = iVar3;
if (iVar3 < iVar8) {
do {
iVar10 = iVar9 + 1;
(**(code **)*piVar4)(piVar4,iVar11,iVar9);
iVar8 = *(int *)param_1;
iVar9 = iVar10;
} while (iVar10 < iVar8);
}
}
if (iVar8 < 1) {
return;
}
iVar3 = 0;
prVar7 = param_1 + 0x28;
do {
if (-1 < *(int *)prVar7) {
(**(code **)(*piVar4 + 4))(piVar4,iVar3,*(int *)prVar7);
}
iVar3 = iVar3 + 1;
prVar7 = prVar7 + 0x54;
} while (iVar3 < *(int *)param_1);
return;
}
pcVar6 = (char *)(**(code **)(*piVar5 + 8))(piVar5);
iVar3 = _V_stricmp(pcVar6,"collisionrules");
if (iVar3 != 0) break;
bVar1 = true;
local_24 = 1;
local_20 = piVar4;
(**(code **)(*piVar5 + 0x2c))(piVar5,&local_24,0);
cVar2 = (**(code **)(*piVar5 + 0xc))(piVar5);
}
(**(code **)(*piVar5 + 0x28))(piVar5);
} while( true );
}
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.