CAchievementMgr::FireGameEvent
0x003e9760 · 636 bytes · __thiscall
_ZN15CAchievementMgr13FireGameEventEP10IGameEvent
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CAchievementMgr::FireGameEvent(IGameEvent*) */
void __thiscall CAchievementMgr::FireGameEvent(CAchievementMgr *this,IGameEvent *param_1)
{
char cVar1;
char *pcVar2;
int iVar3;
CBaseEntity *pCVar4;
CBaseEntity *pCVar5;
CBaseEntity *pCVar6;
int iVar7;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (___atan2f_finite == 0) {
local_20 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,
"/data/src/game/server/../../game/shared/achievementmgr.cpp",0x507,
&FireGameEvent(IGameEvent*)::tm_fmt,"(%s)%s","Steam","CAchievementMgr::FireGameEvent"
);
local_20 = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
/* try { // try from 003e994e to 003e999c has its CatchHandler @ 003e9a14 */
iVar7 = ThreadGetCurrentId();
if (iVar3 == iVar7) {
if ((char *)*_DAT_0105d15c != "CAchievementMgr::FireGameEvent") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xbfb360,(char *)0x1,0xbfafe3);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
}
/* try { // try from 003e9819 to 003e98b4 has its CatchHandler @ 003e99f3 */
pcVar2 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
iVar3 = _V_strcmp(pcVar2,"entity_killed");
if (iVar3 == 0) {
iVar3 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entindex_killed",0);
pCVar4 = (CBaseEntity *)UTIL_EntityByIndex(iVar3);
iVar3 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entindex_attacker",0);
pCVar5 = (CBaseEntity *)UTIL_EntityByIndex(iVar3);
iVar3 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entindex_inflictor",0);
pCVar6 = (CBaseEntity *)UTIL_EntityByIndex(iVar3);
OnKillEvent(this,pCVar4,pCVar5,pCVar6,param_1);
}
else {
/* try { // try from 003e99bb to 003e99dd has its CatchHandler @ 003e99f3 */
iVar3 = _V_strcmp(pcVar2,"game_init");
if (iVar3 == 0) {
PreRestoreSavedGame(this);
PostRestoreSavedGame(this);
}
}
iVar3 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
iVar7 = ThreadGetCurrentId();
if (iVar3 == iVar7) {
cVar1 = CVProfNode::ExitScope();
if (cVar1 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
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.