L L4D2node

CMultiPlayerAnimState::RestartMainSequence

0x0046a3b0 · 181 bytes · __thiscall

_ZN21CMultiPlayerAnimState19RestartMainSequenceEv

Decompiled

undefined (1 param)

/* CMultiPlayerAnimState::RestartMainSequence() */

void __thiscall CMultiPlayerAnimState::RestartMainSequence(CMultiPlayerAnimState *this)

{
  float fVar1;
  int iVar2;
  CBaseEdict *pCVar3;
  int iVar4;
  
  iVar2 = *(int *)(this + 0x1c);
  if (iVar2 != 0) {
    fVar1 = *(float *)(gpGlobals + 0xc);
    if (fVar1 != *(float *)(iVar2 + 0x90)) {
      if (*(char *)(iVar2 + 0x6c) == '\0') {
        pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
      }
      *(float *)(iVar2 + 0x90) = fVar1;
    }
    if (*(float *)(iVar2 + 0x490) != 0.0) {
      if (*(char *)(iVar2 + 0x6c) == '\0') {
        pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
        *(undefined4 *)(iVar2 + 0x490) = 0;
      }
      else {
        *(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
        *(undefined4 *)(iVar2 + 0x490) = 0;
      }
      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)