aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorlbsa712007-07-16 20:10:54 +0000
committerlbsa712007-07-16 20:10:54 +0000
commit85bdec5e0d30224f66851fe4183eb03e15828fbf (patch)
tree1215edd4ac26cdc37da2e43f975a04e71e1213cc /OpenSim/Region
parent*Adding some more files (diff)
downloadopensim-SC_OLD-85bdec5e0d30224f66851fe4183eb03e15828fbf.zip
opensim-SC_OLD-85bdec5e0d30224f66851fe4183eb03e15828fbf.tar.gz
opensim-SC_OLD-85bdec5e0d30224f66851fe4183eb03e15828fbf.tar.bz2
opensim-SC_OLD-85bdec5e0d30224f66851fe4183eb03e15828fbf.tar.xz
* Massive restructuring of RegionApplicationBase, OpenSimMain and SimpleApp
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/Application.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs97
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs40
-rw-r--r--OpenSim/Region/Environment/RegionManager.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs64
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs31
7 files changed, 106 insertions, 132 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index a47ba48..a64d05f 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -43,7 +43,7 @@ namespace OpenSim
43 bool sandBoxMode = false; 43 bool sandBoxMode = false;
44 bool startLoginServer = false; 44 bool startLoginServer = false;
45 string physicsEngine = "basicphysics"; 45 string physicsEngine = "basicphysics";
46 bool allowFlying = false; 46
47 bool userAccounts = false; 47 bool userAccounts = false;
48 bool gridLocalAsset = false; 48 bool gridLocalAsset = false;
49 bool useConfigFile = false; 49 bool useConfigFile = false;
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 368af12..18c81a0 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -78,26 +78,16 @@ namespace OpenSim
78 m_silent = silent; 78 m_silent = silent;
79 } 79 }
80 80
81
81 /// <summary> 82 /// <summary>
82 /// Performs initialisation of the world, such as loading configuration from disk. 83 /// Performs initialisation of the world, such as loading configuration from disk.
83 /// </summary> 84 /// </summary>
84 public void StartUp() 85 public override void StartUp()
85 { 86 {
86 this.m_serversData = new NetworkServersInfo(); 87 base.StartUp();
87
88 this.localConfig = new XmlConfig(m_config);
89 this.localConfig.LoadData();
90
91 if (this.configFileSetup)
92 {
93 this.SetupFromConfigFile(this.localConfig);
94 }
95
96 m_log = new LogBase(m_logFilename, "Region", this, m_silent);
97 MainLog.Instance = m_log;
98 88
99 m_log.Verbose("Main.cs:Startup() - Loading configuration"); 89 m_log.Verbose("Main.cs:Startup() - Loading configuration");
100 this.m_serversData.InitConfig(this.m_sandbox, this.localConfig); 90 this.m_networkServersInfo.InitConfig(this.m_sandbox, this.localConfig);
101 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change 91 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
102 92
103 ScenePresence.LoadTextureFile("avatar-texture.dat"); 93 ScenePresence.LoadTextureFile("avatar-texture.dat");
@@ -106,19 +96,18 @@ namespace OpenSim
106 96
107 this.SetupHttpListener(); 97 this.SetupHttpListener();
108 98
99 m_assetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey);
100 m_inventoryCache = new InventoryCache();
101
109 if (m_sandbox) 102 if (m_sandbox)
110 { 103 {
111 this.SetupLocalGridServers(); 104 this.commsManager = new CommunicationsLocal( m_networkServersInfo, m_httpServer);
112 // this.checkServer = new CheckSumServer(12036);
113 // this.checkServer.ServerListener();
114 } 105 }
115 else 106 else
116 { 107 {
117 this.SetupRemoteGridServers(); 108 this.commsManager = new CommunicationsOGS1( m_networkServersInfo, m_httpServer );
118 } 109 }
119 110
120 m_startuptime = DateTime.Now;
121
122 this.SetupScene(); 111 this.SetupScene();
123 112
124 m_log.Verbose("Main.cs:Startup() - Initialising HTTP server"); 113 m_log.Verbose("Main.cs:Startup() - Initialising HTTP server");
@@ -135,44 +124,30 @@ namespace OpenSim
135 124
136 } 125 }
137 126
138 # region Setup methods 127 protected override void Initialize()
139 protected void SetupLocalGridServers()
140 { 128 {
141 try 129 this.localConfig = new XmlConfig(m_config);
142 { 130 this.localConfig.LoadData();
143 m_assetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.m_serversData.AssetURL, this.m_serversData.AssetSendKey); 131
144 m_inventoryCache = new InventoryCache(); 132 if (this.configFileSetup)
145 this.commsManager = new CommunicationsLocal(this.m_serversData, m_httpServer);
146 }
147 catch (Exception e)
148 { 133 {
149 m_log.Error(e.Message + "\nSorry, could not setup local cache"); 134 this.SetupFromConfigFile(this.localConfig);
150 Environment.Exit(1);
151 } 135 }
152
153 } 136 }
154 137
155 protected void SetupRemoteGridServers() 138 protected override LogBase CreateLog()
156 { 139 {
157 try 140 return new LogBase(m_logFilename, "Region", this, m_silent);
158 {
159 m_assetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.m_serversData.AssetURL, this.m_serversData.AssetSendKey);
160 m_inventoryCache = new InventoryCache();
161 this.commsManager = new CommunicationsOGS1(this.m_serversData, m_httpServer);
162 }
163 catch (Exception e)
164 {
165 m_log.Error(e.Message + "\nSorry, could not setup remote cache");
166 Environment.Exit(1);
167 }
168 } 141 }
169 142
143 # region Setup methods
144
170 protected void SetupScene() 145 protected void SetupScene()
171 { 146 {
172 IGenericConfig regionConfig; 147 IGenericConfig regionConfig;
173 Scene scene; 148
174 UDPServer udpServer; 149 UDPServer udpServer;
175 RegionInfo regionDat = new RegionInfo(); 150 RegionInfo m_regionInfo = new RegionInfo();
176 AuthenticateSessionsBase authenBase; 151 AuthenticateSessionsBase authenBase;
177 152
178 string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions"); 153 string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions");
@@ -194,7 +169,7 @@ namespace OpenSim
194 169
195 for (int i = 0; i < configFiles.Length; i++) 170 for (int i = 0; i < configFiles.Length; i++)
196 { 171 {
197 regionDat = new RegionInfo(); 172 m_regionInfo = new RegionInfo();
198 if (m_sandbox) 173 if (m_sandbox)
199 { 174 {
200 AuthenticateSessionsBase authen = new AuthenticateSessionsBase(); // new AuthenticateSessionsLocal(); 175 AuthenticateSessionsBase authen = new AuthenticateSessionsBase(); // new AuthenticateSessionsLocal();
@@ -210,17 +185,17 @@ namespace OpenSim
210 Console.WriteLine("Loading region config file"); 185 Console.WriteLine("Loading region config file");
211 regionConfig = new XmlConfig(configFiles[i]); 186 regionConfig = new XmlConfig(configFiles[i]);
212 regionConfig.LoadData(); 187 regionConfig.LoadData();
213 regionDat.InitConfig(this.m_sandbox, regionConfig); 188 m_regionInfo.InitConfig(this.m_sandbox, regionConfig);
214 regionConfig.Close(); 189 regionConfig.Close();
215 190
216 udpServer = new UDPServer(regionDat.InternalEndPoint.Port, m_assetCache, this.m_inventoryCache, this.m_log, authenBase); 191 udpServer = new UDPServer(m_regionInfo.InternalEndPoint.Port, m_assetCache, this.m_inventoryCache, this.m_log, authenBase);
217 192
218 m_udpServer.Add(udpServer); 193 m_udpServer.Add(udpServer);
219 this.m_regionData.Add(regionDat); 194 this.m_regionData.Add(m_regionInfo);
220 195
221 StorageManager tmpStoreManager = new StorageManager("OpenSim.DataStore.NullStorage.dll", regionDat.DataStore, regionDat.RegionName); 196 StorageManager tmpStoreManager = new StorageManager("OpenSim.DataStore.NullStorage.dll", m_regionInfo.DataStore, m_regionInfo.RegionName);
222 197
223 scene = new Scene( regionDat, authenBase, commsManager, m_assetCache, tmpStoreManager, m_httpServer); 198 Scene scene = new Scene( m_regionInfo, authenBase, commsManager, m_assetCache, tmpStoreManager, m_httpServer);
224 this.m_localWorld.Add(scene); 199 this.m_localWorld.Add(scene);
225 200
226 udpServer.LocalWorld = scene; 201 udpServer.LocalWorld = scene;
@@ -253,12 +228,9 @@ namespace OpenSim
253 } 228 }
254 } 229 }
255 230
256 private static PhysicsScene GetPhysicsScene(string physicsEngine) 231 protected override PhysicsScene GetPhysicsScene( )
257 { 232 {
258 PhysicsPluginManager physicsPluginManager; 233 return GetPhysicsScene( m_physicsEngine );
259 physicsPluginManager = new PhysicsPluginManager();
260 physicsPluginManager.LoadPlugins();
261 return physicsPluginManager.GetPhysicsScene( physicsEngine );
262 } 234 }
263 235
264 private class SimStatusHandler : IStreamHandler 236 private class SimStatusHandler : IStreamHandler
@@ -286,7 +258,7 @@ namespace OpenSim
286 258
287 protected void SetupHttpListener() 259 protected void SetupHttpListener()
288 { 260 {
289 m_httpServer = new BaseHttpServer(this.m_serversData.HttpListenerPort); //regionData[0].IPListenPort); 261 m_httpServer = new BaseHttpServer(this.m_networkServersInfo.HttpListenerPort); //regionData[0].IPListenPort);
290 262
291 if (!this.m_sandbox) 263 if (!this.m_sandbox)
292 { 264 {
@@ -372,16 +344,9 @@ namespace OpenSim
372 switch (attri) 344 switch (attri)
373 { 345 {
374 default: 346 default:
375 m_log.Warn("Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating"); 347 throw new ArgumentException(String.Format( "Invalid value [{0}] for PhysicsEngine attribute, terminating", attri ) );
376 Environment.Exit(1);
377 break;
378 348
379 case "": 349 case "":
380 this.m_physicsEngine = "basicphysics";
381 configData.SetAttribute("PhysicsEngine", "basicphysics");
382 ScenePresence.PhysicsEngineFlying = false;
383 break;
384
385 case "basicphysics": 350 case "basicphysics":
386 this.m_physicsEngine = "basicphysics"; 351 this.m_physicsEngine = "basicphysics";
387 configData.SetAttribute("PhysicsEngine", "basicphysics"); 352 configData.SetAttribute("PhysicsEngine", "basicphysics");
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index ec7eee4..043659b 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -37,16 +37,17 @@ using OpenSim.Framework.Types;
37using OpenSim.Physics.Manager; 37using OpenSim.Physics.Manager;
38using OpenSim.Region.Caches; 38using OpenSim.Region.Caches;
39using OpenSim.Region.Environment; 39using OpenSim.Region.Environment;
40using libsecondlife;
40 41
41namespace OpenSim.Region.ClientStack 42namespace OpenSim.Region.ClientStack
42{ 43{
43 public class RegionApplicationBase 44 public abstract class RegionApplicationBase
44 { 45 {
45 protected AssetCache m_assetCache; 46 protected AssetCache m_assetCache;
46 protected InventoryCache m_inventoryCache; 47 protected InventoryCache m_inventoryCache;
47 protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); 48 protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>();
48 protected DateTime m_startuptime; 49 protected DateTime m_startuptime;
49 protected NetworkServersInfo m_serversData; 50 protected NetworkServersInfo m_networkServersInfo;
50 51
51 protected List<UDPServer> m_udpServer = new List<UDPServer>(); 52 protected List<UDPServer> m_udpServer = new List<UDPServer>();
52 protected List<RegionInfo> m_regionData = new List<RegionInfo>(); 53 protected List<RegionInfo> m_regionData = new List<RegionInfo>();
@@ -58,7 +59,40 @@ namespace OpenSim.Region.ClientStack
58 59
59 public RegionApplicationBase( ) 60 public RegionApplicationBase( )
60 { 61 {
61 62 m_startuptime = DateTime.Now;
62 } 63 }
64
65 virtual public void StartUp()
66 {
67 ClientView.TerrainManager = new TerrainManager(new SecondLife());
68 m_networkServersInfo = new NetworkServersInfo();
69 RegionInfo m_regionInfo = new RegionInfo();
70
71 Initialize();
72
73 StartLog();
74
75 }
76
77 protected abstract void Initialize();
78
79 private void StartLog()
80 {
81 LogBase logBase = CreateLog();
82 m_log = logBase;
83 MainLog.Instance = m_log;
84 }
85
86 protected abstract LogBase CreateLog();
87 protected abstract PhysicsScene GetPhysicsScene( );
88
89 protected PhysicsScene GetPhysicsScene(string engine)
90 {
91 PhysicsPluginManager physicsPluginManager;
92 physicsPluginManager = new PhysicsPluginManager();
93 physicsPluginManager.LoadPlugins();
94 return physicsPluginManager.GetPhysicsScene( engine );
95 }
96
63 } 97 }
64} 98}
diff --git a/OpenSim/Region/Environment/RegionManager.cs b/OpenSim/Region/Environment/RegionManager.cs
index 92e2766..f951701 100644
--- a/OpenSim/Region/Environment/RegionManager.cs
+++ b/OpenSim/Region/Environment/RegionManager.cs
@@ -8,7 +8,7 @@ using OpenSim.Region.Environment.LandManagement;
8 8
9namespace OpenSim.Region.Environment 9namespace OpenSim.Region.Environment
10{ 10{
11 public class RegionManager //needs renaming , but first we need to rename the namespace 11 public class RegionManager
12 { 12 {
13 protected AuthenticateSessionsBase authenticateHandler; 13 protected AuthenticateSessionsBase authenticateHandler;
14 protected RegionCommsListener regionCommsHost; 14 protected RegionCommsListener regionCommsHost;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 917f6c4..d2bb030 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Scenes
89 return (this.phyScene); 89 return (this.phyScene);
90 } 90 }
91 } 91 }
92 92
93 private LandManager m_LandManager; 93 private LandManager m_LandManager;
94 public LandManager LandManager 94 public LandManager LandManager
95 { 95 {
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index a2fdd81..8ff2b77 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -19,24 +19,28 @@ using OpenSim.Framework.Data;
19 19
20namespace SimpleApp 20namespace SimpleApp
21{ 21{
22 class Program : conscmd_callback 22 class Program : RegionApplicationBase, conscmd_callback
23 { 23 {
24 private LogBase m_log;
25 AuthenticateSessionsBase m_circuitManager; 24 AuthenticateSessionsBase m_circuitManager;
26 uint m_localId; 25
27 public MyWorld world; 26 public MyWorld m_world;
28 private SceneObject m_sceneObject; 27 private SceneObject m_sceneObject;
29 public MyNpcCharacter m_character; 28 public MyNpcCharacter m_character;
30 29
31 private void Run() 30 protected override LogBase CreateLog()
32 { 31 {
33 m_log = new LogBase(null, "SimpleApp", this, false); 32 return new LogBase(null, "SimpleApp", this, false);
34 MainLog.Instance = m_log; 33 }
35 34
36 // CheckSumServer checksumServer = new CheckSumServer(12036); 35 protected override void Initialize()
37 // checksumServer.ServerListener(); 36 {
37 }
38
39 public void Run()
40 {
41 base.StartUp();
38 42
39 IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000); 43 MainLog.Instance = m_log;
40 44
41 m_circuitManager = new AuthenticateSessionsBase(); 45 m_circuitManager = new AuthenticateSessionsBase();
42 46
@@ -50,30 +54,27 @@ namespace SimpleApp
50 ScenePresence.LoadTextureFile("avatar-texture.dat"); 54 ScenePresence.LoadTextureFile("avatar-texture.dat");
51 ScenePresence.PhysicsEngineFlying = true; 55 ScenePresence.PhysicsEngineFlying = true;
52 56
53 PhysicsPluginManager physManager = new PhysicsPluginManager(); 57 IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000);
54 physManager.LoadPlugins();
55 58
56 UDPServer udpServer = new UDPServer(internalEndPoint.Port, assetCache, inventoryCache, m_log, m_circuitManager); 59 UDPServer udpServer = new UDPServer(internalEndPoint.Port, assetCache, inventoryCache, m_log, m_circuitManager);
57 PacketServer packetServer = new PacketServer(udpServer); 60 PacketServer packetServer = new PacketServer(udpServer);
58 61
59 ClientView.TerrainManager = new TerrainManager(new SecondLife());
60 BaseHttpServer httpServer = new BaseHttpServer(internalEndPoint.Port); 62 BaseHttpServer httpServer = new BaseHttpServer(internalEndPoint.Port);
61 63
62 NetworkServersInfo serverInfo = new NetworkServersInfo(); 64 CommunicationsLocal communicationsManager = new CommunicationsLocal(m_networkServersInfo, httpServer);
63 CommunicationsLocal communicationsManager = new CommunicationsLocal(serverInfo, httpServer);
64 65
65 RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "127.0.0.1"); 66 RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "127.0.0.1");
66 67
67 OpenSim.Region.Environment.StorageManager storeMan = new OpenSim.Region.Environment.StorageManager("OpenSim.DataStore.NullStorage.dll", "simpleapp.yap", "simpleapp"); 68 OpenSim.Region.Environment.StorageManager storeMan = new OpenSim.Region.Environment.StorageManager("OpenSim.DataStore.NullStorage.dll", "simpleapp.yap", "simpleapp");
68 69
69 world = new MyWorld( regionInfo, m_circuitManager, communicationsManager, assetCache, storeMan, httpServer); 70 m_world = new MyWorld( regionInfo, m_circuitManager, communicationsManager, assetCache, storeMan, httpServer);
70 world.PhysScene = physManager.GetPhysicsScene("basicphysics"); //PhysicsScene.Null; 71 m_world.PhysScene = GetPhysicsScene( );
71 72
72 world.LoadWorldMap(); 73 m_world.LoadWorldMap();
73 world.PhysScene.SetTerrain(world.Terrain.getHeights1D()); 74 m_world.PhysScene.SetTerrain(m_world.Terrain.getHeights1D());
74 world.performParcelPrimCountUpdate(); 75 m_world.performParcelPrimCountUpdate();
75 76
76 udpServer.LocalWorld = world; 77 udpServer.LocalWorld = m_world;
77 78
78 httpServer.Start(); 79 httpServer.Start();
79 udpServer.ServerListener(); 80 udpServer.ServerListener();
@@ -81,27 +82,32 @@ namespace SimpleApp
81 UserProfileData masterAvatar = communicationsManager.UserServer.SetupMasterUser("Test", "User", "test"); 82 UserProfileData masterAvatar = communicationsManager.UserServer.SetupMasterUser("Test", "User", "test");
82 if (masterAvatar != null) 83 if (masterAvatar != null)
83 { 84 {
84 world.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; 85 m_world.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
85 world.LandManager.NoLandDataFromStorage(); 86 m_world.LandManager.NoLandDataFromStorage();
86 } 87 }
87 88
88 world.StartTimer(); 89 m_world.StartTimer();
89 90
90 PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox(); 91 PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox();
91 shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 92 shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
92 LLVector3 pos = new LLVector3(138, 129, 27); 93 LLVector3 pos = new LLVector3(138, 129, 27);
93 94
94 m_sceneObject = new MySceneObject(world, world.EventManager, LLUUID.Zero, world.PrimIDAllocate(), pos, shape); 95 m_sceneObject = new MySceneObject(m_world, m_world.EventManager, LLUUID.Zero, m_world.PrimIDAllocate(), pos, shape);
95 world.AddEntity(m_sceneObject); 96 m_world.AddEntity(m_sceneObject);
96 97
97 m_character = new MyNpcCharacter(); 98 m_character = new MyNpcCharacter();
98 world.AddNewClient(m_character, false); 99 m_world.AddNewClient(m_character, false);
99 100
100 m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit."); 101 m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit.");
101 m_log.ReadLine(); 102 m_log.ReadLine();
102 103
103 } 104 }
104 105
106 protected override PhysicsScene GetPhysicsScene( )
107 {
108 return GetPhysicsScene("basicphysics");
109 }
110
105 #region conscmd_callback Members 111 #region conscmd_callback Members
106 112
107 public void RunCmd(string cmd, string[] cmdparams) 113 public void RunCmd(string cmd, string[] cmdparams)
@@ -120,7 +126,7 @@ namespace SimpleApp
120 { 126 {
121 Program app = new Program(); 127 Program app = new Program();
122 128
123 app.Run(); 129 app.StartUp();
124 } 130 }
125 } 131 }
126} 132}
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index ec406f1..81e2ea3 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -36,8 +36,6 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
36 /// </summary> 36 /// </summary>
37 public class BasicPhysicsPlugin : IPhysicsPlugin 37 public class BasicPhysicsPlugin : IPhysicsPlugin
38 { 38 {
39 private BasicScene _mScene;
40
41 public BasicPhysicsPlugin() 39 public BasicPhysicsPlugin()
42 { 40 {
43 41
@@ -145,35 +143,6 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
145 actor.Position.X = 256; 143 actor.Position.X = 256;
146 } 144 }
147 } 145 }
148 //}
149
150
151
152 // This code needs sorting out - border crossings etc
153/* if(actor.Position.X<0)
154 {
155 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
156 actor.Position.X = 0;
157 actor.Velocity.X = 0;
158 }
159 if(actor.Position.Y < 0)
160 {
161 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
162 actor.Position.Y = 0;
163 actor.Velocity.Y = 0;
164 }
165 if(actor.Position.X > 255)
166 {
167 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
168 actor.Position.X = 255;
169 actor.Velocity.X = 0;
170 }
171 if(actor.Position.Y > 255)
172 {
173 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
174 actor.Position.Y = 255;
175 actor.Velocity.X = 0;
176 }*/
177 } 146 }
178 } 147 }
179 148