CBaseCombatCharacter::CheckTraceHullAttack
0x005f13c0 · 517 bytes · __thiscall
_ZN20CBaseCombatCharacter20CheckTraceHullAttackEfRK6VectorS2_iifb
Decompiled
undefined (8 params)
/* WARNING: Removing unreachable block (ram,0x005f1444) */
/* WARNING: Removing unreachable block (ram,0x005f15c7) */
/* CBaseCombatCharacter::CheckTraceHullAttack(float, Vector const&, Vector const&, int, int, float,
bool) */
void __thiscall
CBaseCombatCharacter::CheckTraceHullAttack
(CBaseCombatCharacter *this,float param_1,Vector *param_2,Vector *param_3,int param_4,
int param_5,float param_6,bool param_7)
{
float fVar1;
int iVar2;
float fVar3;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
AngleVectors((QAngle *)(this + 0x37c),(Vector *)&local_40);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_34 = *(float *)(this + 0x2e0);
local_30 = *(float *)(this + 0x2e4);
local_2c = *(float *)(this + 0x2e8);
if ((AllocTempVector()::s_vecTemp == '\0') &&
(iVar2 = __cxa_guard_acquire(&AllocTempVector()::s_vecTemp), iVar2 != 0)) {
__cxa_guard_release(&AllocTempVector()::s_vecTemp);
}
if ((AllocTempVector()::s_nIndex == '\0') &&
(iVar2 = __cxa_guard_acquire(&AllocTempVector()::s_nIndex), iVar2 != 0)) {
AllocTempVector()::s_nIndex = 0;
__cxa_guard_release(&AllocTempVector()::s_nIndex);
}
AllocTempVector()::s_nIndex = AllocTempVector()::s_nIndex + 0x10001 & 0x7f;
LOCK();
UNLOCK();
iVar2 = AllocTempVector()::s_nIndex * 0xc;
*(float *)(AllocTempVector()::s_vecTemp + iVar2) =
*(float *)(this + 0x1a8) - *(float *)(this + 0x19c);
*(float *)(AllocTempVector()::s_vecTemp + iVar2 + 4) =
*(float *)(this + 0x1ac) - *(float *)(this + 0x1a0);
fVar3 = *(float *)(this + 0x1b0);
fVar1 = *(float *)(this + 0x1a4);
*(float *)(AllocTempVector()::s_vecTemp + iVar2 + 8) = fVar3 - fVar1;
fVar3 = (fVar3 - fVar1) * 0.5;
if (fVar3 < *(float *)(param_3 + 8)) {
fVar3 = *(float *)(param_3 + 8) + 1.0;
}
local_2c = fVar3 + local_2c;
local_24 = param_1 * local_3c + local_30;
local_28 = param_1 * local_40 + local_34;
local_20 = param_1 * local_38 + local_2c;
(**(code **)(*(int *)this + 0x4ec))
(this,&local_34,&local_28,param_2,param_3,param_4,param_5,param_6,param_7);
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.