L L4D2node

CChoreoScene::EventThink

0x00bb1c30 · 452 bytes · __thiscall

_ZN12CChoreoScene10EventThinkEP12CChoreoEventffbRNS_15PROCESSING_TYPEE

Decompiled

undefined (6 params)

/* CChoreoScene::EventThink(CChoreoEvent*, float, float, bool, CChoreoScene::PROCESSING_TYPE&) */

undefined4 __thiscall
CChoreoScene::EventThink
          (CChoreoScene *this,CChoreoEvent *param_1,float param_2,float param_3,bool param_4,
          PROCESSING_TYPE *param_5)

{
  float fVar1;
  char cVar2;
  char cVar3;
  int iVar4;
  CChoreoEvent *this_00;
  longdouble lVar5;
  float local_24;
  float local_20;
  
  fVar1 = param_3;
  *(undefined4 *)param_5 = 0;
  cVar2 = CChoreoEvent::HasEndTime(param_1);
  lVar5 = (longdouble)CChoreoEvent::GetStartTime(param_1);
  local_20 = (float)lVar5;
  if (cVar2 == '\0') {
    lVar5 = (longdouble)CChoreoEvent::GetStartTime(param_1);
  }
  else {
    lVar5 = (longdouble)CChoreoEvent::GetEndTime(param_1);
  }
  local_24 = (float)lVar5;
  if (!param_4) {
    param_3 = param_2;
    param_2 = fVar1;
  }
  iVar4 = CChoreoEvent::GetType(param_1);
  if (iVar4 == 5) {
    if (param_4) {
      local_20 = local_20 - *(float *)(this + 0x94);
      this_00 = (CChoreoEvent *)
                FindPauseBetweenTimes(this,local_20,*(float *)(this + 0x94) + local_20);
      if ((this_00 != (CChoreoEvent *)0x0) &&
         (lVar5 = (longdouble)CChoreoEvent::GetStartTime(this_00), param_2 <= (float)lVar5)) {
        CChoreoEvent::AddEventDependency(this_00,param_1);
        goto LAB_00bb1caa;
      }
    }
  }
  else if ((iVar4 == 0xb) && (((byte)this[0x20c] & 4) != 0)) {
LAB_00bb1caa:
    cVar2 = CChoreoEvent::IsProcessing(param_1);
    if (cVar2 == '\0') {
      return 0;
    }
    goto LAB_00bb1cba;
  }
  cVar3 = CChoreoEvent::IsProcessing(param_1);
  if (cVar3 == '\0') {
    if ((local_24 < param_2) || (param_2 < local_20)) {
      if ((cVar2 != '\0') || ((param_3 < local_20 || (local_20 < param_2)))) {
        return 0;
      }
    }
    else {
      cVar2 = CChoreoEvent::IsResumeCondition(param_1);
      if (cVar2 != '\0') {
        *(undefined4 *)param_5 = 2;
        return 1;
      }
    }
    *(undefined4 *)param_5 = 1;
    return 1;
  }
  if ((param_2 <= local_24) && (local_20 <= param_2)) {
    *(undefined4 *)param_5 = 3;
    return 1;
  }
LAB_00bb1cba:
  *(undefined4 *)param_5 = 4;
  return 0;
}

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)