mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
SL_InsertServer: Behaviour repair for multiple contexts
- Repair connecting to a modded server via direct IP/address
- Done by leveraging serverlistultimatecount
- !server was good for avoiding dinging modded local games, but there was other behaviour broken.
- Don't underflow serverlistultimatecount on rejection of undesired serverinfo
This commit is contained in:
parent
5c1f5f1824
commit
124e69be60
1 changed files with 8 additions and 3 deletions
|
|
@ -1609,8 +1609,8 @@ static boolean SL_InsertServer(serverinfo_pak* info, SINT8 node)
|
|||
if (strcmp(info->application, SRB2APPLICATION))
|
||||
return false;/* that's a different mod */
|
||||
|
||||
if (!server && info->modifiedgame != (mpmenu.room == 1))
|
||||
return false;/* CORE vs MODDED! Unless we ARE the server (i.e. local play), then it's fine to not match. */
|
||||
if (serverlistultimatecount && info->modifiedgame != (mpmenu.room == 1))
|
||||
return false;/* CORE vs MODDED! But only on the server browser page. */
|
||||
|
||||
i = serverlistcount++;
|
||||
}
|
||||
|
|
@ -4658,8 +4658,13 @@ static void HandleServerInfo(SINT8 node)
|
|||
CopyCaretColors(netbuffer->u.serverinfo.servername, servername, MAXSERVERNAME);
|
||||
|
||||
// If we have cause to reject it, it's not worth observing.
|
||||
if (SL_InsertServer(&netbuffer->u.serverinfo, node) == false)
|
||||
if (
|
||||
SL_InsertServer(&netbuffer->u.serverinfo, node) == false
|
||||
&& serverlistultimatecount
|
||||
)
|
||||
{
|
||||
serverlistultimatecount--;
|
||||
}
|
||||
}
|
||||
|
||||
static void PT_WillResendGamestate(void)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue