CPointDevShotCamera::DevShotThink_Setup
0x007da1e0 · 459 bytes · __thiscall
_ZN19CPointDevShotCamera18DevShotThink_SetupEv
Decompiled
undefined (1 param)
/* CPointDevShotCamera::DevShotThink_Setup() */
void __thiscall CPointDevShotCamera::DevShotThink_Setup(CPointDevShotCamera *this)
{
char cVar1;
CBasePlayer *this_00;
int iVar2;
CBaseEntity *this_01;
undefined1 local_14 [8];
if (*(int *)(gpGlobals + 0x14) < 2) {
this_00 = (CBasePlayer *)UTIL_GetLocalPlayer();
}
else {
cVar1 = (**(code **)(*engine + 8))(engine);
if (cVar1 != '\0') {
return;
}
this_00 = (CBasePlayer *)UTIL_GetListenServerHost();
}
if (this_00 != (CBasePlayer *)0x0) {
(**(code **)(*engine + 0x9c))(engine,*(undefined4 *)(this_00 + 0x30),"developer 0");
(**(code **)(*engine + 0x9c))(engine,*(undefined4 *)(this_00 + 0x30),"cl_drawhud 0");
(**(code **)(*engine + 0x9c))(engine,*(undefined4 *)(this_00 + 0x30),"sv_cheats 1");
(**(code **)(*engine + 0x9c))(engine,*(undefined4 *)(this_00 + 0x30),&DAT_00cbe2d1);
(**(code **)(*engine + 0x9c))(engine,*(undefined4 *)(this_00 + 0x30),"notarget");
CCollisionProperty::SetSolidFlags
((CCollisionProperty *)(this_00 + 0x194),(uint)(*(ushort *)(this_00 + 0x1b4) | 4));
CBasePlayer::EnableControl(this_00,false);
CBasePlayer::SetViewEntity(this_00,(CBaseEntity *)this);
CBasePlayer::SetFOV(this_00,(CBaseEntity *)this,*(int *)(this + 0x444),0.0,0);
iVar2 = CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this_00);
if (iVar2 != 0) {
this_01 = (CBaseEntity *)
CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this_00);
CBaseEntity::AddEffects(this_01,0x20);
}
CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)DevShotThink_TakeShot);
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
}
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.