CPointCommentaryNode::FinishCommentary
0x0064a880 · 690 bytes · __thiscall
_ZN20CPointCommentaryNode16FinishCommentaryEb
Decompiled
undefined (2 params)
/* CPointCommentaryNode::FinishCommentary(bool) */
void __thiscall CPointCommentaryNode::FinishCommentary(CPointCommentaryNode *this,bool param_1)
{
undefined4 uVar1;
CBaseEdict *pCVar2;
int iVar3;
uint uVar4;
undefined *puVar5;
CBaseEntity *this_00;
CBaseEntity *this_01;
undefined1 local_24 [20];
iVar3 = GetCommentaryPlayer();
if (iVar3 == 0) {
return;
}
if (*(int *)(this + 0x13f8) != 0) {
g_CommentarySystem[0x14] = 1;
(**(code **)(*engine + 0x9c))(engine,*(undefined4 *)(iVar3 + 0x30),"%s",*(int *)(this + 0x13f8))
;
(**(code **)(*engine + 0x9c))
(engine,*(undefined4 *)(iVar3 + 0x30),"commentary_cvarsnotchanging\n");
}
*(undefined4 *)(this + 0x1420) = *(undefined4 *)(gpGlobals + 0xc);
if ((((param_1) && (uVar4 = *(uint *)(this + 0x1418), uVar4 != 0xffffffff)) &&
(puVar5 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar5 + 8) == uVar4 >> 0xc && (*(int *)(puVar5 + 4) != 0)))) {
if (this[0x1488] != (CPointCommentaryNode)0x0) {
if (this[0x6c] == (CPointCommentaryNode)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 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) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CPointCommentaryNode)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x468) = 0x3f800000;
}
uVar4 = *(uint *)(this + 0x1418);
this_00 = (CBaseEntity *)0x0;
if (((uVar4 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar4 >> 0xc)) {
this_00 = *(CBaseEntity **)(puVar5 + 4);
}
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
uVar4 = *(uint *)(this + 0x1418);
}
puVar5 = g_pEntityList;
*(undefined4 *)(this + 0x1424) = *(undefined4 *)(this_00 + 0x2e0);
*(undefined4 *)(this + 0x1428) = *(undefined4 *)(this_00 + 0x2e4);
this_01 = (CBaseEntity *)0x0;
*(undefined4 *)(this + 0x142c) = *(undefined4 *)(this_00 + 0x2e8);
if (((uVar4 != 0xffffffff) &&
(puVar5 = puVar5 + (uVar4 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar4 >> 0xc)) {
this_01 = *(CBaseEntity **)(puVar5 + 4);
}
if (((byte)this_01[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_01);
}
*(undefined4 *)(this + 0x143c) = *(undefined4 *)(this_01 + 0x37c);
*(undefined4 *)(this + 0x1440) = *(undefined4 *)(this_01 + 0x380);
uVar1 = *(undefined4 *)(this_01 + 900);
this[0x1448] = (CPointCommentaryNode)0x1;
*(undefined4 *)(this + 0x1444) = uVar1;
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)UpdateViewPostThink);
return;
}
CleanupPostCommentary(this);
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.