L L4D2node

CBasePlayer::UpdateGeigerCounter

0x007a9c50 · 275 bytes · __thiscall

_ZN11CBasePlayer19UpdateGeigerCounterEv

Decompiled

undefined (1 param)

/* CBasePlayer::UpdateGeigerCounter() */

void __thiscall CBasePlayer::UpdateGeigerCounter(CBasePlayer *this)

{
  char cVar1;
  int iVar2;
  uint uVar3;
  float fVar4;
  undefined **local_3c [11];
  
  if (*(float *)(this + 0x1f3c) <= *(float *)(gpGlobals + 0xc)) {
    uVar3 = 0xff;
    fVar4 = *(float *)(this + 0x1f38) * 0.25;
    *(float *)(this + 0x1f3c) = *(float *)(gpGlobals + 0xc) + 0.25;
    if (fVar4 <= 255.0) {
      if (fVar4 <= 0.0) {
        fVar4 = 0.0;
      }
      uVar3 = (int)fVar4 & 0xff;
    }
    cVar1 = (**(code **)(*(int *)this + 0x4fc))(this);
    if ((cVar1 != '\0') && (uVar3 = uVar3 * 4, 0xff < uVar3)) {
      uVar3 = 0xff;
    }
    if (*(uint *)(this + 8000) != uVar3) {
      *(uint *)(this + 8000) = uVar3;
      CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
      local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
                    /* try { // try from 007a9cf7 to 007a9cfb has its CatchHandler @ 007a9d63 */
      CRecipientFilter::AddRecipient((CRecipientFilter *)local_3c,this);
                    /* try { // try from 007a9cff to 007a9d20 has its CatchHandler @ 007a9d75 */
      CRecipientFilter::MakeReliable((CRecipientFilter *)local_3c);
      UserMessageBegin((IRecipientFilter *)local_3c,"Geiger");
      MessageWriteByte(uVar3);
      MessageEnd();
      local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
      CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
    }
    iVar2 = (**(code **)(*random_valve + 8))(random_valve,0,3);
    if (iVar2 == 0) {
      *(undefined4 *)(this + 0x1f38) = 0x447a0000;
    }
  }
  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)