CCSPlayer::DoBloodEffect
0x00650f30 · 389 bytes · __thiscall
_ZN9CCSPlayer13DoBloodEffectEfRK15CTakeDamageInfoRK6VectorP10CGameTrace
Decompiled
undefined (5 params)
/* CCSPlayer::DoBloodEffect(float, CTakeDamageInfo const&, Vector const&, CGameTrace*) */
void __thiscall
CCSPlayer::DoBloodEffect
(CCSPlayer *this,float param_1,CTakeDamageInfo *param_2,Vector *param_3,
CGameTrace *param_4)
{
int iVar1;
undefined4 local_7c;
undefined4 local_78;
undefined4 local_74;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
uint local_64;
uint local_60;
uint local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
int local_48;
undefined4 local_44;
float local_40;
undefined4 local_3c;
undefined4 local_38;
undefined2 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined1 local_24;
undefined1 local_23;
CBaseEntity::TraceBleed((CBaseEntity *)this,param_1,param_3,param_4,*(int *)(param_2 + 0x48));
local_7c = *(undefined4 *)(param_4 + 0xc);
local_70 = 0;
local_78 = *(undefined4 *)(param_4 + 0x10);
local_6c = 0;
local_74 = *(undefined4 *)(param_4 + 0x14);
local_68 = 0;
local_60 = *(uint *)(param_3 + 4) ^ 0x80000000;
local_5c = *(uint *)(param_3 + 8) ^ 0x80000000;
local_58 = 0;
local_64 = *(uint *)param_3 ^ 0x80000000;
local_54 = 0;
local_50 = 0;
local_4c = 0;
local_44 = 0x3f800000;
local_38 = 0;
local_34 = 0;
local_3c = 0;
local_30 = 0;
local_2c = 0;
local_28 = 0;
local_24 = 0;
local_23 = 0;
if ((*(int *)(param_4 + 0x4c) == 0) ||
(iVar1 = *(int *)(*(int *)(param_4 + 0x4c) + 0x30), iVar1 == 0)) {
local_48 = 0;
}
else {
local_48 = iVar1 - *(int *)(gpGlobals + 0x58) >> 4;
}
local_40 = param_1;
if (0 < *(int *)(this + 0x1f70)) {
local_40 = param_1 * 0.5;
}
if ((*(int *)(param_4 + 0x44) == 1) && (this[0x23e1] != (CCSPlayer)0x0)) {
local_40 = local_40 * 0.5;
}
DispatchEffect("csblood",(CEffectData *)&local_7c);
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.