L L4D2node

CPhysConstraint::ActivateConstraint

0x00774ed0 · 451 bytes · __thiscall

_ZN15CPhysConstraint18ActivateConstraintEv

Decompiled

undefined (1 param)

/* CPhysConstraint::ActivateConstraint() */

undefined4 __thiscall CPhysConstraint::ActivateConstraint(CPhysConstraint *this)

{
  char cVar1;
  undefined4 uVar2;
  char *pcVar3;
  int *piVar4;
  int *piVar5;
  int iVar6;
  undefined1 *puVar7;
  undefined1 *puVar8;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  int *local_34;
  int *local_30;
  int *local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined1 local_20;
  
  local_30 = (int *)0x0;
  local_34 = (int *)0x0;
  local_2c = (int *)0x0;
  local_4c = 0;
  local_48 = 0;
  piVar4 = *(int **)(this + 0x440);
  local_44 = 0;
  local_40 = 0;
  local_3c = 0;
  local_38 = 0;
  local_20 = 0;
  local_24 = 0x3f800000;
  local_28 = 0x3f800000;
  if (piVar4 == (int *)0x0) {
    GetConstraintObjects(this,(hl_constraint_info_t *)&local_4c);
    if ((((local_34 == (int *)0x0) ||
         (cVar1 = (**(code **)(*local_34 + 8))(local_34), cVar1 != '\0')) ||
        (iVar6 = (**(code **)(*local_34 + 0x120))(local_34), iVar6 != 0)) &&
       (((local_30 == (int *)0x0 || (cVar1 = (**(code **)(*local_30 + 8))(local_30), cVar1 != '\0'))
        || (iVar6 = (**(code **)(*local_30 + 0x120))(local_30), iVar6 != 0)))) {
      puVar8 = *(undefined1 **)(this + 0x444);
      pcVar3 = "world";
      if (*(char **)(this + 0x448) != (char *)0x0) {
        pcVar3 = *(char **)(this + 0x448);
      }
      if (puVar8 == (undefined1 *)0x0) {
        puVar8 = &DAT_00d539c2;
      }
      puVar7 = &DAT_00d539c2;
      if (*(undefined1 **)(this + 0x154) != (undefined1 *)0x0) {
        puVar7 = *(undefined1 **)(this + 0x154);
      }
      Warning("Constraint (%s) attached to two static or shadow objects (%s and %s)!!!\n",puVar7,
              puVar8,pcVar3);
      return 0;
    }
    piVar4 = (int *)GetConstraintGroup(*(undefined4 *)(this + 0x450));
    if (piVar4 == (int *)0x0) {
      piVar4 = local_2c;
    }
    piVar5 = (int *)(**(code **)(*(int *)this + 0x32c))
                              (this,piVar4,(hl_constraint_info_t *)&local_4c);
    *(int **)(this + 0x440) = piVar5;
    uVar2 = 0;
    if (piVar5 != (int *)0x0) {
      (**(code **)(*piVar5 + 0x10))(piVar5,this);
      if (piVar4 != (int *)0x0) {
        (**(code **)(*piVar4 + 8))(piVar4);
      }
      (**(code **)(*(int *)this + 0x328))(this,(hl_constraint_info_t *)&local_4c);
      uVar2 = 1;
    }
  }
  else {
    local_34 = (int *)(**(code **)(*piVar4 + 0x18))(piVar4);
    local_30 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
    (**(code **)(*(int *)this + 0x328))(this,&local_4c);
    uVar2 = 1;
  }
  return uVar2;
}

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)