CBaseEntity::ComputeTracerStartPosition
0x0040ef00 · 386 bytes · __thiscall
_ZN11CBaseEntity26ComputeTracerStartPositionERK6VectorPS0_
Decompiled
undefined (3 params)
/* CBaseEntity::ComputeTracerStartPosition(Vector const&, Vector*) */
void __thiscall
CBaseEntity::ComputeTracerStartPosition(CBaseEntity *this,Vector *param_1,Vector *param_2)
{
float fVar1;
float fVar2;
char cVar3;
CBaseCombatCharacter *this_00;
CBaseAnimating *this_01;
CBasePlayer *this_02;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
cVar3 = (**(code **)(*g_pGameRules + 0x88))(g_pGameRules);
if (cVar3 == '\0') {
cVar3 = (**(code **)(*(int *)this + 0x16c))(this);
if (cVar3 != '\0') {
cVar3 = (**(code **)(*(int *)this + 0x16c))(this);
this_02 = (CBasePlayer *)0x0;
if (cVar3 != '\0') {
this_02 = (CBasePlayer *)this;
}
CBasePlayer::EyeVectors(this_02,(Vector *)&local_34,(Vector *)&local_28,(Vector *)0x0);
fVar1 = *(float *)(param_1 + 8);
fVar2 = *(float *)param_1;
*(float *)(param_2 + 4) = local_30 * 16.0 + local_24 + local_24 + *(float *)(param_1 + 4);
*(float *)(param_2 + 8) = fVar1 + -4.0 + local_2c * 16.0 + local_20 + local_20;
*(float *)param_2 = local_34 * 16.0 + local_28 + local_28 + fVar2;
return;
}
*(undefined4 *)param_2 = *(undefined4 *)param_1;
*(undefined4 *)(param_2 + 4) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(param_2 + 8) = *(undefined4 *)(param_1 + 8);
this_00 = (CBaseCombatCharacter *)(**(code **)(*(int *)this + 0x144))(this);
if (this_00 != (CBaseCombatCharacter *)0x0) {
this_01 = (CBaseAnimating *)CBaseCombatCharacter::GetActiveWeapon(this_00);
if (this_01 != (CBaseAnimating *)0x0) {
cVar3 = CBaseAnimating::GetAttachment(this_01,1,(Vector *)&local_34,(QAngle *)&local_28);
if (cVar3 != '\0') {
*(float *)param_2 = local_34;
*(float *)(param_2 + 4) = local_30;
*(float *)(param_2 + 8) = local_2c;
}
}
}
}
else {
*(undefined4 *)param_2 = 0x4479c000;
*(undefined4 *)(param_2 + 4) = 0x4479c000;
*(undefined4 *)(param_2 + 8) = 0x4479c000;
}
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.