From 7e3aca4ffcce274f662f4de692c6a0de00d5f1bd Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidoS@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:24:12 -0500 Subject: [PATCH] CustomSpawnPoint: fixed spawnpoint lookup --- CustomSpawnPoint/SpawnPointManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CustomSpawnPoint/SpawnPointManager.cs b/CustomSpawnPoint/SpawnPointManager.cs index 0cf82b9..0aa5504 100644 --- a/CustomSpawnPoint/SpawnPointManager.cs +++ b/CustomSpawnPoint/SpawnPointManager.cs @@ -77,7 +77,7 @@ namespace NAK.CustomSpawnPoint CustomSpawnPointMod.Logger.Msg("World loaded: " + worldId); currentWorldId = worldId; - currentSpawnPoint = spawnPoints.GetValueOrDefault(currentWorldId); + currentSpawnPoint = spawnPoints.TryGetValue(currentWorldId, out SpawnPointData spawnPoint) ? spawnPoint : null; originalSpawnPointsArray ??= world.spawns; // cache the original spawn points array, if null its fine if (currentSpawnPoint.HasValue)