L L4D2node

CSceneEntity::EndEvent

0x00810620 · 783 bytes · __thiscall

_ZN12CSceneEntity8EndEventEfP12CChoreoSceneP12CChoreoEvent

Decompiled

undefined (4 params)

/* CSceneEntity::EndEvent(float, CChoreoScene*, CChoreoEvent*) */

void __thiscall
CSceneEntity::EndEvent(CSceneEntity *this,float param_1,CChoreoScene *param_2,CChoreoEvent *param_3)

{
  char *pcVar1;
  int iVar2;
  undefined4 uVar3;
  code *UNRECOVERED_JUMPTABLE;
  CChoreoScene *this_00;
  undefined1 *puVar4;
  int local_24;
  
  pcVar1 = (char *)CChoreoEvent::GetName(param_3);
  iVar2 = _V_stricmp(pcVar1,"NULL");
  if (iVar2 != 0) {
    iVar2 = CChoreoEvent::GetActor(param_3);
    local_24 = 0;
    if (iVar2 != 0) {
      local_24 = (**(code **)(*(int *)this + 0x3e0))(this,iVar2);
    }
    uVar3 = CChoreoEvent::GetDescription(param_3);
    puVar4 = &DAT_00d539c2;
    if (*(undefined1 **)(this + 0x444) != (undefined1 *)0x0) {
      puVar4 = *(undefined1 **)(this + 0x444);
    }
    Scene_Printf("%s : %8.2f:  finish %s\n",puVar4,(double)param_1,uVar3);
    uVar3 = CChoreoEvent::GetType(param_3);
    switch(uVar3) {
    case 2:
      if ((local_24 != 0) && (this[0x496] == (CSceneEntity)0x0)) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x370);
LAB_00810730:
                    /* WARNING: Could not recover jumptable at 0x00810737. Too many branches */
                    /* WARNING: Treating indirect jump as call */
        (*UNRECOVERED_JUMPTABLE)();
        return;
      }
      break;
    case 3:
      if ((local_24 != 0) && (this[0x496] == (CSceneEntity)0x0)) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x388);
        goto LAB_00810730;
      }
      break;
    case 4:
      if ((local_24 != 0) && (this[0x496] == (CSceneEntity)0x0)) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x390);
        goto LAB_00810730;
      }
      break;
    case 5:
      if (local_24 != 0) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x398);
        goto LAB_00810730;
      }
      break;
    case 6:
      if (local_24 != 0) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x380);
        goto LAB_00810730;
      }
      break;
    case 7:
      if (local_24 != 0) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x3a8);
        goto LAB_00810730;
      }
      break;
    case 8:
      if ((local_24 != 0) && (this[0x496] == (CSceneEntity)0x0)) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x3a0);
        goto LAB_00810730;
      }
      break;
    case 10:
      if ((local_24 != 0) && (this[0x496] == (CSceneEntity)0x0)) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x378);
        goto LAB_00810730;
      }
      break;
    case 0xb:
      if ((this[0x496] == (CSceneEntity)0x0) &&
         (this_00 = (CChoreoScene *)CChoreoEvent::GetSubScene(param_3),
         this_00 != (CChoreoScene *)0x0)) {
        CChoreoScene::ResetSimulation(this_00,true,0.0,0.0);
        return;
      }
      break;
    case 0xd:
      if (this[0x496] == (CSceneEntity)0x0) {
                    /* WARNING: Could not recover jumptable at 0x0081093d. Too many branches */
                    /* WARNING: Treating indirect jump as call */
        (**(code **)(*(int *)this + 0x3b4))();
        return;
      }
      break;
    case 0xf:
      if (this[0x496] == (CSceneEntity)0x0) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x3c4);
        goto LAB_00810730;
      }
      break;
    case 0x10:
      iVar2 = CChoreoEvent::GetParameters(param_3);
      if (iVar2 != 0) {
        pcVar1 = (char *)CChoreoEvent::GetParameters(param_3);
        iVar2 = V_strncmp(pcVar1,"debugtext",9);
        if (iVar2 == 0) {
          return;
        }
      }
      if (local_24 != 0) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x3bc);
        goto LAB_00810730;
      }
    }
  }
  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)