L L4D2node

WriteUserCmdDeltaFloat

0x0057ad40 · 152 bytes · __regparm3

_ZL22WriteUserCmdDeltaFloatP8bf_writePcff.isra.6

Decompiled

undefined (4 params)

/* WriteUserCmdDeltaFloat(bf_write*, char*, float, float) [clone .isra.6] */

undefined4 __regparm3
WriteUserCmdDeltaFloat(bf_write *param_1,char *param_2,float param_3,float param_4)

{
  int iVar1;
  byte *pbVar2;
  float in_XMM0_Da;
  float in_XMM1_Da;
  
  iVar1 = *(int *)(param_1 + 0xc);
  if (in_XMM0_Da != in_XMM1_Da) {
    if (iVar1 < *(int *)(param_1 + 8)) {
      if (param_1[0x10] == (bf_write)0x0) {
        pbVar2 = (byte *)((iVar1 >> 3) + *(int *)param_1);
        *pbVar2 = *pbVar2 | (byte)(1 << ((byte)iVar1 & 7));
        *(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + 1;
      }
    }
    else {
      param_1[0x10] = (bf_write)0x1;
    }
    bf_write::WriteFloat((float)param_1);
    return 1;
  }
  if (*(int *)(param_1 + 8) <= iVar1) {
    param_1[0x10] = (bf_write)0x1;
    return 0;
  }
  if (param_1[0x10] == (bf_write)0x0) {
    pbVar2 = (byte *)((iVar1 >> 3) + *(int *)param_1);
    *pbVar2 = *pbVar2 & ~(byte)(1 << ((byte)iVar1 & 7));
    *(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + 1;
  }
  return 0;
}

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)