L L4D2node

CBaseTeamObjectiveResource::Spawn

0x0083a270 · 2053 bytes · __thiscall

_ZN26CBaseTeamObjectiveResource5SpawnEv

Decompiled

undefined (1 param)

/* CBaseTeamObjectiveResource::Spawn() */

void __thiscall CBaseTeamObjectiveResource::Spawn(CBaseTeamObjectiveResource *this)

{
  CBaseTeamObjectiveResource *pCVar1;
  CBaseTeamObjectiveResource CVar2;
  CBaseEdict *pCVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  int iVar6;
  CBaseTeamObjectiveResource *pCVar7;
  CBaseTeamObjectiveResource *pCVar8;
  CBaseTeamObjectiveResource *local_58;
  CBaseTeamObjectiveResource *local_54;
  int local_4c;
  CBaseTeamObjectiveResource *local_48;
  CBaseTeamObjectiveResource *local_3c;
  CBaseTeamObjectiveResource *local_38;
  undefined1 local_34 [20];
  undefined4 local_20 [4];
  
  if (*(int *)(this + 0x448) != 0) {
    if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
      *(undefined4 *)(this + 0x448) = 0;
    }
    else {
      this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      *(undefined4 *)(this + 0x448) = 0;
    }
  }
  pCVar1 = this + 0xd34;
  local_54 = this;
  local_48 = this;
  local_58 = this;
  local_4c = 0;
  do {
    iVar6 = memcmp(local_58 + 0x454,&vec3_origin,0xc);
    if (iVar6 != 0) {
      if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
        pCVar3 = *(CBaseEdict **)(this + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar6 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      }
      uVar5 = DAT_01053d50;
      uVar4 = DAT_01053d4c;
      *(undefined4 *)(local_58 + 0x454) = vec3_origin;
      *(undefined4 *)(local_58 + 0x458) = uVar4;
      *(undefined4 *)(local_58 + 0x45c) = uVar5;
    }
    local_20[0] = 1;
    iVar6 = memcmp(local_48 + 0x4b4,local_20,4);
    if (iVar6 == 0) {
      CVar2 = local_54[0xedc];
    }
    else {
      if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
        pCVar3 = *(CBaseEdict **)(this + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar6 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + local_4c * 4 + 0x4b4) = 1;
      CVar2 = local_54[0xedc];
    }
    if (CVar2 != (CBaseTeamObjectiveResource)0x0) {
      if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
        pCVar3 = *(CBaseEdict **)(this + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar6 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      }
      this[local_4c + 0xedc] = (CBaseTeamObjectiveResource)0x0;
    }
    local_20[0] = 0;
    iVar6 = memcmp(local_48 + 0xee4,local_20,4);
    if (iVar6 != 0) {
      if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
        pCVar3 = *(CBaseEdict **)(this + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar6 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + local_4c * 4 + 0xee4) = 0;
    }
    local_20[0] = 0;
    iVar6 = memcmp(local_48 + 0xe9c,local_20,4);
    if (iVar6 != 0) {
      if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
        pCVar3 = *(CBaseEdict **)(this + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar6 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + local_4c * 4 + 0xe9c) = 0;
    }
    local_20[0] = 0;
    iVar6 = memcmp(local_48 + 0xebc,local_20,4);
    if (iVar6 != 0) {
      if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
        pCVar3 = *(CBaseEdict **)(this + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar6 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + local_4c * 4 + 0xebc) = 0;
    }
    if (local_54[0xd34] != (CBaseTeamObjectiveResource)0x1) {
      if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
        pCVar3 = *(CBaseEdict **)(this + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar6 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      }
      pCVar1[local_4c] = (CBaseTeamObjectiveResource)0x1;
    }
    local_20[0] = 0;
    iVar6 = memcmp(local_48 + 0xd3c,local_20,4);
    if (iVar6 != 0) {
      if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
        pCVar3 = *(CBaseEdict **)(this + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar6 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + local_4c * 4 + 0xd3c) = 0;
    }
    local_20[0] = 0;
    iVar6 = memcmp(local_48 + 0x4d4,local_20,4);
    if (iVar6 != 0) {
      if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
        pCVar3 = *(CBaseEdict **)(this + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar6 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + local_4c * 4 + 0x4d4) = 0;
    }
    local_38 = local_58 + 0x900;
    local_3c = local_54;
    pCVar8 = local_48 + 0x4f4;
    do {
      local_20[0] = 0;
      iVar6 = memcmp(pCVar8,local_20,4);
      if (iVar6 != 0) {
        if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
          pCVar3 = *(CBaseEdict **)(this + 0x30);
          if (pCVar3 != (CBaseEdict *)0x0) {
            *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
            iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
            *(undefined2 *)(iVar6 + 2) = 0;
          }
        }
        else {
          this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
        }
        *(undefined4 *)pCVar8 = 0;
      }
      local_20[0] = 0;
      iVar6 = memcmp(pCVar8 + 0x100,local_20,4);
      if (iVar6 != 0) {
        if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
          pCVar3 = *(CBaseEdict **)(this + 0x30);
          if (pCVar3 != (CBaseEdict *)0x0) {
            *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
            iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
            *(undefined2 *)(iVar6 + 2) = 0;
          }
        }
        else {
          this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
        }
        *(undefined4 *)(pCVar8 + 0x100) = 0;
      }
      local_20[0] = 0;
      iVar6 = memcmp(pCVar8 + 0x200,local_20,4);
      if (iVar6 != 0) {
        if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
          pCVar3 = *(CBaseEdict **)(this + 0x30);
          if (pCVar3 != (CBaseEdict *)0x0) {
            *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
            iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
            *(undefined2 *)(iVar6 + 2) = 0;
          }
        }
        else {
          this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
        }
        *(undefined4 *)(pCVar8 + 0x200) = 0;
      }
      local_20[0] = 0;
      iVar6 = memcmp(pCVar8 + 0x300,local_20,4);
      if (iVar6 != 0) {
        if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
          pCVar3 = *(CBaseEdict **)(this + 0x30);
          if (pCVar3 != (CBaseEdict *)0x0) {
            *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
            iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
            *(undefined2 *)(iVar6 + 2) = 0;
          }
        }
        else {
          this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
        }
        *(undefined4 *)(pCVar8 + 0x300) = 0;
      }
      local_20[0] = 0;
      iVar6 = memcmp(pCVar8 + 0x8a8,local_20,4);
      if (iVar6 != 0) {
        if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
          pCVar3 = *(CBaseEdict **)(this + 0x30);
          if (pCVar3 != (CBaseEdict *)0x0) {
            *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
            iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
            *(undefined2 *)(iVar6 + 2) = 0;
          }
        }
        else {
          this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
        }
        *(undefined4 *)(pCVar8 + 0x8a8) = 0;
      }
      pCVar7 = local_38 + -0xc;
      do {
        local_20[0] = 0xffffffff;
        iVar6 = memcmp(pCVar7,local_20,4);
        if (iVar6 != 0) {
          if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
            pCVar3 = *(CBaseEdict **)(this + 0x30);
            if (pCVar3 != (CBaseEdict *)0x0) {
              *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
              iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
              *(undefined2 *)(iVar6 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
          }
          *(undefined4 *)pCVar7 = 0xffffffff;
        }
        pCVar7 = pCVar7 + 4;
      } while (pCVar7 != local_38);
      if (local_3c[0xbf4] != (CBaseTeamObjectiveResource)0x0) {
        if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
          pCVar3 = *(CBaseEdict **)(this + 0x30);
          if (pCVar3 != (CBaseEdict *)0x0) {
            *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
            iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
            *(undefined2 *)(iVar6 + 2) = 0;
          }
        }
        else {
          this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
        }
        local_3c[0xbf4] = (CBaseTeamObjectiveResource)0x0;
      }
      local_38 = local_38 + 0x60;
      pCVar8 = pCVar8 + 0x20;
      local_3c = local_3c + 8;
    } while (local_38 != local_58 + 0xc00);
    local_4c = local_4c + 1;
    local_58 = local_58 + 0xc;
    local_48 = local_48 + 4;
    local_54 = local_54 + 1;
  } while (local_4c != 8);
  pCVar8 = this + 0xcb4;
  do {
    while( true ) {
      local_20[0] = 0xffffffff;
      iVar6 = memcmp(pCVar8,local_20,4);
      if (iVar6 == 0) break;
      if (this[0x6c] == (CBaseTeamObjectiveResource)0x0) {
        pCVar3 = *(CBaseEdict **)(this + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar6 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseTeamObjectiveResource)((byte)this[0x70] | 1);
      }
      pCVar7 = pCVar8 + 4;
      *(undefined4 *)pCVar8 = 0xffffffff;
      pCVar8 = pCVar7;
      if (pCVar7 == pCVar1) goto LAB_0083a606;
    }
    pCVar8 = pCVar8 + 4;
  } while (pCVar8 != pCVar1);
LAB_0083a606:
  CBaseEntity::ThinkSet((_func_void *)local_34,(float)this,(char *)0x325);
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 3.0,(char *)0x0);
  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)