CCollisionEvent::PreCollision
0x00779230 · 418 bytes · __thiscall
_ZN15CCollisionEvent12PreCollisionEP17vcollisionevent_t
Decompiled
undefined (2 params)
/* CCollisionEvent::PreCollision(vcollisionevent_t*) */
void __thiscall CCollisionEvent::PreCollision(CCollisionEvent *this,vcollisionevent_t *param_1)
{
undefined4 uVar1;
int *piVar2;
char cVar3;
uint uVar4;
int *piVar5;
longdouble lVar6;
float fVar7;
CCollisionEvent *local_44;
uint local_40;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
local_40 = 0;
*(int *)(this + 0x15c) = *(int *)(this + 0x15c) + 1;
*(undefined4 *)(this + 0x4c) = *(undefined4 *)param_1;
*(undefined4 *)(this + 0x50) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(this + 0x54) = *(undefined4 *)(param_1 + 8);
*(undefined4 *)(this + 0x58) = *(undefined4 *)(param_1 + 0xc);
*(undefined4 *)(this + 0x5c) = *(undefined4 *)(param_1 + 0x10);
*(undefined4 *)(this + 0x60) = *(undefined4 *)(param_1 + 0x14);
*(undefined4 *)(this + 100) = *(undefined4 *)(param_1 + 0x18);
uVar1 = *(undefined4 *)(param_1 + 0x1c);
*(undefined4 *)(this + 0xb4) = 0;
*(undefined4 *)(this + 0xb8) = 0;
*(undefined4 *)(this + 0x68) = uVar1;
local_44 = this + 0x6c;
do {
piVar2 = *(int **)(param_1 + local_40 * 4);
if (piVar2 != (int *)0x0) {
/* try { // try from 007792a9 to 007793b0 has its CatchHandler @ 007793d2 */
uVar4 = (**(code **)(*piVar2 + 0x50))(piVar2);
if ((uVar4 & 4) != 0) {
piVar5 = (int *)(**(code **)(**(int **)(param_1 + (local_40 ^ 1) * 4) + 0x48))
(*(int **)(param_1 + (local_40 ^ 1) * 4));
if (piVar5 != (int *)0x0) {
cVar3 = (**(code **)(*piVar5 + 0x16c))(piVar5);
if (cVar3 == '\0') {
(**(code **)(*piVar2 + 0xd4))(piVar2,&local_34,&local_28);
lVar6 = (longdouble)VectorNormalize((Vector *)&local_34);
fVar7 = (float)lVar6;
if (fVar7 <= 10.0) {
fVar7 = 10.0;
}
local_34 = local_34 * fVar7;
local_30 = local_30 * fVar7;
local_2c = fVar7 * local_2c;
lVar6 = (longdouble)VectorNormalize((Vector *)&local_28);
fVar7 = (float)lVar6;
if (fVar7 <= 1.0) {
fVar7 = 1.0;
}
local_28 = local_28 * fVar7;
local_24 = local_24 * fVar7;
local_20 = fVar7 * local_20;
(**(code **)(*piVar2 + 0xcc))(piVar2,&local_34,&local_28);
}
}
}
(**(code **)(*piVar2 + 0xd4))(piVar2,local_44,local_44 + 0x30);
}
local_40 = local_40 + 1;
local_44 = local_44 + 0xc;
} while (local_40 != 2);
*(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.