L L4D2node

StopScriptedScene

0x00813aa0 · 152 bytes · __cdecl

_Z17StopScriptedSceneP9CBaseFlex7CHandleI11CBaseEntityE

Decompiled

undefined (2 params)

/* StopScriptedScene(CBaseFlex*, CHandle<CBaseEntity>) */

void StopScriptedScene(undefined4 param_1,uint *param_2)

{
  uint uVar1;
  int *piVar2;
  undefined1 *puVar3;
  undefined *puVar4;
  
  uVar1 = *param_2;
  if ((((uVar1 != 0xffffffff) &&
       (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar4 + 4) != 0)) {
    piVar2 = (int *)__dynamic_cast(*(int *)(puVar4 + 4),&CBaseEntity::typeinfo,
                                   &CSceneEntity::typeinfo,0);
    if (piVar2 != (int *)0x0) {
      puVar3 = &DAT_00d539c2;
      if ((undefined1 *)piVar2[0x111] != (undefined1 *)0x0) {
        puVar3 = (undefined1 *)piVar2[0x111];
      }
      Scene_Printf("%s : stop scripted scene\n",puVar3);
                    /* WARNING: Could not recover jumptable at 0x00813b3d. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (**(code **)(*piVar2 + 0x360))();
      return;
    }
  }
  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)