Improve lobby handling so it doesn't spam errors anymore

This commit is contained in:
RisaDev
2024-09-30 23:32:48 +03:00
parent a0c21635ad
commit b2d110980e
2 changed files with 23 additions and 18 deletions

View File

@@ -487,10 +487,7 @@ public class ProfileManager : IDisposable
//performance: using textual override for ProfileAppliesTo here to not call
//GetGameObjectName every time we are trying to check object against profiles
if (_objectManager.LobbyActor.Valid &&
_objectManager.TryGetValue(actorIdentifier, out var actorData) &&
actorData.Objects.Count == 1 &&
_objectManager.LobbyActor == actorData.Objects[0] && !_configuration.ProfileApplicationSettings.ApplyInLobby)
if (_objectManager.IsInLobby && !_configuration.ProfileApplicationSettings.ApplyInLobby)
yield break;
(actorIdentifier, _) = _gameObjectService.GetTrueActorForSpecialTypeActor(actorIdentifier);