L L4D2node

CPhysicsSpring::Activate

0x0079e560 · 525 bytes · __thiscall

_ZN14CPhysicsSpring8ActivateEv

Decompiled

undefined (1 param)

/* CPhysicsSpring::Activate() */

void __thiscall CPhysicsSpring::Activate(CPhysicsSpring *this)

{
  char cVar1;
  undefined4 uVar2;
  undefined1 *puVar3;
  int iVar4;
  undefined1 *puVar5;
  undefined4 *puVar6;
  byte bVar7;
  IPhysicsObject *local_50;
  IPhysicsObject *local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  byte local_1f;
  
  bVar7 = 0;
  CBaseEntity::Activate((CBaseEntity *)this);
  if (*(int *)(this + 0x440) == 0) {
    GetSpringObjectConnections
              (this,*(undefined4 *)(this + 0x458),*(undefined4 *)(this + 0x45c),&local_50,&local_4c)
    ;
    if (((local_50 == (IPhysicsObject *)0x0) || (local_4c == (IPhysicsObject *)0x0)) ||
       (local_50 == local_4c)) {
      puVar5 = *(undefined1 **)(this + 0x45c);
      if (puVar5 == (undefined1 *)0x0) {
        puVar5 = &DAT_00d539c2;
      }
      puVar3 = &DAT_00d539c2;
      if (*(undefined1 **)(this + 0x458) != (undefined1 *)0x0) {
        puVar3 = *(undefined1 **)(this + 0x458);
      }
      uVar2 = CBaseEntity::GetDebugName((CBaseEntity *)this);
      DevMsg("ERROR: Can\'t init spring %s from \"%s\" to \"%s\"\n",uVar2,puVar3,puVar5);
      UTIL_Remove((CBaseEntity *)this);
    }
    else {
      cVar1 = PointIsNearer(local_4c,(Vector *)(this + 0x46c),(Vector *)(this + 0x460));
      if (cVar1 == '\0') {
        local_2c = *(undefined4 *)(this + 0x460);
        local_28 = *(undefined4 *)(this + 0x464);
        local_24 = *(undefined4 *)(this + 0x468);
        local_38 = *(undefined4 *)(this + 0x46c);
        *(undefined4 *)(this + 0x46c) = local_2c;
        local_34 = *(undefined4 *)(this + 0x470);
        *(undefined4 *)(this + 0x470) = local_28;
        local_30 = *(undefined4 *)(this + 0x474);
        *(undefined4 *)(this + 0x460) = local_38;
        *(undefined4 *)(this + 0x464) = local_34;
        *(undefined4 *)(this + 0x468) = local_30;
        *(undefined4 *)(this + 0x474) = local_24;
      }
      else {
        local_38 = *(undefined4 *)(this + 0x460);
        local_34 = *(undefined4 *)(this + 0x464);
        local_30 = *(undefined4 *)(this + 0x468);
        local_2c = *(undefined4 *)(this + 0x46c);
        local_28 = *(undefined4 *)(this + 0x470);
        local_24 = *(undefined4 *)(this + 0x474);
      }
      local_48 = *(undefined4 *)(this + 0x448);
      puVar6 = &local_48;
      for (iVar4 = 0xb; iVar4 != 0; iVar4 = iVar4 + -1) {
        *puVar6 = 0;
        puVar6 = puVar6 + (uint)bVar7 * -2 + 1;
      }
      local_40 = *(undefined4 *)(this + 0x450);
      local_44 = *(undefined4 *)(this + 0x44c);
      local_1f = (byte)*(undefined4 *)(this + 0x148) & 1;
      local_3c = *(undefined4 *)(this + 0x454);
      uVar2 = (**(code **)(*physenv + 0x38))(physenv,local_50,local_4c,&local_48);
      *(undefined4 *)(this + 0x440) = uVar2;
    }
  }
  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)