L L4D2node

ClipTraceToTongue::ClipTongueSegment

0x005295b0 · 233 bytes · __thiscall

_ZN17ClipTraceToTongue17ClipTongueSegmentEP7CTongueRK6VectorS4_

Decompiled

undefined (4 params)

/* ClipTraceToTongue::ClipTongueSegment(CTongue*, Vector const&, Vector const&) */

void __thiscall
ClipTraceToTongue::ClipTongueSegment
          (ClipTraceToTongue *this,CTongue *param_1,Vector *param_2,Vector *param_3)

{
  char cVar1;
  float fVar2;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  float local_1c;
  float local_18;
  float local_14;
  float local_10;
  
  cVar1 = CalcLineToLineIntersectionSegment
                    ((Vector *)(this + 0x14),(Vector *)(this + 0x20),param_2,param_3,
                     (Vector *)&local_24,(Vector *)&local_18,&local_2c,&local_28);
  if ((((cVar1 != '\0') && (0.0 <= local_2c)) && (local_2c <= 1.0)) &&
     ((0.0 <= local_28 && (local_28 <= 1.0)))) {
    fVar2 = SQRT((local_20 - local_14) * (local_20 - local_14) +
                 (local_24 - local_18) * (local_24 - local_18) +
                 (local_1c - local_10) * (local_1c - local_10));
    if (fVar2 < *(float *)(this + 0x10) || fVar2 == *(float *)(this + 0x10)) {
      *(float *)(this + 0x10) = fVar2;
      *(float *)(this + 4) = local_18;
      *(float *)(this + 8) = local_14;
      *(float *)(this + 0xc) = local_10;
      *(CTongue **)this = param_1;
    }
  }
  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)