diff options
author | Diva Canto | 2009-08-21 11:01:23 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-21 11:01:23 -0700 |
commit | f9ee8be2bce8dd894f0db33f152c872695ac839d (patch) | |
tree | f3d09cb58ffe68ac95f9e4197435f4d837d00ded | |
parent | Added a more sane InventoryServerMoveItemsHandler. Changed SynchronousRestObj... (diff) | |
parent | Fix Messaging server so -xmlfile actually works (diff) | |
download | opensim-SC-f9ee8be2bce8dd894f0db33f152c872695ac839d.zip opensim-SC-f9ee8be2bce8dd894f0db33f152c872695ac839d.tar.gz opensim-SC-f9ee8be2bce8dd894f0db33f152c872695ac839d.tar.bz2 opensim-SC-f9ee8be2bce8dd894f0db33f152c872695ac839d.tar.xz |
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/GridServer/GridServerBase.cs | 3 | ||||
-rw-r--r-- | OpenSim/Grid/GridServer/Program.cs | 2 | ||||
-rw-r--r-- | OpenSim/Grid/MessagingServer/Main.cs | 5 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/NPC/INPCModule.cs | 29 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 32 |
8 files changed, 66 insertions, 23 deletions
diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index e3ad52a..d63ac2e 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs | |||
@@ -49,6 +49,7 @@ namespace OpenSim.Grid.GridServer | |||
49 | protected GridConfig m_config; | 49 | protected GridConfig m_config; |
50 | public string m_consoleType = "local"; | 50 | public string m_consoleType = "local"; |
51 | public IConfigSource m_configSource = null; | 51 | public IConfigSource m_configSource = null; |
52 | public string m_configFile = "GridServer_Config.xml"; | ||
52 | 53 | ||
53 | public GridConfig Config | 54 | public GridConfig Config |
54 | { | 55 | { |
@@ -91,7 +92,7 @@ namespace OpenSim.Grid.GridServer | |||
91 | break; | 92 | break; |
92 | } | 93 | } |
93 | MainConsole.Instance = m_console; | 94 | MainConsole.Instance = m_console; |
94 | m_config = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml"))); | 95 | m_config = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), m_configFile))); |
95 | 96 | ||
96 | m_log.Info("[GRID]: Starting HTTP process"); | 97 | m_log.Info("[GRID]: Starting HTTP process"); |
97 | m_httpServer = new BaseHttpServer(m_config.HttpPort); | 98 | m_httpServer = new BaseHttpServer(m_config.HttpPort); |
diff --git a/OpenSim/Grid/GridServer/Program.cs b/OpenSim/Grid/GridServer/Program.cs index c7ba897..741a01b 100644 --- a/OpenSim/Grid/GridServer/Program.cs +++ b/OpenSim/Grid/GridServer/Program.cs | |||
@@ -36,6 +36,7 @@ namespace OpenSim.Grid.GridServer | |||
36 | { | 36 | { |
37 | ArgvConfigSource argvSource = new ArgvConfigSource(args); | 37 | ArgvConfigSource argvSource = new ArgvConfigSource(args); |
38 | argvSource.AddSwitch("Startup", "console", "c"); | 38 | argvSource.AddSwitch("Startup", "console", "c"); |
39 | argvSource.AddSwitch("Startup", "xmlfile", "x"); | ||
39 | 40 | ||
40 | XmlConfigurator.Configure(); | 41 | XmlConfigurator.Configure(); |
41 | 42 | ||
@@ -45,6 +46,7 @@ namespace OpenSim.Grid.GridServer | |||
45 | if (startupConfig != null) | 46 | if (startupConfig != null) |
46 | { | 47 | { |
47 | app.m_consoleType = startupConfig.GetString("console", "local"); | 48 | app.m_consoleType = startupConfig.GetString("console", "local"); |
49 | app.m_configFile = startupConfig.GetString("xmlfile", "GridServer_Config.xml"); | ||
48 | } | 50 | } |
49 | 51 | ||
50 | app.m_configSource = argvSource; | 52 | app.m_configSource = argvSource; |
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index 654e770..f2631a7 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs | |||
@@ -59,16 +59,19 @@ namespace OpenSim.Grid.MessagingServer | |||
59 | 59 | ||
60 | protected static string m_consoleType = "local"; | 60 | protected static string m_consoleType = "local"; |
61 | protected static IConfigSource m_config = null; | 61 | protected static IConfigSource m_config = null; |
62 | protected static string m_configFile = "MessagingServer_Config.xml"; | ||
62 | 63 | ||
63 | public static void Main(string[] args) | 64 | public static void Main(string[] args) |
64 | { | 65 | { |
65 | ArgvConfigSource argvSource = new ArgvConfigSource(args); | 66 | ArgvConfigSource argvSource = new ArgvConfigSource(args); |
66 | argvSource.AddSwitch("Startup", "console", "c"); | 67 | argvSource.AddSwitch("Startup", "console", "c"); |
68 | argvSource.AddSwitch("Startup", "xmlfile", "x"); | ||
67 | 69 | ||
68 | IConfig startupConfig = argvSource.Configs["Startup"]; | 70 | IConfig startupConfig = argvSource.Configs["Startup"]; |
69 | if (startupConfig != null) | 71 | if (startupConfig != null) |
70 | { | 72 | { |
71 | m_consoleType = startupConfig.GetString("console", "local"); | 73 | m_consoleType = startupConfig.GetString("console", "local"); |
74 | m_configFile = startupConfig.GetString("xmlfile", "MessagingServer_Config.xml"); | ||
72 | } | 75 | } |
73 | 76 | ||
74 | m_config = argvSource; | 77 | m_config = argvSource; |
@@ -164,7 +167,7 @@ namespace OpenSim.Grid.MessagingServer | |||
164 | 167 | ||
165 | protected override void StartupSpecific() | 168 | protected override void StartupSpecific() |
166 | { | 169 | { |
167 | Cfg = new MessageServerConfig("MESSAGING SERVER", (Path.Combine(Util.configDir(), "MessagingServer_Config.xml"))); | 170 | Cfg = new MessageServerConfig("MESSAGING SERVER", (Path.Combine(Util.configDir(), m_configFile))); |
168 | 171 | ||
169 | m_userDataBaseService = new UserDataBaseService(); | 172 | m_userDataBaseService = new UserDataBaseService(); |
170 | m_userDataBaseService.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); | 173 | m_userDataBaseService.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); |
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 1ee53ef..baf0fd3 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -76,16 +76,19 @@ namespace OpenSim.Grid.UserServer | |||
76 | 76 | ||
77 | protected static string m_consoleType = "local"; | 77 | protected static string m_consoleType = "local"; |
78 | protected static IConfigSource m_config = null; | 78 | protected static IConfigSource m_config = null; |
79 | protected static string m_configFile = "UserServer_Config.xml"; | ||
79 | 80 | ||
80 | public static void Main(string[] args) | 81 | public static void Main(string[] args) |
81 | { | 82 | { |
82 | ArgvConfigSource argvSource = new ArgvConfigSource(args); | 83 | ArgvConfigSource argvSource = new ArgvConfigSource(args); |
83 | argvSource.AddSwitch("Startup", "console", "c"); | 84 | argvSource.AddSwitch("Startup", "console", "c"); |
85 | argvSource.AddSwitch("Startup", "xmlfile", "x"); | ||
84 | 86 | ||
85 | IConfig startupConfig = argvSource.Configs["Startup"]; | 87 | IConfig startupConfig = argvSource.Configs["Startup"]; |
86 | if (startupConfig != null) | 88 | if (startupConfig != null) |
87 | { | 89 | { |
88 | m_consoleType = startupConfig.GetString("console", "local"); | 90 | m_consoleType = startupConfig.GetString("console", "local"); |
91 | m_configFile = startupConfig.GetString("xmlfile", "UserServer_Config.xml"); | ||
89 | } | 92 | } |
90 | 93 | ||
91 | m_config = argvSource; | 94 | m_config = argvSource; |
@@ -151,7 +154,7 @@ namespace OpenSim.Grid.UserServer | |||
151 | 154 | ||
152 | protected virtual IInterServiceInventoryServices StartupCoreComponents() | 155 | protected virtual IInterServiceInventoryServices StartupCoreComponents() |
153 | { | 156 | { |
154 | Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); | 157 | Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), m_configFile))); |
155 | 158 | ||
156 | m_httpServer = new BaseHttpServer(Cfg.HttpPort); | 159 | m_httpServer = new BaseHttpServer(Cfg.HttpPort); |
157 | 160 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/NPC/INPCModule.cs b/OpenSim/Region/CoreModules/Avatar/NPC/INPCModule.cs index 7d5c310..cd2fe4f 100644 --- a/OpenSim/Region/CoreModules/Avatar/NPC/INPCModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/NPC/INPCModule.cs | |||
@@ -1,4 +1,31 @@ | |||
1 | using OpenMetaverse; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenMetaverse; | ||
2 | using OpenSim.Region.Framework.Scenes; | 29 | using OpenSim.Region.Framework.Scenes; |
3 | 30 | ||
4 | namespace OpenSim.Region.CoreModules.Avatar.NPC | 31 | namespace OpenSim.Region.CoreModules.Avatar.NPC |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs index b61959f..3c5e8c9 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs | |||
@@ -213,7 +213,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
213 | m_log.DebugFormat("[IRC-Channel-{0}] AccessPassword : <{1}>", cs.idn, cs.AccessPassword); | 213 | m_log.DebugFormat("[IRC-Channel-{0}] AccessPassword : <{1}>", cs.idn, cs.AccessPassword); |
214 | string[] excludes = config.GetString("exclude_list", "").Trim().Split(new Char[] { ',' }); | 214 | string[] excludes = config.GetString("exclude_list", "").Trim().Split(new Char[] { ',' }); |
215 | cs.ExcludeList = new List<string>(excludes.Length); | 215 | cs.ExcludeList = new List<string>(excludes.Length); |
216 | foreach(string name in excludes) | 216 | foreach (string name in excludes) |
217 | { | 217 | { |
218 | cs.ExcludeList.Add(name.Trim().ToLower()); | 218 | cs.ExcludeList.Add(name.Trim().ToLower()); |
219 | } | 219 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index a43a5f5..b3bfe07 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
89 | p_returnUuid = UUID.Zero; | 89 | p_returnUuid = UUID.Zero; |
90 | } | 90 | } |
91 | 91 | ||
92 | while(p_returnUuid == UUID.Zero) | 92 | while (p_returnUuid == UUID.Zero) |
93 | { | 93 | { |
94 | Thread.Sleep(250); | 94 | Thread.Sleep(250); |
95 | } | 95 | } |
@@ -102,31 +102,37 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
102 | public void Autopilot(UUID agentID, Scene scene, Vector3 pos) | 102 | public void Autopilot(UUID agentID, Scene scene, Vector3 pos) |
103 | { | 103 | { |
104 | lock (m_avatars) | 104 | lock (m_avatars) |
105 | { | ||
105 | if (m_avatars.ContainsKey(agentID)) | 106 | if (m_avatars.ContainsKey(agentID)) |
106 | { | 107 | { |
107 | ScenePresence sp; | 108 | ScenePresence sp; |
108 | scene.TryGetAvatar(agentID, out sp); | 109 | scene.TryGetAvatar(agentID, out sp); |
109 | sp.DoAutoPilot(0, pos, m_avatars[agentID]); | 110 | sp.DoAutoPilot(0, pos, m_avatars[agentID]); |
110 | } | 111 | } |
112 | } | ||
111 | } | 113 | } |
112 | 114 | ||
113 | public void Say(UUID agentID, Scene scene, string text) | 115 | public void Say(UUID agentID, Scene scene, string text) |
114 | { | 116 | { |
115 | lock (m_avatars) | 117 | lock (m_avatars) |
118 | { | ||
116 | if (m_avatars.ContainsKey(agentID)) | 119 | if (m_avatars.ContainsKey(agentID)) |
117 | { | 120 | { |
118 | m_avatars[agentID].Say(text); | 121 | m_avatars[agentID].Say(text); |
119 | } | 122 | } |
123 | } | ||
120 | } | 124 | } |
121 | 125 | ||
122 | public void DeleteNPC(UUID agentID, Scene scene) | 126 | public void DeleteNPC(UUID agentID, Scene scene) |
123 | { | 127 | { |
124 | lock(m_avatars) | 128 | lock (m_avatars) |
129 | { | ||
125 | if (m_avatars.ContainsKey(agentID)) | 130 | if (m_avatars.ContainsKey(agentID)) |
126 | { | 131 | { |
127 | scene.RemoveClient(agentID); | 132 | scene.RemoveClient(agentID); |
128 | m_avatars.Remove(agentID); | 133 | m_avatars.Remove(agentID); |
129 | } | 134 | } |
135 | } | ||
130 | } | 136 | } |
131 | 137 | ||
132 | 138 | ||
@@ -146,7 +152,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
146 | { | 152 | { |
147 | p_inUse = false; | 153 | p_inUse = false; |
148 | 154 | ||
149 | |||
150 | NPCAvatar npcAvatar = new NPCAvatar(p_firstname, p_lastname, p_position, p_scene); | 155 | NPCAvatar npcAvatar = new NPCAvatar(p_firstname, p_lastname, p_position, p_scene); |
151 | npcAvatar.CircuitCode = (uint) Util.RandomClass.Next(0, int.MaxValue); | 156 | npcAvatar.CircuitCode = (uint) Util.RandomClass.Next(0, int.MaxValue); |
152 | 157 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 972e71c..16dd834 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1978,25 +1978,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1978 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); | 1978 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); |
1979 | } | 1979 | } |
1980 | 1980 | ||
1981 | private LSL_Rotation GetPartRot( SceneObjectPart part ) | 1981 | private LSL_Rotation GetPartRot(SceneObjectPart part) |
1982 | { | 1982 | { |
1983 | Quaternion q; | 1983 | Quaternion q; |
1984 | if (part.LinkNum == 0 || part.LinkNum == 1) // unlinked or root prim | 1984 | if (part.LinkNum == 0 || part.LinkNum == 1) // unlinked or root prim |
1985 | { | 1985 | { |
1986 | if (part.ParentGroup.RootPart.AttachmentPoint != 0) | 1986 | if (part.ParentGroup.RootPart.AttachmentPoint != 0) |
1987 | { | 1987 | { |
1988 | ScenePresence avatar = World.GetScenePresence(part.AttachedAvatar); | 1988 | ScenePresence avatar = World.GetScenePresence(part.AttachedAvatar); |
1989 | if (avatar != null) | 1989 | if (avatar != null) |
1990 | if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) | 1990 | { |
1991 | q = avatar.CameraRotation; // Mouselook | 1991 | if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) |
1992 | else | 1992 | q = avatar.CameraRotation; // Mouselook |
1993 | q = avatar.Rotation; // Currently infrequently updated so may be inaccurate | 1993 | else |
1994 | else | 1994 | q = avatar.Rotation; // Currently infrequently updated so may be inaccurate |
1995 | q = part.ParentGroup.GroupRotation; // Likely never get here but just in case | 1995 | } |
1996 | } | 1996 | else |
1997 | else | 1997 | q = part.ParentGroup.GroupRotation; // Likely never get here but just in case |
1998 | q = part.ParentGroup.GroupRotation; // just the group rotation | 1998 | } |
1999 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); | 1999 | else |
2000 | q = part.ParentGroup.GroupRotation; // just the group rotation | ||
2001 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); | ||
2000 | } | 2002 | } |
2001 | q = part.GetWorldRotation(); | 2003 | q = part.GetWorldRotation(); |
2002 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); | 2004 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); |