L L4D2node

CBaseAnimating::ResetSequence

0x005e31c0 · 243 bytes · __thiscall

_ZN14CBaseAnimating13ResetSequenceEi

Decompiled

undefined (2 params)

/* CBaseAnimating::ResetSequence(int) */

void __thiscall CBaseAnimating::ResetSequence(CBaseAnimating *this,int param_1)

{
  CBaseEdict *this_00;
  undefined4 uVar1;
  undefined4 uVar2;
  int iVar3;
  undefined1 *puVar4;
  
  if ((*(int *)(ai_sequence_debug._28_4_ + 0x30) != 0) && (((byte)this[0x111] & 0x10) != 0)) {
    uVar1 = GetSequenceName(this,param_1);
    uVar2 = GetSequenceName(this,*(int *)(this + 0x494));
    puVar4 = &DAT_00d539c2;
    if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
      puVar4 = *(undefined1 **)(this + 0x7c);
    }
    DevMsg("ResetSequence : %s: %s -> %s\n",puVar4,uVar2,uVar1);
  }
  if ((this[0x489] == (CBaseAnimating)0x0) && (*(float *)(this + 0x490) != 0.0)) {
    if (this[0x6c] == (CBaseAnimating)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseAnimating)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x490) = 0;
  }
  iVar3 = *(int *)(this + 0x494);
  SetSequence(this,param_1);
  if ((param_1 == iVar3) && (this[0x489] != (CBaseAnimating)0x0)) {
    return;
  }
  ResetSequenceInfo(this);
  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)