L L4D2node

CNetChan::IsRemoteDisconnected

0x001ad9e0 · 79 bytes · __thiscall

_ZNK8CNetChan20IsRemoteDisconnectedEv

Decompiled

undefined (1 param)

/* CNetChan::IsRemoteDisconnected() const */

undefined4 __thiscall CNetChan::IsRemoteDisconnected(CNetChan *this)

{
  netadr_s *this_00;
  short sVar1;
  undefined4 uVar2;
  longlong lVar3;
  
  this_00 = (netadr_s *)(this + 0x98);
  uVar2 = netadr_s::IsValid(this_00);
  if ((((char)uVar2 == '\0') || (sVar1 = netadr_s::GetPort(this_00), sVar1 != 1)) ||
     (lVar3 = (**(code **)(*(int *)g_pSteamSocketMgr + 0x1c))(g_pSteamSocketMgr,this_00), lVar3 != 0
     )) {
    uVar2 = 0;
  }
  return uVar2;
}

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)