L L4D2node

CRestore::ReadPositionVector

0x004a69e0 · 230 bytes · __thiscall

_ZN8CRestore18ReadPositionVectorEP6Vectorii

Decompiled

undefined (4 params)

/* CRestore::ReadPositionVector(Vector*, int, int) */

void __thiscall CRestore::ReadPositionVector(CRestore *this,Vector *param_1,int param_2,int param_3)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float *pfVar5;
  int iVar6;
  int iVar7;
  Vector *pVVar8;
  float fVar9;
  
  pfVar5 = (float *)&vec3_origin;
  if (*(int *)(*(int *)(this + 0x1c) + 0x504) != 0) {
    pfVar5 = (float *)(*(int *)(this + 0x1c) + 0x51c);
  }
  fVar1 = *pfVar5;
  fVar2 = pfVar5[1];
  fVar3 = pfVar5[2];
  iVar6 = (**(code **)(*(int *)this + 0x58))(this,param_1,param_2,param_3);
  fVar4 = DAT_01053d24;
  iVar7 = iVar6 + -1;
  if (-1 < iVar7) {
    pVVar8 = param_1 + iVar6 * 0xc;
    do {
      while( true ) {
        fVar9 = *(float *)(pVVar8 + -8);
        if (((*(float *)(pVVar8 + -0xc) == vec3_invalid) && (fVar4 == fVar9)) &&
           (fVar9 = fVar4, *(float *)(pVVar8 + -4) == DAT_01053d28)) break;
        iVar7 = iVar7 + -1;
        *(float *)(pVVar8 + -0xc) = *(float *)(pVVar8 + -0xc) + fVar1;
        *(float *)(pVVar8 + -8) = fVar9 + fVar2;
        *(float *)(pVVar8 + -4) = *(float *)(pVVar8 + -4) + fVar3;
        pVVar8 = pVVar8 + -0xc;
        if (iVar7 == -1) {
          return;
        }
      }
      iVar7 = iVar7 + -1;
      pVVar8 = pVVar8 + -0xc;
    } while (iVar7 != -1);
  }
  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)