L L4D2node

CBaseEntity::CreateBubbleTrailTracer

0x005b2dd0 · 290 bytes · __thiscall

_ZN11CBaseEntity23CreateBubbleTrailTracerERK6VectorS2_S2_

Decompiled

undefined (4 params)

/* CBaseEntity::CreateBubbleTrailTracer(Vector const&, Vector const&, Vector const&) */

void __thiscall
CBaseEntity::CreateBubbleTrailTracer
          (CBaseEntity *this,Vector *param_1,Vector *param_2,Vector *param_3)

{
  int iVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float local_24;
  float local_20;
  float local_1c;
  Vector local_18 [12];
  
  fVar4 = *(float *)param_1 - *(float *)param_2;
  fVar2 = *(float *)(param_1 + 4) - *(float *)(param_2 + 4);
  fVar3 = *(float *)(param_1 + 8) - *(float *)(param_2 + 8);
  fVar2 = fVar2 * fVar2 + fVar4 * fVar4 + fVar3 * fVar3;
  if (160000.0 < fVar2) {
    iVar1 = 0x14;
    local_24 = *(float *)param_3 * 400.0;
    local_20 = *(float *)(param_3 + 4) * 400.0;
    local_1c = *(float *)(param_3 + 8) * 400.0;
  }
  else {
    local_1c = SQRT(fVar2) - 0.1;
    iVar1 = (int)(local_1c * 0.05);
    local_24 = *(float *)param_3 * local_1c;
    local_20 = *(float *)(param_3 + 4) * local_1c;
    local_1c = local_1c * *(float *)(param_3 + 8);
  }
  local_1c = local_1c + *(float *)(param_1 + 8);
  local_20 = local_20 + *(float *)(param_1 + 4);
  local_24 = local_24 + *(float *)param_1;
  ComputeTracerStartPosition(this,param_1,local_18);
  UTIL_BubbleTrail(local_18,(Vector *)&local_24,iVar1);
  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)