L L4D2node

CBaseEntity::GetParentToWorldTransform

0x00609b20 · 210 bytes · __thiscall

_ZN11CBaseEntity25GetParentToWorldTransformER11matrix3x4_t

Decompiled

undefined (2 params)

/* CBaseEntity::GetParentToWorldTransform(matrix3x4_t&) */

matrix3x4_t * __thiscall
CBaseEntity::GetParentToWorldTransform(CBaseEntity *this,matrix3x4_t *param_1)

{
  uint uVar1;
  CBaseEntity *this_00;
  int *piVar2;
  char cVar3;
  int *piVar4;
  undefined *puVar5;
  
  piVar2 = mdlcache;
  uVar1 = *(uint *)(this + 0x188);
  if ((((uVar1 == 0xffffffff) ||
       (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) ||
     (this_00 = *(CBaseEntity **)(puVar5 + 4), this_00 == (CBaseEntity *)0x0)) {
    SetIdentityMatrix(param_1);
  }
  else {
    if (this[0x185] != (CBaseEntity)0x0) {
      (**(code **)(*mdlcache + 0x68))(mdlcache);
                    /* try { // try from 00609bb3 to 00609bd9 has its CatchHandler @ 00609c0d */
      piVar4 = (int *)(**(code **)(*(int *)this_00 + 0xf0))(this_00);
      if ((piVar4 != (int *)0x0) &&
         (cVar3 = (**(code **)(*piVar4 + 0x370))(piVar4,this[0x185],param_1), cVar3 != '\0')) {
        (**(code **)(*piVar2 + 0x6c))(piVar2);
        return (matrix3x4_t *)(CBaseEntity *)param_1;
      }
      (**(code **)(*piVar2 + 0x6c))(piVar2);
    }
    if (((byte)this_00[0x14d] & 8) != 0) {
      CalcAbsolutePosition(this_00);
    }
    param_1 = (matrix3x4_t *)(this_00 + 0x28c);
  }
  return param_1;
}

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)