L L4D2node

ParseVector

0x0043bdd0 · 155 bytes · __cdecl

_Z11ParseVectorP9KeyValuesPKcR6Vector

Decompiled

undefined (3 params)

/* ParseVector(KeyValues*, char const*, Vector&) */

void ParseVector(KeyValues *param_1,char *param_2,Vector *param_3)

{
  char *__s;
  int iVar1;
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10 [2];
  
  *(undefined4 *)(param_3 + 8) = 0;
  *(undefined4 *)(param_3 + 4) = 0;
  *(undefined4 *)param_3 = 0;
  if ((param_1 != (KeyValues *)0x0) && (param_2 != (char *)0x0)) {
    __s = (char *)KeyValues::GetString(param_1,param_2,"0 0 0");
    if ((__s != (char *)0x0) && (*__s != '\0')) {
      iVar1 = sscanf(__s,"%f %f %f",&local_18,&local_14,local_10);
      if (iVar1 == 3) {
        *(undefined4 *)param_3 = local_18;
        *(undefined4 *)(param_3 + 4) = local_14;
        *(undefined4 *)(param_3 + 8) = local_10[0];
      }
    }
  }
  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)