ApplyCommentaryModifications
0x006494e0 · 593 bytes · unknown
_Z28ApplyCommentaryModificationsv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* ApplyCommentaryModifications() */
void ApplyCommentaryModifications(void)
{
code *pcVar1;
KeyValues *this;
KeyValues *this_00;
KeyValues *pKVar2;
char *pcVar3;
KeyValues *pKVar4;
undefined4 uVar5;
undefined4 uVar6;
CBaseEntity *pCVar7;
if (g_CommentarySystem._44_4_ != 0) {
for (this = (KeyValues *)KeyValues::GetFirstSubKey((KeyValues *)g_CommentarySystem._44_4_);
this != (KeyValues *)0x0; this = (KeyValues *)KeyValues::GetNextKey(this)) {
this_00 = (KeyValues *)KeyValues::FindKey(this,"modify",false);
if (this_00 != (KeyValues *)0x0) {
pKVar2 = (KeyValues *)KeyValues::FindKey(this,"find_by_modelname",false);
if (pKVar2 != (KeyValues *)0x0) {
pcVar3 = (char *)KeyValues::GetString(pKVar2,(char *)0x0,"");
pCVar7 = (CBaseEntity *)0x0;
while (pCVar7 = (CBaseEntity *)
CGlobalEntityList::FindEntityByModel
((CGlobalEntityList *)gEntList,pCVar7,pcVar3),
pCVar7 != (CBaseEntity *)0x0) {
for (pKVar4 = (KeyValues *)KeyValues::GetFirstSubKey(this_00);
pKVar4 != (KeyValues *)0x0; pKVar4 = (KeyValues *)KeyValues::GetNextKey(pKVar4)) {
pcVar1 = *(code **)(*(int *)pCVar7 + 0x84);
uVar5 = KeyValues::GetString(pKVar4,(char *)0x0,"");
uVar6 = KeyValues::GetName(pKVar4);
(*pcVar1)(pCVar7,uVar6,uVar5);
}
pcVar3 = (char *)KeyValues::GetString(pKVar2,(char *)0x0,"");
}
}
pKVar2 = (KeyValues *)KeyValues::FindKey(this,"find_by_targetname",false);
if (pKVar2 != (KeyValues *)0x0) {
pcVar3 = (char *)KeyValues::GetString(pKVar2,(char *)0x0,"");
pCVar7 = (CBaseEntity *)0x0;
while (pCVar7 = (CBaseEntity *)
CGlobalEntityList::FindEntityByTarget
((CGlobalEntityList *)gEntList,pCVar7,pcVar3),
pCVar7 != (CBaseEntity *)0x0) {
for (pKVar4 = (KeyValues *)KeyValues::GetFirstSubKey(this_00);
pKVar4 != (KeyValues *)0x0; pKVar4 = (KeyValues *)KeyValues::GetNextKey(pKVar4)) {
pcVar1 = *(code **)(*(int *)pCVar7 + 0x84);
uVar5 = KeyValues::GetString(pKVar4,(char *)0x0,"");
uVar6 = KeyValues::GetName(pKVar4);
(*pcVar1)(pCVar7,uVar6,uVar5);
}
pcVar3 = (char *)KeyValues::GetString(pKVar2,(char *)0x0,"");
}
}
}
}
}
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.