mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Improve Discord RP reliability when teleporting
Turns out the Client:Disconnect entry is not reliable at all whatsoever for determining game disconnects, so it's now replaced with a more reliable entry.
This commit is contained in:
parent
c17cd58ec6
commit
68fa419e5b
@ -10,8 +10,8 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<Platforms>AnyCPU;x86</Platforms>
|
<Platforms>AnyCPU;x86</Platforms>
|
||||||
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
|
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
|
||||||
<Version>1.6.1</Version>
|
<Version>1.6.2</Version>
|
||||||
<FileVersion>1.6.1.0</FileVersion>
|
<FileVersion>1.6.2.0</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -14,7 +14,7 @@ namespace Bloxstrap.Helpers.Integrations
|
|||||||
|
|
||||||
const string GameJoiningEntry = "[FLog::Output] ! Joining game";
|
const string GameJoiningEntry = "[FLog::Output] ! Joining game";
|
||||||
const string GameJoinedEntry = "[FLog::Network] serverId:";
|
const string GameJoinedEntry = "[FLog::Network] serverId:";
|
||||||
const string GameDisconnectedEntry = "[FLog::Network] Client:Disconnect";
|
const string GameDisconnectedEntry = "[FLog::Network] Time to disconnect replication data:";
|
||||||
|
|
||||||
const string GameJoiningEntryPattern = @"! Joining game '([0-9a-f\-]{36})' place ([0-9]+) at ([0-9\.]+)";
|
const string GameJoiningEntryPattern = @"! Joining game '([0-9a-f\-]{36})' place ([0-9]+) at ([0-9\.]+)";
|
||||||
const string GameJoinedEntryPattern = @"serverId: ([0-9\.]+)\|([0-9]+)";
|
const string GameJoinedEntryPattern = @"serverId: ([0-9\.]+)\|([0-9]+)";
|
||||||
@ -76,12 +76,12 @@ namespace Bloxstrap.Helpers.Integrations
|
|||||||
{
|
{
|
||||||
// okay, here's the process:
|
// okay, here's the process:
|
||||||
//
|
//
|
||||||
// - read the latest log file from %localappdata%\roblox\logs approx every 30 sec or so
|
// - tail the latest log file from %localappdata%\roblox\logs
|
||||||
// - check for specific lines to determine player's game activity as shown below:
|
// - check for specific lines to determine player's game activity as shown below:
|
||||||
//
|
//
|
||||||
// - get the place id, job id and machine address from '! Joining game '{{JOBID}}' place {{PLACEID}} at {{MACHINEADDRESS}}' entry
|
// - get the place id, job id and machine address from '! Joining game '{{JOBID}}' place {{PLACEID}} at {{MACHINEADDRESS}}' entry
|
||||||
// - confirm place join with 'serverId: {{MACHINEADDRESS}}|{{MACHINEPORT}}' entry
|
// - confirm place join with 'serverId: {{MACHINEADDRESS}}|{{MACHINEPORT}}' entry
|
||||||
// - check for leaves/disconnects with 'Client:Disconnect' entry
|
// - check for leaves/disconnects with 'Time to disconnect replication data: {{TIME}}' entry
|
||||||
//
|
//
|
||||||
// we'll tail the log file continuously, monitoring for any log entries that we need to determine the current game activity
|
// we'll tail the log file continuously, monitoring for any log entries that we need to determine the current game activity
|
||||||
|
|
||||||
@ -123,7 +123,6 @@ namespace Bloxstrap.Helpers.Integrations
|
|||||||
}
|
}
|
||||||
|
|
||||||
// no need to close the event, its going to be finished with when the program closes anyway
|
// no need to close the event, its going to be finished with when the program closes anyway
|
||||||
// ...rr im too lazy to fix the event still be updating when its closed... lol
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> SetPresence()
|
public async Task<bool> SetPresence()
|
||||||
@ -184,6 +183,7 @@ namespace Bloxstrap.Helpers.Integrations
|
|||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
RichPresence.ClearPresence();
|
||||||
RichPresence.Dispose();
|
RichPresence.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user