CDamageCutoutManager::LevelInitPreEntity
0x00521180 · 1163 bytes · __cdecl
_ZN20CDamageCutoutManager18LevelInitPreEntityEv
Decompiled
undefined (0 params)
/* CDamageCutoutManager::LevelInitPreEntity() */
void CDamageCutoutManager::LevelInitPreEntity(void)
{
uchar *puVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
puVar1 = (uchar *)(**(code **)(*g_pGameRules + 0x8c))(g_pGameRules);
if (DAT_00fa9808 < 1) {
ReadDamageCutoutDataFromFile
((CUtlVector *)&gDamageCutoutInfoArray,(CUtlVector *)gDamageCutoutHalfBodyWounds,
filesystem,"scripts/damagecutout",puVar1);
}
puVar1 = (uchar *)(**(code **)(*g_pGameRules + 0x8c))(g_pGameRules);
if (DAT_00fa97f4 < 1) {
ReadDamageCutoutDataFromFile
((CUtlVector *)&gDamageCutoutInfoArray_l4d1,
(CUtlVector *)gDamageCutoutHalfBodyWounds_l4d1,filesystem,"scripts/damagecutout_l4d1"
,puVar1);
}
puVar1 = (uchar *)(**(code **)(*g_pGameRules + 0x8c))(g_pGameRules);
if (DAT_00fa97e0 < 1) {
ReadDamageCutoutDataFromFile
((CUtlVector *)&gDamageCutoutInfoArrayFemale,
(CUtlVector *)gDamageCutoutHalfBodyWoundsFemale,filesystem,
"scripts/damagecutout_female",puVar1);
}
puVar1 = (uchar *)(**(code **)(*g_pGameRules + 0x8c))(g_pGameRules);
if (DAT_00fa97cc < 1) {
ReadDamageCutoutDataFromFile
((CUtlVector *)&gDamageCutoutInfoArrayFemale_l4d1,
(CUtlVector *)gDamageCutoutHalfBodyWoundsFemale_l4d1,filesystem,
"scripts/damagecutout_female_l4d1",puVar1);
}
puVar1 = (uchar *)(**(code **)(*g_pGameRules + 0x8c))(g_pGameRules);
if (DAT_00fa97b8 < 1) {
ReadDamageCutoutDataFromFile
((CUtlVector *)&gDamageCutoutInfoArrayCEDA,
(CUtlVector *)gDamageCutoutHalfBodyWoundsCEDA,filesystem,"scripts/damagecutout_ceda",
puVar1);
}
puVar1 = (uchar *)(**(code **)(*g_pGameRules + 0x8c))(g_pGameRules);
if (DAT_00fa97a4 < 1) {
ReadDamageCutoutDataFromFile
((CUtlVector *)&gDamageCutoutInfoArrayRiot,
(CUtlVector *)gDamageCutoutHalfBodyWoundsRiot,filesystem,
"scripts/damagecutout_laughriot",puVar1);
}
iVar6 = 0;
CBaseEntity::PrecacheModel("models/infected/cim_faceplate.mdl");
CBaseEntity::PrecacheModel("models/infected/cim_riot_faceplate.mdl");
if (0 < DAT_00fa9808) {
iVar5 = 0;
do {
iVar3 = 0;
CBaseEntity::PrecacheModel((char *)(gDamageCutoutInfoArray + 0xe85 + iVar5));
iVar2 = gDamageCutoutInfoArray + iVar5;
if (0 < *(int *)(iVar2 + 0xe80)) {
do {
iVar4 = iVar3 + 1;
CBaseEntity::PrecacheModel((char *)(iVar2 + 0x5d1 + iVar3 * 0x80));
iVar2 = gDamageCutoutInfoArray + iVar5;
iVar3 = iVar4;
} while (iVar4 < *(int *)(iVar2 + 0xe80));
}
iVar6 = iVar6 + 1;
iVar5 = iVar5 + 0xf6c;
} while (iVar6 < DAT_00fa9808);
}
iVar6 = 0;
if (0 < DAT_00fa97f4) {
iVar5 = 0;
do {
iVar3 = 0;
CBaseEntity::PrecacheModel((char *)(gDamageCutoutInfoArray_l4d1 + 0xe85 + iVar5));
iVar2 = gDamageCutoutInfoArray_l4d1 + iVar5;
if (0 < *(int *)(iVar2 + 0xe80)) {
do {
iVar4 = iVar3 + 1;
CBaseEntity::PrecacheModel((char *)(iVar2 + 0x5d1 + iVar3 * 0x80));
iVar2 = gDamageCutoutInfoArray_l4d1 + iVar5;
iVar3 = iVar4;
} while (iVar4 < *(int *)(iVar2 + 0xe80));
}
iVar6 = iVar6 + 1;
iVar5 = iVar5 + 0xf6c;
} while (iVar6 < DAT_00fa97f4);
}
iVar6 = 0;
if (0 < DAT_00fa97e0) {
iVar5 = 0;
do {
iVar3 = 0;
CBaseEntity::PrecacheModel((char *)(gDamageCutoutInfoArrayFemale + 0xe85 + iVar5));
iVar2 = gDamageCutoutInfoArrayFemale + iVar5;
if (0 < *(int *)(iVar2 + 0xe80)) {
do {
iVar4 = iVar3 + 1;
CBaseEntity::PrecacheModel((char *)(iVar2 + 0x5d1 + iVar3 * 0x80));
iVar2 = gDamageCutoutInfoArrayFemale + iVar5;
iVar3 = iVar4;
} while (iVar4 < *(int *)(iVar2 + 0xe80));
}
iVar6 = iVar6 + 1;
iVar5 = iVar5 + 0xf6c;
} while (iVar6 < DAT_00fa97e0);
}
iVar6 = 0;
if (0 < DAT_00fa97cc) {
iVar5 = 0;
do {
iVar3 = 0;
CBaseEntity::PrecacheModel((char *)(gDamageCutoutInfoArrayFemale_l4d1 + 0xe85 + iVar5));
iVar2 = gDamageCutoutInfoArrayFemale_l4d1 + iVar5;
if (0 < *(int *)(iVar2 + 0xe80)) {
do {
iVar4 = iVar3 + 1;
CBaseEntity::PrecacheModel((char *)(iVar2 + 0x5d1 + iVar3 * 0x80));
iVar2 = gDamageCutoutInfoArrayFemale_l4d1 + iVar5;
iVar3 = iVar4;
} while (iVar4 < *(int *)(iVar2 + 0xe80));
}
iVar6 = iVar6 + 1;
iVar5 = iVar5 + 0xf6c;
} while (iVar6 < DAT_00fa97cc);
}
iVar6 = 0;
if (0 < DAT_00fa97b8) {
iVar5 = 0;
do {
iVar3 = 0;
CBaseEntity::PrecacheModel((char *)(gDamageCutoutInfoArrayCEDA + 0xe85 + iVar5));
iVar2 = gDamageCutoutInfoArrayCEDA + iVar5;
if (0 < *(int *)(iVar2 + 0xe80)) {
do {
iVar4 = iVar3 + 1;
CBaseEntity::PrecacheModel((char *)(iVar2 + 0x5d1 + iVar3 * 0x80));
iVar2 = gDamageCutoutInfoArrayCEDA + iVar5;
iVar3 = iVar4;
} while (iVar4 < *(int *)(iVar2 + 0xe80));
}
iVar6 = iVar6 + 1;
iVar5 = iVar5 + 0xf6c;
} while (iVar6 < DAT_00fa97b8);
}
iVar6 = 0;
if (0 < DAT_00fa97a4) {
iVar5 = 0;
do {
iVar3 = 0;
CBaseEntity::PrecacheModel((char *)(gDamageCutoutInfoArrayRiot + 0xe85 + iVar5));
iVar2 = gDamageCutoutInfoArrayRiot + iVar5;
if (0 < *(int *)(iVar2 + 0xe80)) {
do {
iVar4 = iVar3 + 1;
CBaseEntity::PrecacheModel((char *)(iVar2 + 0x5d1 + iVar3 * 0x80));
iVar2 = gDamageCutoutInfoArrayRiot + iVar5;
iVar3 = iVar4;
} while (iVar4 < *(int *)(iVar2 + 0xe80));
}
iVar6 = iVar6 + 1;
iVar5 = iVar5 + 0xf6c;
} while (iVar6 < DAT_00fa97a4);
}
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.