L L4D2node

CBreakableSurface::DropPane

0x006b8af0 · 547 bytes · __thiscall

_ZN17CBreakableSurface8DropPaneEii

Decompiled

undefined (3 params)

/* CBreakableSurface::DropPane(int, int) */

void __thiscall CBreakableSurface::DropPane(CBreakableSurface *this,int param_1,int param_2)

{
  float fVar1;
  float fVar2;
  char cVar3;
  CBaseEntity *this_00;
  int iVar4;
  int iVar5;
  int iVar6;
  float fVar7;
  float fVar8;
  QAngle local_58 [12];
  float local_4c;
  float local_48;
  float local_44;
  float local_40;
  float local_3c;
  float local_38;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  if ((((-1 < param_1) && (param_1 < *(int *)(this + 0x4fc))) && (-1 < param_2)) &&
     ((param_2 < *(int *)(this + 0x500) && (cVar3 = IsBroken(this,param_1,param_2), cVar3 == '\0')))
     ) {
    BreakPane(this,param_1,param_2);
    local_28 = (float)(*(uint *)(this + 0x50c) ^ 0x80000000);
    local_24 = (float)(*(uint *)(this + 0x510) ^ 0x80000000);
    local_20 = (float)(*(uint *)(this + 0x514) ^ 0x80000000);
    VectorAngles((Vector *)&local_28,local_58);
    AngleVectors(local_58,(Vector *)0x0,(Vector *)&local_4c,(Vector *)&local_40);
    fVar8 = (float)param_1;
    fVar7 = (float)param_2;
    fVar1 = *(float *)(this + 0x504);
    fVar2 = *(float *)(this + 0x508);
    local_30 = local_3c * fVar7 * fVar2 + *(float *)(this + 0x51c) + local_48 * fVar1 * fVar8;
    local_2c = local_38 * fVar7 * fVar2 + *(float *)(this + 0x520) + local_44 * fVar1 * fVar8;
    local_34 = fVar7 * local_40 * fVar2 + *(float *)(this + 0x518) + fVar1 * local_4c * fVar8;
    CreateShards((Vector *)this,(QAngle *)&local_34,(Vector *)local_58,(Vector *)&vec3_origin,
                 2.447221e-38,12.0,0x41400000);
    CBreakable::DamageSound((CBreakable *)this);
    this_00 = (CBaseEntity *)CWindowPane::CreateWindowPane((Vector *)&local_34,local_58);
    if (this_00 != (CBaseEntity *)0x0) {
      iVar4 = rand();
      iVar5 = rand();
      iVar6 = rand();
      local_28 = (float)iVar4 * 0.0073244423 - 120.0;
      local_24 = (float)iVar5 * 0.0073244423 - 120.0;
      local_20 = (float)iVar6 * 0.0073244423 - 120.0;
      CBaseEntity::SetLocalAngularVelocity(this_00,(QAngle *)&local_28);
      return;
    }
  }
  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)