CTerrorPlayer::GoAwayFromKeyboard
0x009b22f0 · 468 bytes · __thiscall
_ZN13CTerrorPlayer18GoAwayFromKeyboardEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::GoAwayFromKeyboard() */
void __thiscall CTerrorPlayer::GoAwayFromKeyboard(CTerrorPlayer *this)
{
int iVar1;
code *pcVar2;
int iVar3;
SurvivorBot *this_00;
KeyValues *this_01;
int *piVar4;
undefined4 uVar5;
iVar1 = *(int *)(this + 0x2ba0);
(**(code **)(*(int *)this + 0x8cc))(this,1,8,0);
iVar3 = GetPlayerByCharacter(iVar1);
if (iVar3 != 0) {
this_00 = (SurvivorBot *)__dynamic_cast(iVar3,&typeinfo,&SurvivorBot::typeinfo,0);
if (this_00 != (SurvivorBot *)0x0) {
SurvivorBot::SetHumanSpectator(this_00,this);
(**(code **)(*(int *)this + 0x64c))(this);
iVar3 = (**(code **)(*(int *)this + 0x648))(this);
if (iVar3 == 6) {
this_00 = (SurvivorBot *)0x5;
(**(code **)(*(int *)this + 0x644))(this);
}
this_01 = KeyValues::operator_new((KeyValues *)0x2c,(uint)this_00);
/* try { // try from 009b23b7 to 009b23bb has its CatchHandler @ 009b24c8 */
KeyValues::KeyValues(this_01,"data",(IKeyValuesSystem *)0x0,false);
KeyValues::SetInt(this_01,"character",iVar1);
(**(code **)(*(int *)this + 0x580))(this,"takeover_survivor_bar",1,this_01);
KeyValues::deleteThis();
}
}
piVar4 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"player_afk",0,0);
if (piVar4 != (int *)0x0) {
pcVar2 = *(code **)(*piVar4 + 0x30);
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
(*pcVar2)(piVar4,"player",uVar5);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar4,0);
}
if (*(float *)(this + 0x3fd8) != -1.0) {
(**(code **)(*(int *)(this + 0x3fd0) + 4))(this + 0x3fd0,this + 0x3fd8);
*(undefined4 *)(this + 0x3fd8) = 0xbf800000;
}
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.