L L4D2node

CAchievementSaveRestoreBlockHandler::ReadRestoreHeaders

0x003ed140 · 83 bytes · __thiscall

_ZN35CAchievementSaveRestoreBlockHandler18ReadRestoreHeadersEP8IRestore

Decompiled

undefined (2 params)

/* CAchievementSaveRestoreBlockHandler::ReadRestoreHeaders(IRestore*) */

void __thiscall
CAchievementSaveRestoreBlockHandler::ReadRestoreHeaders
          (CAchievementSaveRestoreBlockHandler *this,IRestore *param_1)

{
  short local_e [5];
  
  (**(code **)(*(int *)param_1 + 0x34))(param_1,local_e,1,0);
  if (local_e[0] != ACHIEVEMENT_SAVE_RESTORE_VERSION) {
    this[4] = (CAchievementSaveRestoreBlockHandler)0x0;
    return;
  }
  this[4] = (CAchievementSaveRestoreBlockHandler)(*(uint *)(gpGlobals + 0x48) < 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)