L L4D2node

UTIL_BubbleTrail

0x00b2d4e0 · 513 bytes · __cdecl

_Z16UTIL_BubbleTrailRK6VectorS1_i

Decompiled

undefined (3 params)

/* UTIL_BubbleTrail(Vector const&, Vector const&, int) */

void UTIL_BubbleTrail(Vector *param_1,Vector *param_2,int param_3)

{
  float fVar1;
  bool bVar2;
  longdouble lVar3;
  longdouble lVar4;
  float fVar5;
  float local_50;
  float local_48;
  float local_44;
  float local_40;
  undefined **local_3c [11];
  
  lVar3 = (longdouble)
          UTIL_FindWaterSurface(param_1,*(float *)(param_1 + 8),*(float *)(param_1 + 8) + 256.0);
  fVar1 = *(float *)(param_1 + 8);
  lVar4 = (longdouble)
          UTIL_FindWaterSurface(param_2,*(float *)(param_2 + 8),*(float *)(param_2 + 8) + 256.0);
  bVar2 = (float)lVar3 - fVar1 == 0.0;
  fVar5 = (float)lVar4 - *(float *)(param_2 + 8);
  if ((fVar5 == 0.0) && (bVar2)) {
    return;
  }
  local_50 = ((float)lVar3 - fVar1) + *(float *)(param_1 + 8);
  if (fVar5 != 0.0) {
    if (!bVar2) goto LAB_00b2d63f;
LAB_00b2d6c0:
    local_50 = fVar5 + *(float *)(param_2 + 8);
  }
  else if (bVar2) goto LAB_00b2d6c0;
  lVar3 = (longdouble)IntersectRayWithAAPlane(param_1,param_2,2,1.0,local_50);
  fVar1 = (float)lVar3;
  local_48 = (*(float *)param_2 - *(float *)param_1) * fVar1 + *(float *)param_1;
  local_44 = (*(float *)(param_2 + 4) - *(float *)(param_1 + 4)) * fVar1 + *(float *)(param_1 + 4);
  local_40 = (*(float *)(param_2 + 8) - *(float *)(param_1 + 8)) * fVar1 + *(float *)(param_1 + 8);
  if (bVar2) {
    param_1 = (Vector *)&local_48;
    param_3 = (int)((1.0 - fVar1) * (float)param_3);
  }
  else {
    param_2 = (Vector *)&local_48;
    param_3 = (int)((float)param_3 * fVar1);
  }
LAB_00b2d63f:
  CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
  local_3c[0] = &PTR__CBroadcastRecipientFilter_00c09928;
                    /* try { // try from 00b2d654 to 00b2d658 has its CatchHandler @ 00b2d701 */
  CRecipientFilter::AddAllPlayers((CRecipientFilter *)local_3c);
                    /* try { // try from 00b2d69b to 00b2d69d has its CatchHandler @ 00b2d6e8 */
  (**(code **)(*(int *)te + 0x48))
            (te,(CRecipientFilter *)local_3c,0,param_1,param_2,local_50,g_sModelIndexBubbles,param_3
             ,0x41000000);
  local_3c[0] = &PTR__CBroadcastRecipientFilter_00c09928;
  CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
  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)