mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
CustomSpawnPoint: fixed spawnpoint lookup
This commit is contained in:
parent
edaf839775
commit
7e3aca4ffc
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ namespace NAK.CustomSpawnPoint
|
||||||
CustomSpawnPointMod.Logger.Msg("World loaded: " + worldId);
|
CustomSpawnPointMod.Logger.Msg("World loaded: " + worldId);
|
||||||
|
|
||||||
currentWorldId = 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
|
originalSpawnPointsArray ??= world.spawns; // cache the original spawn points array, if null its fine
|
||||||
|
|
||||||
if (currentSpawnPoint.HasValue)
|
if (currentSpawnPoint.HasValue)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue