CCollisionEvent::RestoreDamageInflictorState
0x0077b420 · 334 bytes · __thiscall
_ZN15CCollisionEvent27RestoreDamageInflictorStateEif
Decompiled
undefined (3 params)
/* CCollisionEvent::RestoreDamageInflictorState(int, float) */
void __thiscall
CCollisionEvent::RestoreDamageInflictorState(CCollisionEvent *this,int param_1,float param_2)
{
float *pfVar1;
float fVar2;
float local_24;
float local_20;
float local_1c;
float local_18;
float local_14;
float local_10;
pfVar1 = (float *)(*(int *)(this + 0x10c) + param_1 * 0x24);
if (*(short *)((int)pfVar1 + 0x22) == 0) {
*(undefined2 *)((int)pfVar1 + 0x22) = 1;
if (0.0 < param_2) {
(**(code **)(*(int *)pfVar1[6] + 0xd4))((int *)pfVar1[6],&local_24,&local_18);
fVar2 = 1.0 - param_2;
pfVar1[1] = local_20 * fVar2 + pfVar1[1] * param_2;
pfVar1[2] = local_1c * fVar2 + pfVar1[2] * param_2;
*pfVar1 = local_24 * fVar2 + *pfVar1 * param_2;
pfVar1[4] = local_14 * fVar2 + pfVar1[4] * param_2;
pfVar1[5] = local_10 * fVar2 + pfVar1[5] * param_2;
pfVar1[3] = fVar2 * local_18 + pfVar1[3] * param_2;
(**(code **)(*(int *)pfVar1[6] + 0xcc))((int *)pfVar1[6],pfVar1,pfVar1 + 3);
}
if (-1 < *(short *)(pfVar1 + 8)) {
RestoreDamageInflictorState(this,(int)*(short *)(pfVar1 + 8),param_2);
}
}
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.