L L4D2node

CPhysConstraint::NotifySystemEvent

0x007744e0 · 257 bytes · __thiscall

_ZN15CPhysConstraint17NotifySystemEventEP11CBaseEntity21notify_system_event_tRK28notify_system_event_params_t

Decompiled

undefined (4 params)

/* CPhysConstraint::NotifySystemEvent(CBaseEntity*, notify_system_event_t,
   notify_system_event_params_t const&) */

void __thiscall
CPhysConstraint::NotifySystemEvent
          (CPhysConstraint *this,CBaseEntity *param_1,int param_3,undefined4 *param_4)

{
  Vector VVar1;
  float *pfVar2;
  Vector *pVVar3;
  IPhysicsObject *pIVar4;
  IPhysicsObject *pIVar5;
  float fVar6;
  
  if ((param_3 == 0) && (*(int *)(gpGlobals + 0x18) != *(int *)(this + 0x45c))) {
    if (((byte)param_1[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(param_1);
    }
    pfVar2 = (float *)*param_4;
    fVar6 = SQRT((pfVar2[1] - *(float *)(param_1 + 0x2e4)) *
                 (pfVar2[1] - *(float *)(param_1 + 0x2e4)) +
                 (*pfVar2 - *(float *)(param_1 + 0x2e0)) * (*pfVar2 - *(float *)(param_1 + 0x2e0)) +
                 (pfVar2[2] - *(float *)(param_1 + 0x2e8)) *
                 (pfVar2[2] - *(float *)(param_1 + 0x2e8)));
    if (*(float *)(this + 0x460) <= fVar6 && fVar6 != *(float *)(this + 0x460)) {
      *(undefined4 *)(this + 0x45c) = *(undefined4 *)(gpGlobals + 0x18);
      pVVar3 = (Vector *)*param_4;
      VVar1 = pVVar3[0x18];
      pIVar4 = (IPhysicsObject *)
               (**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
      pIVar5 = (IPhysicsObject *)
               (**(code **)(**(int **)(this + 0x440) + 0x18))(*(int **)(this + 0x440));
      PhysTeleportConstrainedEntity
                (param_1,pIVar5,pIVar4,pVVar3,(QAngle *)(pVVar3 + 0xc),(bool)VVar1);
      return;
    }
  }
  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)