L L4D2node

CBasePlayer::Restore

0x007bf820 · 554 bytes · __thiscall

_ZN11CBasePlayer7RestoreER8IRestore

Decompiled

undefined (2 params)

/* CBasePlayer::Restore(IRestore&) */

undefined4 __thiscall CBasePlayer::Restore(CBasePlayer *this,IRestore *param_1)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  undefined4 local_28;
  undefined4 local_24;
  float local_20;
  
  iVar1 = CBaseCombatCharacter::Restore((CBaseCombatCharacter *)this,param_1);
  uVar3 = 0;
  if (iVar1 != 0) {
    if (*(int *)(*(int *)(gpGlobals + 0x2c) + 0x51c) == 0) {
      Msg("No Landmark:%s\n",*(int *)(gpGlobals + 0x2c) + 0x520);
      iVar1 = (**(code **)(*(int *)this + 0x698))(this);
      local_28 = *(undefined4 *)(iVar1 + 0x39c);
      local_24 = *(undefined4 *)(iVar1 + 0x3a0);
      local_20 = *(float *)(iVar1 + 0x3a4) + 1.0;
      CBaseEntity::SetLocalOrigin((CBaseEntity *)this,(Vector *)&local_28);
      CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)(iVar1 + 0x3a8));
    }
    local_28 = *(undefined4 *)(this + 0x1c84);
    local_20 = 0.0;
    local_24 = *(undefined4 *)(this + 0x1c88);
    CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)&local_28);
    *(undefined4 *)(this + 0x1c94) = 1;
    *(undefined4 *)(this + 0x1c84) = local_28;
    *(undefined4 *)(this + 0x1c88) = local_24;
    *(float *)(this + 0x1c8c) = local_20;
    CBaseCombatCharacter::SetBloodColor((CBaseCombatCharacter *)this,0);
    *(uint *)(this + 0x1d20) = *(uint *)(this + 0x1d20) & 0xffffffef;
    if (((byte)this[0x150] & 2) == 0) {
      if (this[0x1a90] != (CBasePlayer)0x0) {
        (**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1a90);
        this[0x1a90] = (CBasePlayer)0x0;
      }
      iVar1 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
      iVar2 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
      UTIL_SetSize((CBaseEntity *)this,(Vector *)(iVar2 + 0xc),(Vector *)(iVar1 + 0x18));
    }
    else {
      FixPlayerCrouchStuck(this);
      iVar1 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
      iVar2 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
      UTIL_SetSize((CBaseEntity *)this,(Vector *)(iVar2 + 0x24),(Vector *)(iVar1 + 0x30));
      if (this[0x1a90] != (CBasePlayer)0x1) {
        (**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1a90);
        this[0x1a90] = (CBasePlayer)0x1;
      }
    }
    (**(code **)(*(int *)this + 0x744))(this,this + 0x2e0,this + 0x274);
    uVar3 = 1;
  }
  return uVar3;
}

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)