L L4D2node

CDynamicProp::AnimThink

0x007efb20 · 680 bytes · __thiscall

_ZN12CDynamicProp9AnimThinkEv

Decompiled

undefined (1 param)

/* CDynamicProp::AnimThink() */

void __thiscall CDynamicProp::AnimThink(CDynamicProp *this)

{
  float fVar1;
  CBaseEntity *this_00;
  uint uVar2;
  int iVar3;
  undefined *puVar4;
  longdouble lVar5;
  
  if (*(short *)(this + 0x159c) != -1) {
    FinishSetSequence(this,(int)*(short *)(this + 0x159c));
    *(undefined2 *)(this + 0x159c) = 0xffff;
  }
  if ((this[0x158c] != (CDynamicProp)0x0) &&
     (*(float *)(this + 0x1590) <= *(float *)(gpGlobals + 0xc) &&
      *(float *)(gpGlobals + 0xc) != *(float *)(this + 0x1590))) {
    iVar3 = (**(code **)(*(int *)this + 0x340))(this,1);
    CBaseAnimating::ResetSequence((CBaseAnimating *)this,iVar3);
    CBaseAnimating::ResetClientsideFrame((CBaseAnimating *)this);
    COutputEvent::FireOutput
              ((COutputEvent *)(this + 0x1550),(CBaseEntity *)0x0,(CBaseEntity *)this,0.0);
    fVar1 = *(float *)(gpGlobals + 0xc);
    lVar5 = (longdouble)
            (**(code **)(*random_valve + 4))
                      (random_valve,*(undefined4 *)(this + 0x1594),*(undefined4 *)(this + 0x1598));
    *(float *)(this + 0x1590) = (float)lVar5 + fVar1;
  }
  if (*(int *)(this + 0x1588) < 1) {
    if ((*(int *)(this + 0x1588) != 0) && (*(float *)(this + 0x490) <= 0.0)) goto LAB_007efc80;
  }
  else if (0.999 <= *(float *)(this + 0x490)) {
LAB_007efc80:
    if (this[0x489] == (CDynamicProp)0x0) {
      if (*(int *)(this + 0x1584) == *(int *)(this + 0x494)) {
        COutputEvent::FireOutput
                  ((COutputEvent *)(this + 0x1568),(CBaseEntity *)0x0,(CBaseEntity *)this,0.0);
        if (this[0x158c] == (CDynamicProp)0x0) {
          if (*(char **)(this + 0x1580) != (char *)0x0) {
            PropSetAnim(this,*(char **)(this + 0x1580));
          }
        }
        else {
          CBaseEntity::SetNextThink
                    ((CBaseEntity *)this,
                     *(float *)(this + 0x1590) + *(float *)(gpGlobals + 0xc) + 0.1,(char *)0x0);
        }
      }
      else {
        PropSetSequence(this,*(int *)(this + 0x1584));
      }
      goto LAB_007efbb9;
    }
  }
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.1,(char *)0x0);
LAB_007efbb9:
  (**(code **)(*(int *)this + 0x32c))(this);
  (**(code **)(*(int *)this + 0x364))(this,this);
  CBoneFollowerManager::UpdateBoneFollowers
            ((CBoneFollowerManager *)(this + 0x15a4),(CBaseAnimating *)this);
  if ((this[0x159f] != (CDynamicProp)0x0) && (uVar2 = *(uint *)(this + 0x18c), uVar2 != 0xffffffff))
  {
    while ((puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc &&
           ((*(uint *)(puVar4 + 8) == uVar2 >> 0xc &&
            (this_00 = *(CBaseEntity **)(puVar4 + 4), this_00 != (CBaseEntity *)0x0))))) {
      CBaseEntity::PhysicsTouchTriggers(this_00,(Vector *)0x0);
      uVar2 = *(uint *)(this_00 + 400);
      if (uVar2 == 0xffffffff) {
        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)