From d0ae8bb86aa64632cf2e3d4e879d7a5f5fb96bb3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 7 Nov 2016 12:45:20 +0000 Subject: [PATCH 01/29] start removing old hack of using SetMomentum to just set instant velocity, now that TargetVelocity is avaiable --- .../PhysicsModules/ubOde/ODECharacter.cs | 40 ++++++++++++++++--- .../Region/PhysicsModules/ubOde/ODEPrim.cs | 5 ++- .../Region/PhysicsModules/ubOde/ODEScene.cs | 1 + 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs index 9640e911af..f7e1044622 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs @@ -632,6 +632,25 @@ namespace OpenSim.Region.PhysicsModule.ubOde } } + public override Vector3 TargetVelocity + { + get + { + return m_targetVelocity; + } + set + { + if (value.IsFinite()) + { + AddChange(changes.TargetVelocity, value); + } + else + { + m_log.Warn("[PHYSICS]: Got a NaN velocity from Scene in a Character"); + } + } + } + public override Vector3 Torque { get { return Vector3.Zero; } @@ -689,7 +708,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde } else { - AddChange(changes.Velocity, force); + AddChange(changes.TargetVelocity, force); } } else @@ -1671,16 +1690,14 @@ namespace OpenSim.Region.PhysicsModule.ubOde { AvatarGeomAndBodyDestroy(); - float oldsz = m_size.Z; m_size = pSize; - AvatarGeomAndBodyCreation(_position.X, _position.Y, _position.Z + (m_size.Z - oldsz) * 0.5f); - Velocity = Vector3.Zero; - +// Velocity = Vector3.Zero; + m_targetVelocity = Vector3.Zero; _parent_scene.actor_name_map[collider] = (PhysicsActor)this; _parent_scene.actor_name_map[capsule] = (PhysicsActor)this; @@ -1738,6 +1755,15 @@ namespace OpenSim.Region.PhysicsModule.ubOde } private void changeVelocity(Vector3 newVel) + { + _velocity = newVel; + setFreeMove(); + + if (Body != IntPtr.Zero) + d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z); + } + + private void changeTargetVelocity(Vector3 newVel) { m_pidControllerActive = true; m_freemove = false; @@ -1881,6 +1907,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde changeVelocity((Vector3)arg); break; + case changes.TargetVelocity: + changeTargetVelocity((Vector3)arg); + break; + // case changes.Acceleration: // changeacceleration((Vector3)arg); // break; diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs index 4adf87ef30..3403f4baac 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs @@ -3805,6 +3805,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde changevelocity((Vector3)arg); break; + case changes.TargetVelocity: + break; + // case changes.Acceleration: // changeacceleration((Vector3)arg); // break; @@ -3933,8 +3936,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde donullchange(); break; - - default: donullchange(); break; diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index e6aa7ef360..6267051aac 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs @@ -112,6 +112,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde OriOffset, // not in use // arg Vector3 new position in local coords. Changes prim position in object Velocity, + TargetVelocity, AngVelocity, Acceleration, Force, From 07893ec3e7e2bfe2066eb0477574543b4efa6930 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 7 Nov 2016 16:03:23 +0000 Subject: [PATCH 02/29] a few more changes on the avatars Velocity/TargetVelocity/SetMomentum. Need talk with Robert before last changes bc of bullet --- .../Region/Framework/Scenes/ScenePresence.cs | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6f4d6c3f97..f96fb858ec 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -781,6 +781,34 @@ namespace OpenSim.Region.Framework.Scenes } } + // requested Velocity for physics engines avatar motors + // only makes sense if there is a physical rep + public Vector3 TargetVelocity + { + get + { + if (PhysicsActor != null) + return PhysicsActor.TargetVelocity; + else + return Vector3.Zero; + } + + set + { + if (PhysicsActor != null) + { + try + { + PhysicsActor.TargetVelocity = value; + } + catch (Exception e) + { + m_log.Error("[SCENE PRESENCE]: TARGETVELOCITY " + e.Message); + } + } + } + } + private Quaternion m_bodyRot = Quaternion.Identity; /// @@ -3649,7 +3677,7 @@ namespace OpenSim.Region.Framework.Scenes m_forceToApplyValid = true; } */ - Velocity = direc; + TargetVelocity = direc; Animator.UpdateMovementAnimations(); } From 7ebc08ad6512670ed9897c27475e278168eab18d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 7 Nov 2016 18:34:45 +0000 Subject: [PATCH 03/29] partially revert commit f29d5ad662387b97d9e881f28df584dc19fa8c07: if mesh asset does not contain data for PRIM type warn and use convex, do avoid physical peims going underground etc --- .../ubOdeMeshing/Meshmerizer.cs | 284 +++++++++--------- 1 file changed, 145 insertions(+), 139 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs index bcd1530302..ca94034b10 100644 --- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs @@ -395,6 +395,10 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing { // m_log.DebugFormat("[MESH]: experimental mesh proxy generation for {0}", primName); + + // for ubOde we have a diferent mesh use priority + // priority is to use full mesh then decomposition + // SL does the oposite bool usemesh = false; coords = new List(); @@ -443,16 +447,10 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing if (physicsParms != null) usemesh = true; - else - { - m_log.WarnFormat("[MESH]: Data for PRIM shape type not found for prim {0}",primName); - return false; - } } if(!usemesh && (map.ContainsKey("physics_convex"))) physicsParms = (OSDMap)map["physics_convex"]; - if (physicsParms == null) { @@ -555,160 +553,168 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing range = range - min; range *= invMaxU16; - if (!convex && cmap.ContainsKey("HullList") && cmap.ContainsKey("Positions")) + if(!convex) { - List hsizes = new List(); - int totalpoints = 0; - data = cmap["HullList"].AsBinary(); - for (i = 0; i < data.Length; i++) + // if mesh data not present and not convex then we need convex decomposition data + if (cmap.ContainsKey("HullList") && cmap.ContainsKey("Positions")) { - t1 = data[i]; - if (t1 == 0) - t1 = 256; - totalpoints += t1; - hsizes.Add(t1); - } - - data = cmap["Positions"].AsBinary(); - int ptr = 0; - int vertsoffset = 0; - - if (totalpoints == data.Length / 6) // 2 bytes per coord, 3 coords per point - { - foreach (int hullsize in hsizes) + List hsizes = new List(); + int totalpoints = 0; + data = cmap["HullList"].AsBinary(); + for (i = 0; i < data.Length; i++) { - for (i = 0; i < hullsize; i++ ) - { - t1 = data[ptr++]; - t1 += data[ptr++] << 8; - t2 = data[ptr++]; - t2 += data[ptr++] << 8; - t3 = data[ptr++]; - t3 += data[ptr++] << 8; + t1 = data[i]; + if (t1 == 0) + t1 = 256; + totalpoints += t1; + hsizes.Add(t1); + } - f3 = new float3((t1 * range.X + min.X), - (t2 * range.Y + min.Y), - (t3 * range.Z + min.Z)); - vs.Add(f3); - } + data = cmap["Positions"].AsBinary(); + int ptr = 0; + int vertsoffset = 0; - if(hullsize <3) + if (totalpoints == data.Length / 6) // 2 bytes per coord, 3 coords per point + { + foreach (int hullsize in hsizes) { - vs.Clear(); - continue; - } - - if (hullsize <5) - { - foreach (float3 point in vs) + for (i = 0; i < hullsize; i++ ) { - c.X = point.x; - c.Y = point.y; - c.Z = point.z; + t1 = data[ptr++]; + t1 += data[ptr++] << 8; + t2 = data[ptr++]; + t2 += data[ptr++] << 8; + t3 = data[ptr++]; + t3 += data[ptr++] << 8; + + f3 = new float3((t1 * range.X + min.X), + (t2 * range.Y + min.Y), + (t3 * range.Z + min.Z)); + vs.Add(f3); + } + + if(hullsize <3) + { + vs.Clear(); + continue; + } + + if (hullsize <5) + { + foreach (float3 point in vs) + { + c.X = point.x; + c.Y = point.y; + c.Z = point.z; + coords.Add(c); + } + f = new Face(vertsoffset, vertsoffset + 1, vertsoffset + 2); + faces.Add(f); + + if (hullsize == 4) + { + // not sure about orientation.. + f = new Face(vertsoffset, vertsoffset + 2, vertsoffset + 3); + faces.Add(f); + f = new Face(vertsoffset, vertsoffset + 3, vertsoffset + 1); + faces.Add(f); + f = new Face(vertsoffset + 3, vertsoffset + 2, vertsoffset + 1); + faces.Add(f); + } + vertsoffset += vs.Count; + vs.Clear(); + continue; + } + /* + if (!HullUtils.ComputeHull(vs, ref hullr, 0, 0.0f)) + { + vs.Clear(); + continue; + } + + nverts = hullr.Vertices.Count; + nindexs = hullr.Indices.Count; + + if (nindexs % 3 != 0) + { + vs.Clear(); + continue; + } + + for (i = 0; i < nverts; i++) + { + c.X = hullr.Vertices[i].x; + c.Y = hullr.Vertices[i].y; + c.Z = hullr.Vertices[i].z; coords.Add(c); } - f = new Face(vertsoffset, vertsoffset + 1, vertsoffset + 2); - faces.Add(f); - - if (hullsize == 4) + + for (i = 0; i < nindexs; i += 3) { - // not sure about orientation.. - f = new Face(vertsoffset, vertsoffset + 2, vertsoffset + 3); - faces.Add(f); - f = new Face(vertsoffset, vertsoffset + 3, vertsoffset + 1); - faces.Add(f); - f = new Face(vertsoffset + 3, vertsoffset + 2, vertsoffset + 1); + t1 = hullr.Indices[i]; + if (t1 > nverts) + break; + t2 = hullr.Indices[i + 1]; + if (t2 > nverts) + break; + t3 = hullr.Indices[i + 2]; + if (t3 > nverts) + break; + f = new Face(vertsoffset + t1, vertsoffset + t2, vertsoffset + t3); faces.Add(f); } - vertsoffset += vs.Count; - vs.Clear(); - continue; - } -/* - if (!HullUtils.ComputeHull(vs, ref hullr, 0, 0.0f)) - { - vs.Clear(); - continue; - } + */ + List indices; + if (!HullUtils.ComputeHull(vs, out indices)) + { + vs.Clear(); + continue; + } - nverts = hullr.Vertices.Count; - nindexs = hullr.Indices.Count; + nverts = vs.Count; + nindexs = indices.Count; - if (nindexs % 3 != 0) - { - vs.Clear(); - continue; - } + if (nindexs % 3 != 0) + { + vs.Clear(); + continue; + } - for (i = 0; i < nverts; i++) - { - c.X = hullr.Vertices[i].x; - c.Y = hullr.Vertices[i].y; - c.Z = hullr.Vertices[i].z; - coords.Add(c); - } + for (i = 0; i < nverts; i++) + { + c.X = vs[i].x; + c.Y = vs[i].y; + c.Z = vs[i].z; + coords.Add(c); + } - for (i = 0; i < nindexs; i += 3) - { - t1 = hullr.Indices[i]; - if (t1 > nverts) - break; - t2 = hullr.Indices[i + 1]; - if (t2 > nverts) - break; - t3 = hullr.Indices[i + 2]; - if (t3 > nverts) - break; - f = new Face(vertsoffset + t1, vertsoffset + t2, vertsoffset + t3); - faces.Add(f); - } -*/ - List indices; - if (!HullUtils.ComputeHull(vs, out indices)) - { + for (i = 0; i < nindexs; i += 3) + { + t1 = indices[i]; + if (t1 > nverts) + break; + t2 = indices[i + 1]; + if (t2 > nverts) + break; + t3 = indices[i + 2]; + if (t3 > nverts) + break; + f = new Face(vertsoffset + t1, vertsoffset + t2, vertsoffset + t3); + faces.Add(f); + } + vertsoffset += nverts; vs.Clear(); - continue; } - - nverts = vs.Count; - nindexs = indices.Count; - - if (nindexs % 3 != 0) - { - vs.Clear(); - continue; - } - - for (i = 0; i < nverts; i++) - { - c.X = vs[i].x; - c.Y = vs[i].y; - c.Z = vs[i].z; - coords.Add(c); - } - - for (i = 0; i < nindexs; i += 3) - { - t1 = indices[i]; - if (t1 > nverts) - break; - t2 = indices[i + 1]; - if (t2 > nverts) - break; - t3 = indices[i + 2]; - if (t3 > nverts) - break; - f = new Face(vertsoffset + t1, vertsoffset + t2, vertsoffset + t3); - faces.Add(f); - } - vertsoffset += nverts; - vs.Clear(); } + if (coords.Count > 0 && faces.Count > 0) + return true; + } + else + { + // if neither mesh or decomposition present, warn and use convex + m_log.WarnFormat("[MESH]: Data for PRIM shape type ( mesh or decomposition) not found for prim {0}",primName); } - if (coords.Count > 0 && faces.Count > 0) - return true; } - vs.Clear(); if (cmap.ContainsKey("BoundingVerts")) From 6218913345ae22ef5c95fa71ee4f36f46c7a5644 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 8 Nov 2016 11:22:08 +0000 Subject: [PATCH 04/29] add some configuration options missing in OpenSimDeafults.ini but present in OpenSim.ini.example --- bin/OpenSimDefaults.ini | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index c4a01a6ef1..6b04424a87 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -306,12 +306,23 @@ DefaultScriptEngine = "XEngine" + ; Http proxy setting for llHTTPRequest and dynamic texture loading, if + ; required + ; HttpProxy = "http://proxy.com:8080" + + ; If you're using HttpProxy, then you can set HttpProxyExceptions to a + ; list of regular expressions for URLs that you don't want to go through + ; the proxy. + ; For example, servers inside your firewall. + ; Separate patterns with a ';' + ; HttpProxyExceptions = ".mydomain.com;localhost" + ; ## ; ## EMAIL MODULE ; ## ;emailmodule = DefaultEmailModule - + ; ## ; ## ANIMATIONS ; ## @@ -324,6 +335,10 @@ ; won't look right until the physics engine supports it ; (i.e delays takeoff for a moment) + ; # + ; # statistics + ; # + ; Simulator statistics are output to the console periodically at debug level INFO. ; Setting this to zero disables this output. ; LogShowStatsSeconds = 3600 @@ -362,6 +377,23 @@ ; system with reduced logging LogOverloads = True + ; # + ; # Telehubs + ; # + + ; SpawnPointRouting adjusts the landing for incoming avatars. + ; "closest" will place the avatar at the SpawnPoint located in the closest + ; available spot to the destination (typically map click/landmark). + ; "random" will place the avatar on a randomly selected spawnpoint; + ; "sequence" will place the avatar on the next sequential SpawnPoint + ; SpawnPointRouting = closest + + ; TelehubAllowLandmark allows users with landmarks to override telehub + ; routing and land at the landmark coordinates when set to true + ; default is false + ; TelehubAllowLandmark = false + + [Map] ;WorldMapModule = "WorldMap" ;MapImageModule = "MapImageModule" From 6c44dceced81f3ae0a7650f8186f17b15dd55fe0 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 8 Nov 2016 13:39:49 +0000 Subject: [PATCH 05/29] change display and log of normal script errors --- .../Shared/Instance/ScriptInstance.cs | 61 +++++++++++++------ 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 611df58952..d72590792a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -924,26 +924,53 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance { try { - // DISPLAY ERROR INWORLD - string text = FormatException(e); - if (text.Length > 1000) - text = text.Substring(0, 1000); - Engine.World.SimChat(Utils.StringToBytes(text), - ChatTypeEnum.DebugChannel, 2147483647, - Part.AbsolutePosition, - Part.Name, Part.UUID, false); + if(e.InnerException != null && e.InnerException is ScriptException) + { + string text = e.InnerException.Message + + "(script: " + ScriptName + + " event: " + data.EventName + + " at " + Part.AbsolutePosition + ")"; + if (text.Length > 1000) + text = text.Substring(0, 1000); + Engine.World.SimChat(Utils.StringToBytes(text), + ChatTypeEnum.DebugChannel, 2147483647, + Part.AbsolutePosition, + Part.Name, Part.UUID, false); + m_log.Debug(string.Format( + "[SCRIPT INSTANCE]: {0} (at event {1}, part {2} {3} at {4} in {5}", + e.InnerException.Message, + data.EventName, + PrimName, + Part.UUID, + Part.AbsolutePosition, + Part.ParentGroup.Scene.Name)); + + } + else + { + + // DISPLAY ERROR INWORLD + string text = FormatException(e); + + if (text.Length > 1000) + text = text.Substring(0, 1000); + Engine.World.SimChat(Utils.StringToBytes(text), + ChatTypeEnum.DebugChannel, 2147483647, + Part.AbsolutePosition, + Part.Name, Part.UUID, false); - m_log.Debug(string.Format( - "[SCRIPT INSTANCE]: Runtime error in script {0} (event {1}), part {2} {3} at {4} in {5} ", - ScriptName, - data.EventName, - PrimName, - Part.UUID, - Part.AbsolutePosition, - Part.ParentGroup.Scene.Name), - e); + m_log.Debug(string.Format( + "[SCRIPT INSTANCE]: Runtime error in script {0} (event {1}), part {2} {3} at {4} in {5} ", + ScriptName, + data.EventName, + PrimName, + Part.UUID, + Part.AbsolutePosition, + Part.ParentGroup.Scene.Name), + e); + } } catch (Exception) { From 92984556e1e8b8386b2362b821679ed76891e262 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 8 Nov 2016 23:09:53 +0000 Subject: [PATCH 06/29] change the clock source on tokenBucket --- .../ClientStack/Linden/UDP/TokenBucket.cs | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs index 0ac573ac1b..7b9661b80c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs @@ -62,8 +62,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// protected const float m_minimumDripRate = 1500; - /// Time of the last drip, in system ticks - protected Int32 m_lastDrip; + /// Time of the last drip + protected double m_lastDrip; /// /// The number of bytes that can be sent at this moment. This is the @@ -166,10 +166,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// protected float m_totalDripRequest; public float TotalDripRequest - { - get { return m_totalDripRequest; } - set { m_totalDripRequest = value; } - } + { + get { return m_totalDripRequest; } + set { m_totalDripRequest = value; } + } #endregion Properties @@ -193,9 +193,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Parent = parent; RequestedDripRate = dripRate; RequestedBurst = MaxBurst; - // TotalDripRequest = dripRate; // this will be overwritten when a child node registers - // MaxBurst = (Int64)((double)dripRate * m_quantumsPerBurst); - m_lastDrip = Util.EnvironmentTickCount() + 100000; + m_lastDrip = Util.GetTimeStampMS() + 50.0; } #endregion Constructor @@ -210,7 +208,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP protected float DripRateModifier() { float driprate = DripRate; - return driprate >= TotalDripRequest ? 1.0f : driprate / TotalDripRequest; + return driprate >= TotalDripRequest ? 1.0f : (driprate / TotalDripRequest); } /// @@ -313,14 +311,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP return; } - Int32 now = Util.EnvironmentTickCount(); - Int32 deltaMS = now - m_lastDrip; + double now = Util.GetTimeStampMS(); + double deltaMS = now - m_lastDrip; m_lastDrip = now; if (deltaMS <= 0) return; - m_tokenCount += deltaMS * DripRate * m_timeScale; + m_tokenCount += (float)deltaMS * DripRate * m_timeScale; float burst = Burst; if (m_tokenCount > burst) From 94d2422230be405f44be3697e663ef4fac8369f8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 9 Nov 2016 10:21:02 +0000 Subject: [PATCH 07/29] change the clock source on udp outgoing, remove some dead code --- .../ClientStack/Linden/UDP/LLUDPServer.cs | 134 ++---------------- .../ClientStack/Linden/UDP/ThrottleRates.cs | 4 +- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 25 ---- 3 files changed, 10 insertions(+), 153 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 0e67095146..8355f2b13c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -323,7 +323,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP protected int m_elapsedMSSinceLastStatReport = 0; /// Environment.TickCount of the last time the outgoing packet handler executed - protected int m_tickLastOutgoingPacketHandler; + protected double m_tickLastOutgoingPacketHandler; /// Keeps track of the number of elapsed milliseconds since the last time the outgoing packet handler looped protected int m_elapsedMSOutgoingPacketHandler; @@ -356,20 +356,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - - protected ExpiringCache> m_pendingCache = new ExpiringCache>(); - /// - /// Event used to signal when queued packets are available for sending. - /// - /// - /// This allows the outbound loop to only operate when there is data to send rather than continuously polling. - /// Some data is sent immediately and not queued. That data would not trigger this event. - /// WRONG use. May be usefull in future revision - /// -// protected AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); - protected Pool m_incomingPacketPool; /// @@ -467,8 +455,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP int sceneThrottleBps = 0; bool usePools = false; - - IConfig config = configSource.Configs["ClientStack.LindenUDP"]; if (config != null) { @@ -927,10 +913,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP } PacketPool.Instance.ReturnPacket(packet); - - /// WRONG use. May be usefull in future revision -// if (packetQueued) -// m_dataPresentEvent.Set(); } /// @@ -2079,14 +2061,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_sendPing = false; // Update elapsed time - int thisTick = Environment.TickCount & Int32.MaxValue; - if (m_tickLastOutgoingPacketHandler > thisTick) - m_elapsedMSOutgoingPacketHandler += ((Int32.MaxValue - m_tickLastOutgoingPacketHandler) + thisTick); - else - m_elapsedMSOutgoingPacketHandler += (thisTick - m_tickLastOutgoingPacketHandler); - + double thisTick = Util.GetTimeStampMS(); + int deltaMS = (int)(thisTick - m_tickLastOutgoingPacketHandler); m_tickLastOutgoingPacketHandler = thisTick; + // update some 1ms resolution chained timers + + m_elapsedMSOutgoingPacketHandler += deltaMS; + // Check for pending outgoing resends every 100ms if (m_elapsedMSOutgoingPacketHandler >= 100) { @@ -2109,15 +2091,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_sendPing = true; m_elapsed500MSOutgoingPacketHandler = 0; } - #endregion Update Timers - // Use this for emergency monitoring -- bug hunting - //if (m_scene.EmergencyMonitoring) - // clientPacketHandler = MonitoredClientOutgoingPacketHandler; - //else - // clientPacketHandler = ClientOutgoingPacketHandler; - // Handle outgoing packets, resends, acknowledgements, and pings for each // client. m_packetSent will be set to true if a packet is sent Scene.ForEachClient(clientPacketHandler); @@ -2129,7 +2104,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if(Scene.GetNumberOfClients() == 0) { - Thread.Sleep(250); // be friendly to PIs, but how long ?? + Thread.Sleep(100); } else if (!m_packetSent) // Thread.Sleep((int)TickCountResolution); outch this is bad on linux @@ -2204,99 +2179,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// public long IncomingPacketsProcessed { get; protected set; } - protected void MonitoredClientOutgoingPacketHandler(IClientAPI client) - { - nticks++; - watch1.Start(); - m_currentOutgoingClient = client; - - try - { - if (client is LLClientView) - { - LLClientView llClient = (LLClientView)client; - LLUDPClient udpClient = llClient.UDPClient; - - if (udpClient.IsConnected) - { - if (m_resendUnacked) - { - nticksUnack++; - watch2.Start(); - - HandleUnacked(llClient); - - watch2.Stop(); - avgResendUnackedTicks = (nticksUnack - 1)/(float)nticksUnack * avgResendUnackedTicks + (watch2.ElapsedTicks / (float)nticksUnack); - watch2.Reset(); - } - - if (m_sendAcks) - { - nticksAck++; - watch2.Start(); - - SendAcks(udpClient); - - watch2.Stop(); - avgSendAcksTicks = (nticksAck - 1) / (float)nticksAck * avgSendAcksTicks + (watch2.ElapsedTicks / (float)nticksAck); - watch2.Reset(); - } - - if (m_sendPing) - { - nticksPing++; - watch2.Start(); - - SendPing(udpClient); - - watch2.Stop(); - avgSendPingTicks = (nticksPing - 1) / (float)nticksPing * avgSendPingTicks + (watch2.ElapsedTicks / (float)nticksPing); - watch2.Reset(); - } - - watch2.Start(); - // Dequeue any outgoing packets that are within the throttle limits - if (udpClient.DequeueOutgoing()) - { - m_packetSent = true; - npacksSent++; - } - else - { - npackNotSent++; - } - - watch2.Stop(); - avgDequeueTicks = (nticks - 1) / (float)nticks * avgDequeueTicks + (watch2.ElapsedTicks / (float)nticks); - watch2.Reset(); - - } - else - { - m_log.WarnFormat("[LLUDPSERVER]: Client is not connected"); - } - } - } - catch (Exception ex) - { - m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler iteration for " + client.Name + - " threw an exception: " + ex.Message, ex); - } - watch1.Stop(); - avgProcessingTicks = (nticks - 1) / (float)nticks * avgProcessingTicks + (watch1.ElapsedTicks / (float)nticks); - watch1.Reset(); - - // reuse this -- it's every ~100ms - if (Scene.EmergencyMonitoring && nticks % 100 == 0) - { - m_log.InfoFormat("[LLUDPSERVER]: avg processing ticks: {0} avg unacked: {1} avg acks: {2} avg ping: {3} avg dequeue: {4} (TickCountRes: {5} sent: {6} notsent: {7})", - avgProcessingTicks, avgResendUnackedTicks, avgSendAcksTicks, avgSendPingTicks, avgDequeueTicks, TickCountResolution, npacksSent, npackNotSent); - npackNotSent = npacksSent = 0; - } - - } - #endregion protected void ProcessInPacket(IncomingPacket incomingPacket) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs index a476b919a5..6278e3686d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs @@ -92,8 +92,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP Asset = throttleConfig.GetInt("asset_default", 10500); Total = Resend + Land + Wind + Cloud + Task + Texture + Asset; - // 3000000 bps default max - ClientMaxRate = throttleConfig.GetInt("client_throttle_max_bps", 375000); + // 5120000 bps default max + ClientMaxRate = throttleConfig.GetInt("client_throttle_max_bps", 640000); if (ClientMaxRate > 1000000) ClientMaxRate = 1000000; // no more than 8Mbps diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 08d0fbf5bb..071530b753 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -125,13 +125,6 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden + " With the 'full' option child agents are also shown.", (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); - scene.AddCommand( - "Comms", this, "emergency-monitoring", - "emergency-monitoring", - "Go on/off emergency monitoring mode", - "Go on/off emergency monitoring mode", - HandleEmergencyMonitoring); - scene.AddCommand( "Comms", this, "show client stats", "show client stats [first_name last_name]", @@ -197,24 +190,6 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden return report.ToString(); } - protected void HandleEmergencyMonitoring(string module, string[] cmd) - { - bool mode = true; - if (cmd.Length == 1 || (cmd.Length > 1 && cmd[1] == "on")) - { - mode = true; - MainConsole.Instance.Output("Emergency Monitoring ON"); - } - else - { - mode = false; - MainConsole.Instance.Output("Emergency Monitoring OFF"); - } - - foreach (Scene s in m_scenes.Values) - s.EmergencyMonitoring = mode; - } - protected string GetColumnEntry(string entry, int maxLength, int columnPadding) { return string.Format( From c349a1a5e76a97d8b421afedcbb6320e846404ad Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 9 Nov 2016 11:21:46 +0000 Subject: [PATCH 08/29] also log estimated average Util.GetTimeStampMS() resolution --- .../ClientStack/Linden/UDP/LLUDPServer.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 8355f2b13c..ffdb6398a9 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -444,10 +444,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP int now = start; while (now == start) now = Environment.TickCount; - TickCountResolution += (float)(now - start) * 0.1f; + TickCountResolution += (float)(now - start); } - TickCountResolution = (float)Math.Ceiling(TickCountResolution); - m_log.Info("[LLUDPSERVER]: Average Environment.TickCount resolution: " + TickCountResolution + "ms"); + m_log.Info("[LLUDPSERVER]: Average Environment.TickCount resolution: " + TickCountResolution * 0.1f + "ms"); + + TickCountResolution = 0f; + for (int i = 0; i < 100; i++) + { + double start = Util.GetTimeStampMS(); + double now = start; + while (now == start) + now = Util.GetTimeStampMS(); + TickCountResolution += (float)((now - start)); + } + + TickCountResolution = (float)Math.Round(TickCountResolution * 0.01f,6,MidpointRounding.AwayFromZero); + m_log.Info("[LLUDPSERVER]: Average Util.GetTimeStampMS resolution: " + TickCountResolution + "ms"); #endregion Environment.TickCount Measurement From 924c5fb55e8e5561c2d9d939b1c5dd77a9d6955a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 9 Nov 2016 19:41:07 +0000 Subject: [PATCH 09/29] minor cleanup --- .../RemoteUserAccountServiceConnector.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs index eead05d7ae..9140d786f5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs @@ -144,10 +144,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts return account; account = base.GetUserAccount(scopeID, userID); - lock(m_Cache) - if(account != null) + if(account != null) + { + lock(m_Cache) m_Cache.Cache(userID, account); - + } return account; } @@ -162,9 +163,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts account = base.GetUserAccount(scopeID, firstName, lastName); if (account != null) + { lock(m_Cache) m_Cache.Cache(account.PrincipalID, account); - + } return account; } @@ -195,16 +197,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts List ext = base.GetUserAccounts(scopeID, missing); if(ext != null && ext.Count >0 ) { - accs.AddRange(ext); foreach(UserAccount acc in ext) { if(acc != null) + { + accs.Add(acc); lock(m_Cache) m_Cache.Cache(acc.PrincipalID, acc); + } } } } - return accs; } From 1e1d0d8204181e4dedf438332625941cd56b02c2 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 9 Nov 2016 20:09:49 +0000 Subject: [PATCH 10/29] move UserAccountCache access locking to its methods and not callers. --- .../LocalUserAccountServiceConnector.cs | 18 ++---- .../RemoteUserAccountServiceConnector.cs | 27 +++----- .../UserAccounts/UserAccountCache.cs | 64 +++++++++++-------- 3 files changed, 54 insertions(+), 55 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index 3127199586..a413a8bff1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs @@ -154,14 +154,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { bool inCache = false; UserAccount account; - lock(m_Cache) - account = m_Cache.Get(userID, out inCache); + account = m_Cache.Get(userID, out inCache); if (inCache) return account; account = UserAccountService.GetUserAccount(scopeID, userID); - lock(m_Cache) - m_Cache.Cache(userID, account); + m_Cache.Cache(userID, account); return account; } @@ -170,15 +168,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { bool inCache = false; UserAccount account; - lock(m_Cache) - account = m_Cache.Get(firstName + " " + lastName, out inCache); + account = m_Cache.Get(firstName + " " + lastName, out inCache); if (inCache) return account; account = UserAccountService.GetUserAccount(scopeID, firstName, lastName); if (account != null) - lock(m_Cache) - m_Cache.Cache(account.PrincipalID, account); + m_Cache.Cache(account.PrincipalID, account); return account; } @@ -201,8 +197,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { if(UUID.TryParse(id, out uuid)) { - lock(m_Cache) - account = m_Cache.Get(uuid, out inCache); + account = m_Cache.Get(uuid, out inCache); if (inCache) ret.Add(account); else @@ -220,8 +215,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts foreach(UserAccount acc in ext) { if(acc != null) - lock(m_Cache) - m_Cache.Cache(acc.PrincipalID, acc); + m_Cache.Cache(acc.PrincipalID, acc); } } return ret; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs index 9140d786f5..60dd97ad90 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs @@ -128,8 +128,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts // flags, title, etc. And country, don't forget country! private void OnNewClient(IClientAPI client) { - lock(m_Cache) - m_Cache.Remove(client.Name); + m_Cache.Remove(client.Name); } #region Overwritten methods from IUserAccountService @@ -138,17 +137,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { bool inCache = false; UserAccount account; - lock(m_Cache) - account = m_Cache.Get(userID, out inCache); + account = m_Cache.Get(userID, out inCache); if (inCache) return account; account = base.GetUserAccount(scopeID, userID); if(account != null) - { - lock(m_Cache) - m_Cache.Cache(userID, account); - } + m_Cache.Cache(userID, account); + return account; } @@ -156,17 +152,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { bool inCache = false; UserAccount account; - lock(m_Cache) - account = m_Cache.Get(firstName + " " + lastName, out inCache); + account = m_Cache.Get(firstName + " " + lastName, out inCache); if (inCache) return account; account = base.GetUserAccount(scopeID, firstName, lastName); if (account != null) - { - lock(m_Cache) - m_Cache.Cache(account.PrincipalID, account); - } + m_Cache.Cache(account.PrincipalID, account); + return account; } @@ -183,8 +176,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { if(UUID.TryParse(id, out uuid)) { - lock(m_Cache) - account = m_Cache.Get(uuid, out inCache); + account = m_Cache.Get(uuid, out inCache); if (inCache) accs.Add(account); else @@ -202,8 +194,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts if(acc != null) { accs.Add(acc); - lock(m_Cache) - m_Cache.Cache(acc.PrincipalID, acc); + m_Cache.Cache(acc.PrincipalID, acc); } } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index 53610d95af..97baf8703a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs @@ -44,6 +44,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts private ExpiringCache m_UUIDCache; private ExpiringCache m_NameCache; + private object accessLock = new object(); public UserAccountCache() { @@ -54,60 +55,73 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts public void Cache(UUID userID, UserAccount account) { // Cache even null accounts - m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS); - if (account != null) - m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS); + lock(accessLock) + { + m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS); + if (account != null) + m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS); //m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); + } } public void Invalidate(UUID userID) { - m_UUIDCache.Remove(userID); + lock(accessLock) + m_UUIDCache.Remove(userID); } public UserAccount Get(UUID userID, out bool inCache) { UserAccount account = null; inCache = false; - if (m_UUIDCache.TryGetValue(userID, out account)) + lock(accessLock) { - //m_log.DebugFormat("[USER CACHE]: Account {0} {1} found in cache", account.FirstName, account.LastName); - inCache = true; - return account; + if (m_UUIDCache.TryGetValue(userID, out account)) + { + //m_log.DebugFormat("[USER CACHE]: Account {0} {1} found in cache", account.FirstName, account.LastName); + inCache = true; + return account; + } } - return null; } public UserAccount Get(string name, out bool inCache) { inCache = false; - if (!m_NameCache.Contains(name)) - return null; + lock(accessLock) + { + if (!m_NameCache.Contains(name)) + return null; - UserAccount account = null; - UUID uuid = UUID.Zero; - if (m_NameCache.TryGetValue(name, out uuid)) - if (m_UUIDCache.TryGetValue(uuid, out account)) + UserAccount account = null; + UUID uuid = UUID.Zero; + if (m_NameCache.TryGetValue(name, out uuid)) { - inCache = true; - return account; + if (m_UUIDCache.TryGetValue(uuid, out account)) + { + inCache = true; + return account; + } } - + } return null; } public void Remove(string name) { - if (!m_NameCache.Contains(name)) - return; - - UUID uuid = UUID.Zero; - if (m_NameCache.TryGetValue(name, out uuid)) + lock(accessLock) { - m_NameCache.Remove(name); - m_UUIDCache.Remove(uuid); + if (!m_NameCache.Contains(name)) + return; + + UUID uuid = UUID.Zero; + if (m_NameCache.TryGetValue(name, out uuid)) + { + m_NameCache.Remove(name); + m_UUIDCache.Remove(uuid); + } } } } From 53003db4cf8fe468a4c417db72c0dfd9b6c30404 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 9 Nov 2016 22:12:27 +0000 Subject: [PATCH 11/29] stop warning about integer division cast to float --- OpenSim/Region/Framework/Scenes/Scene.cs | 5 ++--- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 168080fa8e..ca32940cd2 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -67,8 +67,6 @@ namespace OpenSim.Region.Framework.Scenes #region Fields - public bool EmergencyMonitoring = false; - /// /// Show debug information about animations. /// @@ -4606,7 +4604,8 @@ Label_GroupsDone: } // TODO: This check should probably be in QueryAccess(). - ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, RegionInfo.RegionSizeX / 2, RegionInfo.RegionSizeY / 2); + ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, + (float)RegionInfo.RegionSizeX * 0.5f, (float)RegionInfo.RegionSizeY * 0.5f); if (nearestParcel == null) { m_log.InfoFormat( diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 1141f541dd..f5f83caad0 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -246,11 +246,11 @@ namespace OpenSim.Region.Framework.Scenes // try to work around that scale down X and Y acording to region size, so reducing the resolution // // viewers need to scale up - float scaleX = m_parentScene.RegionInfo.RegionSizeX / Constants.RegionSize; + float scaleX = (float)m_parentScene.RegionInfo.RegionSizeX / (float)Constants.RegionSize; if (scaleX == 0) scaleX = 1.0f; scaleX = 1.0f / scaleX; - float scaleY = m_parentScene.RegionInfo.RegionSizeY / Constants.RegionSize; + float scaleY = (float)m_parentScene.RegionInfo.RegionSizeY / (float)Constants.RegionSize; if (scaleY == 0) scaleY = 1.0f; scaleY = 1.0f / scaleY; From d1baa3e0c3b1783a68061980ffd8b9693c5a474a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 9 Nov 2016 22:39:52 +0000 Subject: [PATCH 12/29] fix some invalid string.format arguments --- .../Remote/GroupsServiceRobustConnector.cs | 2 +- OpenSim/Data/MySQL/MySQLXInventoryData.cs | 9 +- OpenSim/Data/PGSQL/PGSQLXInventoryData.cs | 11 ++- .../Framework/Scenes/Scene.PacketHandlers.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneBase.cs | 2 +- .../Shared/Api/Implementation/LSL_Api.cs | 89 ++++++++++++++++++- .../Connectors/Estate/EstateDataConnector.cs | 2 +- 7 files changed, 108 insertions(+), 9 deletions(-) diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs index 26e844eb57..d79e4fa0f0 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs @@ -286,7 +286,7 @@ namespace OpenSim.Groups string requestingAgentID = request["RequestingAgentID"].ToString(); if (!m_GroupsService.RemoveAgentFromGroup(requestingAgentID, agentID, groupID)) - NullResult(result, string.Format("Insufficient permissions.", agentID)); + NullResult(result, string.Format("Insufficient permissions. {0}", agentID)); else result["RESULT"] = "true"; } diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs index c74033eefc..9a0044eb8b 100644 --- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs @@ -193,7 +193,9 @@ namespace OpenSim.Data.MySQL { using (MySqlCommand cmd = new MySqlCommand()) { - cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags & 1", m_Realm); +// cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags & 1", m_Realm); + + cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags & 1"); cmd.Parameters.AddWithValue("?uuid", principalID.ToString()); cmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture); @@ -212,7 +214,10 @@ namespace OpenSim.Data.MySQL { cmd.Connection = dbcon; - cmd.CommandText = String.Format("select bit_or(inventoryCurrentPermissions) as inventoryCurrentPermissions from inventoryitems where avatarID = ?PrincipalID and assetID = ?AssetID group by assetID", m_Realm); +// cmd.CommandText = String.Format("select bit_or(inventoryCurrentPermissions) as inventoryCurrentPermissions from inventoryitems where avatarID = ?PrincipalID and assetID = ?AssetID group by assetID", m_Realm); + + cmd.CommandText = String.Format("select bit_or(inventoryCurrentPermissions) as inventoryCurrentPermissions from inventoryitems where avatarID = ?PrincipalID and assetID = ?AssetID group by assetID"); + cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString()); cmd.Parameters.AddWithValue("?AssetID", assetID.ToString()); diff --git a/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs b/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs index a22b882c01..c34a8dce87 100644 --- a/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs +++ b/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs @@ -174,7 +174,9 @@ namespace OpenSim.Data.PGSQL { using (NpgsqlCommand cmd = new NpgsqlCommand()) { - cmd.CommandText = String.Format(@"select * from inventoryitems where ""avatarID"" = :uuid and ""assetType"" = :type and ""flags"" = 1", m_Realm); +// cmd.CommandText = String.Format(@"select * from inventoryitems where ""avatarID"" = :uuid and ""assetType"" = :type and ""flags"" = 1", m_Realm); + + cmd.CommandText = String.Format(@"select * from inventoryitems where ""avatarID"" = :uuid and ""assetType"" = :type and ""flags"" = 1"); UUID princID = UUID.Zero; UUID.TryParse(principalID, out princID); @@ -194,11 +196,18 @@ namespace OpenSim.Data.PGSQL { using (NpgsqlCommand cmd = new NpgsqlCommand()) { +/* cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" from inventoryitems where ""avatarID"" = :PrincipalID and ""assetID"" = :AssetID group by ""assetID"" ", m_Realm); +*/ + cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" + from inventoryitems + where ""avatarID"" = :PrincipalID + and ""assetID"" = :AssetID + group by ""assetID"" "); cmd.Parameters.Add(m_database.CreateParameter("PrincipalID", principalID)); cmd.Parameters.Add(m_database.CreateParameter("AssetID", assetID)); diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index a5abe76376..3f48372db3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -614,7 +614,7 @@ namespace OpenSim.Region.Framework.Scenes { m_log.Error( string.Format( - "[AGENT INVENTORY]: Error in SendInventoryAsync() for {0} with folder ID {1}. Exception ", e)); + "[AGENT INVENTORY]: Error in SendInventoryAsync() for {0} with folder ID {1}. Exception ", e, folderID)); } Thread.Sleep(20); } diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index 1de55ec9f6..d40662589c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs @@ -287,7 +287,7 @@ namespace OpenSim.Region.Framework.Scenes } catch (Exception e) { - m_log.Error(string.Format("[SCENE]: SceneBase.cs: Close() - Failed with exception ", e)); + m_log.Error(string.Format("[SCENE]: SceneBase.cs: Close() - Failed with exception {0}", e)); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1a73c3e01e..bafee28fb3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -14358,6 +14358,91 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return contacts.ToArray(); } + private ContactResult? GroundIntersection2(Vector3 rayStart, Vector3 rayEnd) + { + // get work copies + float sx = rayStart.X; + float ex = rayEnd.X; + float sy = rayStart.Y; + float ey = rayEnd.Y; + + float dx = ex - sx; + float dy = ey - sy; + + // region size info + float rsx = World.RegionInfo.RegionSizeX; + + float tmp; + + // region bounds + if(sx < 0) + { + if(ex < 0) // totally outside + return null; + if(dx <= 0) // out and going away + return null; + else if(ex >= rsx) + ex = rsx - 0.001f; + tmp = -sx / dx; + sy += dy * dx; + sx = 0; + } + else if(sx >= rsx) + { + if(ex >= rsx) // totally outside + return null; + if(dx >= 0) // out and going away + return null; + else if(ex < 0) + ex = 0; + tmp = (rsx - sx) / dx; + sy += dy * dx; + sx = rsx - 0.001f; + } + + float rsy = World.RegionInfo.RegionSizeY; + if(sy < 0) + { + if(dy <= 0) // out and going away + return null; + else if(ey >= rsy) + ey = rsy - 0.001f; + tmp = -sy / dy; + sx += dy * dx; + sy = 0; + } + else if(sy >= rsy) + { + if(dy >= 0) // out and going away + return null; + else if(ey < 0) + ey = 0; + tmp = (rsy - sy) / dy; + sx += dy * dx; + sy = rsy - 0.001f; + } + + if(sx < 0 || sx >= rsx) + return null; + + float sz = rayStart.Z; + float ez = rayEnd.Z; + float dz = ez - sz; + + float dist = dx * dx + dy * dy + dz * dz; + if(dist < 0.001) + return null; + dist = (float)Math.Sqrt(dist); + tmp = 1.0f / dist; + Vector3 rayn = new Vector3(dx * tmp, dy * tmp, dz * tmp); + + ContactResult? result = null; + + + + return result; + } + private ContactResult? GroundIntersection(Vector3 rayStart, Vector3 rayEnd) { double[,] heightfield = World.Heightmap.GetDoubles(); @@ -16024,8 +16109,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api catch (InvalidCastException e) { Error(originFunc,string.Format( - " error running rule #{1}: arg #{2} ", - rulesParsed, idx - idxStart) + e.Message); + " error running rule #{0}: arg #{1} {2}", + rulesParsed, idx - idxStart, e.Message)); } finally { diff --git a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs index 74935f37df..b9a628160c 100644 --- a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs +++ b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs @@ -323,7 +323,7 @@ namespace OpenSim.Services.Connectors } else m_log.Error(string.Format( - "[ESTATE CONNECTOR]: WebException for {0} {1} {2} ", + "[ESTATE CONNECTOR]: WebException for {0} {1} {2} {3}", verb, uri, formdata, e)); } } From bddaef51220198c3a3894edeece750e29337a558 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 10 Nov 2016 17:56:51 +0000 Subject: [PATCH 13/29] on Select use again the priority queues to send ObjectProperties, including physics via caps. This is need to reduce useless redudance --- .../ClientStack/Linden/UDP/LLClientView.cs | 33 ++++++++++++++- .../Framework/Scenes/Scene.PacketHandlers.cs | 42 ++----------------- 2 files changed, 34 insertions(+), 41 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 276b36724d..99c9049e01 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -2856,6 +2856,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendSelectedPartsProprieties(List parts) { +/* not in use // udp part ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); @@ -2893,6 +2894,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP llsdBody.Add("ObjectData", array); eq.Enqueue(BuildEvent("ObjectPhysicsProperties", llsdBody),AgentId); +*/ } @@ -4839,7 +4841,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP OpenSim.Framework.Lazy> propertyUpdates = new OpenSim.Framework.Lazy>(); - + + List needPhysics = new List(); + EntityUpdate iupdate; Int32 timeinqueue; // this is just debugging code & can be dropped later @@ -4867,6 +4871,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (update.Entity is SceneObjectPart) { SceneObjectPart sop = (SceneObjectPart)update.Entity; + needPhysics.Add(sop); ObjectPropertiesPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesBlock(sop); objectPropertiesBlocks.Value.Add(objPropDB); propertyUpdates.Value.Add(update); @@ -4932,7 +4937,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP // fpcnt++; // fbcnt++; } - + } + + if(needPhysics.Count > 0) + { + IEventQueue eq = Scene.RequestModuleInterface(); + if(eq != null) + { + OSDArray array = new OSDArray(); + foreach(SceneObjectPart sop in needPhysics) + { + OSDMap physinfo = new OSDMap(6); + physinfo["LocalID"] = sop.LocalId; + physinfo["Density"] = sop.Density; + physinfo["Friction"] = sop.Friction; + physinfo["GravityMultiplier"] = sop.GravityModifier; + physinfo["Restitution"] = sop.Restitution; + physinfo["PhysicsShapeType"] = (int)sop.PhysicsShapeType; + array.Add(physinfo); + } + + OSDMap llsdBody = new OSDMap(1); + llsdBody.Add("ObjectData", array); + + eq.Enqueue(BuildEvent("ObjectPhysicsProperties", llsdBody),AgentId); + } } // m_log.WarnFormat("[PACKETCOUNTS] queued {0} property packets with {1} blocks",ppcnt,pbcnt); diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 3f48372db3..24a2db792b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -166,8 +166,6 @@ namespace OpenSim.Region.Framework.Scenes /// public void SelectPrim(List primIDs, IClientAPI remoteClient) { - List needUpdates = new List(); - foreach(uint primLocalID in primIDs) { SceneObjectPart part = GetSceneObjectPart(primLocalID); @@ -179,8 +177,6 @@ namespace OpenSim.Region.Framework.Scenes if (sog == null) continue; - needUpdates.Add((ISceneEntity)part); - // waste of time because properties do not send prim flags as they should // if a friend got or lost edit rights after login, a full update is needed if(sog.OwnerID != remoteClient.AgentId) @@ -193,10 +189,9 @@ namespace OpenSim.Region.Framework.Scenes part.IsSelected = true; EventManager.TriggerParcelPrimCountTainted(); } - } - if(needUpdates.Count > 0) - remoteClient.SendSelectedPartsProprieties(needUpdates); + part.SendPropertiesToClient(remoteClient); + } } /// @@ -248,38 +243,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart part = GetSceneObjectPart(primLocalID); if (part == null) return; - /* - // A deselect packet contains all the local prims being deselected. However, since selection is still - // group based we only want the root prim to trigger a full update - otherwise on objects with many prims - // we end up sending many duplicate ObjectUpdates - if (part.ParentGroup.RootPart.LocalId != part.LocalId) - return; - - // This is wrong, wrong, wrong. Selection should not be - // handled by group, but by prim. Legacy cruft. - // TODO: Make selection flagging per prim! - // - if (Permissions.CanEditObject(part.ParentGroup.UUID, remoteClient.AgentId) - || Permissions.CanMoveObject(part.ParentGroup.UUID, remoteClient.AgentId)) - part.ParentGroup.IsSelected = false; - - part.ParentGroup.ScheduleGroupForFullUpdate(); - - // If it's not an attachment, and we are allowed to move it, - // then we might have done so. If we moved across a parcel - // boundary, we will need to recount prims on the parcels. - // For attachments, that makes no sense. - // - if (!part.ParentGroup.IsAttachment) - { - if (Permissions.CanEditObject( - part.UUID, remoteClient.AgentId) - || Permissions.CanMoveObject( - part.UUID, remoteClient.AgentId)) - EventManager.TriggerParcelPrimCountTainted(); - } - */ - + bool oldgprSelect = part.ParentGroup.IsSelected; // This is wrong, wrong, wrong. Selection should not be From 743a9d617e92f2ccd01816aec3bef73df22ed534 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 10 Nov 2016 19:21:07 +0000 Subject: [PATCH 14/29] also cache not found useraccounts when search by ID. Change the expire time to 5minutes in this case --- .../UserAccounts/LocalUserAccountServiceConnector.cs | 5 +---- .../UserAccounts/RemoteUserAccountServiceConnector.cs | 10 +++------- .../UserAccounts/UserAccountCache.cs | 9 +++++++-- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index a413a8bff1..9325de9854 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs @@ -213,10 +213,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { ret.AddRange(ext); foreach(UserAccount acc in ext) - { - if(acc != null) - m_Cache.Cache(acc.PrincipalID, acc); - } + m_Cache.Cache(acc.PrincipalID, acc); } return ret; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs index 60dd97ad90..e84b66630f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs @@ -142,8 +142,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts return account; account = base.GetUserAccount(scopeID, userID); - if(account != null) - m_Cache.Cache(userID, account); + m_Cache.Cache(userID, account); return account; } @@ -191,11 +190,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { foreach(UserAccount acc in ext) { - if(acc != null) - { - accs.Add(acc); - m_Cache.Cache(acc.PrincipalID, acc); - } + accs.Add(acc); + m_Cache.Cache(acc.PrincipalID, acc); } } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index 97baf8703a..f514bd77d4 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs @@ -37,6 +37,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts public class UserAccountCache : IUserAccountCacheModule { private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours! + private const double CACHENULL_EXPIRATION_SECONDS = 600; // 5minutes // private static readonly ILog m_log = // LogManager.GetLogger( @@ -57,9 +58,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts // Cache even null accounts lock(accessLock) { - m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS); - if (account != null) + if (account == null) + m_UUIDCache.AddOrUpdate(userID, null, CACHENULL_EXPIRATION_SECONDS); + else + { + m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS); m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS); + } //m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); } From 58b7be48a9466ee8df670e743bfa1711fe6a6450 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 10 Nov 2016 23:07:57 +0000 Subject: [PATCH 15/29] ubOde: add a needed lock --- OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index 6267051aac..f6426998d3 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs @@ -1221,8 +1221,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde /// public void RemoveCollisionEventReporting(PhysicsActor obj) { - if (_collisionEventPrim.Contains(obj) && !_collisionEventPrimRemove.Contains(obj)) - _collisionEventPrimRemove.Add(obj); + lock(_collisionEventPrimRemove) + { + if (_collisionEventPrim.Contains(obj) && !_collisionEventPrimRemove.Contains(obj)) + _collisionEventPrimRemove.Add(obj); + } } public override float TimeDilation @@ -1759,10 +1762,13 @@ namespace OpenSim.Region.PhysicsModule.ubOde prm.SleeperAddCollisionEvents(); sleepers.Clear(); - foreach (PhysicsActor obj in _collisionEventPrimRemove) - _collisionEventPrim.Remove(obj); + lock(_collisionEventPrimRemove) + { + foreach (PhysicsActor obj in _collisionEventPrimRemove) + _collisionEventPrim.Remove(obj); - _collisionEventPrimRemove.Clear(); + _collisionEventPrimRemove.Clear(); + } // do a ode simulation step d.WorldQuickStep(world, ODE_STEPSIZE); From 56a79a252c285c68cbdc856dc215d1155dff8c36 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 10 Nov 2016 23:14:08 +0000 Subject: [PATCH 16/29] GetUserAccounts cannot cache null accounts --- .../UserAccounts/LocalUserAccountServiceConnector.cs | 9 +++++++-- .../UserAccounts/RemoteUserAccountServiceConnector.cs | 7 +++++-- .../UserAccounts/UserAccountCache.cs | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index 9325de9854..b72ffbba4a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs @@ -211,9 +211,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts List ext = UserAccountService.GetUserAccounts(scopeID, missing); if(ext != null && ext.Count > 0) { - ret.AddRange(ext); foreach(UserAccount acc in ext) - m_Cache.Cache(acc.PrincipalID, acc); + { + if(acc != null) + { + ret.Add(acc); + m_Cache.Cache(acc.PrincipalID, acc); + } + } } return ret; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs index e84b66630f..f5eda11487 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs @@ -190,8 +190,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { foreach(UserAccount acc in ext) { - accs.Add(acc); - m_Cache.Cache(acc.PrincipalID, acc); + if(acc != null) + { + accs.Add(acc); + m_Cache.Cache(acc.PrincipalID, acc); + } } } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index f514bd77d4..03cb680a0a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs @@ -37,7 +37,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts public class UserAccountCache : IUserAccountCacheModule { private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours! - private const double CACHENULL_EXPIRATION_SECONDS = 600; // 5minutes + private const double CACHENULL_EXPIRATION_SECONDS = 600; // 10minutes // private static readonly ILog m_log = // LogManager.GetLogger( From 326821f66ed6286ee8b2ea6f5606d3eb902489fc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 11 Nov 2016 12:59:43 +0000 Subject: [PATCH 17/29] reduce useraccouts cache time --- .../UserAccounts/UserAccountCache.cs | 6 +-- .../PasswordAuthenticationService.cs | 53 +------------------ 2 files changed, 5 insertions(+), 54 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index 03cb680a0a..6c1cc525b2 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs @@ -36,8 +36,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { public class UserAccountCache : IUserAccountCacheModule { - private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours! - private const double CACHENULL_EXPIRATION_SECONDS = 600; // 10minutes + private const double CACHE_EXPIRATION_SECONDS = 3600.0; // 1 hour! + private const double CACHE_NULL_EXPIRATION_SECONDS = 600; // 10minutes // private static readonly ILog m_log = // LogManager.GetLogger( @@ -59,7 +59,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts lock(accessLock) { if (account == null) - m_UUIDCache.AddOrUpdate(userID, null, CACHENULL_EXPIRATION_SECONDS); + m_UUIDCache.AddOrUpdate(userID, null, CACHE_NULL_EXPIRATION_SECONDS); else { m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS); diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs index a9359f3cd0..2e8ffe5aae 100644 --- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs @@ -72,11 +72,8 @@ namespace OpenSim.Services.AuthenticationService { realID = UUID.Zero; - m_log.DebugFormat("[AUTH SERVICE]: Authenticating for {0}, user account service present: {1}", principalID, m_UserAccountService != null); + m_log.DebugFormat("[AUTH SERVICE]: Authenticating for {0}", principalID); AuthenticationData data = m_Database.Get(principalID); - UserAccount user = null; - if (m_UserAccountService != null) - user = m_UserAccountService.GetUserAccount(UUID.Zero, principalID); if (data == null || data.Data == null) { @@ -100,53 +97,7 @@ namespace OpenSim.Services.AuthenticationService return GetToken(principalID, lifetime); } - if (user == null) - { - m_log.DebugFormat("[PASS AUTH]: No user record for {0}", principalID); - return String.Empty; - } - - int impersonateFlag = 1 << 6; - - if ((user.UserFlags & impersonateFlag) == 0) - return String.Empty; - - m_log.DebugFormat("[PASS AUTH]: Attempting impersonation"); - - List accounts = m_UserAccountService.GetUserAccountsWhere(UUID.Zero, "UserLevel >= 200"); - if (accounts == null || accounts.Count == 0) - return String.Empty; - - foreach (UserAccount a in accounts) - { - data = m_Database.Get(a.PrincipalID); - if (data == null || data.Data == null || - !data.Data.ContainsKey("passwordHash") || - !data.Data.ContainsKey("passwordSalt")) - { - continue; - } - -// m_log.DebugFormat("[PASS AUTH]: Trying {0}", data.PrincipalID); - - hashed = Util.Md5Hash(password + ":" + - data.Data["passwordSalt"].ToString()); - - if (data.Data["passwordHash"].ToString() == hashed) - { - m_log.DebugFormat("[PASS AUTH]: {0} {1} impersonating {2}, proceeding with login", a.FirstName, a.LastName, principalID); - realID = a.PrincipalID; - return GetToken(principalID, lifetime); - } -// else -// { -// m_log.DebugFormat( -// "[AUTH SERVICE]: Salted hash {0} of given password did not match salted hash of {1} for PrincipalID {2}. Authentication failure.", -// hashed, data.Data["passwordHash"], data.PrincipalID); -// } - } - - m_log.DebugFormat("[PASS AUTH]: Impersonation of {0} failed", principalID); + m_log.DebugFormat("[AUTH SERVICE]: Authenticating FAIL for {0} ", principalID); return String.Empty; } } From c5d85b5465e6c2d6de2836b739324b634f57cc86 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 11 Nov 2016 16:04:20 +0000 Subject: [PATCH 18/29] reduce diferencs btw OpenSimDefaults.ini and OpenSim.ini.example --- bin/OpenSim.ini.example | 10 +++--- bin/OpenSimDefaults.ini | 69 +++++++++++++++++++++++++++++------------ 2 files changed, 54 insertions(+), 25 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 961c141362..f6466b566d 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -696,12 +696,6 @@ ;; then you might want to try setting this to false. ; mesh_sculpted_prim = true - ;# {use_NINJA_physics_joints} {[Startup]physics:OpenDynamicsEngine} {Use jointed (NINJA) physics?} {true false} false - ;; If you would like physics joints to be enabled through a special naming - ;; convention in the client, set this to true. - ;; (see NINJA Physics, http://opensimulator.org/wiki/NINJA_Physics) - ; use_NINJA_physics_joints = false - [RemoteAdmin] ;; This is the remote admin module, which uses XMLRPC requests to ;; manage regions from a web interface. @@ -1138,15 +1132,19 @@ ;; several options to control NPCs creation + ;# {AllowNotOwned} {} {allow NPCs to be created not Owned} {true false} false ;; allow NPCs to be created not Owned {true false} default: true ; AllowNotOwned = false + ;# {AllowSenseAsAvatar} {} {allow NPCs to set to be sensed as Avatars} {true false} false ;; allow NPCs to set to be sensed as Avatars {true false} default: true ; AllowSenseAsAvatar = false + ;# {AllowCloneOtherAvatars} {} {allow NPCs to created cloning any avatar in region} {true false} false ;; allow NPCs to created cloning any avatar in region {true false} default: true ; AllowCloneOtherAvatars = false + ;# {NoNPCGroup} {} {if true NPCs will have no group title, if false display "- NPC -"} {true false} false ;; if true NPCs will have no group title, if false display "- NPC -" for easy identification {true false} default: true ; NoNPCGroup = false diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 6b04424a87..906c7bc143 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -128,9 +128,16 @@ ; Increasing this number will increase memory usage. MaxPrimUndos = 20 + ; Minimum size for non-physical prims.This can be overridden in the region config file (as + ; NonPhysicalPrimMin!). + ; NonPhysicalPrimMin = 0.001 + ; Maximum size of non physical prims. Affects resizing of existing prims. This can be overridden in the region config file (as NonPhysicalPrimMax!). NonPhysicalPrimMax = 256 + ; Minimum size where a prim can be physical. This can be overridden in the region config file. + ; PhysicalPrimMin = 0.01 + ; Maximum size of physical prims. Affects resizing of existing prims. This can be overridden in the region config file. PhysicalPrimMax = 64 @@ -304,6 +311,7 @@ ; ## SCRIPT ENGINE ; ## + ;; Default script engine to use. Currently, we only have XEngine DefaultScriptEngine = "XEngine" ; Http proxy setting for llHTTPRequest and dynamic texture loading, if @@ -320,7 +328,8 @@ ; ## ; ## EMAIL MODULE ; ## - + ;; The email module requires some configuration. It needs an SMTP + ;; server to send mail through. ;emailmodule = DefaultEmailModule ; ## @@ -395,15 +404,23 @@ [Map] + ; Map tile options. + ; If true, then maptiles are generated using the MapImageModule below. + ; If false then the texture referenced by MaptileStaticUUID is used instead, which can also be overridden + ; in individual region config file(s). If you do not want to upload map tiles at all, then you will need + ; both to set this to false and comment out the [Modules] MapImageServiceModule setting in config-include/ + ;GenerateMaptiles = true + ;WorldMapModule = "WorldMap" + + ; The module to use in order to generate map images. + ; MapImageModule is the default. Warp3DImageModule is an alternative experimental module that can + ; generate better images. ;MapImageModule = "MapImageModule" ; World map blacklist timeout in seconds ;BlacklistTimeout = 600 - ; Set to false to not generate any maptiles - ;GenerateMaptiles = true - ; Refresh (in seconds) the map tile periodically ;MaptileRefresh = 0 @@ -431,6 +448,8 @@ ; ## PERMISSIONS ; ## + ; Permission modules to use, separated by comma. + ; Possible modules are DefaultPermissionsModule, PrimLimitsModule ;permissionmodules = "DefaultPermissionsModule" ; If set to false, then, in theory, the server never carries out permission checks (allowing anybody to copy @@ -439,12 +458,22 @@ ; Default is true serverside_object_permissions = true - allow_grid_gods = false - - ; This allows somne control over permissions + + ; This allows some control over permissions ; please note that this still doesn't duplicate SL, and is not intended to + + ; This allows grid users with a UserLevel of 200 or more to assume god + ; powers in the regions in this simulator. + allow_grid_gods = false + + ; Allow region owners to assume god powers in their regions ;region_owner_is_god = true + + ; Allow region managers to assume god powers in regions they manage ;region_manager_is_god = false + + ; Allow parcel owners to assume god powers in their parcels + ; you really may not want this... ;parcel_owner_is_god = false ; Control user types that are allowed to create new scripts @@ -1107,16 +1136,6 @@ ; number^2 physical level of detail of the sculpt texture. 16x16 - 256 verticies mesh_physical_lod = 16 - ; ## - ; ## Joint support - ; ## - - ; If you would like physics joints to be enabled through a special naming - ; convention in the client, set this to true. - ; (See NINJA Physics documentation, http://opensimulator.org/wiki/NINJA_Physics) - ; Default is false - ;use_NINJA_physics_joints = true - ; ## ; ## additional meshing options ; ## @@ -1126,7 +1145,7 @@ ; If you would rather have mesh proxies for simple prims, you can set this to ; true. Note that this will increase memory usage and region startup time. ; Default is false. - ;force_simple_prim_meshing = true + ;force_simple_prim_meshing = false [BulletSim] @@ -2104,7 +2123,19 @@ [NPC] ;; Enable Non Player Character (NPC) facilities Enabled = false - + ;; several options to control NPCs creation + + ;; allow NPCs to be created not Owned {true false} default: true + ; AllowNotOwned = false + + ;; allow NPCs to set to be sensed as Avatars {true false} default: true + ; AllowSenseAsAvatar = false + + ;; allow NPCs to created cloning any avatar in region {true false} default: true + ; AllowCloneOtherAvatars = false + + ;; if true NPCs will have no group title, if false display "- NPC -" for easy identification {true false} default: true + ; NoNPCGroup = false [Terrain] ; Values can be "pinhead-island" or "flat" From 077cfdf698b2f769f3e136a779e1b1e108d1b8ed Mon Sep 17 00:00:00 2001 From: AliciaRaven Date: Fri, 11 Nov 2016 22:05:48 +0000 Subject: [PATCH 19/29] Update gitignore to include VS user config folder and remove old FxCop file which is not used --- .gitignore | 2 +- OpenSim.FxCop | 7241 ------------------------------------------------- 2 files changed, 1 insertion(+), 7242 deletions(-) delete mode 100644 OpenSim.FxCop diff --git a/.gitignore b/.gitignore index d1f7710f47..f77d9f9079 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ */*/*/*/*/bin */*/*/*/*/*/bin */*/*/*/*/*/*/bin +.vs/ addon-modules/ bin/Debug/*.dll bin/*.dll.mdb @@ -93,7 +94,6 @@ TAGS Makefile.local bin/.version compile.bat -addon-modules OpenSim/Data/Tests/test-results/ OpenSim/Framework/Serialization/Tests/test-results/ OpenSim/Framework/Servers/Tests/test-results/ diff --git a/OpenSim.FxCop b/OpenSim.FxCop deleted file mode 100644 index d07c26efbf..0000000000 --- a/OpenSim.FxCop +++ /dev/null @@ -1,7241 +0,0 @@ - - - - True - http://www.gotdotnet.com/team/fxcop//xsl/1.35/FxCopReport.xsl - - - - - - True - True - True - 10 - 1 - - False - False - - False - 120 - - - - $(ProjectDir)/lib/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sim - OpenSim - - - - - - - - - Sim - OpenSim.Assets - - - - - - - - - OpenSim.CAPS - - - - - Sim - OpenSim.CAPS - - - - - OpenSim.CAPS - - - - - - - - - Sim - OpenSim.Config.SimConfigDb4o - - - Sim - OpenSim.Config.SimConfigDb4o - - - - - - - - - OpenSim.Framework.Assets - - - - - Sim - OpenSim.Framework.Assets - - - - - - - - - Sim - OpenSim.Framework.Console - - - - - - - - - OpenSim.Framework.Grid - - - - - Sim - OpenSim.Framework.Grid - - - - - - - - - Sim - OpenSim.Framework.Interfaces - - - - - - - - - OpenSim.Framework.Inventory - - - - - Sim - OpenSim.Framework.Inventory - - - - - - - - - OpenSim.Framework.Sims - - - - - Sim - OpenSim.Framework.Sims - - - - - - - - - OpenSim.Framework.Terrain - - - - - Sim - OpenSim.Framework.Terrain - - - - - - - - - OpenSim.Framework.User - - - - - Sim - OpenSim.Framework.User - - - - - - - - - OpenSim.Framework.Utilities - - - - - Sim - OpenSim.Framework.Utilities - - - - - - - - - Sim - OpenSim.GridInterfaces.Local - - - - - - - - - OpenSim.GridInterfaces.Remote - - - - - Sim - OpenSim.GridInterfaces.Remote - - - - - - - - - Plugin - OpenSim.Physics.BasicPhysicsPlugin - - - - - Sim - OpenSim.Physics.BasicPhysicsPlugin - - - - - - - - - Sim - OpenSim.Physics.Manager - - - - - - - - - OpenSim.Physics.OdePlugin - - - - - Plugin - OpenSim.Physics.OdePlugin - - - - - Sim - OpenSim.Physics.OdePlugin - - - - - - - - - OpenSim.Physics.PhysXPlugin - - - - - Plugin - OpenSim.Physics.PhysXPlugin - - - - - Sim - OpenSim.Physics.PhysXPlugin - - - - - - - - - Sim - OpenSim.Storage.LocalStorageDb4o - - - - - - - - - OpenSim.types - - - - - OpenSim.types - - - - - Sim - OpenSim.types - - - - - - - - - OpenSim.UserServer - - - - - Sim - OpenSim.UserServer - - - - - - - - - OpenSim.world - - - - - Sim - OpenSim.world - - - - - - - - - OpenSim.world.scripting - - - - - OpenSim.world.scripting - - - OpenSim.world.scripting - - - - - Sim - OpenSim.world.scripting - - - - - - - - - - - - - OpenGridServices.ServerConsole - - - - - OpenGridServices.ServerConsole - - - - - OpenGridServices.ServerConsole - - - - - - - - - - - conscmd_callback - - - - - conscmd - ServerConsole.conscmd_callback - - - - - conscmd_callback - - - - - - - - - conscmd_callback.RunCmd(String, String[]):Void - cmdparams - cmdparams - - - - - - - - - ShowWhat - - - - - - - - - - - - - ConsoleBase.CmdPrompt(String, String):String - defaultresponse - defaultresponse - - - - - - - - - OptionA - - - - - OptionB - - - - - ConsoleBase.CmdPrompt(String, String, String, String):String - defaultresponse - defaultresponse - - - - - - - - - Passwd - ConsoleBase.PasswdPrompt(String):String - - - - - - - - - Cmd - - - - - ConsoleBase.RunCmd(String, String[]):Object - cmdparams - cmdparams - - - - - - - - - ShowWhat - - - - - - - - - Line - - - - - - - - - Line - - - - - - - - - - - - - Sim - ConsoleType.SimChat - - - - - - - - - ConsoleType.TCP - - - - - - - - - - - MainConsole - - - - - - - - - - - - - - - - - OpenSim.Config.SimConfigDb4o - - - - - OpenSim.Config.SimConfigDb4o - - - - - OpenSim.Config.SimConfigDb4o - - - - - - - - - - - Plugin - OpenSim.Config.SimConfigDb4o.Db40ConfigPlugin - - - - - - - - - Sim - OpenSim.Config.SimConfigDb4o.DbSimConfig - - - - - Db - OpenSim.Config.SimConfigDb4o.DbSimConfig - - - - - - - - - DbSimConfig.InitConfig(Boolean):Void - System.Exception - - - - - DbSimConfig.InitConfig(Boolean):Void - System.UInt32.ToString - System.UInt32.ToString(System.IFormatProvider) - - - - - DbSimConfig.InitConfig(Boolean):Void - System.UInt64.ToString - System.UInt64.ToString(System.IFormatProvider) - - - - - - - - - DbSimConfig.LoadDefaults():Void - System.Convert.ToInt32(System.String) - System.Convert.ToInt32(System.String,System.IFormatProvider) - - - DbSimConfig.LoadDefaults():Void - System.Convert.ToInt32(System.String) - System.Convert.ToInt32(System.String,System.IFormatProvider) - - - DbSimConfig.LoadDefaults():Void - System.Convert.ToInt32(System.String) - System.Convert.ToInt32(System.String,System.IFormatProvider) - - - - - - - - - - - - - Map - - - - - - - - - - - - - - - - - - - OpenSim - - - - - OpenSim - - - - - OpenSim - - - - - OpenSim - - - - - OpenSim - - - - - - - - - - - - - 'args' - RegionServer.Main(String[]):Void - - - 'args' - RegionServer.Main(String[]):Void - - - - - - - - - - - - - - - - - - - OpenSim.Framework.Console - - - - - OpenSim.Framework.Console - - - - - OpenSim.Framework.Console - - - - - - - - - - - - - ConsoleBase.CmdPrompt(String, String):String - defaultresponse - defaultresponse - - - - - - - - - OptionA - - - - - OptionB - - - - - ConsoleBase.CmdPrompt(String, String, String, String):String - defaultresponse - defaultresponse - - - - - - - - - Cmd - - - - - ConsoleBase.RunCmd(String, String[]):Object - cmdparams - cmdparams - - - - - - - - - ShowWhat - - - - - - - - - - - - - Sim - ConsoleType.SimChat - - - - - - - - - ConsoleType.TCP - - - - - - - - - - - MainConsole - - - - - - - - - - - - - - - - - OpenSim.Framework - - - - - OpenSim.Framework - - - - - OpenSim.Framework - - - - - - - - - - - - - Data - - - - - - - - - Description - - - - - - - - - FullID - - - - - - - - - InvType - - - - - - - - - Name - - - - - - - - - Type - - - - - - - - - - - - - PrimData.PrimData() - ParentID - System.UInt32 - 0 - - - - - - - - - FullID - - - - - - - - - LocalID - - - - - - - - - OwnerID - - - - - - - - - ParentID - - - - - - - - - PathBegin - - - - - - - - - PathCurve - - - - - - - - - PathEnd - - - - - - - - - PathRadiusOffset - - - - - - - - - PathRevolutions - - - - - - - - - PathScaleX - - - - - - - - - PathScaleY - - - - - - - - - PathShearX - - - - - - - - - PathShearY - - - - - - - - - PathSkew - - - - - - - - - PathTaperX - - - - - - - - - PathTaperY - - - - - - - - - PathTwist - - - - - - - - - PathTwistBegin - - - - - - - - - PCode - - - - - - - - - Position - - - - - - - - - ProfileBegin - - - - - - - - - ProfileCurve - - - - - - - - - ProfileEnd - - - - - - - - - ProfileHollow - - - - - - - - - Rotation - - - - - - - - - Scale - - - - - - - - - Texture - - - - - - - - - - - - - - - Login - LoginService - LogOn - - - - - - - - - - - - - - - AgentID - - - - - - - - - circuitcode - - - - - circuitcode - AgentCircuitData.circuitcode - - - - - - - - - firstname - - - - - firstname - AgentCircuitData.firstname - - - - - - - - - lastname - - - - - lastname - AgentCircuitData.lastname - - - - - - - - - SecureSessionID - - - - - - - - - SessionID - - - - - - - - - - - OpenSim.Framework.Interfaces.ARequest - - - OpenSim.Framework.Interfaces.ARequest - - - - - - - - - AssetID - - - - - - - - - IsTexture - - - - - - - - - - - - - Authorised - - - - - Authorised - AuthenticateResponse.Authorised - - - - - - - - - LoginInfo - - - - - Login - LoginInfo - LogOn - - - - - - - - - - - Plugin - OpenSim.Framework.Interfaces.IAssetPlugin - - - - - - - - - GetAssetServer - - - - - - - - - - - - - IsTexture - - - - - - - - - - - - - ID - assetID - Id - - - - - - - - - ServerUrl - - - - - ServerKey - - - - - ServerUrl - IAssetServer.SetServerInfo(String, String):Void - - - - - - - - - - - Plugin - OpenSim.Framework.Interfaces.IGridPlugin - - - - - - - - - GetGridServer - - - - - - - - - - - - - ID - sessionID - Id - - - - - ID - agentID - Id - - - - - - - - - GetName - - - - - - - - - ID - sessionID - Id - - - - - ID - agentID - Id - - - - - Logout - LogoutSession - LogOff - - - - - - - - - Neighbours - IGridServer.RequestNeighbours():NeighbourInfo[] - - - - - - - - - IGridServer.RequestUUIDBlock():UUIDBlock - - - - - - - - - ServerUrl - - - - - SendKey - - - - - RecvKey - - - - - IGridServer.SetServerInfo(String, String, String):Void - Recv - RecvKey - - - - - ServerUrl - IGridServer.SetServerInfo(String, String, String):Void - - - - - - - - - - - - - ID - primID - Id - - - - - - - - - ShutDown - method - ShutDown - Shutdown - - - - - - - - - - - Sim - OpenSim.Framework.Interfaces.ISimConfig - - - - - - - - - GetConfigObject - - - - - - - - - - - - - ID - agentID - Id - - - - - - - - - ServerUrl - - - - - SendKey - - - - - RecvKey - - - - - IUserServer.SetServerInfo(String, String, String):Void - Recv - RecvKey - - - - - ServerUrl - IUserServer.SetServerInfo(String, String, String):Void - - - - - - - - - - - - - Logout - LogoutSession - LogOff - - - - - - - - - - - Login - Login - LogOn - - - - - - - - - Agent - - - - - - - - - BaseFolder - - - - - - - - - First - - - - - - - - - InventoryFolder - - - - - - - - - Last - - - - - - - - - SecureSession - - - - - - - - - Session - - - - - - - - - - - Neighbour - OpenSim.Framework.Interfaces.NeighbourInfo - - - - - - - - - regionhandle - - - - - regionhandle - NeighbourInfo.regionhandle - - - - - - - - - RegionLocX - - - - - - - - - RegionLocY - - - - - - - - - sim_ip - - - - - sim - NeighbourInfo.sim_ip - - - - - sim_ip - - - - - - - - - sim_port - - - - - sim - NeighbourInfo.sim_port - - - - - sim_port - - - - - - - - - - - - - agentcircuits - - - - - agentcircuits - - - - - agentcircuits - RemoteGridBase.agentcircuits:Dictionary`2<System.UInt32,OpenSim.Framework.Interfaces.AgentCircuitData> - - - - - - - - - Logout - LogoutSession - LogOff - - - - - - - - - - - Sim - OpenSim.Framework.Interfaces.SimConfig - - - - - - - - - AssetSendKey - - - - - - - - - AssetURL - - - - - - - - - GridRecvKey - - - - - Recv - SimConfig.GridRecvKey - - - - - - - - - GridSendKey - - - - - - - - - GridURL - - - - - - - - - IPListenAddr - - - - - Addr - SimConfig.IPListenAddr - - - - - - - - - IPListenPort - - - - - - - - - RegionHandle - - - - - - - - - RegionLocX - - - - - - - - - RegionLocY - - - - - - - - - RegionName - - - - - - - - - SimConfig.SaveMap(Single[]):Void - heightmap - heightmap - - - - - - - - - UserRecvKey - - - - - Recv - SimConfig.UserRecvKey - - - - - - - - - UserSendKey - - - - - - - - - UserURL - - - - - - - - - - - UUIDBlock - - - - - OpenSim.Framework.Interfaces.UUIDBlock - - - OpenSim.Framework.Interfaces.UUIDBlock - - - - - - - - - BlockEnd - - - - - - - - - BlockStart - - - - - - - - - - - - - - - - - AgentInventory.AgentInventory() - AgentInventory.AgentInventory() AgentInventory.Initialise():Void - - - - - - - - - ID - folderID - Id - - - - - - - - - AgentID - - - - - - - - - ID - folderID - Id - - - - - - - - - Initialise - AgentInventory.Initialise():Void - - - - - - - - - InventoryFolders - - - - - - - - - InventoryItems - - - - - - - - - InventoryRoot - - - - - - - - - LastCached - - - - - - - - - ID - itemID - Id - - - - - - - - - Wearables - - - - - Wearables - AgentInventory.Wearables - - - - - - - - - - - - - AssetID - - - - - - - - - ItemID - - - - - - - - - - - - - DefaultType - - - - - - - - - FolderID - - - - - - - - - FolderName - - - - - - - - - Items - - - - - System.Collections.Generic.List`1<OpenSim.Framework.Inventory.InventoryItem> - InventoryFolder.Items - - - - - - - - - OwnerID - - - - - - - - - ParentID - - - - - - - - - Version - - - - - - - - - - - - - AssetID - - - - - - - - - CreatorID - - - - - - - - - Description - - - - - - - - - FolderID - - - - - - - - - InvType - - - - - - - - - ItemID - - - - - - - - - Name - - - - - - - - - OwnerID - - - - - - - - - Type - - - - - - - - - - - - - - - Sim - OpenSim.Framework.Sims.SimProfile - - - - - - - - - SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile - System.Exception - - - - - GridURL - - - - - SendKey - - - - - RecvKey - - - - - SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile - Recv - RecvKey - - - - - region_handle - - - - - GridURL - - - - - RecvKey - SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile - - - - - SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile - System.Convert.ToUInt16(System.Object) - System.Convert.ToUInt16(System.Object,System.IFormatProvider) - - - - - SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile - System.Convert.ToUInt32(System.Object) - System.Convert.ToUInt32(System.Object,System.IFormatProvider) - - - SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile - System.Convert.ToUInt32(System.Object) - System.Convert.ToUInt32(System.Object,System.IFormatProvider) - - - - - SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile - System.Convert.ToUInt64(System.Object) - System.Convert.ToUInt64(System.Object,System.IFormatProvider) - - - - - SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile - System.UInt64.ToString - System.UInt64.ToString(System.IFormatProvider) - - - - - - - - - - - Sim - OpenSim.Framework.Sims.SimProfileBase - - - - - - - - - caps_url - - - - - caps_url - - - - - - - - - recvkey - - - - - recvkey - SimProfileBase.recvkey - - - - - - - - - regionhandle - - - - - regionhandle - SimProfileBase.regionhandle - - - - - - - - - RegionLocX - - - - - - - - - RegionLocY - - - - - - - - - regionname - - - - - regionname - SimProfileBase.regionname - - - - - - - - - sendkey - - - - - sendkey - SimProfileBase.sendkey - - - - - - - - - sim_ip - - - - - sim - SimProfileBase.sim_ip - - - - - sim_ip - - - - - - - - - sim_port - - - - - sim - SimProfileBase.sim_port - - - - - sim_port - - - - - - - - - UUID - - - - - - - - - - - - - - - Heightmap - OpenSim.Framework.Terrain.HeightmapGenHills - - - - - - - - - HeightmapGenHills.GenerateHeightmap(Int32, Single, Single, Boolean):Single[] - num - numHills - - - - - Heightmap - HeightmapGenHills.GenerateHeightmap(Int32, Single, Single, Boolean):Single[] - - - - - - - - - HeightmapGenHills.NumHills - - - - - - - - - - - - - - - - - UserProfile.UserProfile() - IsGridGod - System.Boolean - false - - - - - - - - - Sim - UserProfile.AddSimCircuit(UInt32, LLUUID):Void - - - - - regionUUID - - - - - - - - - AssetURL - - - - - - - - - Circuits - - - - - - - - - CurrentSecureSessionID - - - - - - - - - CurrentSessionID - - - - - - - - - firstname - - - - - firstname - UserProfile.firstname - - - - - - - - - homelookat - - - - - homelookat - UserProfile.homelookat - - - - - - - - - homepos - - - - - homepos - UserProfile.homepos - - - - - - - - - homeregionhandle - - - - - homeregionhandle - UserProfile.homeregionhandle - - - - - - - - - Inventory - - - - - - - - - IsGridGod - - - - - - - - - IsLocal - - - - - - - - - lastname - - - - - lastname - UserProfile.lastname - - - - - - - - - MD5passwd - - - - - - - - - UUID - - - - - - - - - - - - - response - - - - - Customise - UserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - - - - - UserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - GridResp - Nwc.XmlRpc.XmlRpcResponse - - - - - UserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - - - UserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.UInt32.ToString - System.UInt32.ToString(System.IFormatProvider) - - - UserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.UInt32.ToString - System.UInt32.ToString(System.IFormatProvider) - - - - - - - - - DefaultStartupMsg - - - - - - - - - GridRecvKey - - - - - Recv - UserProfileManager.GridRecvKey - - - - - - - - - GridSendKey - - - - - - - - - GridURL - - - - - - - - - UserProfileManager.ParseXMLRPC(String):String - System.Exception - - - - - UserProfileManager.ParseXMLRPC(String):String - - - - - UserProfileManager.ParseXMLRPC(String):String - System.Int32.ToString - System.Int32.ToString(System.IFormatProvider) - - - UserProfileManager.ParseXMLRPC(String):String - System.Int32.ToString - System.Int32.ToString(System.IFormatProvider) - - - - - UserProfileManager.ParseXMLRPC(String):String - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.ParseXMLRPC(String):String - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.ParseXMLRPC(String):String - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.ParseXMLRPC(String):String - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.ParseXMLRPC(String):String - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.ParseXMLRPC(String):String - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.ParseXMLRPC(String):String - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.ParseXMLRPC(String):String - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - UserProfileManager.ParseXMLRPC(String):String - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - - - - - - - UserProfileManager.SetKeys(String, String, String, String):Void - recv - recvKey - - - - - url - UserProfileManager.SetKeys(String, String, String, String):Void - - - - - - - - - - - - - UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean - firstname - firstname - - - - - UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean - lastname - lastname - - - - - UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean - passwd - passwd - - - - - - - - - MD5passwd - - - - - UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile - firstname - firstname - - - - - UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile - lastname - lastname - - - - - UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile - M - MD5passwd - - - - - - - - - ProfileLLUUID - - - - - ProfileLLUUID - - - - - UserProfileManagerBase.GetProfileByLLUUID(LLUUID):UserProfile - - - - - - - - - UserProfileManagerBase.GetProfileByName(String, String):UserProfile - firstname - firstname - - - - - UserProfileManagerBase.GetProfileByName(String, String):UserProfile - lastname - lastname - - - - - - - - - ID - agentID - Id - - - - - - - - - GodID - - - - - ID - GodID - Id - - - - - - - - - UserProfiles - - - - - - - - - - - - - - - OpenSim.Framework.Utilities.BlockingQueue`1 - Queue - - - - - - - - - Util - OpenSim.Framework.Utilities.Util - - - - - Util - - - - - Util - System.Web.Util - - - - - - - - - Xfer - Util.GetNextXferID():UInt32 - - - - - Util.GetNextXferID():UInt32 - - - - - GetNextXferID - - - - - - - - - X - - - - - Y - - - - - Util.UIntsToLong(UInt32, UInt32):UInt64 - X - - - - - Util.UIntsToLong(UInt32, UInt32):UInt64 - Y - - - - - Ints - Util.UIntsToLong(UInt32, UInt32):UInt64 - - - - - - - - - - - - - - - - - - - OpenSim.GridInterfaces.Local - - - - - OpenSim.GridInterfaces.Local - - - - - OpenSim.GridInterfaces.Local - - - - - - - - - - - - - Data - - - - - - - - - Name - - - - - - - - - Type - - - - - - - - - UUID - - - - - - - - - - - AssetUUIDQuery - - - - - - - - - 'asset' - AssetUUIDQuery.Match(AssetStorage):Boolean - - - - - - - - - - - Plugin - OpenSim.GridInterfaces.Local.LocalAssetPlugin - - - - - - - - - - - LocalAssetServer.LocalAssetServer() - System.Exception - - - - - - - - - LocalAssetServer.LoadAsset(AssetBase, Boolean, String):Void - - - - - image - LocalAssetServer.LoadAsset(AssetBase, Boolean, String):Void - - - - - - - - - 'asset' - LocalAssetServer.UploadNewAsset(AssetBase):Void - - - - - - - - - - - Plugin - OpenSim.GridInterfaces.Local.LocalGridPlugin - - - - - - - - - - - Logout - LogoutSession - LogOff - - - - - - - - - Sessions - - - - - System.Collections.Generic.List`1<OpenSim.Framework.Interfaces.Login> - LocalGridServer.Sessions - - - - - - - - - - - - - - - - - - - OpenSim.GridInterfaces.Remote - - - - - OpenSim.GridInterfaces.Remote - - - - - OpenSim.GridInterfaces.Remote - - - - - - - - - - - Plugin - OpenSim.GridInterfaces.Remote.RemoteAssetPlugin - - - - - - - - - Plugin - OpenSim.GridInterfaces.Remote.RemoteGridPlugin - - - - - - - - - - - agentcircuits - - - - - - - - - circuitcode - RemoteGridServer.AuthenticateSession(LLUUID, LLUUID, UInt32):AuthenticateResponse - circuitCode - IGridServer.AuthenticateSession(LLUUID, LLUUID, UInt32):AuthenticateResponse - - - - - - - - - RemoteGridServer.GridRecvKey - - - - - - - - - RemoteGridServer.GridSendKey - - - - - - - - - RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean - WebRequest.Create(Uri):WebRequest - WebRequest.Create(String):WebRequest - - - - - RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean - GridResponse - System.String - - - - - Logout - LogoutSession - LogOff - - - - - 'sessionID' - RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean - - - - - - - - - - - - - - - - - - - OpenSim.Physics.Manager - - - - - OpenSim.Physics.Manager - - - - - OpenSim.Physics.Manager - - - - - - - - - - - Plugin - OpenSim.Physics.Manager.IPhysicsPlugin - - - - - - - - - GetName - - - - - - - - - GetScene - - - - - - - - - - - - - 'heightMap' - NullPhysicsScene.SetTerrain(Single[]):Void - - - - - - - - - NullPhysicsScene.Simulate(Single):Void - System.Int32.ToString - System.Int32.ToString(System.IFormatProvider) - - - - - - - - - - - - - Kinematic - PhysicsActor.Kinematic:Boolean - - - - - - - - - - - - - PhysicsManager.GetPhysicsScene(String):PhysicsScene - System.String.Format(System.String,System.Object) - System.String.Format(System.IFormatProvider,System.String,System.Object[]) - - - - - - - - - Plugins - PhysicsManager.LoadPlugins():Void - - - - - - - - - - - - - PhysicsVector.PhysicsVector(Single, Single, Single) - x - - - - - PhysicsVector.PhysicsVector(Single, Single, Single) - y - - - - - PhysicsVector.PhysicsVector(Single, Single, Single) - z - - - - - - - - - X - - - - - X - PhysicsVector.X - - - - - - - - - Y - - - - - Y - PhysicsVector.Y - - - - - - - - - Z - - - - - Z - PhysicsVector.Z - - - - - - - - - PhysicsVector.Zero - OpenSim.Physics.Manager.PhysicsVector - - - - - - - - - - - - - - - - - - - OpenSim.RegionServer - - - - - OpenSim.RegionServer - - - - - OpenSim.RegionServer - - - - - OpenSim.RegionServer - - - - - OpenSim.RegionServer - - - - - - - - - - - - - ID - transactionID - Id - - - - - - - - - ID - transactionID - Id - - - - - - - - - ID - transactionID - Id - - - - - - - - - ID - assetID - Id - - - - - AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void - System.Int32.ToString(System.String) - System.Int32.ToString(System.String,System.IFormatProvider) - - - AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void - System.Int32.ToString(System.String) - System.Int32.ToString(System.String,System.IFormatProvider) - - - - - 'assetID' - AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void - - - 'pack' - AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void - - - - - - - - - AgentAssetUpload.HandleXferPacket(SendXferPacketPacket):Void - xfer - xferPacket - - - - - Xfer - AgentAssetUpload.HandleXferPacket(SendXferPacketPacket):Void - - - - - - - - - - - - - AssetTransaction.AssetTransaction() - UploadComplete - System.Boolean - false - - - - - - - - - AddToInventory - - - - - - - - - Asset - - - - - - - - - InventFolder - - - - - - - - - TransactionID - - - - - - - - - UploadComplete - - - - - - - - - XferID - - - - - Xfer - AssetTransaction.XferID - - - - - - - - - - - Grid - OpenSim.Framework.Grid - - - - - - - - - AssetDll - - - - - - - - - AssetServer - - - - - - - - - GridDll - - - - - - - - - GridServer - - - - - - - - - Initialise - Grid.Initialise():Void - - - - - - - - - Grid.LoadAssetDll(String):IAssetServer - - - - - - - - - Grid.LoadGridDll(String):IGridServer - - - - - - - - - - - Sim - OpenSim.OpenSimApplication - - - - - - - - - OpenSimApplication.RemoveClientCircuit(UInt32):Void - circuitcode - circuitcode - - - - - - - - - OpenSimApplication.SendPacketTo(Byte[], Int32, SocketFlags, UInt32):Void - circuitcode - circuitcode - - - - - - - - - StartUp - method - StartUp - Startup - - - - - - - - - - - Sim - OpenSim.OpenSimMain - - - - - OpenSim.OpenSimMain - System.Timers.Timer, System.Net.Sockets.Socket - - - - - - - - - OpenSimMain.OpenSimMain() - loginserver - System.Boolean - false - - - OpenSimMain.OpenSimMain() - sandbox - System.Boolean - false - - - - - - - - - _physicsEngine - - - - - _physicsEngine - - - - - - - - - OpenSimMain.LoadConfigDll(String):SimConfig - - - - - - - - - loginserver - - - - - loginserver - OpenSimMain.loginserver - - - - - - - - - sandbox - - - - - - - - - Server - - - - - - - - - Timer.set_Interval(Double):Void - OpenSimMain.StartUp():Void - - - - - OpenSimMain.StartUp():Void - System.UInt32.ToString - System.UInt32.ToString(System.IFormatProvider) - - - OpenSimMain.StartUp():Void - System.UInt32.ToString - System.UInt32.ToString(System.IFormatProvider) - - - - - - - - - - - Sim - OpenSim.OpenSimRoot - - - - - - - - - OpenSimRoot.OpenSimRoot() - Sandbox - System.Boolean - false - - - - - - - - - Application - - - - - - - - - AssetCache - - - - - - - - - Cfg - - - - - Cfg - OpenSimRoot.Cfg - - - - - - - - - ClientThreads - - - - - - - - - GridServers - - - - - - - - - HttpServer - - - - - - - - - InventoryCache - - - - - - - - - LocalWorld - - - - - - - - - Sandbox - - - - - - - - - StartUp - method - StartUp - Startup - - - - - - - - - startuptime - - - - - startuptime - OpenSimRoot.startuptime - - - - - - - - - - - Que - OpenSim.QueItem - - - - - - - - - Incoming - - - - - - - - - Packet - - - - - - - - - - - Sim - OpenSim.SimClient - - - - - OpenSim.SimClient - System.Timers.Timer - - - - - - - - - SimClient.SimClient(EndPoint, UseCircuitCodePacket) - Sequence - System.UInt32 - 0 - - - SimClient.SimClient(EndPoint, UseCircuitCodePacket) - debug - System.Boolean - false - - - - - Timer.Timer(Double) - SimClient.SimClient(EndPoint, UseCircuitCodePacket) - - - - - SimClient.SimClient(EndPoint, UseCircuitCodePacket) - initialcirpack - initialcirpack - - - - - - - - - AgentID - - - - - - - - - CircuitCode - - - - - - - - - ClientAvatar - - - - - - - - - NewPack - - - - - - - - - SimClient.newAssetFolder - - - - - - - - - NewPack - - - - - - - - - Pack - - - - - SimClient.ProcessInPacket(Packet):Void - wear - libsecondlife.Packets.AgentIsNowWearingPacket - - - - - op_Equality - "" - SimClient.ProcessInPacket(Packet):Void - - - - - - - - - SimClient.ProcessOutPacket(Packet):Void - System.Exception - - - - - Pack - - - - - - - - - SecureSessionID - - - - - - - - - SessionID - - - - - - - - - userEP - - - - - - - - - - - OpenSim.SimConsole - OpenSim.Framework.Console.ConsoleBase - - - - - Sim - OpenSim.SimConsole - - - - - - - - - SimConsole.SimConsole(ConsoleType, String, Int32) - constype - constype - - - - - SimConsole.SimConsole(ConsoleType, String, Int32) - sparam - sparam - - - - - SimConsole.SimConsole(ConsoleType, String, Int32) - iparam - iparam - - - - - iparam - SimConsole.SimConsole(ConsoleType, String, Int32) - - - - - sparam - SimConsole.SimConsole(ConsoleType, String, Int32) - - - - - - - - - op_Equality - "" - SimConsole.CmdPrompt(String, String):String - - - - - - - - - SimConsole.ConsType - - - - - - - - - SimConsole.MainConsolePrompt():Void - System.UInt64.ToString - System.UInt64.ToString(System.IFormatProvider) - - - - - - - - - 'cmdparams' - SimConsole.RunCmd(String, String[]):Object - - - - - - - - - SimConsole.ShowCommands(String):Void - System.String.Format(System.String,System.Object[]) - System.String.Format(System.IFormatProvider,System.String,System.Object[]) - - - SimConsole.ShowCommands(String):Void - System.String.Format(System.String,System.Object[]) - System.String.Format(System.IFormatProvider,System.String,System.Object[]) - - - - - - - - - - - - - Version - - - - - - - - - - - - - - - - - ID - imageID - Id - - - - - - - - - AssetRequests - - - - - System.Collections.Generic.List`1<OpenSim.Assets.AssetRequest> - AssetCache.AssetRequests - - - - - - - - - Assets - - - - - - - - - sourceAsset - AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo - OpenSim.Assets.AssetInfo - OpenSim.Framework.Assets.AssetBase - - - - - AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo - - - - - newOwner - AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo - - - - - 'sourceAsset' - AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo - - - - - - - - - source - AssetCache.CloneImage(LLUUID, TextureImage):TextureImage - OpenSim.Assets.TextureImage - OpenSim.Framework.Assets.AssetBase - - - - - AssetCache.CloneImage(LLUUID, TextureImage):TextureImage - - - - - newOwner - AssetCache.CloneImage(LLUUID, TextureImage):TextureImage - - - - - 'source' - AssetCache.CloneImage(LLUUID, TextureImage):TextureImage - - - - - - - - - ID - agentID - Id - - - - - - - - - ID - assetID - Id - - - - - - - - - RequestedAssets - - - - - - - - - RequestedTextures - - - - - - - - - AssetCache.RunAssetManager():Void - System.Exception - - - - - - - - - TextureRequests - - - - - System.Collections.Generic.List`1<OpenSim.Assets.AssetRequest> - AssetCache.TextureRequests - - - - - - - - - Textures - - - - - - - - - - - OpenSim.Assets.AssetInfo - OpenSim.Framework.Assets.AssetBase - - - - - - - - - AssetInfo.AssetInfo(AssetBase) - a - aBase - - - - - 'aBase' - AssetInfo.AssetInfo(AssetBase) - - - - - - - - - - - - - AssetRequest.AssetRequest() - DataPointer - System.Int64 - 0 - - - AssetRequest.AssetRequest() - NumPackets - System.Int32 - 0 - - - AssetRequest.AssetRequest() - PacketCounter - System.Int32 - 0 - - - - - - - - - AssetInf - - - - - - - - - DataPointer - - - - - - - - - ImageInfo - - - - - - - - - IsTextureRequest - - - - - - - - - NumPackets - - - - - Num - AssetRequest.NumPackets - - - - - - - - - PacketCounter - - - - - - - - - RequestAssetID - - - - - - - - - RequestUser - - - - - - - - - TransferRequestID - - - - - - - - - - - - - ID - folderID - Id - - - - - - - - - ID - clientID - Id - - - - - - - - - ID - folderID - Id - - - - - - - - - ID - folderID - Id - - - - - - - - - FetchItems - - - - - - - - - FetchDescend - - - - - - - - - ID - agentID - Id - - - - - - - - - ID - itemID - Id - - - - - - - - - - - OpenSim.Assets.TextureImage - OpenSim.Framework.Assets.AssetBase - - - - - - - - - TextureImage.TextureImage(AssetBase) - a - aBase - - - - - 'aBase' - TextureImage.TextureImage(AssetBase) - - - - - - - - - - - - - - - Sim - OpenSim.CAPS.SimCAPSHTTPServer - - - - - SimCAPSHTTPServer - - - - - OpenSim.CAPS.SimCAPSHTTPServer - System.Net.HttpListener - - - - - - - - - SimCAPSHTTPServer.HandleRequest(Object):Void - stateinfo - stateinfo - - - - - - - - - HTTPD - - - - - - - - - Listener - - - - - - - - - SimCAPSHTTPServer.LoadAdminPage():Void - System.Exception - - - - - - - - - SimCAPSHTTPServer.ParseLLSDXML(String):String - - - - - requestBody - SimCAPSHTTPServer.ParseLLSDXML(String):String - - - - - - - - - SimCAPSHTTPServer.ParseREST(String, String, String):String - System.Exception - - - - - SimCAPSHTTPServer.ParseREST(String, String, String):String - System.String.Format(System.String,System.Object[]) - System.String.Format(System.IFormatProvider,System.String,System.Object[]) - - - - - - - - - SimCAPSHTTPServer.ParseXMLRPC(String):String - System.Exception - - - - - SimCAPSHTTPServer.ParseXMLRPC(String):String - - - - - SimCAPSHTTPServer.ParseXMLRPC(String):String - System.Convert.ToUInt32(System.Object) - System.Convert.ToUInt32(System.Object,System.IFormatProvider) - - - - - - - - - SimCAPSHTTPServer.StartHTTP():Void - System.Exception - - - - - SimCAPSHTTPServer.StartHTTP():Void - - - - - - - - - - - - - - - - - mesh - - - - - System.Collections.Generic.List`1<OpenSim.types.Triangle> - Mesh.mesh - - - - - - - - - Mesh.op_Addition(Mesh, Mesh):Mesh - a - - - - - Mesh.op_Addition(Mesh, Mesh):Mesh - b - - - - - Add - Mesh.op_Addition(Mesh, Mesh):Mesh - - - - - Mesh - Mesh.op_Addition(Mesh, Mesh):Mesh - - - - - - - - - - - - - A - - - - - B - - - - - C - - - - - Triangle.Triangle(Vector3, Vector3, Vector3) - A - - - - - Triangle.Triangle(Vector3, Vector3, Vector3) - B - - - - - Triangle.Triangle(Vector3, Vector3, Vector3) - C - - - - - - - - - - - - - - - - - LocalUserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Int32.ToString - System.Int32.ToString(System.IFormatProvider) - - - LocalUserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Int32.ToString - System.Int32.ToString(System.IFormatProvider) - - - - - LocalUserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - LocalUserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - LocalUserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - LocalUserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - LocalUserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - LocalUserProfileManager.CustomiseResponse(Hashtable&, UserProfile):Void - System.Single.ToString - System.Single.ToString(System.IFormatProvider) - - - - - - - - - - - OpenSim.UserServer.LoginServer - OpenSim.Framework.Grid.LoginService - - - - - OpenSim.UserServer.LoginServer - System.Net.Sockets.Socket - - - - - Login - LoginServer - LogOn - - - - - - - - - LoginServer.LoginServer(IGridServer) - _needPasswd - System.Boolean - false - - - LoginServer.LoginServer(IGridServer) - userAccounts - System.Boolean - false - - - - - - - - - LoginServer.Authenticate(String, String, String):Boolean - passwd - passwd - - - - - - - - - clientAddress - - - - - - - - - Customise - LoginServer.CustomiseLoginResponse(Hashtable, String, String):Void - - - - - Login - CustomiseLoginResponse - LogOn - - - - - - - - - LoginServer.EncodePassword(String):String - System.String.ToLower - System.String.ToLower(System.Globalization.CultureInfo) - - - - - - - - - LoginServer.GetAgentId(String, String):LLUUID - System.Int32.ToString(System.String) - System.Int32.ToString(System.String,System.IFormatProvider) - - - - - - - - - LoginServer.InitializeLogin():Void - 4 - UserProfileManager.SetKeys(String, String, String, String):Void - Welcome to OpenSim - - - - - Sim - OpenSim - - - - - - - - - LoginServer.LoginRequest(StreamReader, StreamWriter):Void - System.Exception - - - - - LoginServer.LoginRequest(StreamReader, StreamWriter):Void - System.Convert.ToInt32(System.String) - System.Convert.ToInt32(System.String,System.IFormatProvider) - - - - - op_Inequality - "" - LoginServer.LoginRequest(StreamReader, StreamWriter):Void - - - - - - - - - writer - LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean - System.IO.StreamWriter - System.IO.TextWriter - - - - - LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean - System.Int32.ToString - System.Int32.ToString(System.IFormatProvider) - - - - - LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean - System.Int32.ToString(System.String) - System.Int32.ToString(System.String,System.IFormatProvider) - - - - - 'request' - LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean - - - 'writer' - LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean - - - 'writer' - LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean - - - - - - - - - remoteAddress - - - - - - - - - LoginServer.RunLogin():Void - System.Exception - - - LoginServer.RunLogin():Void - System.Exception - - - - - LoginServer.RunLogin():Void - clientEndPoint - System.Net.IPEndPoint - - - - - - - - - - - - - - - - - Avatar.Avatar() - PhysicsEngineFlying - System.Boolean - false - - - - - - - - - Avatar.Avatar(SimClient) - _updateCount - System.Int16 - 0 - - - Avatar.Avatar(SimClient) - avatarAppearanceTexture - libsecondlife.LLObject+TextureEntry - null - - - Avatar.Avatar(SimClient) - movementflag - System.Byte - 0 - - - Avatar.Avatar(SimClient) - updateflag - System.Boolean - false - - - - - TheClient - - - - - - - - - anim_seq - - - - - anim - Avatar.anim_seq - - - - - anim_seq - - - - - - - - - Animations - - - - - - - - - RegionInfo - - - - - RegionInfo - Avatar.CompleteMovement(World):Void - - - - - - - - - ControllingClient - - - - - - - - - current_anim - - - - - anim - Avatar.current_anim - - - - - current_anim - - - - - - - - - firstname - - - - - firstname - Avatar.firstname - - - - - - - - - lastname - - - - - lastname - Avatar.lastname - - - - - - - - - Anims - Avatar.LoadAnims():Void - - - - - - - - - PhysActor - - - - - - - - - PhysicsEngineFlying - - - - - - - - - Anim - Avatar.SendAnimPack():Void - - - - - - - - - 'userInfo' - Avatar.SendAppearanceToOtherAgent(SimClient):Void - - - - - - - - - RegionInfo - - - - - RegionInfo - Avatar.SendRegionHandshake(World):Void - - - - - - - - - - - - - AnimsLLUUID - - - - - Anims - AvatarAnimations.AnimsLLUUID - - - - - - - - - AnimsNames - - - - - Anims - AvatarAnimations.AnimsNames - - - - - - - - - Anims - AvatarAnimations.LoadAnims():Void - - - - - - - - - - - - - Entity.Entity() - localid - System.UInt32 - 0 - - - - - - - - - addForces - - - - - - - - - BackUp - method - BackUp - Backup - - - - - - - - - children - - - - - System.Collections.Generic.List`1<OpenSim.world.Entity> - Entity.children - - - - - - - - - getMesh - - - - - - - - - getName - - - - - - - - - localid - - - - - localid - Entity.localid - - - - - - - - - name - - - - - - - - - position - - - - - - - - - rotation - - - - - - - - - update - - - - - - - - - uuid - - - - - uuid - Entity.uuid - - - - - - - - - velocity - - - - - - - - - - - - - X - - - - - X - NewForce.X - - - - - - - - - Y - - - - - Y - NewForce.Y - - - - - - - - - Z - - - - - Z - NewForce.Z - - - - - - - - - - - 'UpdateFlag' - updateFlag - - - - - - - - - Primitive.Primitive() - dirtyFlag - System.Boolean - false - - - Primitive.Primitive() - mesh_cutbegin - System.Single - 0.0 - - - Primitive.Primitive() - newPrimFlag - System.Boolean - false - - - Primitive.Primitive() - physicsEnabled - System.Boolean - false - - - Primitive.Primitive() - physicstest - System.Boolean - false - - - Primitive.Primitive() - updateFlag - System.Boolean - false - - - - - - - - - localID-702000 - Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void - - - - - ID - agentID - Id - - - - - ID - localID - Id - - - - - Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void - System.UInt32.ToString(System.String) - System.UInt32.ToString(System.String,System.IFormatProvider) - - - - - 'addPacket' - Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void - - - - - - - - - 'store' - Primitive.CreateFromStorage(PrimData):Void - - - - - - - - - dirtyFlag - - - - - - - - - mesh_cutbegin - - - - - cutbegin - Primitive.mesh_cutbegin - - - - - mesh_cutbegin - - - - - - - - - mesh_cutend - - - - - cutend - Primitive.mesh_cutend - - - - - mesh_cutend - - - - - - - - - newPrimFlag - - - - - - - - - PhysActor - - - - - - - - - primData - - - - - - - - - RemoteClient - - - - - 'RemoteClient' - Primitive.UpdateClient(SimClient):Void - - - - - - - - - updateFlag - - - - - - - - - 'pack' - Primitive.UpdateObjectFlags(ObjectFlagUpdatePacket):Void - - - - - - - - - 'addPacket' - Primitive.UpdateShape(ObjectDataBlock):Void - - - - - - - - - - - - - ScriptEngine.ScriptEngine(World) - env - env - - - - - env - ScriptEngine.ScriptEngine(World) - - - - - - - - - ScriptEngine.LoadScript():Void - - - - - - - - - - - - - HeightMap - - - - - - - - - - - World - OpenSim.world - - - - - - - - - World.World() - _localNumber - System.UInt32 - 0 - - - - - - - - - _localNumber - - - - - _localNumber - - - - - - - - - AgentClient - - - - - - - - - AgentClient - - - - - - - - - DeRezPacket - - - - - AgentClient - - - - - World.DeRezObject(DeRezObjectPacket, SimClient):Void - Rez - DeRezPacket - - - - - Rez - World.DeRezObject(DeRezObjectPacket, SimClient):Void - - - - - AgentClient - World.DeRezObject(DeRezObjectPacket, SimClient):Void - - - - - De - World.DeRezObject(DeRezObjectPacket, SimClient):Void - - - - - - - - - Entities - - - - - - - - - RemoteClient - - - - - Prims - World.GetInitialPrims(SimClient):Void - - - - - - - - - LandMap - - - - - - - - - Prims - World.LoadPrimsFromStorage():Void - - - - - - - - - World.LoadStorageDLL(String):Boolean - - - - - - - - - localStorage - - - - - - - - - World.Rand - - - - - - - - - Scripts - - - - - - - - - RemoteClient - - - - - 'RemoteClient' - World.SendLayerData(SimClient):Void - - - 'RemoteClient' - World.SendLayerData(SimClient):Void - - - 'RemoteClient' - World.SendLayerData(SimClient):Void - - - - - - - - - - - - - - - - - IScriptHost.Register(IScript):Boolean - iscript - iscript - - - - - - - - - - - - - - - - - - - OpenSim.Storage.LocalStorageDb4o - - - - - OpenSim.Storage.LocalStorageDb4o - - - - - OpenSim.Storage.LocalStorageDb4o - - - - - - - - - - - - - Db4LocalStorage.Db4LocalStorage() - System.Exception - - - - - - - - - 'receiver' - Db4LocalStorage.LoadPrimitives(ILocalStorageReceiver):Void - - - - - - - - - 'prim' - Db4LocalStorage.StorePrim(PrimData):Void - - - - - - - - - - - UUIDQuery - - - - - - - - - 'prim' - UUIDQuery.Match(PrimData):Boolean - - - - - - - - - - - - - - - - - - - OpenSim.Physics.BasicPhysicsPlugin - - - - - - - - - - OpenSim.Physics.BasicPhysicsPlugin - - - - - - - - - - OpenSim.Physics.BasicPhysicsPlugin - - - - - - - - - - - - - - - - - - BasicActor.flying - - - - - - - - - BasicActor.SetAcceleration(PhysicsVector):Void - accel - accel - - - - - - - - - - - Plugin - OpenSim.Physics.BasicPhysicsPlugin.BasicPhysicsPlugin - - - - - BasicPhysicsPlugin - OpenSim.Physics.BasicPhysicsPlugin - - - - - - - - - - - - - - - - - OpenSim.Physics.OdePlugin - - - - - OpenSim.Physics.OdePlugin - - - - - OpenSim.Physics.OdePlugin - - - - - - - - - - - OdeCharacter - - - - - - - - - parent_scene - OdeCharacter.OdeCharacter(OdeScene, PhysicsVector) - - - - - 'pos' - OdeCharacter.OdeCharacter(OdeScene, PhysicsVector) - - - - - - - - - OdeCharacter.capsule_geom - - - - - - - - - OdeCharacter.gravityAccel - - - - - - - - - OdeCharacter.SetAcceleration(PhysicsVector):Void - accel - accel - - - - - - - - - - - Plugin - OpenSim.Physics.OdePlugin.OdePlugin - - - - - OdePlugin - OpenSim.Physics.OdePlugin - - - - - - - - - - - OdePrim._position - - - - - - - - - OdePrim.SetAcceleration(PhysicsVector):Void - accel - accel - - - - - - - - - - - - - 'position' - OdeScene.AddPrim(PhysicsVector, PhysicsVector):PhysicsActor - - - 'size' - OdeScene.AddPrim(PhysicsVector, PhysicsVector):PhysicsActor - - - - - - - - - OdeScene.Land - - - - - - - - - OdeScene.LandGeom - - - - - - - - - 'heightMap' - OdeScene.SetTerrain(Single[]):Void - - - 'heightMap' - OdeScene.SetTerrain(Single[]):Void - - - - - - - - - space - - - - - space - - - - - - - - - world - - - - - world - - - - - - - - - - - - - - - - - - - OpenSim.Physics.PhysXPlugin - - - - - OpenSim.Physics.PhysXPlugin - - - - - OpenSim.Physics.PhysXPlugin - - - - - - - - - - - - - PhysXCharacter.SetAcceleration(PhysicsVector):Void - accel - accel - - - - - - - - - - - Plugin - OpenSim.Physics.PhysXPlugin.PhysXPlugin - - - - - PhysXPlugin - OpenSim.Physics.PhysXPlugin - - - - - - - - - - - PhysXPrim._position - - - - - - - - - PhysXPrim.SetAcceleration(PhysicsVector):Void - accel - accel - - - - - - - - - - - - - - - - Save it for a rainy day. - Save it for a rainy day. - Save it for a rainy day. - - - - - No valid permission requests were found for assembly '{0}'. You should always specify the minimum security permissions using SecurityAction.RequestMinimum. - - - Sign '{0}' with a strong name key. - - - Consider merging the types defined in '{0}' with another namespace. - - - It appears that field '{0}' is never used or is only ever assigned to. Use this field or remove it. - - - Change '{0}' to be read-only by removing the property setter. - - - The compound word '{0}' in {1} '{2}' exists as a discrete term. If your usage is intended to be single word, case it as '{3}'. - - - '{0}' is marked ComVisible(true) but has the following ComVisible(false) types in its object hierarchy: {1} - - - Consider changing the type of parameter '{0}' in {1} from {2} to its base type {3}. This method appears to only require base class members in its implementation. Suppress this violation if there is a compelling reason to require the more derived type in the method signature. - - - '{0}' contains a call chain that results in a call to a virtual method defined by the class. Review the following call stack for unintended consequences: {1} - - - Modify '{0}' to catch a more specific exception than '{1}' or rethrow the exception. - - - Remove the readonly declaration from '{0}' or change the field to one that is an immutable reference type. If the reference type '{1}' is, in fact, immutable, exclude this message. - - - Make '{0}' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. - - - Change '{0}' in {1} to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> - - - {0} initializes field {1} of type {2} to {3}. Remove this initialization as it will be done automatically by the runtime. - - - {0} passes a literal as parameter {1} of a call to {2}. Retrieve the following string argument from a resource table instead: '{3}' - - - Consider a design that does not require that '{0}' be a reference parameter. - - - {0} creates an exception of type '{1}', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. - - - Modify the call to {0} in method {1} to set the timer interval to a value that's greater than or equal to one second. - - - Correct the casing of member name '{0}'. - Correct the casing of namespace name '{0}'. - Correct the casing of parameter name '{0}'. - Correct the casing of type name '{0}'. - - - Correct the spelling of the unrecognized token '{0}' in member name '{1}'. - Consider providing a more meaningful name than the one-letter token '{0}' in member name '{1}'. - Correct the spelling of the unrecognized token '{0}' in namespace '{1}'. - In method {0}, correct the spelling of the unrecognized token '{1}' in parameter name '{2}' or strip it entirely if it represents any sort of hungarian notation. - In method {0}, consider providing a more meaningful name than the one-letter parameter name '{1}'. - Correct the spelling of the unrecognized token '{0}' in type name '{1}'. - - - Change member names {0} and '{1}' so that they differ by more than case. - - - Remove all underscores from member '{0}'. - Remove all underscores from parameter '{0}'. - Remove all underscores from type '{0}'. - - - Rename '{0}' so that it does not end in '{1}'. - - - Correct the spelling of the unrecognized token '{0}' in the literal '{1}'. - - - Correct the capitalization of member name '{0}'. - Correct the capitalization of namespace name '{0}'. - Correct the capitalization of parameter name '{0}'. - Correct the capitalization of type name '{0}'. - - - Add an AssemblyVersion attribute to '{0}'. - - - '{0}' should be marked with CLSCompliantAttribute and its value should be true. - - - Mark '{0}' as ComVisible(false) at the assembly level, then mark all types within the assembly that should be exposed to Com clients as ComVisible(true). - - - The 'this' parameter (or 'Me' in VB) of {0} is never used. Mark the member as static (or Shared in VB) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. - - - Consider making '{0}' non-public or a constant. - - - Correct the potential overflow in the operation '{0}' in '{1}'. - - - Provide a method named '{0}' as a friendly alternate for operator {1}. - - - Consider adding an overload of the equality operator for '{0}' that takes the same parameters as {1}. - - - '{0}' should override Equals. - '{0}' should override the equality (==) and inequality (!=) operators. - - - Change parameter name '{0}' of method {1} to '{2}' in order to match the identifier as it has been declared in {3}. - - - Modify {0} to call {1} instead of {2}. - - - Make '{0}' private. - - - Add a property getter to '{0}'. - - - {0} declares a local, '{1}', of type {2}, which is never used or is only assigned to. Use this local or remove it. - - - Parameter '{0}' of {1} is never used. Remove the parameter or use it in the method body. - - - Correct the capitalization of '{0}' in member name '{1}'. - 'Id' is an abbreviation and therefore is not subject to acronym casing guidelines. Correct the capitalization of 'ID' in member name '{0}' by changing it to 'Id'. - 'Id' is an abbreviation and therefore is not subject to acronym casing guidelines. Correct the capitalization of '{0}' in parameter name '{1}' by changing it to '{2}'. - Correct the capitalization of '{0}' in type name '{1}'. - - - {0} makes a call to {1} that does not explicitly provide a CultureInfo. This should be replaced with a call to {2}. - - - {0} makes a call to {1} that does not explicitly provide an IFormatProvider. This should be replaced with a call to {2}. - - - Remove the public constructors from '{0}'. - - - Replace the call to String.{0}({1}) in '{2}' with a call to String.IsNullOrEmpty. - - - The type name '{0}' conflicts in whole or in part with the namespace name '{1}'. Change either name to eliminate the conflict. - - - Implement IDisposable on '{0}' as it instantiates members of the following IDisposable types: {1} - - - Implement IDisposable on '{0}'. - - - Change the type of parameter '{0}' of method {1} from string to System.Uri, or provide an overload of {1}, that allows '{0}' to be passed as a System.Uri object. - - - Replace the term '{0}' in member name '{1}' with the preferred alternate '{2}'. - Replace the term '{0}' in type name '{1}' with the preferred alternate '{2}'. - - - Change '{0}' to a property if appropriate. - - - Validate parameter {0} passed to externally visible method {1}. - - - - From 4a7b8c1b41972a8ea40f08b57d3111d59505748b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 12 Nov 2016 03:31:34 +0000 Subject: [PATCH 20/29] ubOde fix a multhreading timming issue --- OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs index 3403f4baac..60b24ec891 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs @@ -1157,6 +1157,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde m_building = true; // control must set this to false when done + AddChange(changes.Add, null); + // get basic mass parameters ODEPhysRepData repData = _parent_scene.m_meshWorker.NewActorPhysRep(this, _pbs, _size, m_shapetype); @@ -1165,8 +1167,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde m_OBBOffset = repData.OBBOffset; UpdatePrimBodyData(); - - AddChange(changes.Add, null); } private void resetCollisionAccounting() From b6329fb784669e60f0eacb9610fd70e7f551453c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 12 Nov 2016 14:07:40 +0000 Subject: [PATCH 21/29] mantis 8055: fix default value of npc options --- bin/OpenSim.ini.example | 16 ++++++++-------- bin/OpenSimDefaults.ini | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index f6466b566d..5103e7184d 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -1132,21 +1132,21 @@ ;; several options to control NPCs creation - ;# {AllowNotOwned} {} {allow NPCs to be created not Owned} {true false} false + ;# {AllowNotOwned} {} {allow NPCs to be created not Owned} {true false} true ;; allow NPCs to be created not Owned {true false} default: true - ; AllowNotOwned = false + ; AllowNotOwned = true - ;# {AllowSenseAsAvatar} {} {allow NPCs to set to be sensed as Avatars} {true false} false + ;# {AllowSenseAsAvatar} {} {allow NPCs to set to be sensed as Avatars} {true false} true ;; allow NPCs to set to be sensed as Avatars {true false} default: true - ; AllowSenseAsAvatar = false + ; AllowSenseAsAvatar = true - ;# {AllowCloneOtherAvatars} {} {allow NPCs to created cloning any avatar in region} {true false} false + ;# {AllowCloneOtherAvatars} {} {allow NPCs to created cloning any avatar in region} {true false} true ;; allow NPCs to created cloning any avatar in region {true false} default: true - ; AllowCloneOtherAvatars = false + ; AllowCloneOtherAvatars = true - ;# {NoNPCGroup} {} {if true NPCs will have no group title, if false display "- NPC -"} {true false} false + ;# {NoNPCGroup} {} {if true NPCs will have no group title, if false display "- NPC -"} {true false} true ;; if true NPCs will have no group title, if false display "- NPC -" for easy identification {true false} default: true - ; NoNPCGroup = false + ; NoNPCGroup = true [Terrain] diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 906c7bc143..35530027ea 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -2126,16 +2126,16 @@ ;; several options to control NPCs creation ;; allow NPCs to be created not Owned {true false} default: true - ; AllowNotOwned = false + ; AllowNotOwned = true ;; allow NPCs to set to be sensed as Avatars {true false} default: true - ; AllowSenseAsAvatar = false + ; AllowSenseAsAvatar = true ;; allow NPCs to created cloning any avatar in region {true false} default: true - ; AllowCloneOtherAvatars = false + ; AllowCloneOtherAvatars = true ;; if true NPCs will have no group title, if false display "- NPC -" for easy identification {true false} default: true - ; NoNPCGroup = false + ; NoNPCGroup = true [Terrain] ; Values can be "pinhead-island" or "flat" From e13ff5a39233fd871e69f9ace23b4559cdfdcb7f Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 13 Nov 2016 11:19:54 -0800 Subject: [PATCH 22/29] BulletSim: update avatar velocity setting to the new TargetVelocity pattern. Now PhysicsActor.Velocity.set and PhysicsActor.SetMomentum do the same thing of setting the instantanious avatar velocity. PhysicsActor.TargetVelocity sets a velocity target and the movement motor is used to accelerate the' avatar to that velocity. --- .../BulletS/BSActorAvatarMove.cs | 8 +--- .../PhysicsModules/BulletS/BSCharacter.cs | 47 ++++++++----------- .../PhysicsModules/BulletS/BSPhysObject.cs | 34 ++++++++++---- .../Region/PhysicsModules/BulletS/BSPrim.cs | 11 ----- 4 files changed, 48 insertions(+), 52 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs index 79ee00f4ca..40c6b983b0 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs @@ -108,10 +108,6 @@ public class BSActorAvatarMove : BSActor { if (m_velocityMotor != null) { -// if (targ == OMV.Vector3.Zero) -// Util.PrintCallStack(); -// -// Console.WriteLine("SetVelocityAndTarget, {0} {1}", vel, targ); m_velocityMotor.Reset(); m_velocityMotor.SetTarget(targ); m_velocityMotor.SetCurrent(vel); @@ -128,7 +124,7 @@ public class BSActorAvatarMove : BSActor m_waitingForLowVelocityForStationary = true; } - // If a movement motor has not been created, create one and start the hovering. + // If a movement motor has not been created, create one and start the movement private void ActivateAvatarMove() { if (m_velocityMotor == null) @@ -161,7 +157,7 @@ public class BSActorAvatarMove : BSActor } } - // Called just before the simulation step. Update the vertical position for hoverness. + // Called just before the simulation step. private void Mover(float timeStep) { // Don't do movement while the object is selected. diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs index 757f06ccd3..6322695e17 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs @@ -449,6 +449,7 @@ public sealed class BSCharacter : BSPhysObject public override OMV.Vector3 GeometricCenter { get { return OMV.Vector3.Zero; } } public override OMV.Vector3 CenterOfMass { get { return OMV.Vector3.Zero; } } + // PhysicsActor.TargetVelocity // Sets the target in the motor. This starts the changing of the avatar's velocity. public override OMV.Vector3 TargetVelocity { @@ -459,7 +460,7 @@ public sealed class BSCharacter : BSPhysObject set { DetailLog("{0},BSCharacter.setTargetVelocity,call,vel={1}", LocalID, value); - m_targetVelocity = value; + base.m_targetVelocity = value; OMV.Vector3 targetVel = value; if (_setAlwaysRun && !_flying) targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 1f); @@ -472,32 +473,12 @@ public sealed class BSCharacter : BSPhysObject public override OMV.Vector3 Velocity { get { return RawVelocity; } set { - RawVelocity = value; - OMV.Vector3 vel = RawVelocity; - - DetailLog("{0}: set Velocity = {1}", LocalID, value); - - PhysScene.TaintedObject(LocalID, "BSCharacter.setVelocity", delegate() + if (m_moveActor != null) { - if (m_moveActor != null) - m_moveActor.SetVelocityAndTarget(vel, vel, true /* inTaintTime */); - - DetailLog("{0},BSCharacter.setVelocity,taint,vel={1}", LocalID, vel); - ForceVelocity = vel; - }); - } - } - - public override OMV.Vector3 ForceVelocity { - get { return RawVelocity; } - set { - PhysScene.AssertInTaintTime("BSCharacter.ForceVelocity"); -// Util.PrintCallStack(); - DetailLog("{0}: set ForceVelocity = {1}", LocalID, value); - - RawVelocity = value; - PhysScene.PE.SetLinearVelocity(PhysBody, RawVelocity); - PhysScene.PE.Activate(PhysBody, true); + // m_moveActor.SetVelocityAndTarget(OMV.Vector3.Zero, OMV.Vector3.Zero, false /* inTaintTime */); + m_moveActor.SetVelocityAndTarget(RawVelocity, RawVelocity, false /* inTaintTime */); + } + base.Velocity = value; } } @@ -506,11 +487,23 @@ public sealed class BSCharacter : BSPhysObject { if (m_moveActor != null) { - m_moveActor.SetVelocityAndTarget(OMV.Vector3.Zero, OMV.Vector3.Zero, false /* inTaintTime */); + // m_moveActor.SetVelocityAndTarget(OMV.Vector3.Zero, OMV.Vector3.Zero, false /* inTaintTime */); + m_moveActor.SetVelocityAndTarget(RawVelocity, RawVelocity, false /* inTaintTime */); } base.SetMomentum(momentum); } + public override OMV.Vector3 ForceVelocity { + get { return RawVelocity; } + set { + PhysScene.AssertInTaintTime("BSCharacter.ForceVelocity"); + DetailLog("{0}: BSCharacter.ForceVelocity.set = {1}", LocalID, value); + + RawVelocity = Util.ClampV(value, BSParam.MaxLinearVelocity); + PhysScene.PE.SetLinearVelocity(PhysBody, RawVelocity); + PhysScene.PE.Activate(PhysBody, true); + } + } public override OMV.Vector3 Torque { get { return RawTorque; } diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs index 3682455154..a846869983 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs @@ -230,15 +230,22 @@ public abstract class BSPhysObject : PhysicsActor // Update the physical location and motion of the object. Called with data from Bullet. public abstract void UpdateProperties(EntityProperties entprop); + // The position value as known by BulletSim. Does not effect the physics engine. public virtual OMV.Vector3 RawPosition { get; set; } + // Set position in BulletSim and the physics engined to a value immediately. Must be called at taint time. public abstract OMV.Vector3 ForcePosition { get; set; } + // The orientation value as known by BulletSim. Does not effect the physics engine. public virtual OMV.Quaternion RawOrientation { get; set; } + // Set orientation in BulletSim and the physics engine to a value immediately. Must be called at taint time. public abstract OMV.Quaternion ForceOrientation { get; set; } + // The velocity value as known by BulletSim. Does not effect the physics engine. public virtual OMV.Vector3 RawVelocity { get; set; } + // Set velocity in BulletSim and the physics engined to a value immediately. Must be called at taint time. public abstract OMV.Vector3 ForceVelocity { get; set; } + // The rotational velocity value as known by BulletSim. Does not effect the physics engine. public OMV.Vector3 RawRotationalVelocity { get; set; } // RawForce is a constant force applied to object (see Force { set; } ) @@ -252,17 +259,28 @@ public abstract class BSPhysObject : PhysicsActor public abstract void AddAngularForce(bool inTaintTime, OMV.Vector3 force); public abstract void AddForce(bool inTaintTime, OMV.Vector3 force); + // PhysicsActor.Velocity + public override OMV.Vector3 Velocity + { + get { return RawVelocity; } + set + { + // This sets the velocity now. BSCharacter will override to clear target velocity + // before calling this. + RawVelocity = value; + PhysScene.TaintedObject(LocalID, TypeName + ".SetVelocity", delegate () { + // DetailLog("{0},BSPhysObject.Velocity.set,vel={1}", LocalID, RawVelocity); + ForceVelocity = RawVelocity; + }); + } + } + // PhysicsActor.SetMomentum - // All the physics engined use this as a way of forcing the velocity to something. + // All the physics engines use this as a way of forcing the velocity to something. + // BSCharacter overrides this so it can set the target velocity to zero before calling this. public override void SetMomentum(OMV.Vector3 momentum) { - // This doesn't just set Velocity=momentum because velocity is ramped up to (see MoveActor) - RawVelocity = momentum; - PhysScene.TaintedObject(LocalID, TypeName + ".SetMomentum", delegate() - { - // DetailLog("{0},BSPrim.SetMomentum,taint,vel={1}", LocalID, RawVelocity); - ForceVelocity = RawVelocity; - }); + this.Velocity = momentum; } public override OMV.Vector3 RotationalVelocity { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs index 78a617d731..db2b9db987 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs @@ -787,17 +787,6 @@ public class BSPrim : BSPhysObject } } } - public override OMV.Vector3 Velocity { - get { return RawVelocity; } - set { - RawVelocity = value; - PhysScene.TaintedObject(LocalID, "BSPrim.setVelocity", delegate() - { - // DetailLog("{0},BSPrim.SetVelocity,taint,vel={1}", LocalID, RawVelocity); - ForceVelocity = RawVelocity; - }); - } - } public override OMV.Vector3 ForceVelocity { get { return RawVelocity; } set { From 4ebb4e371f44e8e8e9612d8e5eaab274263a2f89 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 13 Nov 2016 19:25:32 +0000 Subject: [PATCH 23/29] prevent self call to llSetScriptState(ownname,FALSE) from blocking entire engine --- .../ScriptEngine/Interfaces/IScriptEngine.cs | 2 +- .../Shared/Api/Implementation/LSL_Api.cs | 2 +- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 14 +++++++++++--- OpenSim/Tests/Common/Mock/MockScriptEngine.cs | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs index 6355669e16..361a0b9629 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs @@ -68,7 +68,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces void SetMinEventDelay(UUID itemID, double delay); int GetStartParameter(UUID itemID); - void SetScriptState(UUID itemID, bool state); + void SetScriptState(UUID itemID, bool state, bool self); bool GetScriptState(UUID itemID); void SetState(UUID itemID, string newState); void ApiResetScript(UUID itemID); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bafee28fb3..af0495119f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -521,7 +521,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if ((item = GetScriptByName(name)) != UUID.Zero) { - m_ScriptEngine.SetScriptState(item, run == 0 ? false : true); + m_ScriptEngine.SetScriptState(item, run == 0 ? false : true, item == m_item.ItemID); } else { diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index e12f8509bc..7822df9c80 100755 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1854,15 +1854,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine return instance; } - public void SetScriptState(UUID itemID, bool running) + public void SetScriptState(UUID itemID, bool running, bool self) { IScriptInstance instance = GetInstance(itemID); if (instance != null) { if (running) - instance.Start(); + instance.Start(); else - instance.Stop(100); + { + if(self) + { + instance.Running = false; + throw new EventAbortException(); + } + else + instance.Stop(100); + } } } diff --git a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs index d7a144c886..b6f5760d9b 100644 --- a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs +++ b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs @@ -221,7 +221,7 @@ namespace OpenSim.Tests.Common throw new System.NotImplementedException (); } - public void SetScriptState(UUID itemID, bool state) + public void SetScriptState(UUID itemID, bool state, bool self) { throw new System.NotImplementedException (); } From ae17b5d203677ff99cf0c3ee9d9ec9309600b568 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 14 Nov 2016 03:21:07 +0000 Subject: [PATCH 24/29] reduce calls to physics world cast rays for camera collision check --- OpenSim/Framework/AgentUpdateArgs.cs | 1 + .../ClientStack/Linden/UDP/LLClientView.cs | 8 +- .../Region/Framework/Scenes/ScenePresence.cs | 97 +++++++++---------- 3 files changed, 55 insertions(+), 51 deletions(-) diff --git a/OpenSim/Framework/AgentUpdateArgs.cs b/OpenSim/Framework/AgentUpdateArgs.cs index 660bc327de..eaa7902d8d 100644 --- a/OpenSim/Framework/AgentUpdateArgs.cs +++ b/OpenSim/Framework/AgentUpdateArgs.cs @@ -81,6 +81,7 @@ namespace OpenSim.Framework public Vector3 ClientAgentPosition; public bool UseClientAgentPosition; + public bool NeedsCameraCollision; public AgentUpdateArgs() { diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 99c9049e01..46c6a19e9d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -6263,7 +6263,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP bool movement = CheckAgentMovementUpdateSignificance(x); bool camera = CheckAgentCameraUpdateSignificance(x); - + // Was there a significant movement/state change? if (movement) { @@ -6274,6 +6274,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_thisAgentUpdateArgs.HeadRotation = x.HeadRotation; m_thisAgentUpdateArgs.State = x.State; + m_thisAgentUpdateArgs.NeedsCameraCollision = !camera; + UpdateAgent handlerAgentUpdate = OnAgentUpdate; UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate; @@ -6282,7 +6284,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (handlerAgentUpdate != null) OnAgentUpdate(this, m_thisAgentUpdateArgs); - + } // Was there a significant camera(s) change? @@ -6293,6 +6295,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_thisAgentUpdateArgs.CameraLeftAxis = x.CameraLeftAxis; m_thisAgentUpdateArgs.CameraUpAxis = x.CameraUpAxis; + m_thisAgentUpdateArgs.NeedsCameraCollision = true; + UpdateAgent handlerAgentCameraUpdate = OnAgentCameraUpdate; if (handlerAgentCameraUpdate != null) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f96fb858ec..2ca218c387 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2297,6 +2297,48 @@ namespace OpenSim.Region.Framework.Scenes /// /// + private void checkCameraCollision() + { + if(!m_scene.PhysicsScene.SupportsRayCast()) + return; + + ++m_movementUpdateCount; + if (m_movementUpdateCount < 1) + m_movementUpdateCount = 1; + + if (m_doingCamRayCast || m_movementUpdateCount % NumMovementsBetweenRayCast != 0) + return; + + if (m_followCamAuto && !m_mouseLook) + { + Vector3 posAdjusted = AbsolutePosition; +// posAdjusted.Z += 0.5f * Appearance.AvatarSize.Z - 0.5f; + posAdjusted.Z += 1.0f; // viewer current camera focus point + Vector3 tocam = CameraPosition - posAdjusted; + tocam.X = (float)Math.Round(tocam.X, 1); + tocam.Y = (float)Math.Round(tocam.Y, 1); + tocam.Z = (float)Math.Round(tocam.Z, 1); + + float distTocamlen = tocam.Length(); + if (distTocamlen > 0.3f) + { + tocam *= (1.0f / distTocamlen); + posAdjusted.X = (float)Math.Round(posAdjusted.X, 1); + posAdjusted.Y = (float)Math.Round(posAdjusted.Y, 1); + posAdjusted.Z = (float)Math.Round(posAdjusted.Z, 1); + + m_doingCamRayCast = true; + m_scene.PhysicsScene.RaycastWorld(posAdjusted, tocam, distTocamlen + 1.0f, RayCastCameraCallback); + } + } + else if (CameraConstraintActive) + { + Vector4 plane = new Vector4(0.9f, 0.0f, 0.361f, -10000f); // not right... + UpdateCameraCollisionPlane(plane); + CameraConstraintActive = false; + } + } + private void UpdateCameraCollisionPlane(Vector4 plane) { if (m_lastCameraCollisionPlane != plane) @@ -2442,38 +2484,8 @@ namespace OpenSim.Region.Framework.Scenes // Raycast from the avatar's head to the camera to see if there's anything blocking the view // this exclude checks may not be complete - - if (m_movementUpdateCount % NumMovementsBetweenRayCast == 0 && m_scene.PhysicsScene.SupportsRayCast()) - { - if (!m_doingCamRayCast && !m_mouseLook && ParentID == 0) - { - Vector3 posAdjusted = AbsolutePosition; -// posAdjusted.Z += 0.5f * Appearance.AvatarSize.Z - 0.5f; - posAdjusted.Z += 1.0f; // viewer current camera focus point - Vector3 tocam = CameraPosition - posAdjusted; - tocam.X = (float)Math.Round(tocam.X, 1); - tocam.Y = (float)Math.Round(tocam.Y, 1); - tocam.Z = (float)Math.Round(tocam.Z, 1); - - float distTocamlen = tocam.Length(); - if (distTocamlen > 0.3f) - { - tocam *= (1.0f / distTocamlen); - posAdjusted.X = (float)Math.Round(posAdjusted.X, 1); - posAdjusted.Y = (float)Math.Round(posAdjusted.Y, 1); - posAdjusted.Z = (float)Math.Round(posAdjusted.Z, 1); - - m_doingCamRayCast = true; - m_scene.PhysicsScene.RaycastWorld(posAdjusted, tocam, distTocamlen + 1.0f, RayCastCameraCallback); - } - } - else if (CameraConstraintActive && (m_mouseLook || ParentID != 0)) - { - Vector4 plane = new Vector4(0.9f, 0.0f, 0.361f, -10000f); // not right... - UpdateCameraCollisionPlane(plane); - CameraConstraintActive = false; - } - } + if(agentData.NeedsCameraCollision && ParentID == 0) // condition parentID may be wrong + checkCameraCollision(); uint flagsForScripts = (uint)flags; flags = RemoveIgnoredControls(flags, IgnoredControls); @@ -2742,14 +2754,10 @@ namespace OpenSim.Region.Framework.Scenes // Scene.RegionInfo.RegionName, remoteClient.Name, (AgentManager.ControlFlags)agentData.ControlFlags); if (IsChildAgent) - { - // // m_log.Debug("DEBUG: HandleAgentUpdate: child agent"); return; - } - ++m_movementUpdateCount; - if (m_movementUpdateCount < 1) - m_movementUpdateCount = 1; + if(IsInTransit) + return; // AgentManager.ControlFlags flags = (AgentManager.ControlFlags)agentData.ControlFlags; @@ -2779,17 +2787,8 @@ namespace OpenSim.Region.Framework.Scenes m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f) && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; - - //m_log.DebugFormat("[FollowCam]: {0}", m_followCamAuto); - // Raycast from the avatar's head to the camera to see if there's anything blocking the view - if ((m_movementUpdateCount % NumMovementsBetweenRayCast) == 0 && m_scene.PhysicsScene.SupportsRayCast()) - { - if (m_followCamAuto) - { - Vector3 posAdjusted = m_pos + HEAD_ADJUSTMENT; - m_scene.PhysicsScene.RaycastWorld(m_pos, Vector3.Normalize(CameraPosition - posAdjusted), Vector3.Distance(CameraPosition, posAdjusted) + 0.3f, RayCastCameraCallback); - } - } + if(agentData.NeedsCameraCollision) + checkCameraCollision(); TriggerScenePresenceUpdated(); } From e304acb06fddfd79ceedd6991f4c9f1a3fd08e79 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 14 Nov 2016 05:15:41 +0000 Subject: [PATCH 25/29] fix unack bytes stats report --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index 246f003dd2..d59b7614ed 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs @@ -161,6 +161,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// Total byte count of unacked packets sent to this client public int UnackedBytes; + private int m_packetsUnAckReported; /// Total number of received packets that we have reported to the OnPacketStats event(s) private int m_packetsReceivedReported; /// Total number of sent packets that we have reported to the OnPacketStats event(s) @@ -389,11 +390,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP { int newPacketsReceived = PacketsReceived - m_packetsReceivedReported; int newPacketsSent = PacketsSent - m_packetsSentReported; - + int newPacketUnAck = UnackedBytes - m_packetsUnAckReported; callback(newPacketsReceived, newPacketsSent, UnackedBytes); m_packetsReceivedReported += newPacketsReceived; m_packetsSentReported += newPacketsSent; + m_packetsUnAckReported += newPacketUnAck; } } From a858804b420f700965abf3b6601b83c0fb1d9b7c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 14 Nov 2016 22:08:39 +0000 Subject: [PATCH 26/29] fix a vector range parsing --- .../CoreModules/World/Objects/Commands/ObjectCommandsModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index e65f860e44..688648b965 100644 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs @@ -920,7 +920,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands return false; } - string rawConsoleEndVector = rawComponents.Skip(2).Take(1).Single(); + string rawConsoleEndVector = rawComponents.Skip(1).Take(1).Single(); if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector)) { From 8196f21af9ce53a0daf9cd415de06db2e0eff75a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 14 Nov 2016 22:13:02 +0000 Subject: [PATCH 27/29] change camera collision check rules --- .../Region/Framework/Scenes/ScenePresence.cs | 57 +++++++++++-------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2ca218c387..3378eade7c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2313,25 +2313,23 @@ namespace OpenSim.Region.Framework.Scenes { Vector3 posAdjusted = AbsolutePosition; // posAdjusted.Z += 0.5f * Appearance.AvatarSize.Z - 0.5f; + // not good for tiny or huge avatars posAdjusted.Z += 1.0f; // viewer current camera focus point Vector3 tocam = CameraPosition - posAdjusted; - tocam.X = (float)Math.Round(tocam.X, 1); - tocam.Y = (float)Math.Round(tocam.Y, 1); - tocam.Z = (float)Math.Round(tocam.Z, 1); - float distTocamlen = tocam.Length(); - if (distTocamlen > 0.3f) + float distTocamlen = tocam.LengthSquared(); + if (distTocamlen > 0.08f && distTocamlen < 400) { + distTocamlen = (float)Math.Sqrt(distTocamlen); tocam *= (1.0f / distTocamlen); - posAdjusted.X = (float)Math.Round(posAdjusted.X, 1); - posAdjusted.Y = (float)Math.Round(posAdjusted.Y, 1); - posAdjusted.Z = (float)Math.Round(posAdjusted.Z, 1); m_doingCamRayCast = true; m_scene.PhysicsScene.RaycastWorld(posAdjusted, tocam, distTocamlen + 1.0f, RayCastCameraCallback); + return; } } - else if (CameraConstraintActive) + + if (CameraConstraintActive) { Vector4 plane = new Vector4(0.9f, 0.0f, 0.361f, -10000f); // not right... UpdateCameraCollisionPlane(plane); @@ -2350,17 +2348,14 @@ namespace OpenSim.Region.Framework.Scenes public void RayCastCameraCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 pNormal) { - const float POSITION_TOLERANCE = 0.02f; - const float ROTATION_TOLERANCE = 0.02f; +// const float POSITION_TOLERANCE = 0.02f; +// const float ROTATION_TOLERANCE = 0.02f; - m_doingCamRayCast = false; if (hitYN && localid != LocalId) { - SceneObjectGroup group = m_scene.GetGroupByPrim(localid); - bool IsPrim = group != null; - if (IsPrim) + if (localid != 0) { - SceneObjectPart part = group.GetPart(localid); + SceneObjectPart part = m_scene.GetSceneObjectPart(localid); if (part != null && !part.VolumeDetectActive) { CameraConstraintActive = true; @@ -2393,13 +2388,16 @@ namespace OpenSim.Region.Framework.Scenes UpdateCameraCollisionPlane(plane); } } - else if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || - !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)) +// else if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || +// !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)) + else if(CameraConstraintActive) { Vector4 plane = new Vector4(0.9f, 0.0f, 0.361f, -9000f); // not right... UpdateCameraCollisionPlane(plane); CameraConstraintActive = false; } + + m_doingCamRayCast = false; } /// @@ -2767,7 +2765,7 @@ namespace OpenSim.Region.Framework.Scenes // Use these three vectors to figure out what the agent is looking at // Convert it to a Matrix and/or Quaternion - // this my need lock + // this may need lock CameraAtAxis = agentData.CameraAtAxis; CameraLeftAxis = agentData.CameraLeftAxis; CameraUpAxis = agentData.CameraUpAxis; @@ -2781,11 +2779,24 @@ namespace OpenSim.Region.Framework.Scenes DrawDistance = agentData.Far; - // Check if Client has camera in 'follow cam' or 'build' mode. - Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); - m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f) - && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; + // Check if Client has camera in 'follow cam' or 'build' mode. +// Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); + m_followCamAuto = false; + if(!m_mouseLook) + { + if((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f)) + { + Vector3 camdif = new Vector3(1f, 0f, 0f) * Rotation; + float ftmp = camdif.X - CameraAtAxis.X; + if(Math.Abs(ftmp) < 0.1f) + { + ftmp = camdif.Y - CameraAtAxis.Y; + if(Math.Abs(ftmp) < 0.1f) + m_followCamAuto = true; + } + } + } if(agentData.NeedsCameraCollision) checkCameraCollision(); From 8dd9601fdcdaf77060446f40e69b3d1524afa31f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 16 Nov 2016 00:42:08 +0000 Subject: [PATCH 28/29] minor change to getdisplaynames cap url --- .../Linden/Caps/GetDisplayNamesModule.cs | 7 ++- .../InstantMessage/InstantMessageModule.cs | 44 +------------------ 2 files changed, 5 insertions(+), 46 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetDisplayNamesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetDisplayNamesModule.cs index eabacb42dd..bf559d3abe 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetDisplayNamesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetDisplayNamesModule.cs @@ -120,14 +120,13 @@ namespace OpenSim.Region.ClientStack.Linden public virtual void RegisterCaps(UUID agentID, Caps caps) { - UUID capID = UUID.Random(); - if (m_URL == "localhost") { - m_log.DebugFormat("[GET_DISPLAY_NAMES]: /CAPS/agents/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); + string capUrl = "/CAPS/" + UUID.Random() + "/"; +// m_log.DebugFormat("[GET_DISPLAY_NAMES]: {0} in region {1}", capUrl, m_scene.RegionInfo.RegionName); caps.RegisterHandler( "GetDisplayNames", - new GetDisplayNamesHandler("/CAPS/agents" + capID + "/", m_UserManager, "GetDisplayNames", agentID.ToString())); + new GetDisplayNamesHandler(capUrl, m_UserManager, "GetDisplayNames", agentID.ToString())); } else { diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs index 2ba35df092..7d54a00c7f 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs @@ -45,10 +45,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage private static readonly ILog m_log = LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType); - protected Timer m_logTimer = new Timer(10000); - protected List m_logData = new List(); - protected string m_restUrl; - /// /// Is this module enabled? /// @@ -68,12 +64,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage "InstantMessageModule", "InstantMessageModule") != "InstantMessageModule") return; - m_restUrl = config.Configs["Messaging"].GetString("LogURL", String.Empty); } m_enabled = true; - m_logTimer.AutoReset = false; - m_logTimer.Elapsed += LogTimerElapsed; } public virtual void AddRegion(Scene scene) @@ -153,20 +146,17 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage } #endregion - +/* public virtual void OnViewerInstantMessage(IClientAPI client, GridInstantMessage im) { im.fromAgentName = client.FirstName + " " + client.LastName; OnInstantMessage(client, im); } - +*/ public virtual void OnInstantMessage(IClientAPI client, GridInstantMessage im) { byte dialog = im.dialog; - if (client != null && dialog == (byte)InstantMessageDialog.MessageFromAgent) - LogInstantMesssage(im); - if (dialog != (byte)InstantMessageDialog.MessageFromAgent && dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping @@ -243,35 +233,5 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage // OnInstantMessage(null, msg); } - - protected virtual void LogInstantMesssage(GridInstantMessage im) - { - if (m_logData.Count < 20) - { - // Restart the log write timer - m_logTimer.Stop(); - } - if (!m_logTimer.Enabled) - m_logTimer.Start(); - - lock (m_logData) - { - m_logData.Add(im); - } - } - - protected virtual void LogTimerElapsed(object source, ElapsedEventArgs e) - { - lock (m_logData) - { - if (m_restUrl != String.Empty && m_logData.Count > 0) - { - bool success = SynchronousRestObjectRequester.MakeRequest, bool>("POST", m_restUrl + "/LogMessages/", m_logData); - if (!success) - m_log.ErrorFormat("[INSTANT MESSAGE]: Failed to save log data"); - } - m_logData.Clear(); - } - } } } From 05ba77fd3b72bb29a1f57245f8cd4ddeb6a19fb8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 16 Nov 2016 03:47:48 +0000 Subject: [PATCH 29/29] fix parsing of a vector4 and storing on a lsl quaternion needed for lightShare scripts --- .../Shared/Api/Implementation/LS_Api.cs | 10 ++++---- .../Region/ScriptEngine/Shared/LSL_Types.cs | 25 +++++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index e5e43f80fd..8cd065b36a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs @@ -295,7 +295,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api idx++; try { - iQ = rules.GetQuaternionItem(idx); + iQ = rules.GetVector4Item(idx); } catch (InvalidCastException) { @@ -319,7 +319,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api idx++; try { - iQ = rules.GetQuaternionItem(idx); + iQ = rules.GetVector4Item(idx); } catch (InvalidCastException) { @@ -342,7 +342,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api idx++; try { - iQ = rules.GetQuaternionItem(idx); + iQ = rules.GetVector4Item(idx); } catch (InvalidCastException) { @@ -532,7 +532,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api idx++; try { - iQ = rules.GetQuaternionItem(idx); + iQ = rules.GetVector4Item(idx); } catch (InvalidCastException) { @@ -654,7 +654,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: idx++; - iQ = rules.GetQuaternionItem(idx); + iQ = rules.GetVector4Item(idx); try { wl.sunMoonColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index c36e7c6c04..738a814602 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -700,6 +700,31 @@ namespace OpenSim.Region.ScriptEngine.Shared } } + // use LSL_Types.Quaternion to parse and store a vector4 for lightShare + public LSL_Types.Quaternion GetVector4Item(int itemIndex) + { + if (Data[itemIndex] is LSL_Types.Quaternion) + { + LSL_Types.Quaternion q = (LSL_Types.Quaternion)Data[itemIndex]; + return q; + } + else if(Data[itemIndex] is OpenMetaverse.Quaternion) + { + LSL_Types.Quaternion q = new LSL_Types.Quaternion( + (OpenMetaverse.Quaternion)Data[itemIndex]); + q.Normalize(); + return q; + } + else + { + throw new InvalidCastException(string.Format( + "{0} expected but {1} given", + typeof(LSL_Types.Quaternion).Name, + Data[itemIndex] != null ? + Data[itemIndex].GetType().Name : "null")); + } + } + public LSL_Types.Quaternion GetQuaternionItem(int itemIndex) { if (Data[itemIndex] is LSL_Types.Quaternion)