CTerrorPlayer::OnFriendlyFire
0x009b5d30 · 587 bytes · __thiscall
_ZN13CTerrorPlayer14OnFriendlyFireEPS_P10IGameEvent
Decompiled
undefined (3 params)
/* CTerrorPlayer::OnFriendlyFire(CTerrorPlayer*, IGameEvent*) */
void __thiscall
CTerrorPlayer::OnFriendlyFire(CTerrorPlayer *this,CTerrorPlayer *param_1,IGameEvent *param_2)
{
char cVar1;
char *pcVar2;
int iVar3;
undefined4 uVar4;
longdouble lVar5;
undefined4 local_34;
CTerrorPlayer *local_30;
CTerrorPlayer *local_2c;
undefined4 local_28;
undefined4 local_24;
undefined1 local_20;
pcVar2 = (char *)(**(code **)(*(int *)param_2 + 0x28))(param_2,"weapon",&DAT_00d539c2);
if ((pcVar2 != "inferno") && (iVar3 = _V_stricmp(pcVar2,"inferno"), iVar3 != 0)) {
if (*(float *)(this + 0x3340) <= 0.0) {
lVar5 = (longdouble)CountdownTimer::Now();
if ((float)lVar5 + 0.5 != *(float *)(this + 0x3340)) {
(**(code **)(*(int *)(this + 0x3338) + 4))(this + 0x3338,this + 0x3340);
*(float *)(this + 0x3340) = (float)lVar5 + 0.5;
}
if (*(float *)(this + 0x333c) != 0.5) {
(**(code **)(*(int *)(this + 0x3338) + 4))(this + 0x3338,this + 0x333c);
*(undefined4 *)(this + 0x333c) = 0x3f000000;
}
lVar5 = (longdouble)CountdownTimer::Now();
if ((float)lVar5 + 1.5 != *(float *)(this + 0x334c)) {
(**(code **)(*(int *)(this + 0x3344) + 4))(this + 0x3344,this + 0x334c);
*(float *)(this + 0x334c) = (float)lVar5 + 1.5;
}
if (*(float *)(this + 0x3348) != 1.5) {
(**(code **)(*(int *)(this + 0x3344) + 4))(this + 0x3344,this + 0x3348);
*(undefined4 *)(this + 0x3348) = 0x3fc00000;
}
*(undefined4 *)(this + 0x3334) = *(undefined4 *)(param_1 + 0x2ba0);
uVar4 = (**(code **)(*(int *)param_2 + 0x1c))(param_2,"type",0);
*(undefined4 *)(this + 0x3350) = uVar4;
pcVar2 = (char *)(**(code **)(*(int *)param_2 + 0x28))(param_2,"weapon",&DAT_00d539c2);
V_strncpy((char *)(this + 0x3354),pcVar2,0x20);
}
else if (param_1 == (CTerrorPlayer *)0x0) {
return;
}
cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (((cVar1 != '\0') &&
(cVar1 = CBaseEntity::InSameTeam((CBaseEntity *)param_1,(CBaseEntity *)this), cVar1 != '\0')
) && (iVar3 = GetDifficulty(), 1 < iVar3)) {
local_30 = this;
local_2c = param_1;
local_28 = 0;
local_34 = 9;
local_20 = 1;
local_24 = 0;
ForEachTerrorPlayer<HitAnnouncement>((HitAnnouncement *)&local_34);
}
}
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.