L L4D2node

CTerrorPlayer::UpdateBloodSpatters

0x00a00a90 · 492 bytes · __thiscall

_ZN13CTerrorPlayer19UpdateBloodSpattersEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::UpdateBloodSpatters() */

void __thiscall CTerrorPlayer::UpdateBloodSpatters(CTerrorPlayer *this)

{
  CBasePlayer *pCVar1;
  int iVar2;
  CTerrorPlayer *pCVar3;
  int iVar4;
  CRecipientFilter local_3c [44];
  
  if ((((*(int *)(this + 0x2b90) != 0) || (*(int *)(this + 0x2b94) != 0)) ||
      (*(int *)(this + 0x2b98) != 0)) || (*(int *)(this + 0x2b9c) != 0)) {
    CRecipientFilter::CRecipientFilter(local_3c);
                    /* try { // try from 00a00ac5 to 00a00c70 has its CatchHandler @ 00a00c80 */
    CRecipientFilter::MakeReliable(local_3c);
    CRecipientFilter::AddRecipient(local_3c,(CBasePlayer *)this);
    if (0 < *(int *)(gpGlobals + 0x14)) {
      iVar4 = 1;
      do {
        while (((pCVar1 = (CBasePlayer *)UTIL_PlayerByIndex(iVar4), pCVar1 == (CBasePlayer *)0x0 ||
                (this == (CTerrorPlayer *)pCVar1)) ||
               ((iVar2 = (**(code **)(*(int *)pCVar1 + 0x648))(pCVar1), iVar2 != 4 ||
                (pCVar3 = (CTerrorPlayer *)(**(code **)(*(int *)pCVar1 + 0x654))(pCVar1),
                this != pCVar3))))) {
          iVar4 = iVar4 + 1;
          if (*(int *)(gpGlobals + 0x14) < iVar4) goto LAB_00a00b50;
        }
        CRecipientFilter::AddRecipient(local_3c,pCVar1);
        iVar4 = iVar4 + 1;
      } while (iVar4 <= *(int *)(gpGlobals + 0x14));
    }
LAB_00a00b50:
    if (*(int *)(this + 0x2b90) != 0) {
      UserMessageBegin((IRecipientFilter *)local_3c,"Splatter");
      MessageWriteByte(*(int *)(this + 0x2b90));
      MessageEnd();
      *(undefined4 *)(this + 0x2b90) = 0;
    }
    if (*(int *)(this + 0x2b94) != 0) {
      UserMessageBegin((IRecipientFilter *)local_3c,"MeleeSlashSplatter");
      MessageWriteByte(*(int *)(this + 0x2b94));
      MessageEnd();
      *(undefined4 *)(this + 0x2b94) = 0;
    }
    if (*(int *)(this + 0x2b98) != 0) {
      UserMessageBegin((IRecipientFilter *)local_3c,"MeleeClubSplatter");
      MessageWriteByte(*(int *)(this + 0x2b98));
      MessageEnd();
      *(undefined4 *)(this + 0x2b98) = 0;
    }
    if (*(int *)(this + 0x2b9c) != 0) {
      UserMessageBegin((IRecipientFilter *)local_3c,"MudSplatter");
      MessageWriteByte(*(int *)(this + 0x2b9c));
      MessageEnd();
      *(undefined4 *)(this + 0x2b9c) = 0;
    }
    CRecipientFilter::~CRecipientFilter(local_3c);
  }
  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)