CCSPlayer::SetupVisibility
0x0065ed50 · 388 bytes · __thiscall
_ZN9CCSPlayer15SetupVisibilityEP11CBaseEntityPhi
Decompiled
undefined (4 params)
/* CCSPlayer::SetupVisibility(CBaseEntity*, unsigned char*, int) */
void __thiscall
CCSPlayer::SetupVisibility(CCSPlayer *this,CBaseEntity *param_1,uchar *param_2,int param_3)
{
float fVar1;
int iVar2;
int iVar3;
undefined4 uVar4;
int iVar5;
int iVar6;
undefined1 *puVar7;
CBaseEntity *pCVar8;
double local_3c;
double local_34;
pCVar8 = param_1;
CBasePlayer::SetupVisibility((CBaseEntity *)this,(uchar *)param_1,(int)param_2);
if (*(int *)(VisDebug._28_4_ + 0x30) == 0) {
return;
}
if (param_1 == (CBaseEntity *)0x0) {
param_1 = (CBaseEntity *)this;
}
if (((byte)param_1[0x14d] & 8) == 0) {
local_34 = (double)*(float *)(param_1 + 0x2e8);
}
else {
CBaseEntity::CalcAbsolutePosition(param_1);
local_34 = (double)*(float *)(param_1 + 0x2e8);
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(param_1);
local_3c = (double)*(float *)(param_1 + 0x2e4);
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(param_1);
}
goto LAB_0065edbb;
}
}
local_3c = (double)*(float *)(param_1 + 0x2e4);
LAB_0065edbb:
fVar1 = *(float *)(param_1 + 0x2e0);
iVar2 = *(int *)(param_1 + 0x30);
puVar7 = &DAT_00d539c2;
if (*(undefined1 **)(param_1 + 0x7c) != (undefined1 *)0x0) {
puVar7 = *(undefined1 **)(param_1 + 0x7c);
}
if (iVar2 == 0) {
iVar5 = 0;
}
else {
iVar5 = iVar2 - *(int *)(gpGlobals + 0x58) >> 4;
}
uVar4 = (**(code **)(*(int *)this + 0xb8))(this,pCVar8,param_2,param_3);
iVar3 = *(int *)(this + 0x30);
if (iVar3 == 0) {
iVar6 = 0;
}
else {
iVar6 = iVar3 - *(int *)(gpGlobals + 0x58) >> 4;
}
Msg("%d(0x%8.8X)(%s): view ent is %d(0x%8.8X)(%s) @ %f,%f,%f\n",iVar6,iVar3,uVar4,iVar5,iVar2,
puVar7,(double)fVar1,local_3c,local_34);
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.