PhysModelParseSolidByIndex
0x00491e50 · 729 bytes · __cdecl
_Z26PhysModelParseSolidByIndexR7solid_tP11CBaseEntityii
Decompiled
undefined (4 params)
/* PhysModelParseSolidByIndex(solid_t&, CBaseEntity*, int, int) */
undefined4 PhysModelParseSolidByIndex(solid_t *param_1,CBaseEntity *param_2,int param_3,int param_4)
{
char cVar1;
int iVar2;
undefined4 uVar3;
int *piVar4;
char *pcVar5;
int iVar6;
undefined1 *puVar7;
undefined4 *puVar8;
undefined4 *puVar9;
solid_t *psVar10;
int in_GS_OFFSET;
byte bVar11;
undefined4 uStackY_690;
undefined1 *local_670;
undefined4 local_660 [128];
undefined4 local_460 [128];
undefined4 local_260 [128];
undefined4 local_60;
undefined4 local_5c;
undefined4 local_58;
int local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
char *local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
int local_20;
bVar11 = 0;
puVar8 = (undefined4 *)&stack0xfffff974;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
uStackY_690 = 0x491e90;
iVar2 = (**(code **)(*modelinfo + 0x18))();
uVar3 = 0;
if (iVar2 != 0) {
psVar10 = param_1;
for (iVar2 = 400; iVar2 != 0; iVar2 = iVar2 + -1) {
*(undefined4 *)psVar10 = 0;
psVar10 = psVar10 + (uint)bVar11 * -8 + 4;
}
*(undefined4 *)(param_1 + 0x618) = 0x3f800000;
*(undefined4 *)(param_1 + 0x61c) = 0x3f800000;
piVar4 = physcollision;
*(undefined4 *)(param_1 + 0x620) = 0x3dcccccd;
*(undefined4 *)(param_1 + 0x624) = 0x3dcccccd;
*(undefined4 *)(param_1 + 0x628) = 0x3d4ccccd;
*(char **)(param_1 + 0x62c) = "DEFAULT";
*(undefined4 *)(param_1 + 0x638) = 0x3f800000;
param_1[0x63c] = (solid_t)0x1;
uStackY_690 = 0x491f12;
piVar4 = (int *)(**(code **)(*piVar4 + 0xa0))();
do {
uStackY_690 = 0x491f20;
cVar1 = (**(code **)(*piVar4 + 0xc))();
while( true ) {
if (cVar1 != '\0') {
uVar3 = 0;
goto LAB_004920b2;
}
uStackY_690 = 0x491f30;
pcVar5 = (char *)(**(code **)(*piVar4 + 8))();
uStackY_690 = 0x491f40;
iVar2 = _V_stricmp(pcVar5,"solid");
if (iVar2 == 0) break;
uStackY_690 = 0x4920a0;
(**(code **)(*piVar4 + 0x28))();
uStackY_690 = 0x4920a8;
cVar1 = (**(code **)(*piVar4 + 0xc))();
}
puVar9 = local_660;
for (iVar2 = 400; iVar2 != 0; iVar2 = iVar2 + -1) {
*puVar9 = 0;
puVar9 = puVar9 + (uint)bVar11 * -2 + 1;
}
local_48 = 0x3f800000;
local_44 = 0x3f800000;
local_40 = 0x3dcccccd;
local_3c = 0x3dcccccd;
local_38 = 0x3d4ccccd;
local_34 = "DEFAULT";
local_28 = 0x3f800000;
local_24 = CONCAT31(local_24._1_3_,1);
uStackY_690 = 0x491fa4;
(**(code **)(*piVar4 + 0x10))();
iVar2 = local_54;
} while ((-1 < param_4) && (iVar2 = param_4, local_54 != param_4));
puVar9 = local_660;
psVar10 = param_1;
for (iVar6 = 0x80; iVar6 != 0; iVar6 = iVar6 + -1) {
*(undefined4 *)psVar10 = *puVar9;
puVar9 = puVar9 + (uint)bVar11 * -2 + 1;
psVar10 = psVar10 + (uint)bVar11 * -8 + 4;
}
puVar9 = local_460;
psVar10 = param_1 + 0x200;
for (iVar6 = 0x80; iVar6 != 0; iVar6 = iVar6 + -1) {
*(undefined4 *)psVar10 = *puVar9;
puVar9 = puVar9 + (uint)bVar11 * -2 + 1;
psVar10 = psVar10 + (uint)bVar11 * -8 + 4;
}
puVar9 = local_260;
psVar10 = param_1 + 0x400;
for (iVar6 = 0x80; iVar6 != 0; iVar6 = iVar6 + -1) {
*(undefined4 *)psVar10 = *puVar9;
puVar9 = puVar9 + (uint)bVar11 * -2 + 1;
psVar10 = psVar10 + (uint)bVar11 * -8 + 4;
}
*(int *)(param_1 + 0x60c) = iVar2;
*(undefined4 *)(param_1 + 0x600) = local_60;
uVar3 = 1;
*(undefined4 *)(param_1 + 0x604) = local_5c;
*(undefined4 *)(param_1 + 0x610) = local_50;
*(undefined4 *)(param_1 + 0x608) = local_58;
*(undefined4 *)(param_1 + 0x614) = local_4c;
*(undefined4 *)(param_1 + 0x618) = local_48;
*(undefined4 *)(param_1 + 0x61c) = local_44;
*(undefined4 *)(param_1 + 0x620) = local_40;
*(undefined4 *)(param_1 + 0x624) = local_3c;
*(undefined4 *)(param_1 + 0x628) = local_38;
*(char **)(param_1 + 0x62c) = local_34;
*(undefined4 *)(param_1 + 0x630) = local_30;
*(undefined4 *)(param_1 + 0x634) = local_2c;
*(undefined4 *)(param_1 + 0x638) = local_28;
*(undefined4 *)(param_1 + 0x63c) = local_24;
LAB_004920b2:
uStackY_690 = 0x4920c6;
(**(code **)(*physcollision + 0xa4))();
param_1[0x63c] = (solid_t)0x1;
*(CBaseEntity **)(param_1 + 0x630) = param_2;
uStackY_690 = 0x4920f1;
(**(code **)(*(int *)param_2 + 0x20))();
puVar8 = &uStackY_690;
puVar7 = &DAT_00d539c2;
if (local_670 != (undefined1 *)0x0) {
puVar7 = local_670;
}
*(undefined1 **)(param_1 + 0x62c) = puVar7;
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar3;
}
/* WARNING: Subroutine does not return */
*(undefined **)((int)puVar8 + -4) = &UNK_0049212d;
__stack_chk_fail();
}
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.