CCSPlayer::PreThink
0x0065ffa0 · 573 bytes · __thiscall
_ZN9CCSPlayer8PreThinkEv
Decompiled
undefined (1 param)
/* CCSPlayer::PreThink() */
void __thiscall CCSPlayer::PreThink(CCSPlayer *this)
{
float fVar1;
float fVar2;
code *pcVar3;
char cVar4;
float *pfVar5;
int iVar6;
char *pcVar7;
undefined4 uVar8;
CBasePlayer::PreThink((CBasePlayer *)this);
if (*(int *)(this + 0x1cbc) != *(int *)(this + 0x1cb0)) {
*(undefined4 *)(this + 0x2400) = *(undefined4 *)(gpGlobals + 0xc);
}
cVar4 = (**(code **)(*(int *)this + 300))(this);
if (((cVar4 != '\0') || (iVar6 = (**(code **)(*(int *)this + 0x648))(this), iVar6 == 6)) ||
(iVar6 = (**(code **)(*(int *)this + 0x648))(this), iVar6 == 5)) {
pfVar5 = (float *)(**(code **)(*(int *)this + 0x238))(this);
fVar1 = pfVar5[1];
fVar2 = pfVar5[2];
if (((*pfVar5 != *(float *)(this + 0x2404)) || (fVar1 != *(float *)(this + 0x2408))) ||
(fVar2 != *(float *)(this + 0x240c))) {
uVar8 = *(undefined4 *)(gpGlobals + 0xc);
*(float *)(this + 0x2404) = *pfVar5;
*(float *)(this + 0x2408) = fVar1;
*(undefined4 *)(this + 0x2400) = uVar8;
*(float *)(this + 0x240c) = fVar2;
}
}
if (g_fGameOver == '\0') {
(**(code **)(*(int *)this + 0x81c))(this);
State_PreThink(this);
if (*(CHintMessageQueue **)(this + 0x238c) != (CHintMessageQueue *)0x0) {
CHintMessageQueue::Update(*(CHintMessageQueue **)(this + 0x238c));
}
uVar8 = mp_autokick._28_4_;
*(undefined4 *)(this + 0x287c) = vec3_origin;
*(undefined4 *)(this + 0x2880) = DAT_01053d4c;
*(undefined4 *)(this + 0x2884) = DAT_01053d50;
if (((*(int *)(uVar8 + 0x30) != 0) &&
(cVar4 = (**(code **)(*(int *)this + 0x778))(this), cVar4 == '\0')) &&
((this[0x1ca4] == (CCSPlayer)0x0 &&
(((this[0x218c] == (CCSPlayer)0x0 && (*(int *)(nav_edit._28_4_ + 0x30) == 0)) &&
(*(float *)(this + 0x2400) + 300.0 < *(float *)(gpGlobals + 0xc))))))) {
pcVar7 = (char *)(**(code **)(*(int *)this + 0xb8))(this);
UTIL_ClientPrintAll(2,"#Game_idle_kick",pcVar7,(char *)0x0,(char *)0x0,(char *)0x0);
pcVar3 = *(code **)(*engine + 0x94);
uVar8 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
uVar8 = UTIL_VarArgs("kickid %d\n",uVar8);
(*pcVar3)(engine,uVar8);
*(undefined4 *)(this + 0x2400) = *(undefined4 *)(gpGlobals + 0xc);
}
}
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.