L L4D2node

Remote_t::Resolve

0x00101270 · 90 bytes · __thiscall

_ZN8Remote_t7ResolveEv

Decompiled

undefined (1 param)

/* Remote_t::Resolve() */

undefined4 __thiscall Remote_t::Resolve(Remote_t *this)

{
  netadr_s *this_00;
  short sVar1;
  char *pcVar2;
  undefined4 uVar3;
  
  this_00 = (netadr_s *)(this + 0x20);
  pcVar2 = CUtlString::operator_cast_to_char_((CUtlString *)(this + 0x10));
  uVar3 = NET_StringToAdr(pcVar2,this_00);
  if ((char)uVar3 != '\0') {
    sVar1 = netadr_s::GetPort(this_00);
    if (sVar1 == 0) {
      netadr_s::SetPort(this_00,0x6987);
      return uVar3;
    }
  }
  return uVar3;
}

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)