Skip to content
Open
Changes from all commits
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
40 changes: 20 additions & 20 deletions Scripts/LocationLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -451,14 +451,14 @@ void OnTerrainPromoted(DaggerfallTerrain daggerTerrain, TerrainData terrainData)
{
string context = $"location=\"{loc.name}\"";

if (daggerTerrain.MapData.hasLocation)
{
if (loc.type == 0)
{
Debug.LogWarning($"Location already present at ({daggerTerrain.MapPixelX}, {daggerTerrain.MapPixelY}) ({context})");
continue;
}
}
//if (daggerTerrain.MapData.hasLocation)
//{
// if (loc.type == 0)
// {
// Debug.LogWarning($"Location already present at ({daggerTerrain.MapPixelX}, {daggerTerrain.MapPixelY}) ({context})");
// continue;
// }
//}

LocationPrefab locationPrefab = resourceManager.GetPrefabInfo(loc.prefab);
if (locationPrefab == null)
Expand All @@ -481,10 +481,10 @@ void OnTerrainPromoted(DaggerfallTerrain daggerTerrain, TerrainData terrainData)
continue;
}

if (PruneInstance(loc, locationPrefab))
{
continue;
}
//if (PruneInstance(loc, locationPrefab)) // carademono: Removing location check as type 0 placement now avoids overlaps and places multiples multiples per map pixel
//{
// continue;
//}

if (loc.type == 2)
{
Expand All @@ -504,14 +504,14 @@ void OnTerrainPromoted(DaggerfallTerrain daggerTerrain, TerrainData terrainData)
FindRiverCrossingCenter(loc, locationPrefab);
}

if (loc.type == 0)
{
if (terrainOccupied)
{
Debug.LogWarning($"Location instance already present at ({daggerTerrain.MapPixelX}, {daggerTerrain.MapPixelY}) ({context})");
continue;
}
}
//if (loc.type == 0) // carademono: Removing terrainOccupied check as type 0 placement now avoids overlaps and places multiples multiples per map pixel
//{
// if (terrainOccupied)
// {
// Debug.LogWarning($"Location instance already present at ({daggerTerrain.MapPixelX}, {daggerTerrain.MapPixelY}) ({context})");
// continue;
// }
//}

int count = 0;
float tmpAverageHeight = 0;
Expand Down