L L4D2node

VMatrix::IsRotationMatrix

0x0027df80 · 477 bytes · __thiscall

_ZNK7VMatrix16IsRotationMatrixEv

Decompiled

undefined (1 param)

/* VMatrix::IsRotationMatrix() const */

undefined4 __thiscall VMatrix::IsRotationMatrix(VMatrix *this)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  float fVar7;
  float fVar8;
  float fVar9;
  
  fVar9 = *(float *)this;
  fVar1 = *(float *)(this + 4);
  fVar2 = *(float *)(this + 8);
  if (ABS(1.0 - SQRT(fVar1 * fVar1 + fVar9 * fVar9 + fVar2 * fVar2)) < 0.01) {
    fVar3 = *(float *)(this + 0x10);
    fVar4 = *(float *)(this + 0x18);
    fVar5 = *(float *)(this + 0x14);
    if (ABS(1.0 - SQRT(fVar5 * fVar5 + fVar3 * fVar3 + fVar4 * fVar4)) < 0.01) {
      fVar6 = *(float *)(this + 0x20);
      fVar7 = *(float *)(this + 0x24);
      fVar8 = *(float *)(this + 0x28);
      if (((ABS(1.0 - SQRT(fVar7 * fVar7 + fVar6 * fVar6 + fVar8 * fVar8)) < 0.01) &&
          (ABS(fVar5 * fVar1 + fVar3 * fVar9 + fVar4 * fVar2) < 0.01)) &&
         (ABS(fVar1 * fVar7 + fVar9 * fVar6 + fVar2 * fVar8) < 0.01)) {
        fVar9 = ABS(fVar5 * fVar7 + fVar3 * fVar6 + fVar8 * fVar4);
        return CONCAT31((int3)((uint)fVar9 >> 8),fVar9 < 0.01);
      }
    }
  }
  return 0;
}

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)