CCollisionEvent::AddDamageInflictor
0x0077fbc0 · 486 bytes · __thiscall
_ZN15CCollisionEvent18AddDamageInflictorEP14IPhysicsObjectfRK6VectorS4_b
Decompiled
undefined (6 params)
/* CCollisionEvent::AddDamageInflictor(IPhysicsObject*, float, Vector const&, Vector const&, bool)
*/
uint __thiscall
CCollisionEvent::AddDamageInflictor
(CCollisionEvent *this,IPhysicsObject *param_1,float param_2,Vector *param_3,
Vector *param_4,bool param_5)
{
undefined4 uVar1;
uint uVar2;
IPhysicsObject *pIVar3;
int *piVar4;
int iVar5;
uint uVar6;
uint uVar7;
int iVar8;
undefined4 *puVar9;
Vector local_1034 [12];
Vector local_1028 [12];
int local_101c [1027];
uVar2 = *(uint *)(this + 0x118);
CUtlVector<inflictorstate_t,CUtlMemory<inflictorstate_t,int>>::GrowVector
((CUtlVector<inflictorstate_t,CUtlMemory<inflictorstate_t,int>> *)(this + 0x10c),1);
if (0 < (int)(~uVar2 + *(int *)(this + 0x118))) {
_V_memmove((void *)(*(int *)(this + 0x10c) + 0x24 + uVar2 * 0x24),
(void *)(*(int *)(this + 0x10c) + uVar2 * 0x24),
(~uVar2 + *(int *)(this + 0x118)) * 0x24);
}
puVar9 = (undefined4 *)(uVar2 * 0x24 + *(int *)(this + 0x10c));
puVar9[6] = param_1;
*puVar9 = *(undefined4 *)param_3;
puVar9[1] = *(undefined4 *)(param_3 + 4);
puVar9[2] = *(undefined4 *)(param_3 + 8);
puVar9[3] = *(undefined4 *)param_4;
puVar9[4] = *(undefined4 *)(param_4 + 4);
uVar1 = *(undefined4 *)(param_4 + 8);
puVar9[7] = param_2;
*(undefined2 *)((int)puVar9 + 0x22) = 0;
puVar9[5] = uVar1;
*(undefined2 *)(puVar9 + 8) = 0xffff;
if ((param_5) &&
(piVar4 = (int *)(**(code **)(*(int *)param_1 + 0x48))(param_1), piVar4 != (int *)0x0)) {
iVar8 = 0;
iVar5 = (**(code **)(*piVar4 + 0x2b8))(piVar4,local_101c,0x400);
uVar7 = uVar2;
if (1 < iVar5) {
do {
pIVar3 = (IPhysicsObject *)local_101c[iVar8];
uVar6 = uVar7;
if (pIVar3 != param_1) {
(**(code **)(*(int *)pIVar3 + 0xd4))(pIVar3,local_1034,local_1028);
uVar6 = AddDamageInflictor(this,(IPhysicsObject *)local_101c[iVar8],param_2,local_1034,
local_1028,false);
*(short *)(uVar7 * 0x24 + *(int *)(this + 0x10c) + 0x20) = (short)uVar6;
}
iVar8 = iVar8 + 1;
uVar7 = uVar6;
} while (iVar8 != iVar5);
}
}
return uVar2;
}
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.