L L4D2node

CBasePlayerAnimState::RestartMainSequence

0x0041e990 · 292 bytes · __thiscall

_ZN20CBasePlayerAnimState19RestartMainSequenceEv

Decompiled

undefined (1 param)

/* CBasePlayerAnimState::RestartMainSequence() */

void __thiscall CBasePlayerAnimState::RestartMainSequence(CBasePlayerAnimState *this)

{
  float fVar1;
  int *piVar2;
  CBaseEdict *pCVar3;
  char cVar4;
  int iVar5;
  int *piVar6;
  
  piVar2 = *(int **)(this + 0x14);
  fVar1 = *(float *)(gpGlobals + 0xc);
  if (fVar1 != (float)piVar2[0x24]) {
    if ((char)piVar2[0x1b] == '\0') {
      pCVar3 = (CBaseEdict *)piVar2[0xc];
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      *(byte *)(piVar2 + 0x1c) = *(byte *)(piVar2 + 0x1c) | 1;
    }
    piVar2[0x24] = (int)fVar1;
  }
  if ((float)piVar2[0x124] != 0.0) {
    if ((char)piVar2[0x1b] == '\0') {
      pCVar3 = (CBaseEdict *)piVar2[0xc];
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      *(byte *)(piVar2 + 0x1c) = *(byte *)(piVar2 + 0x1c) | 1;
    }
    piVar2[0x124] = 0;
  }
  iVar5 = gpGlobals;
  cVar4 = (**(code **)(*piVar2 + 0x16c))(piVar2);
  fVar1 = *(float *)(iVar5 + 0xc);
  piVar6 = (int *)0x0;
  if (cVar4 != '\0') {
    piVar6 = piVar2;
  }
  if (fVar1 == (float)piVar6[0xa96]) {
    return;
  }
  if ((char)piVar6[0x1b] == '\0') {
    pCVar3 = (CBaseEdict *)piVar6[0xc];
    if (pCVar3 != (CBaseEdict *)0x0) {
      *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
      iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
      *(undefined2 *)(iVar5 + 2) = 0;
    }
    piVar6[0xa96] = (int)fVar1;
  }
  else {
    *(byte *)(piVar6 + 0x1c) = *(byte *)(piVar6 + 0x1c) | 1;
    piVar6[0xa96] = (int)fVar1;
  }
  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)