aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-11-28 00:23:58 +0000
committerJustin Clark-Casey (justincc)2013-11-28 00:23:58 +0000
commitb8dd203378dd8e33cef1609ae6f3e3cf6f261281 (patch)
tree0b3496abcf6a8aec6c7aa4124f67207d042bd734
parentminor: Change ProfileServiceURL reference in OpenSim.ini.example to be consis... (diff)
parentChange the log level for the LOGIN DISABLED and LOGIN ENABLED messages is (diff)
downloadopensim-SC_OLD-b8dd203378dd8e33cef1609ae6f3e3cf6f261281.zip
opensim-SC_OLD-b8dd203378dd8e33cef1609ae6f3e3cf6f261281.tar.gz
opensim-SC_OLD-b8dd203378dd8e33cef1609ae6f3e3cf6f261281.tar.bz2
opensim-SC_OLD-b8dd203378dd8e33cef1609ae6f3e3cf6f261281.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Data/PGSQL/PGSQLRegionData.cs4
-rw-r--r--OpenSim/Region/Application/OpenSim.cs44
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs6
3 files changed, 50 insertions, 4 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLRegionData.cs b/OpenSim/Data/PGSQL/PGSQLRegionData.cs
index 8a46559..f3e4064 100644
--- a/OpenSim/Data/PGSQL/PGSQLRegionData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLRegionData.cs
@@ -206,7 +206,7 @@ namespace OpenSim.Data.PGSQL
206 206
207 DataTable schemaTable = result.GetSchemaTable(); 207 DataTable schemaTable = result.GetSchemaTable();
208 foreach (DataRow row in schemaTable.Rows) 208 foreach (DataRow row in schemaTable.Rows)
209 m_ColumnNames.Add(row["ColumnName"].ToString()); 209 m_ColumnNames.Add(row["column_name"].ToString());
210 } 210 }
211 211
212 foreach (string s in m_ColumnNames) 212 foreach (string s in m_ColumnNames)
@@ -376,7 +376,7 @@ namespace OpenSim.Data.PGSQL
376 376
377 private List<RegionData> Get(int regionFlags, UUID scopeID) 377 private List<RegionData> Get(int regionFlags, UUID scopeID)
378 { 378 {
379 string sql = "SELECT * FROM " + m_Realm + " WHERE (flags & " + regionFlags.ToString() + ") <> 0"; 379 string sql = "SELECT * FROM " + m_Realm + " WHERE (\"flags\" & " + regionFlags.ToString() + ") <> 0";
380 if (scopeID != UUID.Zero) 380 if (scopeID != UUID.Zero)
381 sql += " AND \"ScopeID\" = :scopeID"; 381 sql += " AND \"ScopeID\" = :scopeID";
382 382
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index e31c3fc..c2d9942 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -296,6 +296,11 @@ namespace OpenSim
296 "Change the scale of a named prim", 296 "Change the scale of a named prim",
297 HandleEditScale); 297 HandleEditScale);
298 298
299 m_console.Commands.AddCommand("Objects", false, "rotate scene",
300 "rotate scene <degrees>",
301 "Rotates all scene objects around x:128, y:128",
302 HandleRotateScene);
303
299 m_console.Commands.AddCommand("Users", false, "kick user", 304 m_console.Commands.AddCommand("Users", false, "kick user",
300 "kick user <first> <last> [--force] [message]", 305 "kick user <first> <last> [--force] [message]",
301 "Kick a user off the simulator", 306 "Kick a user off the simulator",
@@ -505,6 +510,45 @@ namespace OpenSim
505 } 510 }
506 } 511 }
507 512
513 private void HandleRotateScene(string module, string[] args)
514 {
515 string usage = "Usage: rotate scene <angle in degrees> [centerX centerY] (centerX and centerY are optional and default to Constants.RegionSize / 2";
516
517 float centerX = Constants.RegionSize * 0.5f;
518 float centerY = Constants.RegionSize * 0.5f;
519
520 if (args.Length < 3 || args.Length == 4)
521 {
522 MainConsole.Instance.Output(usage);
523 return;
524 }
525
526 float angle = (float)(Convert.ToSingle(args[2]) / 180.0 * Math.PI);
527 OpenMetaverse.Quaternion rot = OpenMetaverse.Quaternion.CreateFromAxisAngle(0, 0, 1, angle);
528
529 if (args.Length > 4)
530 {
531 centerX = Convert.ToSingle(args[3]);
532 centerY = Convert.ToSingle(args[4]);
533 }
534
535 Vector3 center = new Vector3(centerX, centerY, 0.0f);
536
537 SceneManager.ForEachSelectedScene(delegate(Scene scene)
538 {
539 scene.ForEachSOG(delegate(SceneObjectGroup sog)
540 {
541 if (sog.AttachmentPoint == 0)
542 {
543 sog.RootPart.UpdateRotation(rot * sog.GroupRotation);
544 Vector3 offset = sog.AbsolutePosition - center;
545 offset *= rot;
546 sog.UpdateGroupPosition(center + offset);
547 }
548 });
549 });
550 }
551
508 /// <summary> 552 /// <summary>
509 /// Creates a new region based on the parameters specified. This will ask the user questions on the console 553 /// Creates a new region based on the parameters specified. This will ask the user questions on the console
510 /// </summary> 554 /// </summary>
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
index c550c44..c717128 100644
--- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
@@ -105,7 +105,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
105 m_scene.LoginLock = true; 105 m_scene.LoginLock = true;
106 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue; 106 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
107 107
108 m_log.InfoFormat("[RegionReady]: Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name); 108 // Warn level because the region cannot be used while logins are disabled
109 m_log.WarnFormat("[RegionReady]: Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
109 110
110 if (m_uri != string.Empty) 111 if (m_uri != string.Empty)
111 { 112 {
@@ -215,7 +216,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
215 // m_log.InfoFormat("[RegionReady]: Logins enabled for {0}, Oar {1}", 216 // m_log.InfoFormat("[RegionReady]: Logins enabled for {0}, Oar {1}",
216 // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString()); 217 // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString());
217 218
218 m_log.InfoFormat( 219 // Warn level because the region cannot be used while logins are disabled
220 m_log.WarnFormat(
219 "[RegionReady]: INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name); 221 "[RegionReady]: INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name);
220 } 222 }
221 223