CPointCommentaryNode::CleanupPostCommentary
0x0064a210 · 768 bytes · __thiscall
_ZN20CPointCommentaryNode21CleanupPostCommentaryEv
Decompiled
undefined (1 param)
/* CPointCommentaryNode::CleanupPostCommentary() */
void __thiscall CPointCommentaryNode::CleanupPostCommentary(CPointCommentaryNode *this)
{
CBaseEdict *pCVar1;
uint uVar2;
CBasePlayer *this_00;
uint uVar3;
CBaseEntity *pCVar4;
uint uVar5;
int iVar6;
undefined4 *puVar7;
undefined *puVar8;
undefined1 local_24 [20];
this_00 = (CBasePlayer *)GetCommentaryPlayer();
if (this_00 == (CBasePlayer *)0x0) {
return;
}
uVar5 = *(uint *)(this + 0x140c);
if (uVar5 == 0xffffffff) {
LAB_0064a26e:
pCVar4 = (CBaseEntity *)0x0;
}
else {
uVar3 = uVar5 & 0xfff;
puVar7 = (undefined4 *)(g_pEntityList + uVar3 * 0x10 + 4);
if (puVar7 == (undefined4 *)0x0) goto LAB_0064a26e;
if (((((*(uint *)(g_pEntityList + uVar3 * 0x10 + 8) == uVar5 >> 0xc) &&
(*(int *)(g_pEntityList + uVar3 * 0x10 + 4) != 0)) &&
(uVar2 = *(uint *)(this_00 + 0x2088), uVar2 != 0xffffffff)) &&
((puVar8 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc &&
(*(uint *)(puVar8 + 8) == uVar2 >> 0xc)))) &&
(*(int *)(g_pEntityList + uVar3 * 0x10 + 4) == *(int *)(puVar8 + 4))) {
CBasePlayer::SetViewEntity(this_00,(CBaseEntity *)0x0);
uVar5 = *(uint *)(this + 0x140c);
if ((uVar5 == 0xffffffff) ||
(puVar7 = (undefined4 *)(g_pEntityList + (uVar5 & 0xfff) * 0x10 + 4),
puVar7 == (undefined4 *)0x0)) goto LAB_0064a26e;
}
if (puVar7[1] != uVar5 >> 0xc) goto LAB_0064a26e;
pCVar4 = (CBaseEntity *)*puVar7;
}
UTIL_Remove(pCVar4);
uVar5 = *(uint *)(this + 0x1418);
if (uVar5 != 0xffffffff) {
uVar3 = uVar5 & 0xfff;
puVar7 = (undefined4 *)(g_pEntityList + uVar3 * 0x10 + 4);
if (puVar7 != (undefined4 *)0x0) {
if (*(uint *)(g_pEntityList + uVar3 * 0x10 + 8) == uVar5 >> 0xc) {
if ((((*(int *)(g_pEntityList + uVar3 * 0x10 + 4) == 0) ||
(uVar2 = *(uint *)(this_00 + 0x2088), uVar2 == 0xffffffff)) ||
(puVar8 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar8 + 8) != uVar2 >> 0xc ||
(*(int *)(g_pEntityList + uVar3 * 0x10 + 4) != *(int *)(puVar8 + 4))))) {
if (*(uint *)(g_pEntityList + uVar3 * 0x10 + 8) == uVar5 >> 0xc) goto LAB_0064a4c0;
}
else {
CBasePlayer::SetViewEntity(this_00,(CBaseEntity *)0x0);
uVar5 = *(uint *)(this + 0x1418);
if ((uVar5 != 0xffffffff) &&
(puVar7 = (undefined4 *)(g_pEntityList + (uVar5 & 0xfff) * 0x10 + 4),
puVar7 != (undefined4 *)0x0)) goto LAB_0064a2b0;
}
}
else {
LAB_0064a2b0:
if (puVar7[1] == uVar5 >> 0xc) {
LAB_0064a4c0:
pCVar4 = (CBaseEntity *)*puVar7;
goto LAB_0064a2c2;
}
}
}
}
pCVar4 = (CBaseEntity *)0x0;
LAB_0064a2c2:
UTIL_Remove(pCVar4);
if (this[0x1488] != (CPointCommentaryNode)0x0) {
if (this[0x6c] == (CPointCommentaryNode)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CPointCommentaryNode)((byte)this[0x70] | 1);
}
this[0x1488] = (CPointCommentaryNode)0x0;
}
if (*(float *)(this + 0x468) != 1.0) {
if (this[0x6c] == (CPointCommentaryNode)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CPointCommentaryNode)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x468) = 0x3f800000;
}
this[0x141e] = (CPointCommentaryNode)0x0;
*(undefined4 *)(this + 0x1420) = 0;
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)0x0);
CEventQueue::CancelEvents((CEventQueue *)g_EventQueue,(CBaseEntity *)this);
COutputEvent::FireOutput
((COutputEvent *)(this + 0x1470),(CBaseEntity *)this,(CBaseEntity *)this,0.0);
g_CommentarySystem._92_4_ = 0xffffffff;
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.