Fix issues with .NET 5.

This commit is contained in:
Pieter-Jan Briers
2020-11-11 00:46:13 +01:00
parent 44ee2b7ab6
commit 0918e14827
2 changed files with 4 additions and 3 deletions

View File

@@ -102,7 +102,7 @@ namespace Content.Server.GameObjects.Components.Observer
{ {
if (player.AttachedEntity != null && warp.PlayerTarget == player.AttachedEntity.Uid) if (player.AttachedEntity != null && warp.PlayerTarget == player.AttachedEntity.Uid)
{ {
session?.AttachedEntity!.Transform.Coordinates = session!.AttachedEntity!.Transform.Coordinates =
player.AttachedEntity.Transform.Coordinates; player.AttachedEntity.Transform.Coordinates;
} }
} }
@@ -113,7 +113,7 @@ namespace Content.Server.GameObjects.Components.Observer
{ {
if (warp.WarpName == warpPoint.Location) if (warp.WarpName == warpPoint.Location)
{ {
session?.AttachedEntity!.Transform.Coordinates = warpPoint.Owner.Transform.Coordinates ; session!.AttachedEntity!.Transform.Coordinates = warpPoint.Owner.Transform.Coordinates ;
} }
} }
} }

View File

@@ -142,7 +142,8 @@ namespace Content.Server.Preferences
int? nextSlot = null; int? nextSlot = null;
if (curPrefs.SelectedCharacterIndex == slot) if (curPrefs.SelectedCharacterIndex == slot)
{ {
var (ns, profile) = curPrefs.Characters.FirstOrDefault(p => p.Key != message.Slot); // That ! on the end is because Rider doesn't like .NET 5.
var (ns, profile) = curPrefs.Characters.FirstOrDefault(p => p.Key != message.Slot)!;
if (profile == null) if (profile == null)
{ {
// Only slot left, can't delete. // Only slot left, can't delete.