L L4D2node

CBaseClientState::ShouldUseDirectConnectAddress

0x001013b0 · 101 bytes · __thiscall

_ZNK16CBaseClientState29ShouldUseDirectConnectAddressERK12CAddressList.part.48

Decompiled

undefined (2 params)

/* CBaseClientState::ShouldUseDirectConnectAddress(CAddressList const&) const [clone .part.48] */

uint __thiscall
CBaseClientState::ShouldUseDirectConnectAddress(CBaseClientState *this,CAddressList *param_1)

{
  int in_EAX;
  int iVar1;
  uint uVar2;
  CAddressList *in_EDX;
  
  iVar1 = netadr_s::GetIP((netadr_s *)(in_EAX + 0x44));
  if (iVar1 == 0) {
    return 0;
  }
  if ((*(int *)(in_EAX + 0x54) != 0 || *(int *)(in_EAX + 0x50) != 0) &&
     (*(int *)(in_EAX + 0x54) != *(int *)(in_EAX + 0x160) ||
      *(int *)(in_EAX + 0x50) != *(int *)(in_EAX + 0x15c))) {
    return 0;
  }
  uVar2 = CAddressList::IsAddressInList(in_EDX,(netadr_s *)(in_EAX + 0x44));
  return uVar2 ^ 1;
}

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)