L L4D2node

CBaseCombatWeapon::FallInit

0x005feb50 · 559 bytes · __thiscall

_ZN17CBaseCombatWeapon8FallInitEv

Decompiled

undefined (1 param)

/* CBaseCombatWeapon::FallInit() */

void __thiscall CBaseCombatWeapon::FallInit(CBaseCombatWeapon *this)

{
  CCollisionProperty *this_00;
  code *pcVar1;
  int *piVar2;
  undefined4 uVar3;
  uint uVar4;
  int iVar5;
  int *piVar6;
  undefined1 local_d4 [16];
  matrix3x4_t local_c4 [48];
  matrix3x4_t local_94 [48];
  matrix3x4_t local_64 [48];
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined1 local_20;
  
  pcVar1 = *(code **)(*(int *)this + 0x70);
  uVar3 = (**(code **)(*(int *)this + 0x508))(this);
  (*pcVar1)(this,uVar3);
  this_00 = (CCollisionProperty *)(this + 0x194);
  (**(code **)(*(int *)this + 0x298))(this);
  uVar4 = (**(code **)(*(int *)(this + 0x194) + 0x30))(this_00);
  iVar5 = CBaseEntity::VPhysicsInitNormal((CBaseEntity *)this,6,uVar4 | 0x1008,0,0);
  piVar6 = g_PhysWorldObject;
  if (iVar5 == 0) {
    CBaseEntity::SetMoveType((CBaseEntity *)this,5,0);
    CCollisionProperty::SetSolid(this_00,2);
    CCollisionProperty::SetSolidFlags(this_00,(uint)(*(ushort *)(this + 0x1b4) | 8));
  }
  else if (((byte)this[0x148] & 1) != 0) {
    piVar2 = *(int **)(this + 0x238);
    if ((piVar2 != (int *)0x0) && (g_PhysWorldObject != (int *)0x0)) {
      SetIdentityMatrix(local_64);
      local_20 = 1;
      local_30 = 0;
      local_2c = 0;
      local_34 = 0x3f800000;
      local_28 = 0x3f800000;
      local_24 = 0x3f800000;
      (**(code **)(*piVar6 + 200))(piVar6,local_94);
      MatrixInvert(local_94,local_c4);
      (**(code **)(*piVar2 + 200))(piVar2,local_94);
      ConcatTransforms(local_c4,local_94,local_64);
      local_30 = 0x458e0ba3;
      local_2c = 0x458e0ba3;
      piVar6 = (int *)(**(code **)(*physenv + 0x48))(physenv,piVar6,piVar2,0,local_64);
      *(int **)(this + 0x1478) = piVar6;
      (**(code **)(*piVar6 + 0x10))(piVar6,this);
    }
  }
  (**(code **)(*(int *)this + 0x3cc))(this);
  CBaseEntity::ThinkSet((_func_void *)local_d4,(float)this,(char *)0x5a9);
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.1,(char *)0x0);
  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)