CCSPlayer::State_Enter_OBSERVER_MODE
0x006510c0 · 259 bytes · __thiscall
_ZN9CCSPlayer25State_Enter_OBSERVER_MODEEv
Decompiled
undefined (1 param)
/* CCSPlayer::State_Enter_OBSERVER_MODE() */
void __thiscall CCSPlayer::State_Enter_OBSERVER_MODE(CCSPlayer *this)
{
int *piVar1;
char cVar2;
char *__nptr;
long lVar3;
int iVar4;
long lVar5;
(**(code **)(*(int *)this + 0x5c4))(this,1);
if (*(int *)(mp_fadetoblack._28_4_ + 0x30) == 0) {
lVar5 = *(long *)(this + 0x1d78);
cVar2 = (**(code **)(*(int *)this + 0x5a8))(this);
if (cVar2 == '\0') {
iVar4 = 0;
if (*(int *)(this + 0x30) != 0) {
iVar4 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
__nptr = (char *)(**(code **)(*engine + 0xe0))(engine,iVar4,"cl_ideal_spec_mode");
if (__nptr != (char *)0x0) {
lVar3 = strtol(__nptr,(char **)0x0,10);
lVar5 = 4;
if ((3 < lVar3) && (lVar5 = 6, lVar3 < 7)) {
lVar5 = lVar3;
}
}
}
(**(code **)(*(int *)this + 0x638))(this,lVar5);
}
else {
(**(code **)(*(int *)this + 0x638))(this,3);
}
(**(code **)(*(int *)this + 0x81c))(this);
piVar1 = *(int **)(this + 0x238);
if (piVar1 != (int *)0x0) {
(**(code **)(*piVar1 + 0x68))(piVar1);
}
/* WARNING: Could not recover jumptable at 0x0065112d. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)this + 0x834))();
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.