L L4D2node

CCollisionProperty::WorldToNormalizedSpace

0x0042a000 · 195 bytes · __thiscall

_ZNK18CCollisionProperty22WorldToNormalizedSpaceERK6VectorPS0_

Decompiled

undefined (3 params)

/* CCollisionProperty::WorldToNormalizedSpace(Vector const&, Vector*) const */

Vector * __thiscall
CCollisionProperty::WorldToNormalizedSpace(CCollisionProperty *this,Vector *param_1,Vector *param_2)

{
  float *pfVar1;
  matrix3x4_t *pmVar2;
  float local_28;
  float local_24;
  float local_20;
  
  if ((((byte)this[0x20] & 0x40) == 0) && (((byte)this[0x22] & 0xfd) != 0)) {
    pfVar1 = (float *)(**(code **)(*(int *)this + 0x24))(this);
    if ((vec3_angle != *pfVar1) || ((DAT_01053d40 != pfVar1[1] || (DAT_01053d44 != pfVar1[2])))) {
      pmVar2 = (matrix3x4_t *)(**(code **)(*(int *)this + 0x28))(this);
      VectorITransform((float *)param_1,pmVar2,&local_28);
      goto LAB_0042a086;
    }
  }
  pfVar1 = (float *)(**(code **)(*(int *)this + 0x20))(this);
  local_28 = *(float *)param_1 - *pfVar1;
  local_24 = *(float *)(param_1 + 4) - pfVar1[1];
  local_20 = *(float *)(param_1 + 8) - pfVar1[2];
LAB_0042a086:
  CollisionToNormalizedSpace(this,(Vector *)&local_28,param_2);
  return param_2;
}

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)