L L4D2node

CInfoDirector::InputRefreshInitialSpawnPositions

0x00884be0 · 357 bytes · __cdecl

_ZN13CInfoDirector33InputRefreshInitialSpawnPositionsER11inputdata_t

Decompiled

undefined (1 param)

/* CInfoDirector::InputRefreshInitialSpawnPositions(inputdata_t&) */

void CInfoDirector::InputRefreshInitialSpawnPositions(inputdata_t *param_1)

{
  int *piVar1;
  CTerrorPlayer *this;
  int iVar2;
  undefined1 local_60 [12];
  int local_54 [5];
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  int local_30 [8];
  
  local_54[0] = 0;
  local_54[1] = 0;
  local_54[2] = 0;
  local_54[3] = 0;
  local_54[4] = 0;
                    /* try { // try from 00884c12 to 00884c79 has its CatchHandler @ 00884d45 */
  ForEachSurvivor<SurvivorCollector>((SurvivorCollector *)local_54);
  if (0 < local_54[3]) {
    iVar2 = 0;
    do {
      piVar1 = *(int **)(local_54[0] + iVar2 * 4);
      if (piVar1 != (int *)0x0) {
        GetPlayerSpawnPosition(8,local_60,(PlayerCollector *)&local_40,0);
        (**(code **)(*piVar1 + 0x1dc))(piVar1,local_60,(PlayerCollector *)&local_40,0);
        (**(code **)(*piVar1 + 0x534))(piVar1);
      }
      iVar2 = iVar2 + 1;
    } while (iVar2 < local_54[3]);
  }
  local_30[0] = 0;
  local_30[1] = 0;
  local_30[2] = 0;
  local_30[3] = 0;
  local_30[4] = 0;
  local_40 = 3;
  local_3c = 4;
  local_38 = 3;
  local_34 = 9;
                    /* try { // try from 00884cc4 to 00884cf1 has its CatchHandler @ 00884d5a */
  ForEachPlayer<PlayerCollector>((PlayerCollector *)&local_40);
  iVar2 = 0;
  if (0 < local_30[3]) {
    do {
      this = *(CTerrorPlayer **)(local_30[0] + iVar2 * 4);
      if (this != (CTerrorPlayer *)0x0) {
        CTerrorPlayer::WarpGhostToInitialPosition(this,true);
      }
      iVar2 = iVar2 + 1;
    } while (iVar2 < local_30[3]);
  }
  local_30[3] = 0;
  CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
  local_30[4] = local_30[0];
  CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
  local_54[3] = 0;
  CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_54);
  local_54[4] = local_54[0];
  CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_54);
  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)