Skip to content

Commit 24cb1f8

Browse files
authored
If terrain is disabled, allow teleporting anywhere (#5785)
1 parent 097fd01 commit 24cb1f8

File tree

1 file changed

+3
-1
lines changed
  • Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Landscapes

1 file changed

+3
-1
lines changed

Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Landscapes/Landscape.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ public Result IsParcelInsideTerrain(Vector2Int parcel, bool isLocal)
8383
{
8484
ITerrain terrain = isLocal && !realmController.RealmData.IsGenesis() ? worldsTerrain : genesisTerrain;
8585

86-
return terrain.TerrainModel == null || !terrain.TerrainModel.IsInsideBounds(parcel)
86+
// If terrain is disabled, allow teleporting anywhere. We're in editor and can assume the
87+
// user knows what they're doing.
88+
return terrain.TerrainModel != null && !terrain.TerrainModel.IsInsideBounds(parcel)
8789
? Result.ErrorResult($"Parcel {parcel} is outside of the bounds.")
8890
: Result.SuccessResult();
8991
}

0 commit comments

Comments
 (0)