L L4D2node

RemoveTransitioningPlayerRecord

0x008f6100 · 212 bytes · __cdecl

_Z31RemoveTransitioningPlayerRecordi

Decompiled

undefined (1 param)

/* RemoveTransitioningPlayerRecord(int) */

void RemoveTransitioningPlayerRecord(int param_1)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  int iVar5;
  
  iVar5 = 0;
  if (0 < DAT_0100e518) {
    do {
      iVar1 = iVar5 * 4;
      iVar2 = KeyValues::GetInt(*(KeyValues **)(g_SavedPlayers + iVar5 * 4),"userID",0);
      if (param_1 == iVar2) {
        uVar3 = KeyValues::GetString(*(KeyValues **)(g_SavedPlayers + iVar1),"name","");
        uVar4 = KeyValues::GetInt(*(KeyValues **)(g_SavedPlayers + iVar1),"userID",0);
        UTIL_LogPrintf("Marking transitioning player %d (%s) DONE\n",uVar4,uVar3);
        KeyValues::SetInt(*(KeyValues **)(g_SavedPlayers + iVar1),"restoreState",2);
        return;
      }
      iVar5 = iVar5 + 1;
    } while (iVar5 < DAT_0100e518);
  }
  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)