CBaseMountedWeapon::GetStandPosition
0x00551b00 · 372 bytes · __thiscall
_ZNK18CBaseMountedWeapon16GetStandPositionEP6Vector
Decompiled
undefined (2 params)
/* CBaseMountedWeapon::GetStandPosition(Vector*) const */
void __thiscall CBaseMountedWeapon::GetStandPosition(CBaseMountedWeapon *this,Vector *param_1)
{
float fVar1;
float fVar2;
uint uVar3;
int *piVar4;
char cVar5;
undefined *puVar6;
longdouble lVar7;
float fVar8;
float local_34;
float local_30;
float local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
if (param_1 != (Vector *)0x0) {
local_28 = vec3_angle;
local_24 = DAT_01053d40;
local_20 = DAT_01053d44;
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_24 = *(undefined4 *)(this + 0x380);
AngleVectors((QAngle *)&local_28,(Vector *)&local_34);
fVar8 = *(float *)(sb_minigun_distance._28_4_ + 0x2c);
uVar3 = *(uint *)(this + 0x15cc);
if ((((uVar3 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar3 >> 0xc)) &&
(piVar4 = *(int **)(puVar6 + 4), piVar4 != (int *)0x0)) {
cVar5 = (**(code **)(*piVar4 + 0x16c))(piVar4);
if (cVar5 != '\0') {
lVar7 = (longdouble)GetCharacterScale(piVar4[0xae8]);
fVar8 = fVar8 * (float)lVar7;
}
}
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
fVar1 = *(float *)(this + 0x2e8);
fVar2 = *(float *)(this + 0x2e0);
*(float *)(param_1 + 4) = *(float *)(this + 0x2e4) - local_30 * fVar8;
*(float *)(param_1 + 8) = fVar1 - fVar8 * local_2c;
*(float *)param_1 = fVar2 - local_34 * fVar8;
}
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.