PrecacheGibsForModel
0x004991c0 · 261 bytes · __cdecl
_Z20PrecacheGibsForModeli
Decompiled
undefined (1 param)
/* PrecacheGibsForModel(int) */
void PrecacheGibsForModel(int param_1)
{
char cVar1;
int iVar2;
int *piVar3;
char *pcVar4;
int in_GS_OFFSET;
undefined **local_45c;
undefined4 local_458;
undefined4 local_454;
undefined1 local_44c [12];
char local_440 [1056];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar2 = (**(code **)(*modelinfo + 0x18))(modelinfo,param_1);
if (iVar2 == 0) {
LAB_0049929e:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
local_45c = &PTR_ParseKeyValue_00c1a818;
local_458 = 0;
local_454 = 0x3f800000;
piVar3 = (int *)(**(code **)(*physcollision + 0xa0))(physcollision,iVar2);
do {
cVar1 = (**(code **)(*piVar3 + 0xc))(piVar3);
while( true ) {
if (cVar1 != '\0') {
(**(code **)(*physcollision + 0xa4))(physcollision,piVar3);
goto LAB_0049929e;
}
pcVar4 = (char *)(**(code **)(*piVar3 + 8))(piVar3);
iVar2 = _V_stricmp(pcVar4,"break");
if (iVar2 != 0) break;
(**(code **)(*piVar3 + 0x20))(piVar3,local_44c,&local_45c);
CBaseEntity::PrecacheModel(local_440);
cVar1 = (**(code **)(*piVar3 + 0xc))(piVar3);
}
(**(code **)(*piVar3 + 0x28))(piVar3);
} 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.