L L4D2node

InstancedScriptedScene

0x00813430 · 956 bytes · __cdecl

_Z22InstancedScriptedSceneP9CBaseFlexPKcP7CHandleI11CBaseEntityEfbP11AI_ResponsebP16IRecipientFilter

Decompiled

undefined (8 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* InstancedScriptedScene(CBaseFlex*, char const*, CHandle<CBaseEntity>*, float, bool, AI_Response*,
   bool, IRecipientFilter*) */

longdouble
InstancedScriptedScene
          (CBaseFlex *param_1,char *param_2,CHandle *param_3,float param_4,bool param_5,
          AI_Response *param_6,bool param_7,IRecipientFilter *param_8)

{
  CBaseEntity *pCVar1;
  float fVar2;
  CBaseEdict *this;
  undefined4 uVar3;
  undefined4 uVar4;
  CBaseEntity CVar5;
  char cVar6;
  CBaseEntity *this_00;
  CBaseEntity *pCVar7;
  undefined4 *puVar8;
  int iVar9;
  int iVar10;
  longdouble lVar11;
  int local_38;
  undefined4 local_24;
  undefined4 local_20;
  
  local_24 = 0;
  local_20 = 0;
  if (___atan2f_finite == 0) {
    local_38 = 0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_24,0,0,0,0,"/data/src/game/server/sceneentity.cpp",0x11c8,
               &InstancedScriptedScene(CBaseFlex*,char_const*,CHandle<CBaseEntity>*,float,bool,AI_Response*,bool,IRecipientFilter*)
                ::tm_fmt,"(%s)%s","Unaccounted","InstancedScriptedScene");
    local_38 = ___atan2f_finite;
  }
  uVar4 = local_20;
  uVar3 = local_24;
  iVar9 = _DAT_0105db00;
  if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 008136e6 to 00813734 has its CatchHandler @ 008138ab */
    iVar10 = ThreadGetCurrentId();
    if (iVar9 == iVar10) {
      if ((char *)*_DAT_0105d15c != "InstancedScriptedScene") {
        _DAT_0105d15c =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xccb002,(char *)0x1,0xbfafa1);
      }
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
  }
                    /* try { // try from 0081350d to 0081367d has its CatchHandler @ 0081381c */
  this_00 = (CBaseEntity *)
            CBaseEntity::CreateNoSpawn
                      ("instanced_scripted_scene",(Vector *)&vec3_origin,(QAngle *)&vec3_angle,
                       (CBaseEntity *)0x0);
  pCVar1 = this_00 + 0x724;
  if (param_1 == (CBaseFlex *)0x0) {
    V_strncpy((char *)pCVar1,param_2,0x80);
  }
  else {
    CBaseEntity::GenderExpandString((CBaseEntity *)param_1,param_2,(char *)pCVar1,0x80);
  }
  pCVar7 = (CBaseEntity *)0x0;
  if ((pCVar1 != (CBaseEntity *)0x0) && (this_00[0x724] != (CBaseEntity)0x0)) {
    pCVar7 = pCVar1;
  }
  *(CBaseEntity **)(this_00 + 0x444) = pCVar7;
  if (param_1 == (CBaseFlex *)0x0) {
    *(undefined4 *)(this_00 + 0x714) = 0xffffffff;
  }
  else {
    puVar8 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
    *(undefined4 *)(this_00 + 0x714) = *puVar8;
  }
  this_00[0x718] = (CBaseEntity)(param_1 != (CBaseFlex *)0x0);
  if (this_00[0x496] != (CBaseEntity)param_7) {
    if (this_00[0x6c] == (CBaseEntity)0x0) {
      this = *(CBaseEdict **)(this_00 + 0x30);
      if (this != (CBaseEdict *)0x0) {
        *(uint *)this = *(uint *)this | 0x101;
        iVar9 = CBaseEdict::GetChangeAccessor(this);
        *(undefined2 *)(iVar9 + 2) = 0;
      }
    }
    else {
      this_00[0x70] = (CBaseEntity)((byte)this_00[0x70] | 1);
    }
    this_00[0x496] = (CBaseEntity)param_7;
  }
  (**(code **)(*(int *)this_00 + 0x3f4))(this_00,param_4);
  DispatchSpawn(this_00,true);
  (**(code **)(*(int *)this_00 + 0x94))(this_00);
  this_00[0x7a4] = (CBaseEntity)param_5;
  if (*(CChoreoScene **)(this_00 + 0x4f0) != (CChoreoScene *)0x0) {
    CChoreoScene::SetBackground(*(CChoreoScene **)(this_00 + 0x4f0),param_5);
  }
  CSceneEntity::SetRecipientFilter((CSceneEntity *)this_00,param_8);
  if (param_6 != (AI_Response *)0x0) {
    lVar11 = (longdouble)AI_Response::GetPreDelay(param_6);
    if ((float)lVar11 != 0.0) {
                    /* try { // try from 008137eb to 00813816 has its CatchHandler @ 0081381c */
      (**(code **)(*(int *)this_00 + 0x3fc))(this_00,(float)lVar11);
    }
  }
  (**(code **)(*(int *)this_00 + 0x354))(this_00);
  if (param_6 != (AI_Response *)0x0) {
    CVar5 = (CBaseEntity)AI_Response::ShouldBreakOnNonIdle(param_6);
    this_00[0x4c0] = CVar5;
  }
  if (param_3 != (CHandle *)0x0) {
    puVar8 = (undefined4 *)(**(code **)(*(int *)this_00 + 0xc))(this_00);
    *(undefined4 *)param_3 = *puVar8;
  }
  lVar11 = (longdouble)(**(code **)(*(int *)this_00 + 0x3d4))(this_00);
  iVar9 = _DAT_0105db00;
  if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
    fVar2 = (float)lVar11;
    iVar10 = ThreadGetCurrentId();
    lVar11 = (longdouble)fVar2;
    if (iVar9 == iVar10) {
      cVar6 = CVProfNode::ExitScope();
      lVar11 = (longdouble)fVar2;
      if (cVar6 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
  }
  if (local_38 != 0) {
    (**(code **)(local_38 + 0x54))(local_38,uVar3,uVar4,0,0,0);
    lVar11 = (longdouble)(float)lVar11;
  }
  return lVar11;
}

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)