L L4D2node

CBaseGameStats::Event_Credits

0x00461f20 · 217 bytes · __thiscall

_ZN14CBaseGameStats13Event_CreditsEv

Decompiled

undefined (1 param)

/* CBaseGameStats::Event_Credits() */

void __thiscall CBaseGameStats::Event_Credits(CBaseGameStats *this)

{
  int iVar1;
  undefined *puVar2;
  char cVar3;
  float local_10;
  
  StatsLog(this,"CBaseGameStats::Event_Credits\n");
  local_10 = 0.0;
  if (CBGSDriver[0x130f] != '\0') {
    local_10 = *gpGlobals - (float)CBGSDriver._4888_4_;
    if (local_10 < 0.0) {
      local_10 = 0.0;
      Warning("EVENT_CREDITS with negative elapsed time (rt %f starttime %f)\n",(double)*gpGlobals,
              (double)(float)CBGSDriver._4888_4_);
      iVar1 = *(int *)(gamestats + 4);
      goto joined_r0x00461f6f;
    }
  }
  iVar1 = *(int *)(gamestats + 4);
joined_r0x00461f6f:
  if ((iVar1 == 0) &&
     (cVar3 = (**(code **)(*(int *)gamestats + 0x48))(gamestats), puVar2 = gamestats, cVar3 != '\0')
     ) {
    *(int *)(gamestats + 4) = (int)((float)*(int *)(gamestats + 0xc) + local_10);
    (**(code **)(*(int *)puVar2 + 0xa4))(puVar2,0);
    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)