L L4D2node

ParseStringToVector

0x0051fcc0 · 219 bytes · __cdecl

_Z19ParseStringToVectorPKcR6Vector

Decompiled

undefined (2 params)

/* ParseStringToVector(char const*, Vector&) */

void ParseStringToVector(char *param_1,Vector *param_2)

{
  undefined1 *puVar1;
  undefined1 *puVar2;
  int in_GS_OFFSET;
  longdouble lVar3;
  char local_420 [1024];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  V_strncpy(local_420,param_1,0x400);
  puVar1 = (undefined1 *)V_stristr(local_420," ");
  if (puVar1 != (undefined1 *)0x0) {
    *puVar1 = 0;
    lVar3 = (longdouble)V_atof(local_420);
    *(float *)param_2 = (float)lVar3;
    puVar2 = (undefined1 *)V_stristr(puVar1 + 1," ");
    if (puVar2 != (undefined1 *)0x0) {
      *puVar2 = 0;
      lVar3 = (longdouble)V_atof(puVar1 + 1);
      *(float *)(param_2 + 4) = (float)lVar3;
      lVar3 = (longdouble)V_atof(puVar2 + 1);
      *(float *)(param_2 + 8) = (float)lVar3;
    }
  }
  if (local_20 == *(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)