mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
if at load all pbt terrain id are zero reset all to non pbr ids (so on version update they look the same automaticly)
This commit is contained in:
@@ -856,14 +856,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
updatedTerrainTextures = true;
|
||||
}
|
||||
|
||||
if (rs.TerrainPBR1.IsZero())
|
||||
rs.TerrainPBR1 = RegionSettings.DEFAULT_TERRAIN_PBR_1;
|
||||
if (rs.TerrainPBR2.IsZero())
|
||||
rs.TerrainPBR2 = RegionSettings.DEFAULT_TERRAIN_PBR_2;
|
||||
if (rs.TerrainPBR3.IsZero())
|
||||
rs.TerrainPBR3 = RegionSettings.DEFAULT_TERRAIN_PBR_3;
|
||||
if (rs.TerrainPBR4.IsZero())
|
||||
rs.TerrainPBR4 = RegionSettings.DEFAULT_TERRAIN_PBR_4;
|
||||
if (rs.TerrainPBR1.IsZero() &&
|
||||
rs.TerrainPBR2.IsZero() &&
|
||||
rs.TerrainPBR3.IsZero() &&
|
||||
rs.TerrainPBR4.IsZero())
|
||||
{
|
||||
rs.TerrainPBR1 = rs.TerrainTexture1;
|
||||
rs.TerrainPBR2 = rs.TerrainTexture2;
|
||||
rs.TerrainPBR3 = rs.TerrainTexture3;
|
||||
rs.TerrainPBR4 = rs.TerrainTexture4;
|
||||
updatedTerrainTextures = true;
|
||||
}
|
||||
|
||||
if (updatedTerrainTextures)
|
||||
rs.Save();
|
||||
|
||||
Reference in New Issue
Block a user