L L4D2node

PhysTeleportConstrainedEntity

0x007742e0 · 488 bytes · __cdecl

_Z29PhysTeleportConstrainedEntityP11CBaseEntityP14IPhysicsObjectS2_RK6VectorRK6QAngleb

Decompiled

undefined (6 params)

/* PhysTeleportConstrainedEntity(CBaseEntity*, IPhysicsObject*, IPhysicsObject*, Vector const&,
   QAngle const&, bool) */

void PhysTeleportConstrainedEntity
               (CBaseEntity *param_1,IPhysicsObject *param_2,IPhysicsObject *param_3,Vector *param_4
               ,QAngle *param_5,bool param_6)

{
  int *piVar1;
  char cVar2;
  CBaseEntity *pCVar3;
  CBaseEntity *this;
  bool bVar4;
  undefined4 local_100;
  undefined4 local_fc;
  undefined4 local_f8;
  float local_f4 [3];
  undefined4 local_e8;
  undefined4 local_e4;
  undefined4 local_e0;
  matrix3x4_t local_dc [48];
  matrix3x4_t local_ac [48];
  matrix3x4_t local_7c [12];
  undefined4 local_70;
  undefined4 local_60;
  undefined4 local_50;
  matrix3x4_t local_4c [60];
  
  pCVar3 = (CBaseEntity *)(**(code **)(*(int *)param_2 + 0x48))(param_2);
  this = (CBaseEntity *)(**(code **)(*(int *)param_3 + 0x48))(param_3);
  if ((this != (CBaseEntity *)0x0) && (pCVar3 != (CBaseEntity *)0x0)) {
    if ((pCVar3 != param_1) && (bVar4 = this != param_1, this = pCVar3, bVar4)) {
      Msg("Bogus teleport notification!!\n");
      return;
    }
    if (((this[0x186] == (CBaseEntity)0x6) &&
        (piVar1 = *(int **)(this + 0x238), piVar1 != (int *)0x0)) &&
       (cVar2 = (**(code **)(*piVar1 + 0x2c))(piVar1), cVar2 != '\0')) {
      local_100 = *(undefined4 *)param_5;
      local_fc = *(undefined4 *)(param_5 + 4);
      local_f8 = *(undefined4 *)(param_5 + 8);
      if (!param_6) {
        if (((byte)param_1[0x14d] & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition(param_1);
        }
        local_100 = *(undefined4 *)(param_1 + 0x37c);
        local_fc = *(undefined4 *)(param_1 + 0x380);
        local_f8 = *(undefined4 *)(param_1 + 900);
      }
      AngleMatrix((QAngle *)&local_100,param_4,local_dc);
      MatrixInvert(local_dc,local_ac);
      if (((byte)param_1[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(param_1);
      }
      ConcatTransforms((matrix3x4_t *)(param_1 + 0x28c),local_ac,local_4c);
      if (((byte)this[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(this);
      }
      ConcatTransforms(local_4c,(matrix3x4_t *)(this + 0x28c),local_7c);
      MatrixAngles(local_7c,local_f4);
      local_e8 = local_70;
      local_e4 = local_60;
      local_e0 = local_50;
      (**(code **)(*(int *)this + 0x1dc))(this,&local_e8,local_f4,0);
    }
  }
  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)