L L4D2node

CBreakableSurface::ShatterPane

0x006b8d20 · 451 bytes · __thiscall

_ZN17CBreakableSurface11ShatterPaneEiiRK6VectorS2_

Decompiled

undefined (5 params)

/* CBreakableSurface::ShatterPane(int, int, Vector const&, Vector const&) */

undefined4 __thiscall
CBreakableSurface::ShatterPane
          (CBreakableSurface *this,int param_1,int param_2,Vector *param_3,Vector *param_4)

{
  float fVar1;
  float fVar2;
  char cVar3;
  float fVar4;
  float fVar5;
  QAngle local_4c [12];
  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_4c);
    AngleVectors(local_4c,(Vector *)0x0,(Vector *)&local_40,(Vector *)&local_34);
    fVar5 = (float)param_1;
    fVar1 = *(float *)(this + 0x504);
    fVar4 = (float)param_2;
    fVar2 = *(float *)(this + 0x508);
    local_24 = local_30 * fVar4 * fVar2 + *(float *)(this + 0x51c) + local_3c * fVar1 * fVar5;
    local_20 = local_2c * fVar4 * fVar2 + *(float *)(this + 0x520) + local_38 * fVar1 * fVar5;
    local_28 = fVar4 * local_34 * fVar2 + *(float *)(this + 0x518) + local_40 * fVar1 * fVar5;
    CreateShards((Vector *)this,(QAngle *)&local_28,(Vector *)local_4c,param_3,(float)param_4,fVar1,
                 (int)fVar2);
    CBreakable::DamageSound((CBreakable *)this);
    return 1;
  }
  return 0;
}

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)