CCollisionEvent::UpdateDamageEvents
0x0077b6a0 · 296 bytes · __thiscall
_ZN15CCollisionEvent18UpdateDamageEventsEv
Decompiled
undefined (1 param)
/* CCollisionEvent::UpdateDamageEvents() */
void __thiscall CCollisionEvent::UpdateDamageEvents(CCollisionEvent *this)
{
int iVar1;
uint uVar2;
uint uVar3;
byte bVar4;
uint uVar5;
uint uVar6;
uint uVar7;
int *piVar8;
int local_24;
int local_20;
local_24 = 0;
local_20 = 0;
if (0 < *(int *)(this + 0x104)) {
do {
piVar8 = (int *)(local_24 + *(int *)(this + 0xf8));
bVar4 = (**(code **)(*(int *)*piVar8 + 300))((int *)*piVar8);
iVar1 = *piVar8;
uVar2 = *(uint *)(iVar1 + 0x14c);
uVar5 = (**(code **)(*(int *)(iVar1 + 0x194) + 0x30))(iVar1 + 0x194);
CBaseEntity::TakeDamage((CBaseEntity *)*piVar8,(CTakeDamageInfo *)(piVar8 + 2));
uVar6 = (**(code **)(*(int *)*piVar8 + 300))((int *)*piVar8);
iVar1 = *piVar8;
uVar3 = *(uint *)(iVar1 + 0x14c);
uVar7 = (**(code **)(*(int *)(iVar1 + 0x194) + 0x30))(iVar1 + 0x194);
if (((char)piVar8[0x1a] != '\0') &&
(((uint)bVar4 | -(uVar2 & 1) & 2 | uVar5 & 4) !=
(uVar6 & 0xff | -(uVar3 & 1) & 2 | uVar7 & 4))) {
RestoreDamageInflictorState(this,(IPhysicsObject *)piVar8[1]);
}
local_20 = local_20 + 1;
local_24 = local_24 + 0x6c;
} while (local_20 < *(int *)(this + 0x104));
}
*(undefined4 *)(this + 0x104) = 0;
*(undefined4 *)(this + 0x118) = 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.