diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Config/SimConfig/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | src/Config/SimConfig/SimConfig.csproj | 2 | ||||
-rw-r--r-- | src/GridInterfaces/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | src/LocalServers/LocalGridServers/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | src/Main.cs | 18 | ||||
-rw-r--r-- | src/OpenSimConsole.cs | 43 | ||||
-rw-r--r-- | src/RemoteServers/RemoteGridServers/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | src/RemoteServers/RemoteGridServers/RemoteGrid.cs | 16 | ||||
-rw-r--r-- | src/ServerConsole/ServerConsole/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | src/ServerConsole/ServerConsole/ServerConsole.cs | 22 | ||||
-rw-r--r-- | src/VersionInfo.cs | 2 | ||||
-rw-r--r-- | src/physics/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | src/physics/PhysicsManager.cs | 119 | ||||
-rw-r--r-- | src/physics/plugins/AssemblyInfo.cs | 2 |
15 files changed, 180 insertions, 58 deletions
diff --git a/src/Config/SimConfig/AssemblyInfo.cs b/src/Config/SimConfig/AssemblyInfo.cs index b205b4b..88a940b 100644 --- a/src/Config/SimConfig/AssemblyInfo.cs +++ b/src/Config/SimConfig/AssemblyInfo.cs | |||
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices; | |||
14 | 14 | ||
15 | [assembly: ComVisibleAttribute(false)] | 15 | [assembly: ComVisibleAttribute(false)] |
16 | [assembly: CLSCompliantAttribute(false)] | 16 | [assembly: CLSCompliantAttribute(false)] |
17 | [assembly: AssemblyVersionAttribute("0.1.*.191")] | 17 | [assembly: AssemblyVersionAttribute("0.1.*.192")] |
18 | [assembly: AssemblyTitleAttribute("opensim-simconfig")] | 18 | [assembly: AssemblyTitleAttribute("opensim-simconfig")] |
19 | [assembly: AssemblyDescriptionAttribute("The default configuration handler")] | 19 | [assembly: AssemblyDescriptionAttribute("The default configuration handler")] |
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | 20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] |
diff --git a/src/Config/SimConfig/SimConfig.csproj b/src/Config/SimConfig/SimConfig.csproj index 3131405..5aee907 100644 --- a/src/Config/SimConfig/SimConfig.csproj +++ b/src/Config/SimConfig/SimConfig.csproj | |||
@@ -8,7 +8,7 @@ | |||
8 | <ProjectGuid>{B063760D-DB8D-4F64-B6FE-335FAD1E650A}</ProjectGuid> | 8 | <ProjectGuid>{B063760D-DB8D-4F64-B6FE-335FAD1E650A}</ProjectGuid> |
9 | </PropertyGroup> | 9 | </PropertyGroup> |
10 | <PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | 10 | <PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
11 | <OutputPath>bin\Debug\</OutputPath> | 11 | <OutputPath>..\..\..\bin\</OutputPath> |
12 | <Optimize>False</Optimize> | 12 | <Optimize>False</Optimize> |
13 | <DefineConstants>DEBUG;TRACE</DefineConstants> | 13 | <DefineConstants>DEBUG;TRACE</DefineConstants> |
14 | <DebugSymbols>True</DebugSymbols> | 14 | <DebugSymbols>True</DebugSymbols> |
diff --git a/src/GridInterfaces/AssemblyInfo.cs b/src/GridInterfaces/AssemblyInfo.cs index 9ec5236..a62dcdc 100644 --- a/src/GridInterfaces/AssemblyInfo.cs +++ b/src/GridInterfaces/AssemblyInfo.cs | |||
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices; | |||
14 | 14 | ||
15 | [assembly: ComVisibleAttribute(false)] | 15 | [assembly: ComVisibleAttribute(false)] |
16 | [assembly: CLSCompliantAttribute(false)] | 16 | [assembly: CLSCompliantAttribute(false)] |
17 | [assembly: AssemblyVersionAttribute("0.1.*.191")] | 17 | [assembly: AssemblyVersionAttribute("0.1.*.192")] |
18 | [assembly: AssemblyTitleAttribute("opensim-gridinterfaces")] | 18 | [assembly: AssemblyTitleAttribute("opensim-gridinterfaces")] |
19 | [assembly: AssemblyDescriptionAttribute("Definitions for OGS interface")] | 19 | [assembly: AssemblyDescriptionAttribute("Definitions for OGS interface")] |
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | 20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] |
diff --git a/src/LocalServers/LocalGridServers/AssemblyInfo.cs b/src/LocalServers/LocalGridServers/AssemblyInfo.cs index 64f467b..e25895f 100644 --- a/src/LocalServers/LocalGridServers/AssemblyInfo.cs +++ b/src/LocalServers/LocalGridServers/AssemblyInfo.cs | |||
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices; | |||
14 | 14 | ||
15 | [assembly: ComVisibleAttribute(false)] | 15 | [assembly: ComVisibleAttribute(false)] |
16 | [assembly: CLSCompliantAttribute(false)] | 16 | [assembly: CLSCompliantAttribute(false)] |
17 | [assembly: AssemblyVersionAttribute("0.1.*.191")] | 17 | [assembly: AssemblyVersionAttribute("0.1.*.192")] |
18 | [assembly: AssemblyTitleAttribute("opensim-localservers")] | 18 | [assembly: AssemblyTitleAttribute("opensim-localservers")] |
19 | [assembly: AssemblyDescriptionAttribute("local grid servers")] | 19 | [assembly: AssemblyDescriptionAttribute("local grid servers")] |
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | 20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] |
diff --git a/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs b/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs index dda233d..28db549 100644 --- a/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs +++ b/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs | |||
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices; | |||
14 | 14 | ||
15 | [assembly: ComVisibleAttribute(false)] | 15 | [assembly: ComVisibleAttribute(false)] |
16 | [assembly: CLSCompliantAttribute(false)] | 16 | [assembly: CLSCompliantAttribute(false)] |
17 | [assembly: AssemblyVersionAttribute("0.1.*.191")] | 17 | [assembly: AssemblyVersionAttribute("0.1.*.192")] |
18 | [assembly: AssemblyTitleAttribute("opensim-localstorage")] | 18 | [assembly: AssemblyTitleAttribute("opensim-localstorage")] |
19 | [assembly: AssemblyDescriptionAttribute("The local storage handler")] | 19 | [assembly: AssemblyDescriptionAttribute("The local storage handler")] |
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | 20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] |
diff --git a/src/Main.cs b/src/Main.cs index 18418d1..79c0782 100644 --- a/src/Main.cs +++ b/src/Main.cs | |||
@@ -83,13 +83,18 @@ namespace OpenSim | |||
83 | ServerConsole.MainConsole.Instance = new MServerConsole(ServerConsole.ConsoleBase.ConsoleType.Local,"",0); | 83 | ServerConsole.MainConsole.Instance = new MServerConsole(ServerConsole.ConsoleBase.ConsoleType.Local,"",0); |
84 | 84 | ||
85 | sim = new OpenSim_Main(); | 85 | sim = new OpenSim_Main(); |
86 | 86 | ||
87 | sim.sandbox = false; | ||
88 | sim.loginserver = false; | ||
89 | sim._physicsEngine = "PhysX"; | ||
90 | |||
87 | for (int i = 0; i < args.Length; i++) | 91 | for (int i = 0; i < args.Length; i++) |
88 | { | 92 | { |
89 | if(args[i] == "-sandbox") | 93 | if(args[i] == "-sandbox") |
90 | { | 94 | { |
91 | sim.sandbox = true; | 95 | sim.sandbox = true; |
92 | } | 96 | } |
97 | |||
93 | if(args[i] == "-loginserver") | 98 | if(args[i] == "-loginserver") |
94 | { | 99 | { |
95 | sim.loginserver = true; | 100 | sim.loginserver = true; |
@@ -136,9 +141,6 @@ namespace OpenSim | |||
136 | 141 | ||
137 | private void Startup() { | 142 | private void Startup() { |
138 | startuptime=DateTime.Now; | 143 | startuptime=DateTime.Now; |
139 | timer1.Enabled = true; | ||
140 | timer1.Interval = 100; | ||
141 | timer1.Elapsed +=new ElapsedEventHandler( this.Timer1Tick ); | ||
142 | 144 | ||
143 | // We check our local database first, then the grid for config options | 145 | // We check our local database first, then the grid for config options |
144 | ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Loading configuration"); | 146 | ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Loading configuration"); |
@@ -150,7 +152,11 @@ namespace OpenSim | |||
150 | ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - We are " + cfg.RegionName + " at " + cfg.RegionLocX.ToString() + "," + cfg.RegionLocY.ToString()); | 152 | ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - We are " + cfg.RegionName + " at " + cfg.RegionLocX.ToString() + "," + cfg.RegionLocY.ToString()); |
151 | ServerConsole.MainConsole.Instance.WriteLine("Initialising world"); | 153 | ServerConsole.MainConsole.Instance.WriteLine("Initialising world"); |
152 | local_world = cfg.LoadWorld(); | 154 | local_world = cfg.LoadWorld(); |
153 | 155 | ||
156 | timer1.Enabled = true; | ||
157 | timer1.Interval = 100; | ||
158 | timer1.Elapsed += new ElapsedEventHandler(this.Timer1Tick); | ||
159 | |||
154 | this.physManager = new PhysicsSystem.PhysicsManager(); | 160 | this.physManager = new PhysicsSystem.PhysicsManager(); |
155 | this.physManager.LoadPlugins(); | 161 | this.physManager.LoadPlugins(); |
156 | ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting up messaging system"); | 162 | ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting up messaging system"); |
@@ -210,7 +216,7 @@ namespace OpenSim | |||
210 | OpenSimClient newuser = new OpenSimClient(epSender,(UseCircuitCodePacket)packet); | 216 | OpenSimClient newuser = new OpenSimClient(epSender,(UseCircuitCodePacket)packet); |
211 | ClientThreads.Add(epSender, newuser); | 217 | ClientThreads.Add(epSender, newuser); |
212 | } else { // invalid client | 218 | } else { // invalid client |
213 | Console.Error.WriteLine("Main.cs:OnReceivedData() - WARNING: Got a " + packet.ToString() + " packet from an invalid client - " + epSender.ToString()); | 219 | Console.Error.WriteLine("Main.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString()); |
214 | } | 220 | } |
215 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); | 221 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); |
216 | } | 222 | } |
diff --git a/src/OpenSimConsole.cs b/src/OpenSimConsole.cs index 11bc648..00a4cee 100644 --- a/src/OpenSimConsole.cs +++ b/src/OpenSimConsole.cs | |||
@@ -61,6 +61,7 @@ namespace OpenSim | |||
61 | ConsType = constype; | 61 | ConsType = constype; |
62 | switch(constype) { | 62 | switch(constype) { |
63 | case ConsoleType.Local: | 63 | case ConsoleType.Local: |
64 | |||
64 | Console.WriteLine("ServerConsole.cs - creating new local console"); | 65 | Console.WriteLine("ServerConsole.cs - creating new local console"); |
65 | Console.WriteLine("Logs will be saved to current directory in opensim-console.log"); | 66 | Console.WriteLine("Logs will be saved to current directory in opensim-console.log"); |
66 | Log=File.AppendText("opensim-console.log"); | 67 | Log=File.AppendText("opensim-console.log"); |
@@ -75,22 +76,30 @@ namespace OpenSim | |||
75 | default: | 76 | default: |
76 | Console.WriteLine("ServerConsole.cs - what are you smoking? that isn't a valid console type!"); | 77 | Console.WriteLine("ServerConsole.cs - what are you smoking? that isn't a valid console type!"); |
77 | break; | 78 | break; |
78 | } | 79 | } |
79 | } | 80 | } |
80 | 81 | ||
81 | public override void Close() { | 82 | public override void Close() { |
82 | Log.WriteLine("OpenSim shutdown at " + DateTime.Now.ToString()); | 83 | Log.WriteLine("OpenSim shutdown at " + DateTime.Now.ToString()); |
83 | Log.Close(); | 84 | Log.Close(); |
84 | } | 85 | } |
85 | 86 | ||
86 | // You know what ReadLine() and WriteLine() do, right? And Read() and Write()? Right, you do actually know C#, right? Are you actually a programmer? Do you know english? Do you find my sense of humour in comments irritating? Good, glad you're still here | 87 | public override void Write(string format, params object[] args) |
87 | public override void WriteLine(string Line) { | 88 | { |
88 | Log.WriteLine(Line); | 89 | Log.Write(format, args); |
89 | Console.WriteLine(Line); | 90 | Console.Write(format, args); |
90 | return; | 91 | return; |
91 | } | 92 | } |
92 | 93 | ||
93 | public override string ReadLine() { | 94 | public override void WriteLine(string format, params object[] args) |
95 | { | ||
96 | Log.WriteLine(format, args); | ||
97 | Console.WriteLine(format, args); | ||
98 | return; | ||
99 | } | ||
100 | |||
101 | public override string ReadLine() | ||
102 | { | ||
94 | string TempStr=Console.ReadLine(); | 103 | string TempStr=Console.ReadLine(); |
95 | Log.WriteLine(TempStr); | 104 | Log.WriteLine(TempStr); |
96 | return TempStr; | 105 | return TempStr; |
@@ -102,12 +111,6 @@ namespace OpenSim | |||
102 | return TempInt; | 111 | return TempInt; |
103 | } | 112 | } |
104 | 113 | ||
105 | public override void Write(string Line) { | ||
106 | Console.Write(Line); | ||
107 | Log.Write(Line); | ||
108 | return; | ||
109 | } | ||
110 | |||
111 | // Displays a command prompt and waits for the user to enter a string, then returns that string | 114 | // Displays a command prompt and waits for the user to enter a string, then returns that string |
112 | public override string CmdPrompt(string prompt) { | 115 | public override string CmdPrompt(string prompt) { |
113 | this.Write(prompt); | 116 | this.Write(prompt); |
@@ -196,7 +199,13 @@ namespace OpenSim | |||
196 | string[] cmdparams=(string[])tempstrarray; | 199 | string[] cmdparams=(string[])tempstrarray; |
197 | RunCmd(cmd,cmdparams); | 200 | RunCmd(cmd,cmdparams); |
198 | } | 201 | } |
199 | } | 202 | |
203 | |||
204 | public override void SetStatus(string status) | ||
205 | { | ||
206 | Console.Write( status + "\r" ); | ||
207 | } | ||
208 | } | ||
200 | } | 209 | } |
201 | 210 | ||
202 | 211 | ||
diff --git a/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs b/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs index 21d481a..3978650 100644 --- a/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs +++ b/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs | |||
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices; | |||
14 | 14 | ||
15 | [assembly: ComVisibleAttribute(false)] | 15 | [assembly: ComVisibleAttribute(false)] |
16 | [assembly: CLSCompliantAttribute(false)] | 16 | [assembly: CLSCompliantAttribute(false)] |
17 | [assembly: AssemblyVersionAttribute("0.1.*.191")] | 17 | [assembly: AssemblyVersionAttribute("0.1.*.192")] |
18 | [assembly: AssemblyTitleAttribute("opensim-remoteservers")] | 18 | [assembly: AssemblyTitleAttribute("opensim-remoteservers")] |
19 | [assembly: AssemblyDescriptionAttribute("Connects to remote OGS installation")] | 19 | [assembly: AssemblyDescriptionAttribute("Connects to remote OGS installation")] |
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | 20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] |
diff --git a/src/RemoteServers/RemoteGridServers/RemoteGrid.cs b/src/RemoteServers/RemoteGridServers/RemoteGrid.cs index e50360a..428d5f5 100644 --- a/src/RemoteServers/RemoteGridServers/RemoteGrid.cs +++ b/src/RemoteServers/RemoteGridServers/RemoteGrid.cs | |||
@@ -89,8 +89,8 @@ namespace RemoteGridServers | |||
89 | String grTest = sr.ReadLine(); | 89 | String grTest = sr.ReadLine(); |
90 | sr.Close(); | 90 | sr.Close(); |
91 | GridResponse.Close(); | 91 | GridResponse.Close(); |
92 | //if(String.IsNullOrEmpty(grTest) || grTest.Equals("1")) | 92 | if(String.IsNullOrEmpty(grTest) || grTest.Equals("1")) |
93 | //{ | 93 | { |
94 | // YAY! Valid login | 94 | // YAY! Valid login |
95 | user.Authorised = true; | 95 | user.Authorised = true; |
96 | user.LoginInfo = new Login(); | 96 | user.LoginInfo = new Login(); |
@@ -99,12 +99,12 @@ namespace RemoteGridServers | |||
99 | user.LoginInfo.First = ""; | 99 | user.LoginInfo.First = ""; |
100 | user.LoginInfo.Last = ""; | 100 | user.LoginInfo.Last = ""; |
101 | 101 | ||
102 | //} | 102 | } |
103 | //else | 103 | else |
104 | //{ | 104 | { |
105 | // // Invalid | 105 | // Invalid |
106 | // user.Authorised = false; | 106 | user.Authorised = false; |
107 | //} | 107 | } |
108 | 108 | ||
109 | return(user); | 109 | return(user); |
110 | } | 110 | } |
diff --git a/src/ServerConsole/ServerConsole/AssemblyInfo.cs b/src/ServerConsole/ServerConsole/AssemblyInfo.cs index 88b4019..57481fc 100644 --- a/src/ServerConsole/ServerConsole/AssemblyInfo.cs +++ b/src/ServerConsole/ServerConsole/AssemblyInfo.cs | |||
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices; | |||
14 | 14 | ||
15 | [assembly: ComVisibleAttribute(false)] | 15 | [assembly: ComVisibleAttribute(false)] |
16 | [assembly: CLSCompliantAttribute(false)] | 16 | [assembly: CLSCompliantAttribute(false)] |
17 | [assembly: AssemblyVersionAttribute("0.1.*.191")] | 17 | [assembly: AssemblyVersionAttribute("0.1.*.192")] |
18 | [assembly: AssemblyTitleAttribute("opensim-serverconsole")] | 18 | [assembly: AssemblyTitleAttribute("opensim-serverconsole")] |
19 | [assembly: AssemblyDescriptionAttribute("The default server console")] | 19 | [assembly: AssemblyDescriptionAttribute("The default server console")] |
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | 20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] |
diff --git a/src/ServerConsole/ServerConsole/ServerConsole.cs b/src/ServerConsole/ServerConsole/ServerConsole.cs index 93c8114..27d97e5 100644 --- a/src/ServerConsole/ServerConsole/ServerConsole.cs +++ b/src/ServerConsole/ServerConsole/ServerConsole.cs | |||
@@ -43,12 +43,7 @@ namespace ServerConsole | |||
43 | instance = value; | 43 | instance = value; |
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | } | |
47 | public MainConsole() | ||
48 | { | ||
49 | |||
50 | } | ||
51 | } | ||
52 | 47 | ||
53 | public abstract class ConsoleBase | 48 | public abstract class ConsoleBase |
54 | { | 49 | { |
@@ -60,16 +55,15 @@ namespace ServerConsole | |||
60 | } | 55 | } |
61 | 56 | ||
62 | public abstract void Close(); | 57 | public abstract void Close(); |
63 | 58 | ||
64 | // You know what ReadLine() and WriteLine() do, right? And Read() and Write()? Right, you do actually know C#, right? Are you actually a programmer? Do you know english? Do you find my sense of humour in comments irritating? Good, glad you're still here | 59 | public abstract void Write(string format, params object[] args); |
65 | public abstract void WriteLine(string Line) ; | 60 | |
66 | 61 | public abstract void WriteLine(string format, params object[] args); | |
62 | |||
67 | public abstract string ReadLine(); | 63 | public abstract string ReadLine(); |
68 | 64 | ||
69 | public abstract int Read() ; | 65 | public abstract int Read() ; |
70 | 66 | ||
71 | public abstract void Write(string Line) ; | ||
72 | |||
73 | // Displays a command prompt and waits for the user to enter a string, then returns that string | 67 | // Displays a command prompt and waits for the user to enter a string, then returns that string |
74 | public abstract string CmdPrompt(string prompt) ; | 68 | public abstract string CmdPrompt(string prompt) ; |
75 | 69 | ||
@@ -87,5 +81,7 @@ namespace ServerConsole | |||
87 | 81 | ||
88 | // Displays a prompt to the user and then runs the command they entered | 82 | // Displays a prompt to the user and then runs the command they entered |
89 | public abstract void MainConsolePrompt() ; | 83 | public abstract void MainConsolePrompt() ; |
90 | } | 84 | |
85 | public abstract void SetStatus( string status ); | ||
86 | } | ||
91 | } | 87 | } |
diff --git a/src/VersionInfo.cs b/src/VersionInfo.cs index b3cc6a5..94f0810 100644 --- a/src/VersionInfo.cs +++ b/src/VersionInfo.cs | |||
@@ -32,6 +32,6 @@ namespace OpenSim | |||
32 | /// </summary> | 32 | /// </summary> |
33 | public class VersionInfo | 33 | public class VersionInfo |
34 | { | 34 | { |
35 | public static string Version = "0.1, Build 1173778834, Revision 191M"; | 35 | public static string Version = "0.1, Build 1173785234, Revision 192M"; |
36 | } | 36 | } |
37 | } | 37 | } |
diff --git a/src/physics/AssemblyInfo.cs b/src/physics/AssemblyInfo.cs index 1cc3ee1..c78d44c 100644 --- a/src/physics/AssemblyInfo.cs +++ b/src/physics/AssemblyInfo.cs | |||
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices; | |||
14 | 14 | ||
15 | [assembly: ComVisibleAttribute(false)] | 15 | [assembly: ComVisibleAttribute(false)] |
16 | [assembly: CLSCompliantAttribute(false)] | 16 | [assembly: CLSCompliantAttribute(false)] |
17 | [assembly: AssemblyVersionAttribute("0.1.*.191")] | 17 | [assembly: AssemblyVersionAttribute("0.1.*.192")] |
18 | [assembly: AssemblyTitleAttribute("opensim-physicsmanager")] | 18 | [assembly: AssemblyTitleAttribute("opensim-physicsmanager")] |
19 | [assembly: AssemblyDescriptionAttribute("Handles physics plugins")] | 19 | [assembly: AssemblyDescriptionAttribute("Handles physics plugins")] |
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | 20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] |
diff --git a/src/physics/PhysicsManager.cs b/src/physics/PhysicsManager.cs index e5d5bd6..1fee628 100644 --- a/src/physics/PhysicsManager.cs +++ b/src/physics/PhysicsManager.cs | |||
@@ -46,15 +46,21 @@ namespace PhysicsSystem | |||
46 | 46 | ||
47 | public PhysicsScene GetPhysicsScene(string engineName) | 47 | public PhysicsScene GetPhysicsScene(string engineName) |
48 | { | 48 | { |
49 | if(_plugins.ContainsKey(engineName)) | 49 | if( String.IsNullOrEmpty( engineName ) ) |
50 | { | ||
51 | return new NullPhysicsScene(); | ||
52 | } | ||
53 | |||
54 | if(_plugins.ContainsKey(engineName)) | ||
50 | { | 55 | { |
51 | ServerConsole.MainConsole.Instance.WriteLine("creating "+engineName); | 56 | ServerConsole.MainConsole.Instance.WriteLine("creating "+engineName); |
52 | return _plugins[engineName].GetScene(); | 57 | return _plugins[engineName].GetScene(); |
53 | } | 58 | } |
54 | else | 59 | else |
55 | { | 60 | { |
56 | ServerConsole.MainConsole.Instance.WriteLine("couldn't find physicsEngine: "+ engineName); | 61 | string error = String.Format("couldn't find physicsEngine: {0}", engineName); |
57 | return null; | 62 | ServerConsole.MainConsole.Instance.WriteLine( error ); |
63 | throw new ArgumentException( error ); | ||
58 | } | 64 | } |
59 | } | 65 | } |
60 | 66 | ||
@@ -108,6 +114,14 @@ namespace PhysicsSystem | |||
108 | 114 | ||
109 | public abstract class PhysicsScene | 115 | public abstract class PhysicsScene |
110 | { | 116 | { |
117 | public static PhysicsScene Null | ||
118 | { | ||
119 | get | ||
120 | { | ||
121 | return new NullPhysicsScene(); | ||
122 | } | ||
123 | } | ||
124 | |||
111 | public abstract PhysicsActor AddAvatar(PhysicsVector position); | 125 | public abstract PhysicsActor AddAvatar(PhysicsVector position); |
112 | 126 | ||
113 | public abstract PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size); | 127 | public abstract PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size); |
@@ -124,8 +138,49 @@ namespace PhysicsSystem | |||
124 | } | 138 | } |
125 | } | 139 | } |
126 | 140 | ||
141 | public class NullPhysicsScene : PhysicsScene | ||
142 | { | ||
143 | private static int m_workIndicator; | ||
144 | |||
145 | public override PhysicsActor AddAvatar(PhysicsVector position) | ||
146 | { | ||
147 | ServerConsole.MainConsole.Instance.WriteLine("NullPhysicsScene : AddAvatar({0})", position ); | ||
148 | return PhysicsActor.Null; | ||
149 | } | ||
150 | |||
151 | public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) | ||
152 | { | ||
153 | ServerConsole.MainConsole.Instance.WriteLine("NullPhysicsScene : AddPrim({0},{1})", position, size ); | ||
154 | return PhysicsActor.Null; | ||
155 | } | ||
156 | |||
157 | public override void Simulate(float timeStep) | ||
158 | { | ||
159 | m_workIndicator = ( m_workIndicator + 1 ) % 10; | ||
160 | |||
161 | ServerConsole.MainConsole.Instance.SetStatus( m_workIndicator.ToString() ); | ||
162 | } | ||
163 | |||
164 | public override void GetResults() | ||
165 | { | ||
166 | ServerConsole.MainConsole.Instance.WriteLine("NullPhysicsScene : GetResults()" ); | ||
167 | } | ||
168 | |||
169 | public override void SetTerrain(float[] heightMap) | ||
170 | { | ||
171 | ServerConsole.MainConsole.Instance.WriteLine("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length ); | ||
172 | } | ||
173 | |||
174 | public override bool IsThreaded | ||
175 | { | ||
176 | get { return false; } | ||
177 | } | ||
178 | } | ||
179 | |||
127 | public abstract class PhysicsActor | 180 | public abstract class PhysicsActor |
128 | { | 181 | { |
182 | public static readonly PhysicsActor Null = new NullPhysicsActor(); | ||
183 | |||
129 | public abstract PhysicsVector Position | 184 | public abstract PhysicsVector Position |
130 | { | 185 | { |
131 | get; | 186 | get; |
@@ -153,7 +208,61 @@ namespace PhysicsSystem | |||
153 | public abstract void SetMomentum(PhysicsVector momentum); | 208 | public abstract void SetMomentum(PhysicsVector momentum); |
154 | } | 209 | } |
155 | 210 | ||
156 | public class PhysicsVector | 211 | public class NullPhysicsActor : PhysicsActor |
212 | { | ||
213 | public override PhysicsVector Position | ||
214 | { | ||
215 | get | ||
216 | { | ||
217 | return PhysicsVector.Zero; | ||
218 | } | ||
219 | set | ||
220 | { | ||
221 | return; | ||
222 | } | ||
223 | } | ||
224 | |||
225 | public override PhysicsVector Velocity | ||
226 | { | ||
227 | get | ||
228 | { | ||
229 | return PhysicsVector.Zero; | ||
230 | } | ||
231 | set | ||
232 | { | ||
233 | return; | ||
234 | } | ||
235 | } | ||
236 | |||
237 | public override PhysicsVector Acceleration | ||
238 | { | ||
239 | get { return PhysicsVector.Zero; } | ||
240 | } | ||
241 | |||
242 | public override bool Flying | ||
243 | { | ||
244 | get | ||
245 | { | ||
246 | return false; | ||
247 | } | ||
248 | set | ||
249 | { | ||
250 | return; | ||
251 | } | ||
252 | } | ||
253 | |||
254 | public override void AddForce(PhysicsVector force) | ||
255 | { | ||
256 | return; | ||
257 | } | ||
258 | |||
259 | public override void SetMomentum(PhysicsVector momentum) | ||
260 | { | ||
261 | return; | ||
262 | } | ||
263 | } | ||
264 | |||
265 | public class PhysicsVector | ||
157 | { | 266 | { |
158 | public float X; | 267 | public float X; |
159 | public float Y; | 268 | public float Y; |
@@ -170,5 +279,7 @@ namespace PhysicsSystem | |||
170 | Y = y; | 279 | Y = y; |
171 | Z = z; | 280 | Z = z; |
172 | } | 281 | } |
282 | |||
283 | public static readonly PhysicsVector Zero = new PhysicsVector(0f, 0f, 0f); | ||
173 | } | 284 | } |
174 | } | 285 | } |
diff --git a/src/physics/plugins/AssemblyInfo.cs b/src/physics/plugins/AssemblyInfo.cs index 2c12da4..a24c947 100644 --- a/src/physics/plugins/AssemblyInfo.cs +++ b/src/physics/plugins/AssemblyInfo.cs | |||
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices; | |||
14 | 14 | ||
15 | [assembly: ComVisibleAttribute(false)] | 15 | [assembly: ComVisibleAttribute(false)] |
16 | [assembly: CLSCompliantAttribute(false)] | 16 | [assembly: CLSCompliantAttribute(false)] |
17 | [assembly: AssemblyVersionAttribute("0.1.*.191")] | 17 | [assembly: AssemblyVersionAttribute("0.1.*.192")] |
18 | [assembly: AssemblyTitleAttribute("opensim-physicsmanager-physx")] | 18 | [assembly: AssemblyTitleAttribute("opensim-physicsmanager-physx")] |
19 | [assembly: AssemblyDescriptionAttribute("PhysX plugin for OpenSim")] | 19 | [assembly: AssemblyDescriptionAttribute("PhysX plugin for OpenSim")] |
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | 20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] |