L L4D2node

CTeam::RemoveSpawnpoint

0x00839130 · 137 bytes · __thiscall

_ZN5CTeam16RemoveSpawnpointEP15CTeamSpawnPoint

Decompiled

undefined (2 params)

/* CTeam::RemoveSpawnpoint(CTeamSpawnPoint*) */

void __thiscall CTeam::RemoveSpawnpoint(CTeam *this,CTeamSpawnPoint *param_1)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int *piVar5;
  
  iVar3 = *(int *)(this + 0x44c);
  if (iVar3 < 1) {
    return;
  }
  piVar1 = *(int **)(this + 0x440);
  iVar4 = 0;
  piVar5 = piVar1;
  if ((CTeamSpawnPoint *)*piVar1 == param_1) {
    iVar4 = 0;
  }
  else {
    do {
      piVar5 = piVar5 + 1;
      iVar4 = iVar4 + 1;
      if (iVar4 == iVar3) {
        return;
      }
    } while ((CTeamSpawnPoint *)*piVar5 != param_1);
  }
  iVar2 = (iVar3 - iVar4) + -1;
  if (0 < iVar2) {
    _V_memmove(piVar5,piVar1 + iVar4 + 1,iVar2 * 4);
    iVar3 = *(int *)(this + 0x44c);
  }
  *(int *)(this + 0x44c) = iVar3 + -1;
  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)