CTerrorPlayer::UpdateGameEventsForBeingIT
0x009fd710 · 615 bytes · __thiscall
_ZN13CTerrorPlayer26UpdateGameEventsForBeingITEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::UpdateGameEventsForBeingIT() */
void __thiscall CTerrorPlayer::UpdateGameEventsForBeingIT(CTerrorPlayer *this)
{
code *pcVar1;
uint uVar2;
char cVar3;
CTerrorPlayer CVar4;
int *piVar5;
undefined4 uVar6;
int iVar7;
CBaseEntity *this_00;
undefined *puVar8;
cVar3 = (**(code **)(*(int *)this + 0x550))(this);
if (cVar3 == '\0') {
if (this[0x3268] != (CTerrorPlayer)0x0) {
piVar5 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"player_no_longer_it",0,0);
if (piVar5 != (int *)0x0) {
pcVar1 = *(code **)(*piVar5 + 0x30);
uVar6 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
(*pcVar1)(piVar5,"userid",uVar6);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar5,0);
}
cVar3 = (**(code **)(*(int *)this + 300))(this);
if (cVar3 != '\0') {
(**(code **)(*(int *)(this + 0x3ab4) + 0x90))(this + 0x3ab4);
}
OnITExpired(this);
}
}
else if (this[0x3268] == (CTerrorPlayer)0x0) {
piVar5 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"player_now_it",0,0);
if (piVar5 != (int *)0x0) {
pcVar1 = *(code **)(*piVar5 + 0x30);
uVar6 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
(*pcVar1)(piVar5,"userid",uVar6);
(**(code **)(*piVar5 + 0x2c))(piVar5,"exploded",this[0x3254]);
uVar2 = *(uint *)(this + 0x3264);
if ((((uVar2 == 0xffffffff) ||
(puVar8 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar8 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar8 + 4) == 0)) {
(**(code **)(*piVar5 + 0x2c))(piVar5,"by_boomer",0);
}
else {
pcVar1 = *(code **)(*piVar5 + 0x30);
uVar6 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(*(int *)(puVar8 + 4) + 0x30));
(*pcVar1)(piVar5,"attacker",uVar6);
this_00 = (CBaseEntity *)0x0;
pcVar1 = *(code **)(*piVar5 + 0x2c);
uVar2 = *(uint *)(this + 0x3264);
if (((uVar2 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar2 >> 0xc)) {
this_00 = *(CBaseEntity **)(puVar8 + 4);
}
iVar7 = CBaseEntity::GetTeamNumber(this_00);
(*pcVar1)(piVar5,"by_boomer",iVar7 == 3);
}
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar5,0);
}
}
CVar4 = (CTerrorPlayer)(**(code **)(*(int *)this + 0x550))(this);
this[0x3268] = CVar4;
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.