L L4D2node

CPointCommentaryNode::StartCommentary

0x00649f20 · 708 bytes · __thiscall

_ZN20CPointCommentaryNode15StartCommentaryEv

Decompiled

undefined (1 param)

/* CPointCommentaryNode::StartCommentary() */

void __thiscall CPointCommentaryNode::StartCommentary(CPointCommentaryNode *this)

{
  CBaseEdict *pCVar1;
  uint uVar2;
  int *piVar3;
  int iVar4;
  undefined4 *puVar5;
  undefined *puVar6;
  float fVar7;
  undefined1 local_24 [20];
  
  piVar3 = (int *)GetCommentaryPlayer();
  if (piVar3 != (int *)0x0) {
    if (this[0x1488] != (CPointCommentaryNode)0x1) {
      if (this[0x6c] == (CPointCommentaryNode)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CPointCommentaryNode)((byte)this[0x70] | 1);
      }
      this[0x1488] = (CPointCommentaryNode)0x1;
    }
    iVar4 = gpGlobals;
    fVar7 = *(float *)(gpGlobals + 0xc);
    if (fVar7 != *(float *)(this + 0x90)) {
      if (this[0x6c] == (CPointCommentaryNode)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar4 + 2) = 0;
          iVar4 = gpGlobals;
        }
      }
      else {
        this[0x70] = (CPointCommentaryNode)((byte)this[0x70] | 1);
      }
      *(float *)(this + 0x90) = fVar7;
      fVar7 = *(float *)(iVar4 + 0xc);
    }
    *(float *)(this + 0x8c) = fVar7;
    if (*(int *)(this + 0x458) != 1) {
      if (this[0x6c] == (CPointCommentaryNode)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CPointCommentaryNode)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + 0x458) = 1;
    }
    COutputEvent::FireOutput
              ((COutputEvent *)(this + 0x1458),(CBaseEntity *)this,(CBaseEntity *)this,0.0);
    if (*(int *)(this + 0x13f4) != 0) {
      g_CommentarySystem[0x14] = 1;
      (**(code **)(*engine + 0x9c))(engine,piVar3[0xc],"%s",*(int *)(this + 0x13f4));
      (**(code **)(*engine + 0x9c))(engine,piVar3[0xc],"commentary_cvarsnotchanging\n");
    }
    fVar7 = *(float *)(gpGlobals + 0xc);
    if (fVar7 != *(float *)(this + 0x148c)) {
      if (this[0x6c] == (CPointCommentaryNode)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CPointCommentaryNode)((byte)this[0x70] | 1);
      }
      *(float *)(this + 0x148c) = fVar7;
    }
    uVar2 = *(uint *)(this + 0x1408);
    if (((((uVar2 != 0xffffffff) &&
          (puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) ||
       (((uVar2 = *(uint *)(this + 0x1414), uVar2 != 0xffffffff &&
         (puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
        ((*(uint *)(puVar6 + 8) == uVar2 >> 0xc && (*(int *)(puVar6 + 4) != 0)))))) {
      puVar5 = (undefined4 *)(**(code **)(*piVar3 + 0x238))(piVar3);
      *(undefined4 *)(this + 0x1430) = *puVar5;
      *(undefined4 *)(this + 0x1434) = puVar5[1];
      *(undefined4 *)(this + 0x1438) = puVar5[2];
      CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)UpdateViewThink);
      return;
    }
  }
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)