mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-24 22:21:30 +00:00
Remove IP addresses from game tokens and matchmaking
This commit is contained in:
parent
a9944ec74d
commit
5283001511
13 changed files with 44 additions and 73 deletions
|
@ -87,7 +87,6 @@ public class MatchController : ControllerBase
|
|||
{
|
||||
case UpdateMyPlayerData playerData:
|
||||
{
|
||||
MatchHelper.SetUserLocation(user.UserId, token.UserLocation);
|
||||
Room? room = RoomHelper.FindRoomByUser(user.UserId, token.GameVersion, token.Platform, true);
|
||||
|
||||
if (playerData.RoomState != null)
|
||||
|
@ -95,19 +94,13 @@ public class MatchController : ControllerBase
|
|||
room.State = (RoomState)playerData.RoomState;
|
||||
break;
|
||||
}
|
||||
// Check how many people are online in release builds, disabled for debug for ..well debugging.
|
||||
#if DEBUG
|
||||
case FindBestRoom diveInData:
|
||||
#else
|
||||
case FindBestRoom diveInData when MatchHelper.UserLocations.Count > 1:
|
||||
#endif
|
||||
{
|
||||
FindBestRoomResponse? response = RoomHelper.FindBestRoom(this.database,
|
||||
user,
|
||||
token.GameVersion,
|
||||
diveInData.RoomSlot,
|
||||
token.Platform,
|
||||
token.UserLocation);
|
||||
token.Platform);
|
||||
|
||||
if (response == null) return this.NotFound();
|
||||
|
||||
|
@ -117,7 +110,7 @@ public class MatchController : ControllerBase
|
|||
|
||||
return this.Ok($"[{{\"StatusCode\":200}},{serialized}]");
|
||||
}
|
||||
case CreateRoom createRoom when !MatchHelper.UserLocations.IsEmpty:
|
||||
case CreateRoom createRoom:
|
||||
{
|
||||
List<int> users = new();
|
||||
foreach (string playerUsername in createRoom.Players)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue