L L4D2node

CSentence::GetEstimatedTimes

0x000ddc50 · 154 bytes · __thiscall

_ZN9CSentence17GetEstimatedTimesERfS0_

Decompiled

undefined (3 params)

/* CSentence::GetEstimatedTimes(float&, float&) */

void __thiscall CSentence::GetEstimatedTimes(CSentence *this,float *param_1,float *param_2)

{
  undefined4 *puVar1;
  float fVar2;
  int iVar3;
  float *pfVar4;
  undefined4 *puVar5;
  float fVar6;
  float fVar7;
  
  iVar3 = *(int *)(this + 0x10);
  if (iVar3 == 0) {
    *param_2 = 0.0;
    *param_1 = 0.0;
    return;
  }
  if (iVar3 < 1) {
    fVar6 = -100000.0;
  }
  else {
    puVar5 = *(undefined4 **)(this + 4);
    fVar6 = -100000.0;
    fVar7 = 100000.0;
    puVar1 = puVar5 + iVar3;
    do {
      pfVar4 = (float *)*puVar5;
      puVar5 = puVar5 + 1;
      fVar2 = *pfVar4;
      if (fVar2 <= fVar7) {
        fVar7 = fVar2;
      }
      fVar2 = pfVar4[1];
      if (fVar6 <= fVar2) {
        fVar6 = fVar2;
      }
    } while (puVar5 != puVar1);
    if (fVar7 != 100000.0) goto joined_r0x000ddcd2;
  }
  fVar7 = 0.0;
joined_r0x000ddcd2:
  if (fVar6 == -100000.0) {
    fVar6 = 1.0;
  }
  *param_1 = fVar7;
  *param_2 = fVar6;
  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)