CCollisionEvent::PostCollision
0x00778190 · 365 bytes · __thiscall
_ZN15CCollisionEvent13PostCollisionEP17vcollisionevent_t
Decompiled
undefined (2 params)
/* CCollisionEvent::PostCollision(vcollisionevent_t*) */
void __thiscall CCollisionEvent::PostCollision(CCollisionEvent *this,vcollisionevent_t *param_1)
{
int *piVar1;
vcollisionevent_t vVar2;
ushort uVar3;
int iVar4;
int iVar5;
CCollisionEvent *local_30;
char local_1e [14];
iVar5 = 0;
local_1e[0] = '\0';
local_1e[1] = '\0';
*(int *)(this + 0x15c) = *(int *)(this + 0x15c) + 1;
local_30 = this + 0x84;
do {
piVar1 = *(int **)(param_1 + iVar5 * 4);
if (piVar1 != (int *)0x0) {
/* try { // try from 007781c5 to 00778301 has its CatchHandler @ 00778307 */
iVar4 = (**(code **)(*piVar1 + 0x48))(piVar1);
if (iVar4 == 0) goto LAB_007782c0;
*(int *)(this + iVar5 * 4 + 0xb4) = iVar4;
uVar3 = (**(code **)(*piVar1 + 0x60))(piVar1);
(**(code **)(*piVar1 + 0xd4))(piVar1,local_30,0);
if ((uVar3 & 0x10) != 0) {
local_1e[iVar5] = '\x01';
}
}
local_30 = local_30 + 0xc;
iVar5 = iVar5 + 1;
} while (iVar5 != 2);
*(undefined4 *)(this + 100) = *(undefined4 *)(param_1 + 0x18);
*(undefined4 *)(this + 0x68) = *(undefined4 *)(param_1 + 0x1c);
piVar1 = *(int **)(this + 0xb4);
if (piVar1 == *(int **)(this + 0xb8)) {
if ((param_1[0x10] != (vcollisionevent_t)0x0) && (piVar1 != (int *)0x0)) {
(**(code **)(*piVar1 + 0x2ac))(piVar1,0,this + 0x4c);
}
}
else {
if ((local_1e[0] == '\0') || (local_1e[1] == '\0')) {
vVar2 = param_1[0x10];
}
else {
param_1[0x10] = (vcollisionevent_t)0x0;
vVar2 = (vcollisionevent_t)0x0;
}
iVar5 = 0;
while( true ) {
if ((vVar2 != (vcollisionevent_t)0x0) &&
(piVar1 = *(int **)(this + iVar5 * 4 + 0xb4), piVar1 != (int *)0x0)) {
(**(code **)(*piVar1 + 0x2ac))(piVar1,iVar5,this + 0x4c);
}
if ((param_1[0x11] != (vcollisionevent_t)0x0) && (local_1e[iVar5] != '\0')) {
(**(code **)(**(int **)(this + iVar5 * 4 + 0xb4) + 0x2a4))
(*(int **)(this + iVar5 * 4 + 0xb4),iVar5,this + 0x4c);
}
iVar5 = iVar5 + 1;
if (iVar5 == 2) break;
vVar2 = param_1[0x10];
}
}
LAB_007782c0:
*(int *)(this + 0x15c) = *(int *)(this + 0x15c) + -1;
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.