L L4D2node

CDeltaCalculator::PropCalcDelta

0x001548c0 · 231 bytes · __thiscall

_ZN16CDeltaCalculator13PropCalcDeltaEv

Decompiled

undefined (1 param)

/* CDeltaCalculator::PropCalcDelta() */

void __thiscall CDeltaCalculator::PropCalcDelta(CDeltaCalculator *this)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar1 = *(int *)(this + 0x70);
  iVar2 = *(int *)(this + 0x74);
  if (iVar1 < iVar2) {
    do {
      iVar1 = *(int *)(*(int *)(*(int *)this + 0x2c) + iVar1 * 4);
      (**(code **)(g_PropTypeFns + *(int *)(iVar1 + 8) * 0x24 + 0x20))(iVar1,this + 4);
      iVar1 = CDeltaBitsReader::ReadNextPropIndex((CDeltaBitsReader *)(this + 0x4c));
      if (iVar1 < 0) {
        iVar2 = *(int *)(this + 0x74);
        *(undefined4 *)(this + 0x70) = 0x7fffffff;
        iVar1 = 0x7fffffff;
        break;
      }
      iVar2 = *(int *)(this + 0x74);
      *(int *)(this + 0x70) = iVar1;
    } while (iVar1 < iVar2);
  }
  iVar3 = *(int *)(*(int *)(*(int *)this + 0x2c) + iVar2 * 4);
  if (iVar1 == iVar2) {
    iVar2 = (**(code **)(g_PropTypeFns + *(int *)(iVar3 + 8) * 0x24 + 8))
                      (iVar3,this + 4,this + 0x28);
    iVar3 = CDeltaBitsReader::ReadNextPropIndex((CDeltaBitsReader *)(this + 0x4c));
    iVar1 = 0x7fffffff;
    if (-1 < iVar3) {
      iVar1 = iVar3;
    }
    *(int *)(this + 0x70) = iVar1;
    if (iVar2 == 0) {
      return;
    }
  }
  else {
    (**(code **)(g_PropTypeFns + *(int *)(iVar3 + 8) * 0x24 + 0x20))(iVar3,this + 0x28);
  }
  if (*(int *)(this + 0x84) < *(int *)(this + 0x80)) {
    *(undefined4 *)(*(int *)(this + 0x7c) + *(int *)(this + 0x84) * 4) =
         *(undefined4 *)(this + 0x74);
    *(int *)(this + 0x84) = *(int *)(this + 0x84) + 1;
  }
  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)