diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 7772f94..64b3baf 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1033,7 +1033,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1033 | 1033 | ||
1034 | BordersLocked = true; | 1034 | BordersLocked = true; |
1035 | Border northBorder = new Border(); | 1035 | Border northBorder = new Border(); |
1036 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- | 1036 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (float)RegionInfo.RegionSizeY); //<--- |
1037 | northBorder.CrossDirection = Cardinals.N; | 1037 | northBorder.CrossDirection = Cardinals.N; |
1038 | NorthBorders.Add(northBorder); | 1038 | NorthBorders.Add(northBorder); |
1039 | 1039 | ||
@@ -1043,7 +1043,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1043 | SouthBorders.Add(southBorder); | 1043 | SouthBorders.Add(southBorder); |
1044 | 1044 | ||
1045 | Border eastBorder = new Border(); | 1045 | Border eastBorder = new Border(); |
1046 | eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- | 1046 | eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (float)RegionInfo.RegionSizeY); //<--- |
1047 | eastBorder.CrossDirection = Cardinals.E; | 1047 | eastBorder.CrossDirection = Cardinals.E; |
1048 | EastBorders.Add(eastBorder); | 1048 | EastBorders.Add(eastBorder); |
1049 | 1049 | ||
@@ -1107,8 +1107,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1107 | if (RegionInfo.RegionHandle != otherRegion.RegionHandle) | 1107 | if (RegionInfo.RegionHandle != otherRegion.RegionHandle) |
1108 | { | 1108 | { |
1109 | // If these are cast to INT because long + negative values + abs returns invalid data | 1109 | // If these are cast to INT because long + negative values + abs returns invalid data |
1110 | int resultX = Math.Abs((int)xcell - (int)RegionInfo.RegionLocX); | 1110 | int resultX = Math.Abs((int)xcell - (int)RegionInfo.LegacyRegionLocX); |
1111 | int resultY = Math.Abs((int)ycell - (int)RegionInfo.RegionLocY); | 1111 | int resultY = Math.Abs((int)ycell - (int)RegionInfo.LegacyRegionLocY); |
1112 | if (resultX <= 1 && resultY <= 1) | 1112 | if (resultX <= 1 && resultY <= 1) |
1113 | { | 1113 | { |
1114 | // Let the grid service module know, so this can be cached | 1114 | // Let the grid service module know, so this can be cached |
@@ -1183,8 +1183,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1183 | /// </returns> | 1183 | /// </returns> |
1184 | public int HaveNeighbor(Cardinals car, ref int[] fix) | 1184 | public int HaveNeighbor(Cardinals car, ref int[] fix) |
1185 | { | 1185 | { |
1186 | uint neighbourx = RegionInfo.RegionLocX; | 1186 | uint neighbourx = RegionInfo.LegacyRegionLocX; |
1187 | uint neighboury = RegionInfo.RegionLocY; | 1187 | uint neighboury = RegionInfo.LegacyRegionLocY; |
1188 | 1188 | ||
1189 | int dir = (int)car; | 1189 | int dir = (int)car; |
1190 | 1190 | ||
@@ -1204,8 +1204,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1204 | 1204 | ||
1205 | if (neighbourRegion == null) | 1205 | if (neighbourRegion == null) |
1206 | { | 1206 | { |
1207 | fix[0] = (int)(RegionInfo.RegionLocX - neighbourx); | 1207 | fix[0] = (int)(RegionInfo.LegacyRegionLocX - neighbourx); |
1208 | fix[1] = (int)(RegionInfo.RegionLocY - neighboury); | 1208 | fix[1] = (int)(RegionInfo.LegacyRegionLocY - neighboury); |
1209 | return dir * (-1); | 1209 | return dir * (-1); |
1210 | } | 1210 | } |
1211 | else | 1211 | else |
@@ -1894,7 +1894,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1894 | { | 1894 | { |
1895 | try | 1895 | try |
1896 | { | 1896 | { |
1897 | double[,] map = SimulationDataService.LoadTerrain(RegionInfo.RegionID); | 1897 | TerrainData map = SimulationDataService.LoadTerrain(RegionInfo.RegionID, (int)RegionInfo.RegionSizeX, (int)RegionInfo.RegionSizeY, (int)RegionInfo.RegionSizeZ); |
1898 | if (map == null) | 1898 | if (map == null) |
1899 | { | 1899 | { |
1900 | // This should be in the Terrain module, but it isn't because | 1900 | // This should be in the Terrain module, but it isn't because |
@@ -1905,7 +1905,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1905 | m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain); | 1905 | m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain); |
1906 | 1906 | ||
1907 | m_log.InfoFormat("[TERRAIN]: No default terrain. Generating a new terrain {0}.", m_InitialTerrain); | 1907 | m_log.InfoFormat("[TERRAIN]: No default terrain. Generating a new terrain {0}.", m_InitialTerrain); |
1908 | Heightmap = new TerrainChannel(m_InitialTerrain); | 1908 | Heightmap = new TerrainChannel(m_InitialTerrain, (int)RegionInfo.RegionSizeX, (int)RegionInfo.RegionSizeY, (int)RegionInfo.RegionSizeZ); |
1909 | 1909 | ||
1910 | SimulationDataService.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1910 | SimulationDataService.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1911 | } | 1911 | } |
@@ -3994,12 +3994,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3994 | { | 3994 | { |
3995 | if (posX < 0) | 3995 | if (posX < 0) |
3996 | posX = 0; | 3996 | posX = 0; |
3997 | else if (posX >= 256) | 3997 | else if (posX >= (float)RegionInfo.RegionSizeX) |
3998 | posX = 255.999f; | 3998 | posX = (float)RegionInfo.RegionSizeX - 0.001f; |
3999 | if (posY < 0) | 3999 | if (posY < 0) |
4000 | posY = 0; | 4000 | posY = 0; |
4001 | else if (posY >= 256) | 4001 | else if (posY >= (float)RegionInfo.RegionSizeY) |
4002 | posY = 255.999f; | 4002 | posY = (float)RegionInfo.RegionSizeY - 0.001f; |
4003 | 4003 | ||
4004 | reason = String.Empty; | 4004 | reason = String.Empty; |
4005 | if (Permissions.IsGod(agentID)) | 4005 | if (Permissions.IsGod(agentID)) |
@@ -4371,8 +4371,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4371 | { | 4371 | { |
4372 | uint rRegionX = (uint)(cAgentData.RegionHandle >> 40); | 4372 | uint rRegionX = (uint)(cAgentData.RegionHandle >> 40); |
4373 | uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8); | 4373 | uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8); |
4374 | uint tRegionX = RegionInfo.RegionLocX; | 4374 | uint tRegionX = RegionInfo.LegacyRegionLocX; |
4375 | uint tRegionY = RegionInfo.RegionLocY; | 4375 | uint tRegionY = RegionInfo.LegacyRegionLocY; |
4376 | //Send Data to ScenePresence | 4376 | //Send Data to ScenePresence |
4377 | childAgentUpdate.UpdateChildAgent(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); | 4377 | childAgentUpdate.UpdateChildAgent(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); |
4378 | // Not Implemented: | 4378 | // Not Implemented: |
@@ -4600,13 +4600,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4600 | ScenePresence sp = GetScenePresence(remoteClient.AgentId); | 4600 | ScenePresence sp = GetScenePresence(remoteClient.AgentId); |
4601 | if (sp != null) | 4601 | if (sp != null) |
4602 | { | 4602 | { |
4603 | uint regionX = RegionInfo.RegionLocX; | 4603 | uint regionX = RegionInfo.LegacyRegionLocX; |
4604 | uint regionY = RegionInfo.RegionLocY; | 4604 | uint regionY = RegionInfo.LegacyRegionLocY; |
4605 | 4605 | ||
4606 | Utils.LongToUInts(regionHandle, out regionX, out regionY); | 4606 | Utils.LongToUInts(regionHandle, out regionX, out regionY); |
4607 | 4607 | ||
4608 | int shiftx = (int) regionX - (int) RegionInfo.RegionLocX * (int)Constants.RegionSize; | 4608 | int shiftx = (int) regionX - (int) RegionInfo.LegacyRegionLocX * (int)Constants.RegionSize; |
4609 | int shifty = (int) regionY - (int) RegionInfo.RegionLocY * (int)Constants.RegionSize; | 4609 | int shifty = (int) regionY - (int) RegionInfo.LegacyRegionLocY * (int)Constants.RegionSize; |
4610 | 4610 | ||
4611 | position.X += shiftx; | 4611 | position.X += shiftx; |
4612 | position.Y += shifty; | 4612 | position.Y += shifty; |