CCSPlayer::UpdateRadar
0x006521b0 · 663 bytes · __thiscall
_ZN9CCSPlayer11UpdateRadarEv
Decompiled
undefined (1 param)
/* CCSPlayer::UpdateRadar() */
void __thiscall CCSPlayer::UpdateRadar(CCSPlayer *this)
{
int iVar1;
code *pcVar2;
char cVar3;
CBaseEntity *this_00;
int iVar4;
int iVar5;
int iVar6;
longdouble lVar7;
uint local_40;
undefined **local_3c [11];
if ((*(float *)(this + 0x2430) + 1.0 <= *(float *)(gpGlobals + 0xc)) &&
(cVar3 = (**(code **)(*(int *)this + 0x778))(this), cVar3 == '\0')) {
local_40 = 0;
*(undefined4 *)(this + 0x2430) = *(undefined4 *)(gpGlobals + 0xc);
pcVar2 = *(code **)(*engine + 0xa8);
(**(code **)(*(int *)this + 0x234))(local_3c,this);
(*pcVar2)(engine,0,local_3c,&local_40);
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
/* try { // try from 00652288 to 0065228c has its CatchHandler @ 00652451 */
CRecipientFilter::AddRecipient((CRecipientFilter *)local_3c,(CBasePlayer *)this);
/* try { // try from 0065229b to 00652439 has its CatchHandler @ 00652466 */
UserMessageBegin((IRecipientFilter *)local_3c,"UpdateRadar");
iVar6 = 0;
do {
iVar1 = iVar6 + 1;
this_00 = (CBaseEntity *)UTIL_PlayerByIndex(iVar1);
if ((this_00 != (CBaseEntity *)0x0) &&
(cVar3 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar3 != '\0')) {
iVar4 = CBaseEntity::GetTeamNumber(this_00);
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((((local_40 & 1 << ((byte)iVar6 & 0x1f)) == 0) || (iVar4 != iVar5)) &&
((((this != (CCSPlayer *)this_00 &&
(cVar3 = (**(code **)(*(int *)this_00 + 300))(this_00), cVar3 != '\0')) &&
(((byte)this_00[0x1d20] & 8) == 0)) && (*(int *)(this_00 + 0x1f6c) != 2)))) {
MessageWriteByte(iVar1);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
MessageWriteSBitLong((int)(*(float *)(this_00 + 0x2e0) * 0.25),0xd);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
MessageWriteSBitLong((int)(*(float *)(this_00 + 0x2e4) * 0.25),0xd);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
MessageWriteSBitLong((int)(*(float *)(this_00 + 0x2e8) * 0.25),0xd);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
lVar7 = (longdouble)AngleNormalize(*(float *)(this_00 + 0x380));
MessageWriteSBitLong((int)lVar7,9);
}
}
iVar6 = iVar1;
} while (iVar1 != 0x20);
MessageWriteByte(0);
MessageEnd();
local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
}
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.