CServerTools::MoveEngineViewTo
0x00680d60 · 197 bytes · __thiscall
_ZN12CServerTools16MoveEngineViewToERK6VectorRK6QAngle
Decompiled
undefined (3 params)
/* CServerTools::MoveEngineViewTo(Vector const&, QAngle const&) */
void __thiscall CServerTools::MoveEngineViewTo(CServerTools *this,Vector *param_1,QAngle *param_2)
{
CBasePlayer *this_00;
float local_28;
float local_24;
float local_20;
this_00 = (CBasePlayer *)UTIL_GetListenServerHost();
if (this_00 != (CBasePlayer *)0x0) {
EnableNoClip(this_00);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this_00);
}
(**(code **)(*(int *)this_00 + 0x234))((Vector *)&local_28,this_00);
local_28 = *(float *)param_1 - (local_28 - *(float *)(this_00 + 0x2e0));
local_24 = *(float *)(param_1 + 4) - (local_24 - *(float *)(this_00 + 0x2e4));
local_20 = *(float *)(param_1 + 8) - (local_20 - *(float *)(this_00 + 0x2e8));
CBaseEntity::SetAbsOrigin((CBaseEntity *)this_00,(Vector *)&local_28);
CBasePlayer::SnapEyeAngles(this_00,param_2);
}
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.