L L4D2node

CBreakableProp::AnimateThink

0x007e8490 · 384 bytes · __thiscall

_ZN14CBreakableProp12AnimateThinkEv

Decompiled

undefined (1 param)

/* CBreakableProp::AnimateThink() */

void __thiscall CBreakableProp::AnimateThink(CBreakableProp *this)

{
  CBaseEdict *this_00;
  char cVar1;
  int iVar2;
  undefined1 local_14 [12];
  
  if ((byte)((char)this[0x14af] - 6U) < 2) {
    CBaseAnimating::StudioFrameAdvanceManual((CBaseAnimating *)this,0.1);
    (**(code **)(*(int *)this + 0x364))(this,this);
    CBaseEntity::SetNextThink
              ((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.1,"PropAnimateThink");
    cVar1 = (**(code **)(*(int *)this + 0x338))(this);
    if (cVar1 != '\0') {
      if (this[0x14af] == (CBreakableProp)0x6) {
        this[0x14af] = (CBreakableProp)0x4;
        iVar2 = (**(code **)(*(int *)this + 0x340))(this,0x18d);
        CBaseAnimating::ResetSequence((CBaseAnimating *)this,iVar2);
        if (*(float *)(this + 0x468) != 1.0) {
          if (this[0x6c] == (CBreakableProp)0x0) {
            this_00 = *(CBaseEdict **)(this + 0x30);
            if (this_00 != (CBaseEdict *)0x0) {
              *(uint *)this_00 = *(uint *)this_00 | 0x101;
              iVar2 = CBaseEdict::GetChangeAccessor(this_00);
              *(undefined2 *)(iVar2 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CBreakableProp)((byte)this[0x70] | 1);
          }
          *(undefined4 *)(this + 0x468) = 0x3f800000;
        }
        CBaseAnimating::ResetClientsideFrame((CBaseAnimating *)this);
        COutputEvent::FireOutput
                  ((COutputEvent *)(this + 0x14e0),(CBaseEntity *)0x0,(CBaseEntity *)this,0.0);
      }
      else {
        this[0x14af] = (CBreakableProp)0x5;
        COutputEvent::FireOutput
                  ((COutputEvent *)(this + 0x1510),(CBaseEntity *)0x0,(CBaseEntity *)this,0.0);
      }
      CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)0x0);
      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)