L L4D2node

CPhysConstraint::~CPhysConstraint

0x00773ea0 · 307 bytes · __thiscall

_ZN15CPhysConstraintD1Ev

Decompiled

undefined (1 param)

/* CPhysConstraint::~CPhysConstraint() */

void __thiscall CPhysConstraint::~CPhysConstraint(CPhysConstraint *this)

{
  int *piVar1;
  uint uVar2;
  int iVar3;
  IPhysicsObject *pIVar4;
  IPhysicsObject *pIVar5;
  
  piVar1 = *(int **)(this + 0x440);
  *(undefined ***)this = &PTR__CPhysConstraint_00caeaa8;
  if (piVar1 != (int *)0x0) {
    (**(code **)(*piVar1 + 0xc))(piVar1);
    piVar1 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x18))(*(int **)(this + 0x440));
    if (piVar1 != (int *)0x0) {
      uVar2 = (**(code **)(*piVar1 + 0x50))(piVar1);
      (**(code **)(*piVar1 + 0x4c))(piVar1,uVar2 & 0xfffd);
    }
    piVar1 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
    if (piVar1 != (int *)0x0) {
      uVar2 = (**(code **)(*piVar1 + 0x50))(piVar1);
      (**(code **)(*piVar1 + 0x4c))(piVar1,uVar2 & 0xfffd);
    }
    if (((byte)this[0x148] & 1) != 0) {
      pIVar4 = (IPhysicsObject *)
               (**(code **)(**(int **)(this + 0x440) + 0x18))(*(int **)(this + 0x440));
      pIVar5 = (IPhysicsObject *)
               (**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
      if ((pIVar5 != (IPhysicsObject *)0x0) && (pIVar4 != (IPhysicsObject *)0x0)) {
        PhysEnableEntityCollisions(pIVar4,pIVar5);
      }
    }
    piVar1 = *(int **)(this + 0x440);
    if (piVar1 != (int *)0x0) {
      iVar3 = (**(code **)(*piVar1 + 0x38))(piVar1);
      if (iVar3 == 0) {
        if (physenv != (int *)0x0) {
          (**(code **)(*physenv + 0x5c))(physenv,*(undefined4 *)(this + 0x440));
        }
      }
      else if (g_pPhys2World != (int *)0x0) {
        (**(code **)(*g_pPhys2World + 0x24))(g_pPhys2World,iVar3);
      }
    }
  }
  CBaseEntityOutput::~CBaseEntityOutput((CBaseEntityOutput *)(this + 0x464));
  *(undefined ***)this = &PTR__CServerOnlyEntity_00c5ff48;
  CBaseEntity::~CBaseEntity((CBaseEntity *)this);
  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)