Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

0.8.0.3
Mic Bowman 2014-01-28 15:47:24 -08:00
commit 1d533b0f01
5 changed files with 21 additions and 4 deletions

View File

@ -531,10 +531,14 @@ ELSE
/// <returns></returns> /// <returns></returns>
public double[,] LoadTerrain(UUID regionID) public double[,] LoadTerrain(UUID regionID)
{ {
double[,] ret = null;
TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight); TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight);
return terrData.GetDoubles(); if (terrData != null)
ret = terrData.GetDoubles();
return ret;
} }
// Returns 'null' if region not found
public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
{ {
TerrainData terrData = null; TerrainData terrData = null;

View File

@ -616,10 +616,14 @@ namespace OpenSim.Data.MySQL
// Legacy region loading // Legacy region loading
public double[,] LoadTerrain(UUID regionID) public double[,] LoadTerrain(UUID regionID)
{ {
double[,] ret = null;
TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight); TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight);
return terrData.GetDoubles(); if (terrData != null)
ret = terrData.GetDoubles();
return ret;
} }
// Returns 'null' if region not found
public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
{ {
TerrainData terrData = null; TerrainData terrData = null;

View File

@ -148,6 +148,7 @@ namespace OpenSim.Data.Null
} }
// Legacy. Just don't do this. // Legacy. Just don't do this.
// Returns 'null' if region not found
public double[,] LoadTerrain(UUID regionID) public double[,] LoadTerrain(UUID regionID)
{ {
if (m_terrains.ContainsKey(regionID)) if (m_terrains.ContainsKey(regionID))

View File

@ -524,10 +524,14 @@ namespace OpenSim.Data.PGSQL
/// <returns></returns> /// <returns></returns>
public double[,] LoadTerrain(UUID regionID) public double[,] LoadTerrain(UUID regionID)
{ {
double[,] ret = null;
TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight); TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight);
return terrData.GetDoubles(); if (terrData != null)
ret = terrData.GetDoubles();
return ret;
} }
// Returns 'null' if region not found
public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
{ {
TerrainData terrData = null; TerrainData terrData = null;

View File

@ -870,10 +870,14 @@ namespace OpenSim.Data.SQLite
/// <returns>Heightfield data</returns> /// <returns>Heightfield data</returns>
public double[,] LoadTerrain(UUID regionID) public double[,] LoadTerrain(UUID regionID)
{ {
double[,] ret = null;
TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight); TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight);
return terrData.GetDoubles(); if (terrData != null)
ret = terrData.GetDoubles();
return ret;
} }
// Returns 'null' if region not found
public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
{ {
TerrainData terrData = null; TerrainData terrData = null;