CMoveableCamera::FollowTarget
0x00a06ac0 · 407 bytes · __thiscall
_ZN15CMoveableCamera12FollowTargetEv
Decompiled
undefined (1 param)
/* CMoveableCamera::FollowTarget() */
void __thiscall CMoveableCamera::FollowTarget(CMoveableCamera *this)
{
float fVar1;
float fVar2;
float fVar3;
uint uVar4;
CBaseEntity *this_00;
undefined *puVar5;
float local_7c;
float local_78;
float local_74;
float local_70;
float local_6c;
float local_68;
float local_64;
float local_60;
float local_5c;
float local_58;
float local_54;
float local_50;
Quaternion local_4c [16];
Quaternion local_3c [16];
Quaternion local_2c [28];
uVar4 = *(uint *)(this + 0x464);
if ((((uVar4 == 0xffffffff) ||
(puVar5 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar4 >> 0xc)) ||
(this_00 = *(CBaseEntity **)(puVar5 + 4), this_00 == (CBaseEntity *)0x0)) {
(**(code **)(*(int *)this + 0x328))(this);
}
else {
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
local_7c = *(float *)(this_00 + 0x37c);
local_6c = *(float *)(this + 0x454);
local_70 = *(float *)(this + 0x450);
local_78 = *(float *)(this_00 + 0x380);
local_74 = *(float *)(this_00 + 900);
local_68 = *(float *)(this + 0x458);
fVar1 = *(float *)(gpGlobals + 0xc);
fVar2 = *(float *)(this + 0x45c);
fVar3 = *(float *)(this + 0x460);
if (((local_7c != local_70) || (local_78 != local_6c)) ||
(local_64 = local_70, local_60 = local_6c, local_5c = local_68, local_74 != local_68)) {
AngleQuaternion((QAngle *)&local_70,local_4c);
AngleQuaternion((QAngle *)&local_7c,local_3c);
QuaternionSlerp(local_4c,local_3c,(fVar1 - fVar2) / fVar3,local_2c);
QuaternionAngles(local_2c,(QAngle *)&local_58);
local_64 = local_58;
local_60 = local_54;
local_5c = local_50;
}
CBaseEntity::SetAbsAngles((CBaseEntity *)this,(QAngle *)&local_64);
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
Move(this);
}
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.