CTerrorPlayer::DoBloodEffect
0x00995ef0 · 1026 bytes · __thiscall
_ZN13CTerrorPlayer13DoBloodEffectEfRK15CTakeDamageInfoRK6VectorP10CGameTrace
Decompiled
undefined (5 params)
/* CTerrorPlayer::DoBloodEffect(float, CTakeDamageInfo const&, Vector const&, CGameTrace*) */
void __thiscall
CTerrorPlayer::DoBloodEffect
(CTerrorPlayer *this,float param_1,CTakeDamageInfo *param_2,Vector *param_3,
CGameTrace *param_4)
{
int iVar1;
undefined4 uVar2;
undefined4 uVar3;
undefined4 uVar4;
uint local_40;
uint local_3c;
uint local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
iVar1 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar1 == 4) {
return;
}
local_40 = *(uint *)param_3 ^ 0x80000000;
local_3c = *(uint *)(param_3 + 4) ^ 0x80000000;
local_38 = *(uint *)(param_3 + 8) ^ 0x80000000;
VectorAngles((Vector *)&local_40,(QAngle *)&local_34);
if (((byte)this[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
}
local_28 = *(undefined4 *)(this + 0x274);
local_24 = *(undefined4 *)(this + 0x278);
local_20 = *(undefined4 *)(this + 0x27c);
iVar1 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar1 == 2) {
DispatchParticleEffect
("blood_impact_survivor_01",*(undefined4 *)(param_4 + 0xc),
*(undefined4 *)(param_4 + 0x10),*(undefined4 *)(param_4 + 0x14),local_28,local_24,
local_20,local_34,local_30,local_2c,0,0,0xffffffff);
return;
}
iVar1 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar1 != 3) {
return;
}
iVar1 = (**(code **)(*(int *)this + 0x544))(this);
if (iVar1 == 2) {
CBaseEntity::TraceBleed((CBaseEntity *)this,param_1,param_3,param_4,*(int *)(param_2 + 0x48));
DispatchParticleEffect
("blood_impact_boomer_01",*(undefined4 *)(param_4 + 0xc),
*(undefined4 *)(param_4 + 0x10),*(undefined4 *)(param_4 + 0x14),local_28,local_24,
local_20,local_34,local_30,local_2c,0,0,0xffffffff);
return;
}
if (iVar1 < 3) {
if (iVar1 == 1) {
DispatchParticleEffect
("blood_impact_smoker_01",*(undefined4 *)(param_4 + 0xc),
*(undefined4 *)(param_4 + 0x10),*(undefined4 *)(param_4 + 0x14),local_28,local_24,
local_20,local_34,local_30,local_2c,0,0,0xffffffff);
return;
}
}
else {
if (iVar1 == 3) {
CBaseEntity::TraceBleed((CBaseEntity *)this,param_1,param_3,param_4,*(int *)(param_2 + 0x48));
DispatchParticleEffect
("blood_impact_hunter_01",*(undefined4 *)(param_4 + 0xc),
*(undefined4 *)(param_4 + 0x10),*(undefined4 *)(param_4 + 0x14),local_28,local_24,
local_20,local_34,local_30,local_2c,0,0,0xffffffff);
return;
}
if (iVar1 == 8) {
CBaseEntity::TraceBleed((CBaseEntity *)this,param_1,param_3,param_4,*(int *)(param_2 + 0x48));
uVar2 = *(undefined4 *)(param_4 + 0xc);
uVar3 = *(undefined4 *)(param_4 + 0x10);
uVar4 = *(undefined4 *)(param_4 + 0x14);
if (*(int *)(ZombieHulkHasSpecialBlood._28_4_ + 0x30) != 0) {
DispatchParticleEffect
("blood_impact_tank_01",uVar2,uVar3,uVar4,local_28,local_24,local_20,local_34,
local_30,local_2c,0,0,0xffffffff);
return;
}
goto LAB_009961dc;
}
}
CBaseEntity::TraceBleed((CBaseEntity *)this,param_1,param_3,param_4,*(int *)(param_2 + 0x48));
uVar2 = *(undefined4 *)(param_4 + 0xc);
uVar3 = *(undefined4 *)(param_4 + 0x10);
uVar4 = *(undefined4 *)(param_4 + 0x14);
LAB_009961dc:
DispatchParticleEffect
("blood_impact_infected_01",uVar2,uVar3,uVar4,local_28,local_24,local_20,local_34,
local_30,local_2c,0,0,0xffffffff);
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.