CDirectorItemManager::ReportAllItems
0x008a4720 · 637 bytes · __cdecl
_ZN20CDirectorItemManager14ReportAllItemsEv
Decompiled
undefined (0 params)
/* CDirectorItemManager::ReportAllItems() */
void CDirectorItemManager::ReportAllItems(void)
{
float fVar1;
code *pcVar2;
CBaseEntity *this;
int *piVar3;
int *piVar4;
CBaseEntity *pCVar5;
int *piVar6;
char *pcVar7;
int iVar8;
int *piVar9;
int *piVar10;
char *pcVar11;
double dVar12;
double dVar13;
int aiStackY_64 [2];
char *local_20 [4];
pcVar11 = "weapon_pain_pills_spawn";
piVar9 = (int *)&stack0xffffffa4;
Msg();
do {
pCVar5 = (CBaseEntity *)
CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar11);
while (this = pCVar5, this != (CBaseEntity *)0x0) {
pCVar5 = (CBaseEntity *)
CGlobalEntityList::FindEntityByClassname((CGlobalEntityList *)gEntList,this,pcVar11);
if ((*(uint *)(this + 0x14c) & 1) == 0) {
if ((((*(uint *)(this + 0x14c) & 0x800) != 0) &&
(CBaseEntity::CalcAbsolutePosition(this), ((byte)this[0x14d] & 8) != 0)) &&
(CBaseEntity::CalcAbsolutePosition(this), ((byte)this[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition(this);
}
Msg();
}
}
pcVar11 = pcVar11 + 0x80;
} while (pcVar11 != "20CDirectorItemManager");
pcVar11 = "models/props_junk/gascan001a.mdl";
do {
piVar9[2] = (int)"prop_physics";
piVar9[1] = 0;
*piVar9 = (int)gEntList;
piVar9[-1] = 0x8a4878;
piVar6 = (int *)CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)*piVar9,(CBaseEntity *)piVar9[1],
(char *)piVar9[2]);
piVar4 = piVar9;
joined_r0x008a487c:
piVar9 = piVar4;
piVar3 = piVar6;
if (piVar3 != (int *)0x0) {
piVar9[2] = (int)"prop_physics";
piVar9[1] = (int)piVar3;
*piVar9 = (int)gEntList;
piVar9[-1] = 0x8a48a2;
piVar6 = (int *)CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)*piVar9,(CBaseEntity *)piVar9[1],
(char *)piVar9[2]);
iVar8 = *piVar3;
piVar9[1] = (int)piVar3;
*piVar9 = (int)local_20;
pcVar2 = *(code **)(iVar8 + 0x20);
piVar9[-1] = 0x8a48b3;
(*pcVar2)();
piVar10 = piVar9 + -1;
pcVar7 = local_20[0];
if (local_20[0] == (char *)0x0) {
pcVar7 = "";
}
piVar4 = piVar10;
if (pcVar7 != pcVar11) break;
goto LAB_008a48d7;
}
pcVar11 = pcVar11 + 0x80;
if (pcVar11 == "weapon_pain_pills_spawn") {
return;
}
} while( true );
*piVar9 = (int)pcVar11;
piVar9[-1] = (int)pcVar7;
piVar9[-2] = 0x8a48d3;
iVar8 = _V_stricmp((char *)piVar9[-1],(char *)*piVar9);
if (iVar8 != 0) goto joined_r0x008a487c;
LAB_008a48d7:
if ((piVar3[0x53] & 1U) != 0) goto joined_r0x008a487c;
if ((piVar3[0x53] & 0x800U) == 0) {
dVar12 = (double)(float)piVar3[0xba];
}
else {
piVar9[-1] = (int)piVar3;
piVar9[-2] = 0x8a4958;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)piVar9[-1]);
dVar12 = (double)(float)piVar3[0xba];
if ((*(byte *)((int)piVar3 + 0x14d) & 8) != 0) {
piVar9[-1] = (int)piVar3;
piVar9[-2] = 0x8a4979;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)piVar9[-1]);
dVar13 = (double)(float)piVar3[0xb9];
if ((*(byte *)((int)piVar3 + 0x14d) & 8) != 0) {
piVar9[-1] = (int)piVar3;
piVar9[-2] = 0x8a49a3;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)piVar9[-1]);
}
goto LAB_008a48fc;
}
}
dVar13 = (double)(float)piVar3[0xb9];
LAB_008a48fc:
*(double *)(piVar9 + 5) = dVar12;
*(double *)(piVar9 + 3) = dVar13;
fVar1 = (float)piVar3[0xb8];
*piVar9 = (int)pcVar11;
piVar9[-1] = (int)"%s - %2.2f %2.2f %2.2f\n";
*(double *)(piVar9 + 1) = (double)fVar1;
piVar9[-2] = 0x8a4929;
Msg();
goto joined_r0x008a487c;
}
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.