L L4D2node

CTongue::OnUpdateDroppingToGroundState

0x00841c20 · 206 bytes · __thiscall

_ZN7CTongue29OnUpdateDroppingToGroundStateEv

Decompiled

undefined (1 param)

/* CTongue::OnUpdateDroppingToGroundState() */

void __thiscall CTongue::OnUpdateDroppingToGroundState(CTongue *this)

{
  uint uVar1;
  char cVar2;
  undefined *puVar3;
  int *piVar4;
  longdouble lVar5;
  float fVar6;
  float fVar7;
  
  if (*(float *)(this + 0x4b8) <= 0.0) {
    fVar6 = 99999.9;
  }
  else {
    lVar5 = (longdouble)IntervalTimer::Now();
    fVar6 = (float)lVar5 - *(float *)(this + 0x4b8);
  }
  uVar1 = *(uint *)(this + 0x44c);
  piVar4 = (int *)0x0;
  if (((uVar1 != 0xffffffff) &&
      (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
    piVar4 = *(int **)(puVar3 + 4);
  }
  cVar2 = (**(code **)(*piVar4 + 0x778))(piVar4);
  if (cVar2 == '\0') {
    fVar7 = *(float *)(TonguePlayerDroppingToGroundTime._28_4_ + 0x2c);
  }
  else {
    fVar7 = *(float *)(TongueDroppingToGroundTime._28_4_ + 0x2c);
  }
  if ((fVar7 < fVar6) && (*(int *)(this + 0x4ac) != 0)) {
    State_Transition();
    return;
  }
  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)