L L4D2node

CBaseFlex::AddSceneEvent

0x00628820 · 307 bytes · __thiscall

_ZN9CBaseFlex13AddSceneEventEP12CChoreoSceneP12CChoreoEventP11CBaseEntityP12CSceneEntity

Decompiled

undefined (5 params)

/* CBaseFlex::AddSceneEvent(CChoreoScene*, CChoreoEvent*, CBaseEntity*, CSceneEntity*) */

void __thiscall
CBaseFlex::AddSceneEvent
          (CBaseFlex *this,CChoreoScene *param_1,CChoreoEvent *param_2,CBaseEntity *param_3,
          CSceneEntity *param_4)

{
  char cVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  CSceneEventInfo *pCVar5;
  byte bVar6;
  CChoreoEvent *local_64;
  CChoreoScene *local_60;
  undefined4 local_58;
  undefined1 local_54;
  undefined4 local_3c;
  
  bVar6 = 0;
  if ((param_1 == (CChoreoScene *)0x0) || (param_2 == (CChoreoEvent *)0x0)) {
    Msg("CBaseFlex::AddSceneEvent:  scene or event was NULL!!!\n");
  }
  else {
    iVar2 = CChoreoEvent::GetActor(param_2);
    if (iVar2 != 0) {
      pCVar5 = (CSceneEventInfo *)&local_64;
      for (iVar4 = 0x12; iVar4 != 0; iVar4 = iVar4 + -1) {
        *(undefined4 *)pCVar5 = 0;
        pCVar5 = pCVar5 + (uint)bVar6 * -8 + 4;
      }
      local_64 = param_2;
      local_60 = param_1;
      if (param_3 == (CBaseEntity *)0x0) {
        local_3c = 0xffffffff;
      }
      else {
        puVar3 = (undefined4 *)(**(code **)(*(int *)param_3 + 0xc))(param_3);
        local_3c = *puVar3;
      }
      local_54 = 0;
      if (param_4 == (CSceneEntity *)0x0) {
        local_58 = 0xffffffff;
      }
      else {
        puVar3 = (undefined4 *)(**(code **)(*(int *)param_4 + 0xc))(param_4);
        local_58 = *puVar3;
      }
      cVar1 = (**(code **)(*(int *)this + 0x3a8))
                        (this,(CSceneEventInfo *)&local_64,param_1,param_2,iVar2,param_3);
      if (cVar1 != '\0') {
        CUtlVector<CSceneEventInfo,CUtlMemory<CSceneEventInfo,int>>::InsertBefore
                  ((CUtlVector<CSceneEventInfo,CUtlMemory<CSceneEventInfo,int>> *)(this + 0x1788),
                   *(int *)(this + 0x1794),(CSceneEventInfo *)&local_64);
        return;
      }
      Scene_Printf("CBaseFlex::AddSceneEvent:  event failed\n");
      return;
    }
    Msg("CBaseFlex::AddSceneEvent:  event->GetActor() was NULL!!!\n");
  }
  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)