Infected::CheckForMeleeWoundEffect
0x00a0ecd0 · 413 bytes · __thiscall
_ZN8Infected24CheckForMeleeWoundEffectEiiib19MeleeSwingDirectionS0_
Decompiled
undefined (7 params)
/* Infected::CheckForMeleeWoundEffect(int, int, int, bool, MeleeSwingDirection, MeleeSwingDirection)
*/
void __thiscall
Infected::CheckForMeleeWoundEffect
(Infected *param_1,int param_2_00,int param_2,uint param_3,char param_4,int param_6,
int param_7)
{
int *piVar1;
int iVar2;
uint uVar3;
char cVar4;
undefined4 uVar5;
int *piVar6;
int iVar7;
int iVar8;
int iVar9;
int local_5c;
int aiStack_3c [11];
if (((*(int *)(param_1 + 0x1cf4) == -1) || (*(int *)(param_1 + 0x1cf8) == -1)) &&
(cVar4 = IsValidHitgroupForWound(param_1,param_2), cVar4 != '\0')) {
uVar5 = CBaseEntity::GetGender((CBaseEntity *)param_1);
piVar6 = (int *)GetDamageCutoutInfoArray(uVar5);
iVar7 = piVar6[3];
if (0 < iVar7) {
iVar2 = *piVar6;
iVar9 = 0;
iVar8 = 0;
local_5c = 0;
do {
piVar6 = (int *)(iVar2 + iVar8);
uVar3 = piVar6[0x171];
if ((((((param_3 & 4) == 0) || ((uVar3 & 0xc) != 0)) &&
(((param_3 & 0x80) == 0 || ((uVar3 & 0x10) != 0)))) &&
(((uVar3 & 8) == 0 ||
(((piVar6[0x172] == param_6 && (piVar6[0x173] == param_7)) &&
(((char)piVar6[0x174] == param_4 &&
((*(int *)(param_1 + 0x1cf4) == -1 ||
((*(byte *)(iVar2 + 0x5c4 + *(int *)(param_1 + 0x1cf4) * 0xf6c) & 8) == 0))))))))))
&& (0 < piVar6[5])) {
piVar1 = piVar6 + piVar6[5];
do {
if (((-1 < *piVar6) && (*piVar6 == param_2_00)) && (local_5c < 8)) {
aiStack_3c[local_5c] = iVar9;
local_5c = local_5c + 1;
}
piVar6 = piVar6 + 1;
} while (piVar6 != piVar1);
}
iVar9 = iVar9 + 1;
iVar8 = iVar8 + 0xf6c;
} while (iVar9 != iVar7);
if (local_5c != 0) {
iVar7 = RandomInt(0,local_5c + -1);
RequestWound(param_1,aiStack_3c[iVar7]);
return;
}
}
}
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.