L L4D2node

CAchievementMgr::PreRestoreSavedGame

0x003e9680 · 101 bytes · __thiscall

_ZN15CAchievementMgr19PreRestoreSavedGameEv

Decompiled

undefined (1 param)

/* CAchievementMgr::PreRestoreSavedGame() */

void __thiscall CAchievementMgr::PreRestoreSavedGame(CAchievementMgr *this)

{
  int *piVar1;
  ushort uVar2;
  CUtlRBTree<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,CBaseAchievement*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
  *this_00;
  int iVar3;
  
  iVar3 = 0;
  this_00 = (CUtlRBTree<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,CBaseAchievement*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
             *)(this + 0x38);
  do {
    for (uVar2 = CUtlRBTree<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,CBaseAchievement*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                 ::FirstInorder(this_00); uVar2 != 0xffff;
        uVar2 = CUtlRBTree<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,CBaseAchievement*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                ::NextInorder(this_00,uVar2)) {
      piVar1 = *(int **)((uint)uVar2 * 0x10 + *(int *)(this_00 + 4) + 0xc);
      (**(code **)(*piVar1 + 0x44))(piVar1);
    }
    iVar3 = iVar3 + 1;
    this_00 = this_00 + 0x1c;
  } while (iVar3 != 2);
  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)