L L4D2node

CSceneEntity::DoThink

0x00813120 · 428 bytes · __thiscall

_ZN12CSceneEntity7DoThinkEf

Decompiled

undefined (2 params)

/* CSceneEntity::DoThink(float) */

void __thiscall CSceneEntity::DoThink(CSceneEntity *this,float param_1)

{
  int iVar1;
  char cVar2;
  longdouble lVar3;
  float fVar4;
  
  (**(code **)(*(int *)this + 0x348))(this);
  if ((this[0x4bd] != (CSceneEntity)0x0) || (this[0x4be] != (CSceneEntity)0x0)) {
    (**(code **)(*(int *)this + 0x354))(this);
  }
  if ((*(CChoreoScene **)(this + 0x4f0) != (CChoreoScene *)0x0) &&
     (this[0x494] != (CSceneEntity)0x0)) {
    fVar4 = *(float *)(this + 0x4a8);
    if (fVar4 <= 0.25) {
      fVar4 = 0.25;
    }
    if (2.5 <= fVar4) {
      fVar4 = 2.5;
    }
    *(float *)(this + 0x4a8) = fVar4;
    iVar1 = m_pcvSndMixahead;
    if (this[0x495] != (CSceneEntity)0x0) {
                    /* WARNING: Could not recover jumptable at 0x00813299. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (**(code **)(*(int *)this + 0x340))();
      return;
    }
    *(float *)(this + 0x4a0) = param_1;
    if (iVar1 == 0) {
      fVar4 = 0.1;
    }
    else {
      fVar4 = *(float *)(*(int *)(iVar1 + 0x1c) + 0x2c);
    }
    CChoreoScene::SetSoundFileStartupLatency(*(CChoreoScene **)(this + 0x4f0),fVar4);
    CChoreoScene::Think(*(CChoreoScene **)(this + 0x4f0),*(float *)(this + 0x49c));
    if (this[0x495] != (CSceneEntity)0x0) {
      lVar3 = (longdouble)CChoreoScene::GetTime(*(CChoreoScene **)(this + 0x4f0));
      SetCurrentTime(this,(float)lVar3,true);
      return;
    }
    SetCurrentTime(this,*(float *)(this + 0x4a8) * *(float *)(this + 0x4a0) +
                        *(float *)(this + 0x49c),false);
    cVar2 = CChoreoScene::SimulationFinished(*(CChoreoScene **)(this + 0x4f0));
    if (cVar2 != '\0') {
      (**(code **)(*(int *)this + 0x338))(this,0,1);
      ClearSchedules(this,*(CChoreoScene **)(this + 0x4f0));
      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)