IGameSystem::InitAllSystems
0x00468530 · 458 bytes · __cdecl
_ZN11IGameSystem14InitAllSystemsEv
Decompiled
undefined (0 params)
/* IGameSystem::InitAllSystems() */
undefined4 IGameSystem::InitAllSystems(void)
{
IGameSystem *pIVar1;
int *piVar2;
int *piVar3;
int *piVar4;
char cVar5;
int iVar6;
undefined4 uVar7;
int local_20;
for (pIVar1 = s_pSystemList; pIVar1 != (IGameSystem *)0x0; pIVar1 = *(IGameSystem **)(pIVar1 + 4))
{
if (DAT_00f7cd98 < 1) {
LAB_00468578:
Add(pIVar1);
}
else {
if (pIVar1 != (IGameSystem *)*s_GameSystems) {
iVar6 = 0;
do {
iVar6 = iVar6 + 1;
if (iVar6 == DAT_00f7cd98) goto LAB_00468578;
} while (pIVar1 != (IGameSystem *)s_GameSystems[iVar6]);
if (iVar6 == -1) goto LAB_00468578;
}
DevWarning(1,"AutoGameSystem already added to game system list!!!\n");
}
}
s_pSystemList = (IGameSystem *)0x0;
pIVar1 = s_pPerFrameSystemList;
do {
if (pIVar1 == (IGameSystem *)0x0) {
s_bSystemsInitted = 1;
s_pSystemList = (IGameSystem *)0x0;
if (0 < DAT_00f7cd98) {
local_20 = 0;
do {
piVar3 = mdlcache;
(**(code **)(*mdlcache + 0xb8))(mdlcache);
piVar4 = mdlcache;
/* try { // try from 0046864d to 0046864f has its CatchHandler @ 00468717 */
(**(code **)(*mdlcache + 0x68))(mdlcache);
piVar2 = (int *)s_GameSystems[local_20];
/* try { // try from 00468660 to 00468693 has its CatchHandler @ 0046872c */
uVar7 = (**(code **)*piVar2)(piVar2);
COM_TimestampedLog("%s->Init():Start",uVar7);
cVar5 = (**(code **)(*piVar2 + 4))(piVar2);
uVar7 = (**(code **)*piVar2)(piVar2);
COM_TimestampedLog("%s->Init():Finish",uVar7);
iVar6 = *piVar4;
if (cVar5 == '\0') {
(**(code **)(iVar6 + 0x6c))();
(**(code **)(*piVar3 + 0xbc))(piVar3);
return 0;
}
(**(code **)(iVar6 + 0x6c))(piVar4);
(**(code **)(*piVar3 + 0xbc))(piVar3);
local_20 = local_20 + 1;
} while (local_20 < DAT_00f7cd98);
}
return 1;
}
if (DAT_00f7cd98 < 1) {
LAB_004685d0:
Add(pIVar1);
}
else {
if (pIVar1 != (IGameSystem *)*s_GameSystems) {
iVar6 = 0;
do {
iVar6 = iVar6 + 1;
if (iVar6 == DAT_00f7cd98) goto LAB_004685d0;
} while (pIVar1 != (IGameSystem *)s_GameSystems[iVar6]);
if (iVar6 == -1) goto LAB_004685d0;
}
DevWarning(1,"AutoGameSystem already added to game system list!!!\n");
}
pIVar1 = *(IGameSystem **)(pIVar1 + 4);
} 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.