Skip to content

Commit fe0a66d

Browse files
committed
fix developer being removed on LAN
1 parent a709b69 commit fe0a66d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Intersect.Client.Core/Core/ClientContext.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ internal sealed partial class ClientContext : ApplicationContext<ClientContext,
2424
{
2525
internal static bool IsSinglePlayer { get; set; }
2626

27+
private bool _forceDeveloper;
28+
2729
private IPlatformRunner? mPlatformRunner;
30+
private bool _isDeveloper;
2831

2932
internal ClientContext(
3033
Assembly entryAssembly,
@@ -41,7 +44,7 @@ IPacketHelper packetHelper
4144
try
4245
{
4346
var address = Dns.GetHostAddresses(hostNameOrAddress).FirstOrDefault();
44-
IsDeveloper = !(address?.IsPublic() ?? true);
47+
_forceDeveloper = !(address?.IsPublic() ?? true);
4548
}
4649
catch (SocketException socketException)
4750
{
@@ -56,7 +59,7 @@ IPacketHelper packetHelper
5659
"Failed to resolve host '{HostNameOrAddress}'",
5760
hostNameOrAddress
5861
);
59-
IsDeveloper = true;
62+
_forceDeveloper = true;
6063
}
6164

6265
_ = FactoryRegistry<IPluginContext>.RegisterFactory(new ClientPluginContext.Factory());
@@ -80,7 +83,11 @@ private void PermissionSetOnActivePermissionSetChanged(string activePermissionSe
8083

8184
public event PermissionSetChangedHandler? PermissionsChanged;
8285

83-
public bool IsDeveloper { get; private set; }
86+
public bool IsDeveloper
87+
{
88+
get => _isDeveloper || _forceDeveloper;
89+
private set => _isDeveloper = value;
90+
}
8491

8592
protected override bool UsesMainThread => true;
8693

Intersect.Client.Core/MonoGame/Network/MonoSocket.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ internal partial class MonoSocket : GameSocket
4343
/// Interval between status pings in ms (e.g. full, bad version, etc.)
4444
/// </summary>
4545
#if DEBUG
46-
private const long ServerStatusPingInterval = 15_000;
46+
private const long ServerStatusPingInterval = 1_000;
4747
#else
4848
private const long ServerStatusPingInterval = 15_000;
4949
#endif

0 commit comments

Comments
 (0)