UTIL_BloodDrips
0x00581240 · 270 bytes · __cdecl
_Z15UTIL_BloodDripsRK6VectorS1_ii
Decompiled
undefined (4 params)
/* UTIL_BloodDrips(Vector const&, Vector const&, int, int) */
void UTIL_BloodDrips(Vector *param_1,Vector *param_2,int param_3,int param_4)
{
char cVar1;
int iVar2;
longdouble lVar3;
cVar1 = UTIL_ShouldShowBlood(param_3);
if (((cVar1 != '\0') && (param_3 != -1)) && (param_4 != 0)) {
cVar1 = (**(code **)(*g_pGameRules + 0x88))(g_pGameRules);
if (cVar1 != '\0') {
param_4 = param_4 * 5;
}
if (param_3 != 3) {
iVar2 = 0xff;
if (param_4 < 0x100) {
iVar2 = param_4;
}
UTIL_BloodImpact(param_1,param_2,param_3,iVar2);
return;
}
(**(code **)(*(int *)g_pEffects + 0x10))(g_pEffects,param_1,1,1,0);
lVar3 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0,0x40000000);
if (1.0 <= (float)lVar3) {
iVar2 = (**(code **)(*random_valve + 8))(random_valve,10,0xf);
UTIL_Smoke(param_1,(float)iVar2,10.0);
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.