L L4D2node

CFourWheelVehiclePhysics::VPhysicsGetObjectList

0x006b01e0 · 123 bytes · __thiscall

_ZN24CFourWheelVehiclePhysics21VPhysicsGetObjectListEPP14IPhysicsObjecti

Decompiled

undefined (3 params)

/* CFourWheelVehiclePhysics::VPhysicsGetObjectList(IPhysicsObject**, int) */

void __thiscall
CFourWheelVehiclePhysics::VPhysicsGetObjectList
          (CFourWheelVehiclePhysics *this,IPhysicsObject **param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  undefined *puVar3;
  int iVar4;
  
  iVar4 = 0;
  uVar1 = *(uint *)(this + 4);
  if (((uVar1 != 0xffffffff) &&
      (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
    iVar4 = *(int *)(puVar3 + 4);
  }
  iVar2 = 0;
  if ((*(IPhysicsObject **)(iVar4 + 0x238) != (IPhysicsObject *)0x0) && (0 < param_2)) {
    *param_1 = *(IPhysicsObject **)(iVar4 + 0x238);
    iVar2 = 1;
  }
  iVar4 = 0;
  do {
    if ((*(IPhysicsObject **)(this + iVar4 * 4 + 0x50) != (IPhysicsObject *)0x0) &&
       (iVar2 < param_2)) {
      param_1[iVar2] = *(IPhysicsObject **)(this + iVar4 * 4 + 0x50);
      iVar2 = iVar2 + 1;
    }
    iVar4 = iVar4 + 1;
  } while (iVar4 != 4);
  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)