Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions EXILED/Exiled.API/Features/Spawn/RoomSpawnPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public override Vector3 Position
{
Room roomInstance = Features.Room.Get(Room) ?? throw new InvalidOperationException("The room instance could not be found.");

if (roomInstance.Type == RoomType.Surface)
{
return Offset != Vector3.zero ? Offset : roomInstance.Position;
}
Comment thread
SrLicht marked this conversation as resolved.
Outdated

return Offset != Vector3.zero ? roomInstance.transform.TransformPoint(Offset) : roomInstance.Position;
}
set => throw new InvalidOperationException("The position of this type of SpawnPoint cannot be changed.");
Expand Down
2 changes: 1 addition & 1 deletion EXILED/Exiled.CustomItems/Events/MapHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal sealed class MapHandler
/// <inheritdoc cref="Exiled.Events.Handlers.Map.Generated"/>
public void OnMapGenerated()
{
Timing.CallDelayed(0.5f, () => // Delay its necessary for the spawnpoints of lockers and rooms to be generated.
Timing.CallDelayed(0.8f, () => // Delay its necessary for the spawnpoints of lockers and rooms to be generated.
Comment thread
SrLicht marked this conversation as resolved.
Outdated
{
foreach (CustomItem customItem in CustomItem.Registered)
customItem?.SpawnAll();
Expand Down