L L4D2node

CSave::WritePositionVector

0x004a6b90 · 222 bytes · __thiscall

_ZN5CSave19WritePositionVectorEPK6Vectori

Decompiled

undefined (3 params)

/* CSave::WritePositionVector(Vector const*, int) */

void __thiscall CSave::WritePositionVector(CSave *this,Vector *param_1,int param_2)

{
  float *pfVar1;
  int iVar2;
  float fVar3;
  float local_28;
  float local_24;
  float local_20;
  
  iVar2 = 0;
  if (0 < param_2) {
    do {
      local_28 = *(float *)param_1;
      local_24 = *(float *)(param_1 + 4);
      local_20 = *(float *)(param_1 + 8);
      fVar3 = local_24;
      if (((local_28 != vec3_invalid) || (DAT_01053d24 != local_24)) ||
         (fVar3 = DAT_01053d24, local_20 != DAT_01053d28)) {
        pfVar1 = (float *)&vec3_origin;
        if (*(int *)(*(int *)(this + 0x1c) + 0x504) != 0) {
          pfVar1 = (float *)(*(int *)(this + 0x1c) + 0x51c);
        }
        local_28 = local_28 - *pfVar1;
        local_24 = fVar3 - pfVar1[1];
        local_20 = local_20 - pfVar1[2];
      }
      iVar2 = iVar2 + 1;
      param_1 = param_1 + 0xc;
      (**(code **)(*(int *)this + 0x38))(this,&local_28,0xc);
    } while (iVar2 != param_2);
  }
  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)