L L4D2node

CBaseEntity::NetworkQuantize

0x0060e620 · 234 bytes · __thiscall

_ZN11CBaseEntity15NetworkQuantizeER6VectorR6QAngle

Decompiled

undefined (3 params)

/* CBaseEntity::NetworkQuantize(Vector&, QAngle&) */

void __thiscall CBaseEntity::NetworkQuantize(CBaseEntity *this,Vector *param_1,QAngle *param_2)

{
  uint uVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  
  iVar2 = *(int *)(in_GS_OFFSET + 0x14);
  if (this[0x3dc] != (CBaseEntity)0x0) {
    iVar3 = 0;
    do {
      *(float *)(param_1 + iVar3 * 4) =
           (float)(int)ROUND(*(float *)(param_1 + iVar3 * 4) * 32.0) * 0.03125;
      iVar3 = iVar3 + 1;
    } while (iVar3 != 3);
    iVar3 = 0;
    do {
      uVar1 = (uint)ROUND((float)((int)(*(float *)(param_2 + iVar3 * 4) * 182.04445) & 0xffff) *
                          0.125);
      *(float *)(param_2 + iVar3 * 4) =
           ((float)(uVar1 >> 0x10) * 65536.0 + (float)(uVar1 & 0xffff)) * 0.043945313;
      iVar3 = iVar3 + 1;
    } while (iVar3 != 3);
  }
  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)