L L4D2node

SerializeFloat

0x00bf1c20 · 162 bytes · __regparm3

_ZL14SerializeFloatR10CUtlBufferf

Decompiled

undefined (2 params)

/* SerializeFloat(CUtlBuffer&, float) */

void __regparm3 SerializeFloat(CUtlBuffer *param_1,float param_2)

{
  char *pcVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  int in_GS_OFFSET;
  float in_XMM0_Da;
  char acStack_111 [257];
  int local_10;
  
  pcVar1 = acStack_111 + 1;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar3 = V_snprintf(pcVar1,0x100,"%.10f",(double)in_XMM0_Da);
  if (0 < iVar3) {
    iVar4 = iVar3 + -1;
    cVar2 = acStack_111[iVar3];
    while (cVar2 == '0') {
      pcVar1[iVar4] = '\0';
      if (iVar4 == 0) goto LAB_00bf1c94;
      iVar4 = iVar4 + -1;
      cVar2 = pcVar1[iVar4];
    }
    if (cVar2 == '.') {
      acStack_111[iVar4 + 1] = '\0';
    }
  }
LAB_00bf1c94:
  CUtlBuffer::PutString(param_1,pcVar1);
  if (local_10 == *(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)