L L4D2node

old_bf_read::ReadBitVec3Coord

0x002440d0 · 316 bytes · __thiscall

_ZN11old_bf_read16ReadBitVec3CoordER6Vector

Decompiled

undefined (2 params)

/* old_bf_read::ReadBitVec3Coord(Vector&) */

void __thiscall old_bf_read::ReadBitVec3Coord(old_bf_read *this,Vector *param_1)

{
  byte bVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  bool bVar7;
  bool bVar8;
  bool bVar9;
  longdouble lVar10;
  
  *(undefined4 *)param_1 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  iVar2 = *(int *)(this + 0xc);
  iVar3 = *(int *)(this + 8);
  if (iVar2 < iVar3) {
    if (this[0x10] != (old_bf_read)0x0) {
      bVar9 = false;
      goto LAB_00244199;
    }
    iVar4 = *(int *)this;
    bVar1 = *(byte *)(iVar4 + (iVar2 >> 3));
    iVar5 = iVar2 + 1;
    *(int *)(this + 0xc) = iVar5;
    bVar7 = ((uint)bVar1 & 1 << ((byte)iVar2 & 7)) != 0;
    if (iVar3 <= iVar5) goto LAB_002441c7;
    bVar1 = *(byte *)(iVar4 + (iVar5 >> 3));
    iVar6 = iVar2 + 2;
    *(int *)(this + 0xc) = iVar6;
    bVar8 = ((uint)bVar1 & 1 << ((byte)iVar5 & 7)) != 0;
    if (iVar3 <= iVar6) goto LAB_002441c9;
    bVar1 = *(byte *)(iVar4 + (iVar6 >> 3));
    *(int *)(this + 0xc) = iVar2 + 3;
    bVar9 = ((uint)bVar1 & 1 << ((byte)iVar6 & 7)) != 0;
    if (bVar7) goto LAB_002441d6;
  }
  else {
    bVar7 = false;
LAB_002441c7:
    bVar8 = false;
LAB_002441c9:
    bVar9 = false;
    this[0x10] = (old_bf_read)0x1;
    if (bVar7) {
LAB_002441d6:
      lVar10 = (longdouble)ReadBitCoord(this);
      *(float *)param_1 = (float)lVar10;
    }
  }
  if (bVar8) {
    lVar10 = (longdouble)ReadBitCoord(this);
    *(float *)(param_1 + 4) = (float)lVar10;
  }
LAB_00244199:
  if (bVar9) {
    lVar10 = (longdouble)ReadBitCoord(this);
    *(float *)(param_1 + 8) = (float)lVar10;
  }
  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)