L L4D2node

bf_write::WriteBits

0x00241320 · 39 bytes · __thiscall

_ZN8bf_write9WriteBitsEPKvi

Decompiled

undefined (3 params)

/* bf_write::WriteBits(void const*, int) */

undefined4 __thiscall bf_write::WriteBits(bf_write *this,void *param_1,int param_2)

{
  undefined4 uVar1;
  
  if (*(int *)(this + 0xc) + param_2 <= *(int *)(this + 8)) {
    uVar1 = WriteBits(this,param_1,param_2);
    return uVar1;
  }
  this[0x10] = (bf_write)0x1;
  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)