PlayerReporter::FireGameEvent
0x008feaa0 · 3779 bytes · __thiscall
_ZN14PlayerReporter13FireGameEventEP10IGameEvent
Decompiled
undefined (2 params)
/* PlayerReporter::FireGameEvent(IGameEvent*) */
void __thiscall PlayerReporter::FireGameEvent(PlayerReporter *this,IGameEvent *param_1)
{
int *piVar1;
CBaseEdict *this_00;
short sVar2;
char cVar3;
char *pcVar4;
int iVar5;
char *pcVar6;
undefined4 uVar7;
CBaseEntity *this_01;
int iVar8;
uint uVar9;
CTerrorPlayer *pCVar10;
CBaseEntity *pCVar11;
int iVar12;
int iVar13;
CTerrorPlayer *pCVar14;
float fVar15;
CBaseEntity *local_20;
pcVar4 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
if (pcVar4 == (char *)0x0) {
return;
}
if ((pcVar4 == "player_spawn") || (iVar5 = _V_stricmp(pcVar4,"player_spawn"), iVar5 == 0)) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar11 = (CBaseEntity *)UTIL_PlayerByUserId(iVar5);
if (pCVar11 == (CBaseEntity *)0x0) {
return;
}
iVar5 = CreateOrFindCurrentReport(this,(CTerrorPlayer *)pCVar11);
if (iVar5 == 0) {
return;
}
*(undefined1 *)(iVar5 + 8) = 1;
uVar7 = CBaseEntity::GetTeamNumber(pCVar11);
*(undefined1 *)(iVar5 + 0x10) = 1;
*(undefined4 *)(iVar5 + 0xc) = uVar7;
if (*(char *)(iVar5 + 0x11) == '\0') {
return;
}
*(undefined1 *)(iVar5 + 0x11) = 0;
return;
}
if ((pcVar4 == "player_team") || (iVar5 = _V_stricmp(pcVar4,"player_team"), iVar5 == 0)) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar5 == 0) {
return;
}
iVar13 = *(int *)(iVar5 + 0xc);
iVar12 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"team",0);
if (iVar13 == iVar12) {
return;
}
*(undefined1 *)(iVar5 + 8) = 0;
uVar7 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"team",0);
*(undefined4 *)(iVar5 + 0xc) = uVar7;
return;
}
if ((pcVar4 == "player_entered_start_area") ||
(iVar5 = _V_stricmp(pcVar4,"player_entered_start_area"), iVar5 == 0)) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar11 = (CBaseEntity *)UTIL_PlayerByUserId(iVar5);
iVar5 = CreateOrFindCurrentReport(this,(CTerrorPlayer *)pCVar11);
if (iVar5 == 0) {
return;
}
if (*(char *)(iVar5 + 0x10) == '\0') {
return;
}
*(undefined1 *)(iVar5 + 0x10) = 0;
iVar13 = CBaseEntity::GetTeamNumber(pCVar11);
if (iVar13 != 2) {
return;
}
*(undefined1 *)(iVar5 + 8) = 1;
return;
}
if ((pcVar4 == "map_transition") || (iVar5 = _V_stricmp(pcVar4,"map_transition"), iVar5 == 0)) {
uVar9 = (uint)*(ushort *)(this + 0x18);
if (uVar9 == 0xffff) {
return;
}
iVar5 = *(int *)(this + 0xc);
do {
iVar5 = *(int *)(iVar5 + uVar9 * 8);
*(undefined1 *)(iVar5 + 0x11) = 1;
if (*(int *)(iVar5 + 0xc) == 2) {
*(undefined1 *)(iVar5 + 8) = 1;
}
iVar5 = *(int *)(this + 0xc);
uVar9 = (uint)*(ushort *)(iVar5 + 6 + uVar9 * 8);
} while (uVar9 != 0xffff);
return;
}
if ((pcVar4 == "player_death") || (iVar5 = _V_stricmp(pcVar4,"player_death"), iVar5 == 0)) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
if (iVar5 == 0) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entityid",0);
if (iVar5 == 0) {
return;
}
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entityid",0);
pCVar11 = (CBaseEntity *)UTIL_EntityByIndex(iVar5);
}
else {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar11 = (CBaseEntity *)UTIL_PlayerByUserId(iVar5);
}
cVar3 = (**(code **)(*(int *)pCVar11 + 0x16c))(pCVar11);
if (cVar3 == '\0') {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))();
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
if (pCVar14 == (CTerrorPlayer *)0x0) {
return;
}
local_20 = (CBaseEntity *)0x0;
}
else {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"attacker",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
local_20 = pCVar11;
if ((pCVar14 == (CTerrorPlayer *)0x0) || (pCVar11[0x3375] != (CBaseEntity)0x0))
goto LAB_008ff190;
}
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (((iVar5 != 0) && (pCVar11 != (CBaseEntity *)pCVar14)) &&
(iVar13 = CBaseEntity::GetTeamNumber(pCVar11), iVar13 == 2)) {
*(int *)(iVar5 + 0x38) = *(int *)(iVar5 + 0x38) + 1;
}
iVar13 = CBaseEntity::GetTeamNumber(pCVar11);
if (iVar13 == 3) {
if ((local_20 == (CBaseEntity *)0x0) ||
(uVar9 = (**(code **)(*(int *)local_20 + 0x544))(local_20), uVar9 == 0)) {
pcVar4 = "";
if (*(char **)(pCVar11 + 0x7c) != (char *)0x0) {
pcVar4 = *(char **)(pCVar11 + 0x7c);
}
iVar13 = _V_strcmp(pcVar4,"witch");
uVar9 = -(uint)(iVar13 == 0) & 7;
}
else if (8 < uVar9) goto LAB_008ff190;
if (iVar5 != 0) {
piVar1 = (int *)(iVar5 + 0x14 + uVar9 * 4);
*piVar1 = *piVar1 + 1;
(**(code **)(*(int *)pCVar14 + 0x930))(pCVar14,uVar9);
}
pcVar4 = (char *)(**(code **)(*(int *)param_1 + 0x28))(param_1,"weapon",&DAT_00d539c2);
iVar13 = V_strncmp(pcVar4,"melee",5);
if (iVar13 != 0) {
pcVar4 = (char *)(**(code **)(*(int *)param_1 + 0x28))(param_1,"weapon",&DAT_00d539c2);
iVar13 = V_strncmp(pcVar4,"chainsaw",8);
if (iVar13 != 0) goto LAB_008ff181;
}
*(int *)(iVar5 + 0x354) = *(int *)(iVar5 + 0x354) + 1;
iVar5 = *(int *)(pCVar14 + 0x397c);
CServerNetworkProperty::NetworkStateChanged((short)pCVar14 + 0x24);
*(int *)(pCVar14 + 0x397c) = iVar5 + 1;
}
LAB_008ff181:
if (local_20 == (CBaseEntity *)0x0) {
return;
}
LAB_008ff190:
iVar5 = CreateOrFindCurrentReport(this,(CTerrorPlayer *)local_20);
if (iVar5 != 0) {
*(int *)(iVar5 + 0x360) = *(int *)(iVar5 + 0x360) + 1;
*(undefined1 *)(iVar5 + 8) = 0;
}
return;
}
if ((pcVar4 != "player_hurt") && (iVar5 = _V_stricmp(pcVar4,"player_hurt"), iVar5 != 0)) {
if ((pcVar4 == "infected_hurt") || (iVar5 = _V_stricmp(pcVar4,"infected_hurt"), iVar5 == 0)) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"attacker",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
if (pCVar14 == (CTerrorPlayer *)0x0) {
return;
}
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar5 == 0) {
return;
}
uVar9 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"type",0);
if ((uVar9 & 0x20000002) == 0) {
return;
}
*(undefined1 *)(iVar5 + 900) = 1;
iVar13 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"hitgroup",0);
if (iVar13 != 1) {
return;
}
*(undefined1 *)(iVar5 + 0x385) = 1;
return;
}
if ((pcVar4 == "pills_used") || (iVar5 = _V_stricmp(pcVar4,"pills_used"), iVar5 == 0)) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"subject",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar5 == 0) {
return;
}
*(int *)(iVar5 + 0x330) = *(int *)(iVar5 + 0x330) + 1;
return;
}
pcVar6 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
if ((pcVar6 == "adrenaline_used") || (iVar5 = _V_stricmp(pcVar6,"adrenaline_used"), iVar5 == 0))
{
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"subject",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar5 == 0) {
return;
}
*(int *)(iVar5 + 0x334) = *(int *)(iVar5 + 0x334) + 1;
iVar5 = *(int *)(pCVar14 + 0x3928);
if (pCVar14[0x6c] == (CTerrorPlayer)0x0) {
this_00 = *(CBaseEdict **)(pCVar14 + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
pCVar14[0x70] = (CTerrorPlayer)((byte)pCVar14[0x70] | 1);
}
*(int *)(pCVar14 + 0x3928) = iVar5 + 1;
return;
}
if ((pcVar4 == "heal_success") || (iVar5 = _V_stricmp(pcVar4,"heal_success"), iVar5 == 0)) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"subject",0);
pCVar10 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar5 == 0) {
return;
}
if (pCVar14 != pCVar10) {
*(int *)(iVar5 + 0x32c) = *(int *)(iVar5 + 0x32c) + 1;
return;
}
*(int *)(iVar5 + 0x328) = *(int *)(iVar5 + 0x328) + 1;
return;
}
if ((pcVar4 == "defibrillator_used") ||
(iVar5 = _V_stricmp(pcVar4,"defibrillator_used"), iVar5 == 0)) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"subject",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar5 != 0) {
*(int *)(iVar5 + 0x360) = *(int *)(iVar5 + 0x360) + -1;
*(undefined1 *)(iVar5 + 8) = 1;
}
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar5 == 0) {
return;
}
*(int *)(iVar5 + 0x338) = *(int *)(iVar5 + 0x338) + 1;
return;
}
if ((pcVar4 == "revive_success") || (iVar5 = _V_stricmp(pcVar4,"revive_success"), iVar5 == 0)) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar5 == 0) {
return;
}
*(int *)(iVar5 + 0x358) = *(int *)(iVar5 + 0x358) + 1;
return;
}
if ((pcVar4 != "player_incapacitated") &&
(iVar5 = _V_stricmp(pcVar4,"player_incapacitated"), iVar5 != 0)) {
if ((pcVar4 == "finale_win") || (iVar5 = _V_stricmp(pcVar4,"finale_win"), iVar5 == 0)) {
iVar5 = 1;
do {
pCVar11 = (CBaseEntity *)UTIL_PlayerByIndex(iVar5);
if (pCVar11 != (CBaseEntity *)0x0) {
cVar3 = (**(code **)(*(int *)pCVar11 + 300))(pCVar11);
if ((cVar3 != '\0') && (iVar13 = CBaseEntity::GetTeamNumber(pCVar11), iVar13 == 2)) {
CreateOrFindCurrentReport(this,(CTerrorPlayer *)pCVar11);
}
cVar3 = CTerrorGameRules::IsSacrificeEscapee(g_pGameRules,(CTerrorPlayer *)pCVar11);
if ((cVar3 == '\0') &&
(iVar13 = CreateOrFindCurrentReport(this,(CTerrorPlayer *)pCVar11), iVar13 != 0)) {
*(int *)(iVar13 + 0x360) = *(int *)(iVar13 + 0x360) + 1;
*(undefined1 *)(iVar13 + 8) = 0;
}
}
iVar5 = iVar5 + 1;
} while (iVar5 != 0x21);
return;
}
if ((pcVar4 == "round_end") || (iVar5 = _V_stricmp(pcVar4,"round_end"), iVar5 == 0)) {
iVar5 = 1;
do {
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByIndex(iVar5);
if ((((pCVar14 != (CTerrorPlayer *)0x0) &&
(iVar13 = CreateOrFindCurrentReport(this,pCVar14), iVar13 != 0)) &&
(iVar12 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"reason",0), iVar12 == 1)) &&
((cVar3 = (**(code **)(*(int *)pCVar14 + 300))(pCVar14), cVar3 != '\0' &&
(cVar3 = (**(code **)(*(int *)pCVar14 + 0x7e8))(pCVar14), cVar3 != '\0')))) {
*(int *)(iVar13 + 0x360) = *(int *)(iVar13 + 0x360) + 1;
*(undefined1 *)(iVar13 + 8) = 0;
}
iVar5 = iVar5 + 1;
} while (iVar5 != 0x21);
return;
}
if ((pcVar4 != "weapon_fire") && (iVar5 = _V_stricmp(pcVar4,"weapon_fire"), iVar5 != 0)) {
pcVar4 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
if ((pcVar4 == "award_earned") || (iVar5 = _V_stricmp(pcVar4,"award_earned"), iVar5 == 0)) {
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"award",0);
iVar13 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar13 == 0) {
return;
}
piVar1 = (int *)(iVar13 + 0x3c + iVar5 * 4);
*piVar1 = *piVar1 + 1;
return;
}
pcVar4 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
if ((pcVar4 != "server_shutdown") &&
(iVar5 = _V_stricmp(pcVar4,"server_shutdown"), iVar5 != 0)) {
return;
}
cVar3 = (**(code **)(*engine + 8))(engine);
if ((cVar3 == '\0') &&
(pCVar14 = (CTerrorPlayer *)UTIL_GetListenServerHost(), pCVar14 != (CTerrorPlayer *)0x0))
{
OnGameOver(this,pCVar14);
}
CUtlLinkedList<PlayerReport*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<PlayerReport*,unsigned_short>,unsigned_short>>
::PurgeAndDeleteElements
((CUtlLinkedList<PlayerReport*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<PlayerReport*,unsigned_short>,unsigned_short>>
*)(this + 0xc));
return;
}
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar5 == 0) {
return;
}
pcVar4 = (char *)(**(code **)(*(int *)param_1 + 0x28))(param_1,"weapon",&DAT_00d539c2);
sVar2 = (short)pCVar14;
if ((pcVar4 == "molotov") || (iVar13 = _V_stricmp(pcVar4,"molotov"), iVar13 == 0)) {
*(int *)(iVar5 + 0x340) = *(int *)(iVar5 + 0x340) + 1;
iVar5 = *(int *)(pCVar14 + 0x3910);
CServerNetworkProperty::NetworkStateChanged(sVar2 + 0x24);
*(int *)(pCVar14 + 0x3910) = iVar5 + 1;
return;
}
if ((pcVar4 == "pipe_bomb") || (iVar13 = _V_stricmp(pcVar4,"pipe_bomb"), iVar13 == 0)) {
*(int *)(iVar5 + 0x33c) = *(int *)(iVar5 + 0x33c) + 1;
iVar5 = *(int *)(pCVar14 + 0x3918);
CServerNetworkProperty::NetworkStateChanged(sVar2 + 0x24);
*(int *)(pCVar14 + 0x3918) = iVar5 + 1;
return;
}
if ((pcVar4 != "vomitjar") && (iVar13 = _V_stricmp(pcVar4,"vomitjar"), iVar13 != 0)) {
*(int *)(iVar5 + 0x348) = *(int *)(iVar5 + 0x348) + 1;
*(int *)(pCVar14 + 0x3984) = *(int *)(pCVar14 + 0x3984) + 1;
return;
}
*(int *)(iVar5 + 0x344) = *(int *)(iVar5 + 0x344) + 1;
iVar5 = *(int *)(pCVar14 + 0x3920);
CServerNetworkProperty::NetworkStateChanged(sVar2 + 0x24);
*(int *)(pCVar14 + 0x3920) = iVar5 + 1;
return;
}
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar14 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar5);
iVar5 = CreateOrFindCurrentReport(this,pCVar14);
if (iVar5 == 0) {
return;
}
*(int *)(iVar5 + 0x35c) = *(int *)(iVar5 + 0x35c) + 1;
return;
}
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
pCVar11 = (CBaseEntity *)UTIL_PlayerByUserId(iVar5);
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"attacker",0);
this_01 = (CBaseEntity *)UTIL_PlayerByUserId(iVar5);
iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"dmg_health",0);
if (pCVar11 == (CBaseEntity *)0x0) {
return;
}
iVar13 = (**(code **)(*(int *)pCVar11 + 0x1fc))(pCVar11);
fVar15 = (float)iVar5;
if ((float)iVar13 <= (float)iVar5) {
fVar15 = (float)iVar13;
}
iVar5 = CreateOrFindCurrentReport(this,(CTerrorPlayer *)pCVar11);
iVar13 = CreateOrFindCurrentReport(this,(CTerrorPlayer *)this_01);
if (iVar13 == 0) {
LAB_008fefd2:
if (pCVar11 == this_01) {
LAB_008ff4d0:
if (iVar5 == 0) {
return;
}
*(int *)(iVar5 + 0x2b8) = (int)((float)*(int *)(iVar5 + 0x2b8) + fVar15);
return;
}
if (this_01 == (CBaseEntity *)0x0) goto LAB_008ff017;
}
else {
if (this_01 == (CBaseEntity *)0x0) {
LAB_008fef8b:
uVar9 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"type",0);
if ((uVar9 & 0x20000002) != 0) {
*(undefined1 *)(iVar13 + 900) = 1;
iVar12 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"hitgroup",0);
if (iVar12 == 1) {
*(undefined1 *)(iVar13 + 0x385) = 1;
}
}
goto LAB_008fefd2;
}
iVar12 = CBaseEntity::GetTeamNumber(pCVar11);
iVar8 = CBaseEntity::GetTeamNumber(this_01);
if (iVar12 != iVar8) goto LAB_008fef8b;
(**(code **)(*(int *)param_1 + 0x1c))(param_1,"type",0);
if (pCVar11 == this_01) goto LAB_008ff4d0;
}
iVar13 = CBaseEntity::GetTeamNumber(pCVar11);
iVar12 = CBaseEntity::GetTeamNumber(this_01);
if (iVar13 == iVar12) {
if (iVar5 != 0) {
*(int *)(iVar5 + 700) = (int)((float)*(int *)(iVar5 + 700) + fVar15);
}
}
else if (this_01 == (CBaseEntity *)0x0) goto LAB_008ff017;
iVar13 = CBaseEntity::GetTeamNumber(pCVar11);
if ((iVar13 == 2) && (iVar13 = CBaseEntity::GetTeamNumber(this_01), iVar13 == 3)) {
if (iVar5 == 0) {
return;
}
uVar9 = (**(code **)(*(int *)this_01 + 0x544))(this_01);
if (8 < uVar9) {
return;
}
iVar5 = iVar5 + uVar9 * 4;
*(int *)(iVar5 + 0x290) = (int)((float)*(int *)(iVar5 + 0x290) + fVar15);
return;
}
LAB_008ff017:
if (iVar5 == 0) {
return;
}
*(int *)(iVar5 + 0x290) = (int)((float)*(int *)(iVar5 + 0x290) + fVar15);
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.