L L4D2node

ServerDemoPacket_BaseAnimating::CopyModifiedFieldsToRecordingState

0x00596e40 · 257 bytes · __thiscall

_ZN30ServerDemoPacket_BaseAnimating34CopyModifiedFieldsToRecordingStateER29BaseAnimatingRecordingState_t

Decompiled

undefined (2 params)

/* ServerDemoPacket_BaseAnimating::CopyModifiedFieldsToRecordingState(BaseAnimatingRecordingState_t&)
    */

void __thiscall
ServerDemoPacket_BaseAnimating::CopyModifiedFieldsToRecordingState
          (ServerDemoPacket_BaseAnimating *this,BaseAnimatingRecordingState_t *param_1)

{
  int iVar1;
  uint uVar2;
  
  uVar2 = *(uint *)this;
  if ((uVar2 & 1) != 0) {
    *(int *)(param_1 + 0x78) = (int)*(short *)(this + 0xc);
    uVar2 = *(uint *)this;
  }
  if ((uVar2 & 2) != 0) {
    *(int *)(param_1 + 0x7c) = (int)*(short *)(this + 0xe);
    uVar2 = *(uint *)this;
  }
  if ((uVar2 & 4) != 0) {
    *(int *)(param_1 + 0x80) = (int)*(short *)(this + 0x10);
    uVar2 = *(uint *)this;
  }
  if ((uVar2 & 8) != 0) {
    *param_1 = (BaseAnimatingRecordingState_t)this[0x12];
    uVar2 = *(uint *)this;
  }
  if ((uVar2 & 0x10) != 0) {
    *(ServerDemoPacket_BaseAnimating *)(param_1 + 1) = this[0x13];
    uVar2 = *(uint *)this;
  }
  if ((uVar2 & 0x20) != 0) {
    *(ServerDemoPacket_BaseAnimating *)(param_1 + 2) = this[0x14];
    uVar2 = *(uint *)this;
  }
  if ((uVar2 & 0x40) != 0) {
    *(ServerDemoPacket_BaseAnimating *)(param_1 + 0x74) = this[0x15];
    uVar2 = *(uint *)this;
  }
  if ((uVar2 & 0x80) != 0) {
    *(undefined4 *)(param_1 + 8) = *(undefined4 *)(this + 0x18);
    uVar2 = *(uint *)this;
  }
  if ((uVar2 & 0x100) != 0) {
    *(undefined4 *)(param_1 + 0xc) = *(undefined4 *)(this + 0x1c);
    uVar2 = *(uint *)this;
  }
  if ((uVar2 & 0x200) != 0) {
    *(undefined4 *)(param_1 + 0x10) = *(undefined4 *)(this + 0x20);
    uVar2 = *(uint *)this;
  }
  if (((uVar2 & 0x100000) != 0) && (*(ushort *)(this + 0x88) >> 1 != 0)) {
    *(ServerDemoPacket_BaseAnimating **)(param_1 + 0x84) = this + 0x88;
    uVar2 = *(uint *)this;
  }
  if ((uVar2 & 0x400) != 0) {
    *(uint *)(param_1 + 4) = (uint)(byte)this[0x24];
  }
  iVar1 = 0;
  if (this[0x24] != (ServerDemoPacket_BaseAnimating)0x0) {
    do {
      uVar2 = 0x800 << ((byte)iVar1 & 0x1f);
      if ((*(uint *)(this + 4) & (int)uVar2 >> 0x1f) != 0 || (uVar2 & *(uint *)this) != 0) {
        *(undefined4 *)(param_1 + iVar1 * 4 + 0x14) = *(undefined4 *)(this + iVar1 * 4 + 0x28);
      }
      iVar1 = iVar1 + 1;
    } while (iVar1 < (int)(uint)(byte)this[0x24]);
  }
  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)