L L4D2node

CBaseFlex::ProcessFlexSettingSceneEvent

0x006290f0 · 669 bytes · __thiscall

_ZN9CBaseFlex28ProcessFlexSettingSceneEventEP15CSceneEventInfoP12CChoreoSceneP12CChoreoEvent

Decompiled

undefined (4 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseFlex::ProcessFlexSettingSceneEvent(CSceneEventInfo*, CChoreoScene*, CChoreoEvent*) */

undefined4 __thiscall
CBaseFlex::ProcessFlexSettingSceneEvent
          (CBaseFlex *this,CSceneEventInfo *param_1,CChoreoScene *param_2,CChoreoEvent *param_3)

{
  char *pcVar1;
  char cVar2;
  int iVar3;
  char *pcVar4;
  float fVar5;
  int iVar6;
  flexsettinghdr_t *pfVar7;
  longdouble lVar8;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  cVar2 = CChoreoEvent::HasEndTime(param_3);
  if (cVar2 != '\0') {
    local_34 = 0;
    local_30 = 0;
    if (___atan2f_finite == 0) {
      local_20 = 0;
    }
    else {
      (**(code **)(___atan2f_finite + 0x50))
                (___atan2f_finite,&local_34,0,0,0,0,"/data/src/game/server/baseflex.cpp",0x4e0,
                 &ProcessFlexSettingSceneEvent(CSceneEventInfo*,CChoreoScene*,CChoreoEvent*)::tm_fmt
                 ,"(%s)%s","Unaccounted","CBaseFlex::ProcessFlexSettingSceneEvent");
      local_20 = ___atan2f_finite;
    }
    iVar6 = _DAT_0105db00;
    local_28 = local_34;
    local_24 = local_30;
    if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 006291b2 to 006291b6 has its CatchHandler @ 0062939e */
      iVar3 = ThreadGetCurrentId();
      if (iVar6 == iVar3) {
        if ((char *)*_DAT_0105d15c != "CBaseFlex::ProcessFlexSettingSceneEvent") {
                    /* try { // try from 00629380 to 00629391 has its CatchHandler @ 0062939e */
          _DAT_0105d15c =
               (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc61804,(char *)0x1,0xbfafa1);
        }
        CVProfNode::EnterScope();
        DAT_0105d158 = '\0';
      }
    }
                    /* try { // try from 006291c5 to 006292a9 has its CatchHandler @ 006293b3 */
    pcVar4 = (char *)CChoreoEvent::GetParameters(param_3);
    fVar5 = (float)CChoreoEvent::GetParameters2(param_3);
    if (((pcVar4 != (char *)0x0) && (fVar5 != 0.0)) && (0 < (int)g_FlexSceneFileManager._24_4_)) {
      iVar6 = 0;
      do {
        pcVar1 = *(char **)(g_FlexSceneFileManager._12_4_ + iVar6 * 4);
        if (pcVar1 != (char *)0x0) {
          iVar3 = _V_stricmp(pcVar1,pcVar4);
          if (iVar3 == 0) {
            pfVar7 = *(flexsettinghdr_t **)(pcVar1 + 0x80);
            if (this != (CBaseFlex *)0x0) {
              EnsureTranslations(this,pfVar7);
              pfVar7 = *(flexsettinghdr_t **)(pcVar1 + 0x80);
            }
            if (pfVar7 != (flexsettinghdr_t *)0x0) {
              lVar8 = (longdouble)CChoreoScene::GetTime(param_2);
              lVar8 = (longdouble)CChoreoEvent::GetIntensity(param_3,(float)lVar8);
              AddFlexSetting((char *)this,fVar5,(flexsettinghdr_t *)(float)lVar8,SUB41(pfVar7,0));
            }
            break;
          }
        }
        iVar6 = iVar6 + 1;
      } while (iVar6 < (int)g_FlexSceneFileManager._24_4_);
    }
    iVar6 = _DAT_0105db00;
    if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
      iVar3 = ThreadGetCurrentId();
      if (iVar6 == iVar3) {
        cVar2 = CVProfNode::ExitScope();
        if (cVar2 != '\0') {
          _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
        }
        DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
      }
    }
    if (local_20 != 0) {
      (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
    }
  }
  return 1;
}

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)