L L4D2node

CSceneManager::RemoveActorFromScenes

0x00813c80 · 365 bytes · __thiscall

_ZN13CSceneManager21RemoveActorFromScenesEP9CBaseFlexbbPKc

Decompiled

undefined (5 params)

/* CSceneManager::RemoveActorFromScenes(CBaseFlex*, bool, bool, char const*) */

void __thiscall
CSceneManager::RemoveActorFromScenes
          (CSceneManager *this,CBaseFlex *param_1,bool param_2,bool param_3,char *param_4)

{
  int iVar1;
  uint uVar2;
  CSceneEntity *this_00;
  char cVar3;
  int iVar4;
  char *pcVar5;
  undefined *puVar6;
  undefined1 *puVar7;
  int iVar8;
  
  iVar8 = 0;
  iVar1 = *(int *)(this + 0x44c);
  if (0 < iVar1) {
    do {
      while ((((((uVar2 = *(uint *)(*(int *)(this + 0x440) + iVar8 * 4), uVar2 == 0xffffffff ||
                 (puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc
                 )) || (*(uint *)(puVar6 + 8) != uVar2 >> 0xc)) ||
               (this_00 = *(CSceneEntity **)(puVar6 + 4), this_00 == (CSceneEntity *)0x0)) ||
              (((param_2 &&
                (iVar4 = __dynamic_cast(this_00,&CSceneEntity::typeinfo,
                                        &CInstancedSceneEntity::typeinfo,0), iVar4 == 0)) ||
               ((param_3 && (this_00[0x4c0] == (CSceneEntity)0x0)))))) ||
             (cVar3 = CSceneEntity::InvolvesActor(this_00,(CBaseEntity *)param_1), cVar3 == '\0')))
      {
LAB_00813cb8:
        iVar8 = iVar8 + 1;
        if (iVar8 == iVar1) {
          return;
        }
      }
      if ((param_4 == (char *)0x0) || (*param_4 == '\0')) {
        if (param_1 != (CBaseFlex *)0x0) goto LAB_00813d65;
LAB_00813df2:
        pcVar5 = "NULL";
      }
      else {
        pcVar5 = *(char **)(this_00 + 0x444);
        if (pcVar5 == (char *)0x0) {
          pcVar5 = "";
        }
        iVar4 = _V_strcmp(param_4,pcVar5);
        if (iVar4 != 0) goto LAB_00813cb8;
        if (param_1 == (CBaseFlex *)0x0) goto LAB_00813df2;
LAB_00813d65:
        pcVar5 = (char *)CBaseEntity::GetDebugName((CBaseEntity *)param_1);
      }
      puVar7 = *(undefined1 **)(this_00 + 0x444);
      if (puVar7 == (undefined1 *)0x0) {
        puVar7 = &DAT_00d539c2;
      }
      iVar8 = iVar8 + 1;
      Scene_Printf("%s : removed for \'%s\'\n",puVar7,pcVar5);
      (**(code **)(*(int *)this_00 + 0x360))(this_00);
    } while (iVar8 != iVar1);
  }
  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)