L L4D2node

CAI_Expresser::CanSpeak

0x005d1220 · 42 bytes · __thiscall

_ZN13CAI_Expresser8CanSpeakEv

Decompiled

undefined (1 param)

/* CAI_Expresser::CanSpeak() */

bool __thiscall CAI_Expresser::CanSpeak(CAI_Expresser *this)

{
  bool bVar1;
  float fVar2;
  
  bVar1 = false;
  if (*(float *)(gpGlobals + 0xc) != *(float *)(this + 0x3c)) {
    fVar2 = *(float *)(this + 0x34);
    if (*(float *)(this + 0x34) <= *(float *)(this + 0x2c)) {
      fVar2 = *(float *)(this + 0x2c);
    }
    bVar1 = fVar2 <= *(float *)(gpGlobals + 0xc);
  }
  return bVar1;
}

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)