CTerrorGameRules::PopulateDeathEvent
0x00502390 · 451 bytes · __thiscall
_ZN16CTerrorGameRules18PopulateDeathEventEP10IGameEventPK11CBaseEntityPK20CBaseCombatCharacterRK15CTakeDamageInfo
Decompiled
undefined (5 params)
/* CTerrorGameRules::PopulateDeathEvent(IGameEvent*, CBaseEntity const*, CBaseCombatCharacter
const*, CTakeDamageInfo const&) */
void __thiscall
CTerrorGameRules::PopulateDeathEvent
(CTerrorGameRules *this,IGameEvent *param_1,CBaseEntity *param_2,
CBaseCombatCharacter *param_3,CTakeDamageInfo *param_4)
{
bool bVar1;
char cVar2;
KeyValues *this_00;
int iVar3;
undefined4 uVar4;
undefined4 uVar5;
code *pcVar6;
longdouble lVar7;
uint in_stack_ffffffb8;
KeyValues *local_24;
if ((param_3 != (CBaseCombatCharacter *)0x0) &&
(cVar2 = (**(code **)(*(int *)param_3 + 0x16c))(param_3), cVar2 != '\0')) {
local_24 = *(KeyValues **)(param_3 + 0x2e20);
bVar1 = false;
if (local_24 != (KeyValues *)0x0) goto LAB_00502420;
}
local_24 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffb8);
/* try { // try from 005023f1 to 005023f5 has its CatchHandler @ 0050257a */
KeyValues::KeyValues(local_24,"death",(IKeyValuesSystem *)0x0,false);
(**(code **)(*(int *)this + 0x2d4))(this,local_24,param_2,param_3,param_4);
bVar1 = true;
LAB_00502420:
this_00 = (KeyValues *)KeyValues::GetFirstValue(local_24);
do {
while( true ) {
if (this_00 == (KeyValues *)0x0) {
if (!bVar1) {
return;
}
KeyValues::deleteThis();
return;
}
iVar3 = KeyValues::GetDataType(this_00,(char *)0x0);
if (iVar3 != 2) break;
pcVar6 = *(code **)(*(int *)param_1 + 0x30);
uVar4 = KeyValues::GetInt(this_00,(char *)0x0,0);
LAB_00502496:
uVar5 = KeyValues::GetName(this_00);
(*pcVar6)(param_1,uVar5,uVar4);
this_00 = (KeyValues *)KeyValues::GetNextValue(this_00);
}
if (iVar3 == 3) {
pcVar6 = *(code **)(*(int *)param_1 + 0x38);
lVar7 = (longdouble)KeyValues::GetFloat(this_00,(char *)0x0,0.0);
uVar4 = KeyValues::GetName(this_00);
(*pcVar6)(param_1,uVar4,(float)lVar7);
}
else if (iVar3 == 1) {
pcVar6 = *(code **)(*(int *)param_1 + 0x3c);
uVar4 = KeyValues::GetString(this_00,(char *)0x0,"");
goto LAB_00502496;
}
this_00 = (KeyValues *)KeyValues::GetNextValue(this_00);
} while( true );
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.