L L4D2node

CBaseAnimating::TransferDissolveFrom

0x004a52a0 · 842 bytes · __thiscall

_ZN14CBaseAnimating20TransferDissolveFromEPS_

Decompiled

undefined (2 params)

/* CBaseAnimating::TransferDissolveFrom(CBaseAnimating*) */

void __thiscall CBaseAnimating::TransferDissolveFrom(CBaseAnimating *this,CBaseAnimating *param_1)

{
  float fVar1;
  float fVar2;
  float fVar3;
  uint uVar4;
  CBaseEdict *pCVar5;
  int iVar6;
  int iVar7;
  int iVar8;
  int iVar9;
  undefined *puVar10;
  
  if (((param_1 != (CBaseAnimating *)0x0) && (((byte)param_1[0x153] & 0x10) != 0)) &&
     (iVar6 = CEntityDissolve::Create((CBaseEntity *)this,(CBaseEntity *)param_1), iVar6 != 0)) {
    CBaseEntity::AddFlag((CBaseEntity *)this,0x10000000);
    puVar10 = g_pEntityList;
    *(undefined4 *)(this + 0x48c) = *(undefined4 *)(param_1 + 0x48c);
    uVar4 = *(uint *)(param_1 + 0x224);
    if (((uVar4 != 0xffffffff) &&
        (puVar10 = puVar10 + (uVar4 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
       ((*(uint *)(puVar10 + 8) == uVar4 >> 0xc &&
        ((*(int *)(puVar10 + 4) != 0 &&
         (iVar7 = __dynamic_cast(*(int *)(puVar10 + 4),&CBaseEntity::typeinfo,
                                 &CEntityDissolve::typeinfo,0), iVar7 != 0)))))) {
      fVar1 = *(float *)(iVar7 + 0x460);
      fVar2 = *(float *)(iVar7 + 0x464);
      fVar3 = *(float *)(iVar7 + 0x468);
      if ((fVar1 != *(float *)(iVar6 + 0x460)) ||
         ((fVar2 != *(float *)(iVar6 + 0x464) || (fVar3 != *(float *)(iVar6 + 0x468))))) {
        if (*(char *)(iVar6 + 0x6c) == '\0') {
          pCVar5 = *(CBaseEdict **)(iVar6 + 0x30);
          if (pCVar5 != (CBaseEdict *)0x0) {
            *(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
            iVar9 = CBaseEdict::GetChangeAccessor(pCVar5);
            *(undefined2 *)(iVar9 + 2) = 0;
          }
        }
        else {
          *(byte *)(iVar6 + 0x70) = *(byte *)(iVar6 + 0x70) | 1;
        }
        *(float *)(iVar6 + 0x460) = fVar1;
        *(float *)(iVar6 + 0x464) = fVar2;
        *(float *)(iVar6 + 0x468) = fVar3;
      }
      iVar9 = *(int *)(iVar7 + 0x45c);
      if (iVar9 != *(int *)(iVar6 + 0x45c)) {
        if (*(char *)(iVar6 + 0x6c) == '\0') {
          pCVar5 = *(CBaseEdict **)(iVar6 + 0x30);
          if (pCVar5 != (CBaseEdict *)0x0) {
            *(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
            iVar8 = CBaseEdict::GetChangeAccessor(pCVar5);
            *(undefined2 *)(iVar8 + 2) = 0;
          }
        }
        else {
          *(byte *)(iVar6 + 0x70) = *(byte *)(iVar6 + 0x70) | 1;
        }
        *(int *)(iVar6 + 0x45c) = iVar9;
        iVar9 = *(int *)(iVar7 + 0x45c);
      }
      if (iVar9 == 3) {
        iVar7 = *(int *)(iVar7 + 0x46c);
        if (iVar7 != *(int *)(iVar6 + 0x46c)) {
          if (*(char *)(iVar6 + 0x6c) == '\0') {
            pCVar5 = *(CBaseEdict **)(iVar6 + 0x30);
            if (pCVar5 != (CBaseEdict *)0x0) {
              *(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
              iVar9 = CBaseEdict::GetChangeAccessor(pCVar5);
              *(undefined2 *)(iVar9 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar6 + 0x70) = *(byte *)(iVar6 + 0x70) | 1;
          }
          *(int *)(iVar6 + 0x46c) = iVar7;
        }
        if (*(float *)(iVar6 + 0x454) != 0.2) {
          if (*(char *)(iVar6 + 0x6c) == '\0') {
            pCVar5 = *(CBaseEdict **)(iVar6 + 0x30);
            if (pCVar5 != (CBaseEdict *)0x0) {
              *(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
              iVar7 = CBaseEdict::GetChangeAccessor(pCVar5);
              *(undefined2 *)(iVar7 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar6 + 0x70) = *(byte *)(iVar6 + 0x70) | 1;
          }
          *(undefined4 *)(iVar6 + 0x454) = 0x3e4ccccd;
        }
        if (*(float *)(iVar6 + 0x44c) != 0.1) {
          if (*(char *)(iVar6 + 0x6c) == '\0') {
            pCVar5 = *(CBaseEdict **)(iVar6 + 0x30);
            if (pCVar5 != (CBaseEdict *)0x0) {
              *(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
              iVar7 = CBaseEdict::GetChangeAccessor(pCVar5);
              *(undefined2 *)(iVar7 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar6 + 0x70) = *(byte *)(iVar6 + 0x70) | 1;
          }
          *(undefined4 *)(iVar6 + 0x44c) = 0x3dcccccd;
        }
        if (*(float *)(iVar6 + 0x450) != 0.05) {
          if (*(char *)(iVar6 + 0x6c) == '\0') {
            pCVar5 = *(CBaseEdict **)(iVar6 + 0x30);
            if (pCVar5 != (CBaseEdict *)0x0) {
              *(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
              iVar7 = CBaseEdict::GetChangeAccessor(pCVar5);
              *(undefined2 *)(iVar7 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar6 + 0x70) = *(byte *)(iVar6 + 0x70) | 1;
          }
          *(undefined4 *)(iVar6 + 0x450) = 0x3d4ccccd;
        }
        if (*(float *)(iVar6 + 0x448) != 0.1) {
          if (*(char *)(iVar6 + 0x6c) == '\0') {
            pCVar5 = *(CBaseEdict **)(iVar6 + 0x30);
            if (pCVar5 != (CBaseEdict *)0x0) {
              *(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
              iVar7 = CBaseEdict::GetChangeAccessor(pCVar5);
              *(undefined2 *)(iVar7 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar6 + 0x70) = *(byte *)(iVar6 + 0x70) | 1;
          }
          *(undefined4 *)(iVar6 + 0x448) = 0x3dcccccd;
        }
      }
    }
  }
  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)