L L4D2node

CSave::WriteVMatrixWorldspace

0x004a8000 · 192 bytes · __thiscall

_ZN5CSave22WriteVMatrixWorldspaceEPK7VMatrixi

Decompiled

undefined (3 params)

/* CSave::WriteVMatrixWorldspace(VMatrix const*, int) */

void __thiscall CSave::WriteVMatrixWorldspace(CSave *this,VMatrix *param_1,int param_2)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float *pfVar4;
  int iVar5;
  VMatrix local_5c [12];
  float local_50;
  float local_40;
  float local_30;
  
  iVar5 = 0;
  if (0 < param_2) {
    do {
      pfVar4 = (float *)(*(int *)(this + 0x1c) + 0x51c);
      if (*(int *)(*(int *)(this + 0x1c) + 0x504) == 0) {
        pfVar4 = (float *)&vec3_origin;
      }
      iVar5 = iVar5 + 1;
      fVar1 = *pfVar4;
      fVar2 = pfVar4[1];
      fVar3 = pfVar4[2];
      VMatrix::operator=(local_5c,param_1);
      local_50 = local_50 - fVar1;
      local_40 = local_40 - fVar2;
      local_30 = local_30 - fVar3;
      BufferData(this,(char *)local_5c,0x40);
      param_1 = param_1 + 0x40;
    } while (iVar5 != 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)