L L4D2node

CMultiplayRules::GoToIntermission

0x0046ed70 · 227 bytes · __thiscall

_ZN15CMultiplayRules16GoToIntermissionEv

Decompiled

undefined (1 param)

/* CMultiplayRules::GoToIntermission() */

void __thiscall CMultiplayRules::GoToIntermission(CMultiplayRules *this)

{
  char cVar1;
  int *piVar2;
  int iVar3;
  longdouble lVar4;
  float fVar5;
  
  if (g_fGameOver == '\0') {
    g_fGameOver = '\x01';
    fVar5 = (float)*(int *)(mp_chattime._28_4_ + 0x30);
    if (*(int *)(tv_delaymapchange._28_4_ + 0x30) != 0) {
      piVar2 = (int *)HLTVDirector();
      cVar1 = (**(code **)(*piVar2 + 0x2c))(piVar2);
      if (cVar1 != '\0') {
        piVar2 = (int *)HLTVDirector();
        lVar4 = (longdouble)(**(code **)(*piVar2 + 0x28))(piVar2);
        if (fVar5 <= (float)lVar4) {
          piVar2 = (int *)HLTVDirector();
          lVar4 = (longdouble)(**(code **)(*piVar2 + 0x28))(piVar2);
          fVar5 = (float)lVar4;
        }
      }
    }
    iVar3 = 1;
    *(float *)(this + 0x20) = fVar5 + *(float *)(gpGlobals + 0xc);
    do {
      piVar2 = (int *)UTIL_PlayerByIndex(iVar3);
      if (piVar2 != (int *)0x0) {
        (**(code **)(*piVar2 + 0x580))(piVar2,"scores",1,0);
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 != 0x21);
  }
  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)