L L4D2node

CMaterialModifyControl::InputStartAnimSequence

0x006f4010 · 884 bytes · __thiscall

_ZN22CMaterialModifyControl22InputStartAnimSequenceER11inputdata_t

Decompiled

undefined (2 params)

/* CMaterialModifyControl::InputStartAnimSequence(inputdata_t&) */

void __thiscall
CMaterialModifyControl::InputStartAnimSequence(CMaterialModifyControl *this,inputdata_t *param_1)

{
  CMaterialModifyControl CVar1;
  CBaseEdict *pCVar2;
  char *pcVar3;
  undefined4 uVar4;
  long lVar5;
  long lVar6;
  long lVar7;
  int iVar8;
  undefined1 *puVar9;
  int in_GS_OFFSET;
  double dVar10;
  char local_11f [255];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(param_1 + 0x18) == 2) {
    pcVar3 = "";
    if (*(char **)(param_1 + 8) != (char *)0x0) {
      pcVar3 = *(char **)(param_1 + 8);
    }
  }
  else {
    pcVar3 = (char *)variant_t::ToString((variant_t *)(param_1 + 8));
  }
  V_strncpy(local_11f,pcVar3,0xff);
  pcVar3 = strtok(local_11f," ");
  if ((pcVar3 != (char *)0x0) && (*pcVar3 != '\0')) {
    lVar5 = strtol(pcVar3,(char **)0x0,10);
    pcVar3 = strtok((char *)0x0," ");
    if ((pcVar3 != (char *)0x0) && (*pcVar3 != '\0')) {
      lVar6 = strtol(pcVar3,(char **)0x0,10);
      pcVar3 = strtok((char *)0x0," ");
      if ((pcVar3 != (char *)0x0) && (*pcVar3 != '\0')) {
        dVar10 = strtod(pcVar3,(char **)0x0);
        pcVar3 = strtok((char *)0x0," ");
        if ((pcVar3 != (char *)0x0) && (*pcVar3 != '\0')) {
          lVar7 = strtol(pcVar3,(char **)0x0,10);
          if (lVar5 != *(int *)(this + 0x740)) {
            if (this[0x6c] == (CMaterialModifyControl)0x0) {
              pCVar2 = *(CBaseEdict **)(this + 0x30);
              if (pCVar2 != (CBaseEdict *)0x0) {
                *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
                iVar8 = CBaseEdict::GetChangeAccessor(pCVar2);
                *(undefined2 *)(iVar8 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CMaterialModifyControl)((byte)this[0x70] | 1);
            }
            *(long *)(this + 0x740) = lVar5;
          }
          if (lVar6 != *(int *)(this + 0x744)) {
            if (this[0x6c] == (CMaterialModifyControl)0x0) {
              pCVar2 = *(CBaseEdict **)(this + 0x30);
              if (pCVar2 != (CBaseEdict *)0x0) {
                *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
                iVar8 = CBaseEdict::GetChangeAccessor(pCVar2);
                *(undefined2 *)(iVar8 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CMaterialModifyControl)((byte)this[0x70] | 1);
            }
            *(long *)(this + 0x744) = lVar6;
          }
          if ((float)dVar10 != *(float *)(this + 0x74c)) {
            CServerNetworkProperty::NetworkStateChanged((short)this + 0x24);
            *(float *)(this + 0x74c) = (float)dVar10;
          }
          if ((CMaterialModifyControl)(lVar7 != 0) != this[0x748]) {
            if (this[0x6c] == (CMaterialModifyControl)0x0) {
              pCVar2 = *(CBaseEdict **)(this + 0x30);
              if (pCVar2 != (CBaseEdict *)0x0) {
                *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
                iVar8 = CBaseEdict::GetChangeAccessor(pCVar2);
                *(undefined2 *)(iVar8 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CMaterialModifyControl)((byte)this[0x70] | 1);
            }
            this[0x748] = (CMaterialModifyControl)(lVar7 != 0);
          }
          if (*(int *)(this + 0x760) != 2) {
            if (this[0x6c] == (CMaterialModifyControl)0x0) {
              pCVar2 = *(CBaseEdict **)(this + 0x30);
              if (pCVar2 != (CBaseEdict *)0x0) {
                *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
                iVar8 = CBaseEdict::GetChangeAccessor(pCVar2);
                *(undefined2 *)(iVar8 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CMaterialModifyControl)((byte)this[0x70] | 1);
            }
            *(undefined4 *)(this + 0x760) = 2;
          }
          CVar1 = this[0x750];
          if (CVar1 != (CMaterialModifyControl)((byte)CVar1 ^ 1)) {
            if (this[0x6c] == (CMaterialModifyControl)0x0) {
              pCVar2 = *(CBaseEdict **)(this + 0x30);
              if (pCVar2 != (CBaseEdict *)0x0) {
                *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
                iVar8 = CBaseEdict::GetChangeAccessor(pCVar2);
                *(undefined2 *)(iVar8 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CMaterialModifyControl)((byte)this[0x70] | 1);
            }
            this[0x750] = (CMaterialModifyControl)((byte)CVar1 ^ 1);
          }
          goto LAB_006f409f;
        }
      }
    }
  }
  uVar4 = CBaseEntity::GetDebugName((CBaseEntity *)this);
  puVar9 = &DAT_00d539c2;
  if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
    puVar9 = *(undefined1 **)(this + 0x7c);
  }
  Warning("%s (%s) received StartAnimSequence input without correct parameters. Syntax: <Frame Start> <Frame End> <Frame Rate> <Loop>\nSetting <Frame End> to -1 uses the last frame of the texture. <Loop> should be 1 or 0.\n"
          ,puVar9,uVar4);
LAB_006f409f:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)