aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs34
-rw-r--r--OpenSim/Framework/RegionInfo.cs1
-rw-r--r--OpenSim/Framework/Util.cs5
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs12
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs11
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs43
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs11
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs29
-rw-r--r--bin/OpenSimDefaults.ini5
11 files changed, 143 insertions, 23 deletions
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index a0d3541..0d6288b 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
31using System.Diagnostics; 31using System.Diagnostics;
32using System.Reflection; 32using System.Reflection;
33using System.Text; 33using System.Text;
34using System.Text.RegularExpressions;
34using System.Threading; 35using System.Threading;
35using log4net; 36using log4net;
36using OpenSim.Framework; 37using OpenSim.Framework;
@@ -531,6 +532,11 @@ namespace OpenSim.Framework.Console
531 532
532 public class Parser 533 public class Parser
533 { 534 {
535 // If an unquoted portion ends with an element matching this regex
536 // and the next element contains a space, then we have stripped
537 // embedded quotes that should not have been stripped
538 private static Regex optionRegex = new Regex("^--[a-zA-Z0-9-]+=$");
539
534 public static string[] Parse(string text) 540 public static string[] Parse(string text)
535 { 541 {
536 List<string> result = new List<string>(); 542 List<string> result = new List<string>();
@@ -544,10 +550,38 @@ namespace OpenSim.Framework.Console
544 if (index % 2 == 0) 550 if (index % 2 == 0)
545 { 551 {
546 string[] words = unquoted[index].Split(new char[] {' '}); 552 string[] words = unquoted[index].Split(new char[] {' '});
553
554 bool option = false;
547 foreach (string w in words) 555 foreach (string w in words)
548 { 556 {
549 if (w != String.Empty) 557 if (w != String.Empty)
558 {
559 if (optionRegex.Match(w) == Match.Empty)
560 option = false;
561 else
562 option = true;
550 result.Add(w); 563 result.Add(w);
564 }
565 }
566 // The last item matched the regex, put the quotes back
567 if (option)
568 {
569 // If the line ended with it, don't do anything
570 if (index < (unquoted.Length - 1))
571 {
572 // Get and remove the option name
573 string optionText = result[result.Count - 1];
574 result.RemoveAt(result.Count - 1);
575
576 // Add the quoted value back
577 optionText += "\"" + unquoted[index + 1] + "\"";
578
579 // Push the result into our return array
580 result.Add(optionText);
581
582 // Skip the already used value
583 index++;
584 }
551 } 585 }
552 } 586 }
553 else 587 else
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 661b457..5ba3863 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -625,7 +625,6 @@ namespace OpenSim.Framework
625 625
626 foreach (String s in allKeys) 626 foreach (String s in allKeys)
627 { 627 {
628 string val = config.GetString(s);
629 SetOtherSetting(s, config.GetString(s)); 628 SetOtherSetting(s, config.GetString(s));
630 } 629 }
631 } 630 }
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index ed92b2d..4b0b13c 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1664,13 +1664,14 @@ namespace OpenSim.Framework
1664 /// </summary> 1664 /// </summary>
1665 public static void PrintCallStack() 1665 public static void PrintCallStack()
1666 { 1666 {
1667 StackTrace stackTrace = new StackTrace(); // get call stack 1667 StackTrace stackTrace = new StackTrace(true); // get call stack
1668 StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames) 1668 StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
1669 1669
1670 // write call stack method names 1670 // write call stack method names
1671 foreach (StackFrame stackFrame in stackFrames) 1671 foreach (StackFrame stackFrame in stackFrames)
1672 { 1672 {
1673 m_log.Debug(stackFrame.GetMethod().DeclaringType + "." + stackFrame.GetMethod().Name); // write method name 1673 MethodBase mb = stackFrame.GetMethod();
1674 m_log.DebugFormat("{0}.{1}:{2}", mb.DeclaringType, mb.Name, stackFrame.GetFileLineNumber()); // write method name
1674 } 1675 }
1675 } 1676 }
1676 1677
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index ff96f4d..d98ff68 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -7625,6 +7625,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7625 } 7625 }
7626 } 7626 }
7627 } 7627 }
7628 else
7629 if (transfer.TransferInfo.SourceType == (int)SourceType.SimEstate)
7630 {
7631 //TransferRequestPacket does not include covenant uuid?
7632 //get scene covenant uuid
7633 taskID = m_scene.RegionInfo.RegionSettings.Covenant;
7634 }
7628 7635
7629 MakeAssetRequest(transfer, taskID); 7636 MakeAssetRequest(transfer, taskID);
7630 7637
@@ -11985,6 +11992,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11985 { 11992 {
11986 requestID = new UUID(transferRequest.TransferInfo.Params, 80); 11993 requestID = new UUID(transferRequest.TransferInfo.Params, 80);
11987 } 11994 }
11995 else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimEstate)
11996 {
11997 requestID = taskID;
11998 }
11999
11988 12000
11989// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID); 12001// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID);
11990 12002
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 8b5b1a7..63ba3d3 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -546,12 +546,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
546 return null; 546 return null;
547 547
548 userID = remoteClient.AgentId; 548 userID = remoteClient.AgentId;
549
550// m_log.DebugFormat(
551// "[INVENTORY ACCESS MODULE]: Target of {0} in CreateItemForObject() is {1} {2}",
552// action, remoteClient.Name, userID);
549 } 553 }
550 else 554 else
551 { 555 {
552 // All returns / deletes go to the object owner 556 // All returns / deletes go to the object owner
553 // 557 //
554 userID = so.RootPart.OwnerID; 558 userID = so.RootPart.OwnerID;
559
560// m_log.DebugFormat(
561// "[INVENTORY ACCESS MODULE]: Target of {0} in CreateItemForObject() is object owner {1}",
562// action, userID);
555 } 563 }
556 564
557 if (userID == UUID.Zero) // Can't proceed 565 if (userID == UUID.Zero) // Can't proceed
@@ -637,11 +645,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
637 } 645 }
638 646
639 // Override and put into where it came from, if it came 647 // Override and put into where it came from, if it came
640 // from anywhere in inventory 648 // from anywhere in inventory and the owner is taking it back.
641 // 649 //
642 if (action == DeRezAction.Take || action == DeRezAction.TakeCopy) 650 if (action == DeRezAction.Take || action == DeRezAction.TakeCopy)
643 { 651 {
644 if (so.RootPart.FromFolderID != UUID.Zero) 652 if (so.RootPart.FromFolderID != UUID.Zero && userID == remoteClient.AgentId)
645 { 653 {
646 InventoryFolderBase f = new InventoryFolderBase(so.RootPart.FromFolderID, userID); 654 InventoryFolderBase f = new InventoryFolderBase(so.RootPart.FromFolderID, userID);
647 folder = m_Scene.InventoryService.GetFolder(f); 655 folder = m_Scene.InventoryService.GetFolder(f);
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
index 5dfd3e0..f678d07 100644
--- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
+++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
@@ -148,7 +148,8 @@ namespace OpenSim.Region.Framework.Scenes
148 x = m_inventoryDeletes.Dequeue(); 148 x = m_inventoryDeletes.Dequeue();
149 149
150 m_log.DebugFormat( 150 m_log.DebugFormat(
151 "[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.", left, x.action, x.objectGroups.Count); 151 "[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.",
152 left, x.action, x.objectGroups.Count);
152 153
153 try 154 try
154 { 155 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5c56150..77f7b32 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -291,13 +291,10 @@ namespace OpenSim.Region.Framework.Scenes
291 /// </summary> 291 /// </summary>
292 public PhysicsActor PhysicsActor { get; private set; } 292 public PhysicsActor PhysicsActor { get; private set; }
293 293
294 private byte m_movementflag; 294 /// <summary>
295 295 /// Record user movement inputs.
296 public byte MovementFlag 296 /// </summary>
297 { 297 public byte MovementFlag { get; private set; }
298 set { m_movementflag = value; }
299 get { return m_movementflag; }
300 }
301 298
302 private bool m_updateflag; 299 private bool m_updateflag;
303 300
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 7c1c046..6d1f41d 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -156,6 +156,22 @@ namespace OpenSim.Region.Physics.OdePlugin
156 internal UUID m_uuid { get; private set; } 156 internal UUID m_uuid { get; private set; }
157 internal bool bad = false; 157 internal bool bad = false;
158 158
159 /// <summary>
160 /// ODE Avatar.
161 /// </summary>
162 /// <param name="avName"></param>
163 /// <param name="parent_scene"></param>
164 /// <param name="pos"></param>
165 /// <param name="size"></param>
166 /// <param name="pid_d"></param>
167 /// <param name="pid_p"></param>
168 /// <param name="capsule_radius"></param>
169 /// <param name="tensor"></param>
170 /// <param name="density">
171 /// Only used right now to return information to LSL. Not actually used to set mass in ODE!
172 /// </param>
173 /// <param name="walk_divisor"></param>
174 /// <param name="rundivisor"></param>
159 public OdeCharacter( 175 public OdeCharacter(
160 String avName, OdeScene parent_scene, Vector3 pos, Vector3 size, float pid_d, float pid_p, 176 String avName, OdeScene parent_scene, Vector3 pos, Vector3 size, float pid_d, float pid_p,
161 float capsule_radius, float tensor, float density, 177 float capsule_radius, float tensor, float density,
@@ -786,6 +802,10 @@ namespace OpenSim.Region.Physics.OdePlugin
786 Vector3 vec = Vector3.Zero; 802 Vector3 vec = Vector3.Zero;
787 d.Vector3 vel = d.BodyGetLinearVel(Body); 803 d.Vector3 vel = d.BodyGetLinearVel(Body);
788 804
805// m_log.DebugFormat(
806// "[ODE CHARACTER]: Current velocity in Move() is <{0},{1},{2}>, target {3} for {4}",
807// vel.X, vel.Y, vel.Z, _target_velocity, Name);
808
789 float movementdivisor = 1f; 809 float movementdivisor = 1f;
790 810
791 if (!m_alwaysRun) 811 if (!m_alwaysRun)
@@ -884,18 +904,20 @@ namespace OpenSim.Region.Physics.OdePlugin
884 904
885 if (flying) 905 if (flying)
886 { 906 {
907 // This also acts as anti-gravity so that we hover when flying rather than fall.
887 vec.Z = (_target_velocity.Z - vel.Z) * (PID_D); 908 vec.Z = (_target_velocity.Z - vel.Z) * (PID_D);
888 } 909 }
889 } 910 }
890 911
891 if (flying) 912 if (flying)
892 { 913 {
914 // Anti-gravity so that we hover when flying rather than fall.
893 vec.Z += ((-1 * _parent_scene.gravityz) * m_mass); 915 vec.Z += ((-1 * _parent_scene.gravityz) * m_mass);
894 916
895 //Added for auto fly height. Kitto Flora 917 //Added for auto fly height. Kitto Flora
896 //d.Vector3 pos = d.BodyGetPosition(Body); 918 //d.Vector3 pos = d.BodyGetPosition(Body);
897 float target_altitude = _parent_scene.GetTerrainHeightAtXY(_position.X, _position.Y) + MinimumGroundFlightOffset; 919 float target_altitude = _parent_scene.GetTerrainHeightAtXY(_position.X, _position.Y) + MinimumGroundFlightOffset;
898 920
899 if (_position.Z < target_altitude) 921 if (_position.Z < target_altitude)
900 { 922 {
901 vec.Z += (target_altitude - _position.Z) * PID_P * 5.0f; 923 vec.Z += (target_altitude - _position.Z) * PID_P * 5.0f;
@@ -921,6 +943,25 @@ namespace OpenSim.Region.Physics.OdePlugin
921 943
922 return; 944 return;
923 } 945 }
946
947 d.Vector3 newVel = d.BodyGetLinearVel(Body);
948 if (newVel.X >= 256 || newVel.X <= 256 || newVel.Y >= 256 || newVel.Y <= 256 || newVel.Z >= 256 || newVel.Z <= 256)
949 {
950// m_log.DebugFormat(
951// "[ODE CHARACTER]: Limiting falling velocity from {0} to {1} for {2}", newVel.Z, -9.8, Name);
952
953 newVel.X = Util.Clamp<float>(newVel.X, -255f, 255f);
954 newVel.Y = Util.Clamp<float>(newVel.Y, -255f, 255f);
955
956 if (!flying)
957 newVel.Z
958 = Util.Clamp<float>(
959 newVel.Z, -_parent_scene.AvatarTerminalVelocity, _parent_scene.AvatarTerminalVelocity);
960 else
961 newVel.Z = Util.Clamp<float>(newVel.Z, -255f, 255f);
962
963 d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z);
964 }
924 } 965 }
925 966
926 /// <summary> 967 /// <summary>
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 4530c09..598530c 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -144,6 +144,8 @@ namespace OpenSim.Region.Physics.OdePlugin
144 public float gravityy = 0f; 144 public float gravityy = 0f;
145 public float gravityz = -9.8f; 145 public float gravityz = -9.8f;
146 146
147 public float AvatarTerminalVelocity { get; set; }
148
147 private float contactsurfacelayer = 0.001f; 149 private float contactsurfacelayer = 0.001f;
148 150
149 private int worldHashspaceLow = -4; 151 private int worldHashspaceLow = -4;
@@ -459,6 +461,15 @@ namespace OpenSim.Region.Physics.OdePlugin
459 gravityy = physicsconfig.GetFloat("world_gravityy", 0f); 461 gravityy = physicsconfig.GetFloat("world_gravityy", 0f);
460 gravityz = physicsconfig.GetFloat("world_gravityz", -9.8f); 462 gravityz = physicsconfig.GetFloat("world_gravityz", -9.8f);
461 463
464 float avatarTerminalVelocity = physicsconfig.GetFloat("avatar_terminal_velocity", 54f);
465 AvatarTerminalVelocity = Util.Clamp<float>(avatarTerminalVelocity, 0, 255f);
466 if (AvatarTerminalVelocity != avatarTerminalVelocity)
467 {
468 m_log.WarnFormat(
469 "[ODE SCENE]: avatar_terminal_velocity of {0} is invalid. Clamping to {1}",
470 avatarTerminalVelocity, AvatarTerminalVelocity);
471 }
472
462 worldHashspaceLow = physicsconfig.GetInt("world_hashspace_size_low", -4); 473 worldHashspaceLow = physicsconfig.GetInt("world_hashspace_size_low", -4);
463 worldHashspaceHigh = physicsconfig.GetInt("world_hashspace_size_high", 128); 474 worldHashspaceHigh = physicsconfig.GetInt("world_hashspace_size_high", 128);
464 475
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 3e0e452..850f50b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -445,17 +445,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
445 Vector3 toRegionPos; 445 Vector3 toRegionPos;
446 double dis; 446 double dis;
447 447
448 Action<ScenePresence> senseEntity = new Action<ScenePresence>(delegate(ScenePresence presence) 448 Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence =>
449 { 449 {
450 if ((ts.type & NPC) == 0 450 if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc)
451 && presence.PresenceType == PresenceType.Npc 451 {
452 && !npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent) 452 INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene);
453 return; 453 if (npcData == null || !npcData.SenseAsAgent)
454 return;
455 }
454 456
455 if ((ts.type & AGENT) == 0 457 if ((ts.type & AGENT) == 0)
456 && (presence.PresenceType == PresenceType.User 458 {
457 || npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent)) 459 if (presence.PresenceType == PresenceType.User)
458 return; 460 {
461 return;
462 }
463 else
464 {
465 INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene);
466 if (npcData != null && npcData.SenseAsAgent)
467 return;
468 }
469 }
459 470
460 if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) 471 if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0)
461 return; 472 return;
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 62fe9d4..3fd3d31 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -655,6 +655,11 @@
655 world_gravityy = 0 655 world_gravityy = 0
656 world_gravityz = -9.8 656 world_gravityz = -9.8
657 657
658 ; Terminal velocity of a falling avatar
659 ; This is the same http://en.wikipedia.org/wiki/Terminal_velocity#Examples
660 ; Max value is 255, min value is 0
661 avatar_terminal_velocity = 54
662
658 ; World Step size. (warning these are dangerous. Changing these will probably cause your scene to explode dramatically) 663 ; World Step size. (warning these are dangerous. Changing these will probably cause your scene to explode dramatically)
659 ; reference: fps = (0.089/ODE_STEPSIZE) * 1000; 664 ; reference: fps = (0.089/ODE_STEPSIZE) * 1000;
660 world_stepsize = 0.0178 665 world_stepsize = 0.0178