ValveSoftware / halflife

Half-Life 1 engine based games

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[HL25] Can't connect to the game server within the loopback network interface

Splatt581 opened this issue · comments

If you turn off the network connection and start the server on the loopback network interface (127.0.0.1), the game client will not be able to connect to the server. This happens because the SVC_GetChallenge server function does not send a packet with challenge number for further client connection. Let's take a look at the code snippet we're interested in:

void SVC_GetChallenge()
{
...
v18 = Steam_GSGetSteamID();
    if ( NET_IsConfigured() && !Steam_GSSteamIDIsValidOrLAN(v18) )
      return;
...

With the anniversary update, new checks were added to the engine. The bug is an incorrect return in the Steam_GSSteamIDIsValidOrLAN function. The Steam_GSGetSteamID function without connecting to Steam servers returns "1" as SteamID.