CBeam::BeamDamage
0x00427cd0 · 406 bytes · __thiscall
_ZN5CBeam10BeamDamageEP10CGameTrace
Decompiled
undefined (2 params)
/* CBeam::BeamDamage(CGameTrace*) */
void __thiscall CBeam::BeamDamage(CBeam *this,CGameTrace *param_1)
{
CTakeDamageInfo *this_00;
char cVar1;
int iVar2;
char *pcVar3;
CTakeDamageInfo *this_01;
CGameTrace *pCVar4;
CGameTrace *pCVar5;
float local_88;
float local_84;
float local_80;
CTakeDamageInfo local_7c [108];
RelinkBeam(this);
if ((*(float *)(param_1 + 0x2c) != 1.0) &&
(this_00 = *(CTakeDamageInfo **)(param_1 + 0x4c), this_00 != (CTakeDamageInfo *)0x0)) {
ClearMultiDamage();
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_88 = *(float *)(param_1 + 0xc) - *(float *)(this + 0x2e0);
local_84 = *(float *)(param_1 + 0x10) - *(float *)(this + 0x2e4);
local_80 = *(float *)(param_1 + 0x14) - *(float *)(this + 0x2e8);
VectorNormalize((Vector *)&local_88);
iVar2 = 0x4000000;
if ((*(int *)(this + 0x4e0) != 0) && (iVar2 = 0x400, 0 < *(int *)(this + 0x4e0))) {
iVar2 = 0x4000100;
}
this_01 = local_7c;
CTakeDamageInfo::CTakeDamageInfo
(this_01,(CBaseEntity *)this,(CBaseEntity *)this,
(*(float *)(gpGlobals + 0xc) - *(float *)(this + 0x448)) * *(float *)(this + 0x44c),
iVar2,0);
CalculateMeleeDamageForce(this_01,(Vector *)&local_88,(Vector *)(param_1 + 0xc),1.0);
pCVar4 = (CGameTrace *)&local_88;
pCVar5 = param_1;
CBaseEntity::DispatchTraceAttack(this_00,(Vector *)this_01,pCVar4);
ApplyMultiDamage();
if (((byte)this[0x148] & 0x40) != 0) {
cVar1 = CBaseEntity::IsBSPModel((CBaseEntity *)this_00);
if (cVar1 != '\0') {
pcVar3 = (char *)(**(code **)(*(int *)this + 0x324))(this,this_01,pCVar4,pCVar5);
UTIL_DecalTrace(param_1,pcVar3);
}
}
}
*(undefined4 *)(this + 0x448) = *(undefined4 *)(gpGlobals + 0xc);
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.