diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs | 6 | ||||
-rw-r--r-- | OpenSim/OpenSim.Region/Scenes/Scene.cs | 25 | ||||
-rw-r--r-- | OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs | 3 | ||||
-rw-r--r-- | OpenSim/OpenSim/OpenSimMain.cs | 6 |
4 files changed, 32 insertions, 8 deletions
diff --git a/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs b/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs index 2293608..9b811ae 100644 --- a/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs +++ b/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs | |||
@@ -39,13 +39,13 @@ namespace OpenSim.LocalCommunications | |||
39 | { | 39 | { |
40 | public class CommunicationsLocal : CommunicationsManager | 40 | public class CommunicationsLocal : CommunicationsManager |
41 | { | 41 | { |
42 | public LocalBackEndServices SandManager = new LocalBackEndServices(); | 42 | public LocalBackEndServices SandBoxManager = new LocalBackEndServices(); |
43 | 43 | ||
44 | public CommunicationsLocal() | 44 | public CommunicationsLocal() |
45 | { | 45 | { |
46 | UserServer = null; | 46 | UserServer = null; |
47 | GridServer = SandManager; | 47 | GridServer = SandBoxManager; |
48 | InterRegion = SandManager; | 48 | InterRegion = SandBoxManager; |
49 | } | 49 | } |
50 | } | 50 | } |
51 | } | 51 | } |
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs index ca9a112..5744f1f 100644 --- a/OpenSim/OpenSim.Region/Scenes/Scene.cs +++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs | |||
@@ -415,10 +415,31 @@ namespace OpenSim.Region.Scenes | |||
415 | float[] map = this.localStorage.LoadWorld(); | 415 | float[] map = this.localStorage.LoadWorld(); |
416 | if (map == null) | 416 | if (map == null) |
417 | { | 417 | { |
418 | Console.WriteLine("creating new terrain"); | 418 | // Console.WriteLine("creating new terrain"); |
419 | this.Terrain.hills(); | 419 | // this.Terrain.hills(); |
420 | 420 | ||
421 | // this.localStorage.SaveMap(this.Terrain.getHeights1D()); | 421 | // this.localStorage.SaveMap(this.Terrain.getHeights1D()); |
422 | if (string.IsNullOrEmpty(this.m_regInfo.estateSettings.terrainFile)) | ||
423 | { | ||
424 | Console.WriteLine("No default terrain, procedurally generating..."); | ||
425 | this.Terrain.hills(); | ||
426 | |||
427 | // this.localStorage.SaveMap(this.Terrain.getHeights1D()); | ||
428 | } | ||
429 | else | ||
430 | { | ||
431 | try | ||
432 | { | ||
433 | this.Terrain.loadFromFileF32(this.m_regInfo.estateSettings.terrainFile); | ||
434 | this.Terrain *= this.m_regInfo.estateSettings.terrainMultiplier; | ||
435 | } | ||
436 | catch | ||
437 | { | ||
438 | Console.WriteLine("Unable to load default terrain, procedurally generating instead..."); | ||
439 | Terrain.hills(); | ||
440 | } | ||
441 | // this.localStorage.SaveMap(this.Terrain.getHeights1D()); | ||
442 | } | ||
422 | } | 443 | } |
423 | else | 444 | else |
424 | { | 445 | { |
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs index e5831a0..fc4ca24 100644 --- a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs | |||
@@ -536,7 +536,7 @@ namespace OpenSim.Terrain | |||
536 | for (int y = 0; y < copy.h; y++) | 536 | for (int y = 0; y < copy.h; y++) |
537 | { | 537 | { |
538 | // 512 is the largest possible height before colours clamp | 538 | // 512 is the largest possible height before colours clamp |
539 | int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(copy.w -x, copy.h - y) / 512.0), 0.0) * pallete); | 539 | int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(copy.h - y, x) / 512.0), 0.0) * pallete); |
540 | bmp.SetPixel(x, y, colours[colorindex]); | 540 | bmp.SetPixel(x, y, colours[colorindex]); |
541 | } | 541 | } |
542 | } | 542 | } |
@@ -549,6 +549,7 @@ namespace OpenSim.Terrain | |||
549 | { | 549 | { |
550 | Console.WriteLine("Failed generating terrain map: " + e.ToString()); | 550 | Console.WriteLine("Failed generating terrain map: " + e.ToString()); |
551 | } | 551 | } |
552 | |||
552 | return imageData; | 553 | return imageData; |
553 | } | 554 | } |
554 | } | 555 | } |
diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs index fb8511d..dddcaea 100644 --- a/OpenSim/OpenSim/OpenSimMain.cs +++ b/OpenSim/OpenSim/OpenSimMain.cs | |||
@@ -100,12 +100,14 @@ namespace OpenSim | |||
100 | 100 | ||
101 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); | 101 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); |
102 | 102 | ||
103 | CommunicationsLocal sandboxCommunications = null; | ||
103 | if (m_sandbox) | 104 | if (m_sandbox) |
104 | { | 105 | { |
105 | this.SetupLocalGridServers(); | 106 | this.SetupLocalGridServers(); |
106 | this.checkServer = new CheckSumServer(12036); | 107 | this.checkServer = new CheckSumServer(12036); |
107 | this.checkServer.ServerListener(); | 108 | this.checkServer.ServerListener(); |
108 | this.commsManager = new CommunicationsLocal(); | 109 | sandboxCommunications = new CommunicationsLocal(); |
110 | this.commsManager = sandboxCommunications; | ||
109 | } | 111 | } |
110 | else | 112 | else |
111 | { | 113 | { |
@@ -132,7 +134,7 @@ namespace OpenSim | |||
132 | { | 134 | { |
133 | loginServer = new LoginServer(regionData[0].IPListenAddr, regionData[0].IPListenPort, regionData[0].RegionLocX, regionData[0].RegionLocY, false); | 135 | loginServer = new LoginServer(regionData[0].IPListenAddr, regionData[0].IPListenPort, regionData[0].RegionLocX, regionData[0].RegionLocY, false); |
134 | loginServer.Startup(); | 136 | loginServer.Startup(); |
135 | loginServer.SetSessionHandler(((CommunicationsLocal)this.commsManager).SandManager.AddNewSession); | 137 | loginServer.SetSessionHandler(sandboxCommunications.SandBoxManager.AddNewSession); |
136 | //sandbox mode with loginserver not using accounts | 138 | //sandbox mode with loginserver not using accounts |
137 | httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod); | 139 | httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod); |
138 | } | 140 | } |