L L4D2node

CPhysicsSpring::Spawn

0x0079ca90 · 202 bytes · __thiscall

_ZN14CPhysicsSpring5SpawnEv

Decompiled

undefined (1 param)

/* CPhysicsSpring::Spawn() */

void __thiscall CPhysicsSpring::Spawn(CPhysicsSpring *this)

{
  float fVar1;
  float fVar2;
  float fVar3;
  
  CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0);
  if (((byte)this[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  *(float *)(this + 0x460) = *(float *)(this + 0x2e0);
  *(float *)(this + 0x464) = *(float *)(this + 0x2e4);
  *(float *)(this + 0x468) = *(float *)(this + 0x2e8);
  if (*(float *)(this + 0x44c) <= 0.0) {
    fVar3 = *(float *)(this + 0x46c) - *(float *)(this + 0x2e0);
    fVar1 = *(float *)(this + 0x470) - *(float *)(this + 0x2e4);
    fVar2 = *(float *)(this + 0x474) - *(float *)(this + 0x2e8);
    *(float *)(this + 0x44c) = SQRT(fVar1 * fVar1 + fVar3 * fVar3 + fVar2 * fVar2);
  }
  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)