L L4D2node

CDirectorVersusMode::UpdateCampaignScores

0x008c3c80 · 124 bytes · __thiscall

_ZN19CDirectorVersusMode20UpdateCampaignScoresEv

Decompiled

undefined (1 param)

/* CDirectorVersusMode::UpdateCampaignScores() */

void __thiscall CDirectorVersusMode::UpdateCampaignScores(CDirectorVersusMode *this)

{
  int iVar1;
  
  if (g_pGameRules != (CTerrorGameRules *)0x0) {
    iVar1 = CTerrorGameRules::GetTeamScore(g_pGameRules,1,false);
    *(int *)(this + 8) = *(int *)(this + 8) + iVar1;
    iVar1 = CTerrorGameRules::GetTeamScore(g_pGameRules,2,false);
    *(int *)(this + 0xc) = *(int *)(this + 0xc) + iVar1;
    CTerrorGameRules::UpdateChapterScores(g_pGameRules);
    CTerrorGameRules::SetCampaignScores(g_pGameRules,*(int *)(this + 8),*(int *)(this + 0xc));
  }
  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)