Don't attempt to dive into the current room the player is in

This commit is contained in:
jvyden 2022-04-05 17:34:59 -04:00
commit e447fff38f
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -70,6 +70,12 @@ public class RoomHelper
rooms = rooms.Where(r => r.Slot.SlotType == slot.SlotType && r.Slot.SlotId == slot.SlotId).ToList();
}
// Don't attempt to dive into the current room the player is in.
if (user != null)
{
rooms = rooms.Where(r => !r.Players.Contains(user)).ToList();
}
foreach (Room room in rooms)
// Look for rooms looking for players before moving on to rooms that are idle.
{