From dbd954d701027c417d8f468d19b735f46596cc8c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 11 Jul 2011 22:56:14 +0100
Subject: Fix permissions problem where newly uploaded meshes rezzed from
inventory could not be copied by owner.
---
OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 2 +-
OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs | 2 +-
.../Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs | 8 ++------
3 files changed, 4 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index d3bb0bc..b11210a 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -687,7 +687,7 @@ namespace OpenSim.Region.ClientStack.Linden
item.CurrentPermissions = (uint)PermissionMask.All;
item.BasePermissions = (uint)PermissionMask.All;
item.EveryOnePermissions = 0;
- item.NextPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer);
+ item.NextPermissions = (uint)PermissionMask.All;
item.CreationDate = Util.UnixTimeSinceEpoch();
if (AddNewInventoryItem != null)
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
index c9d7ae1..29a9199 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
@@ -124,7 +124,7 @@ namespace OpenSim.Region.ClientStack.Linden
private Hashtable MeshUploadFlag(Hashtable mDhttpMethod)
{
- m_log.DebugFormat("[SIMULATOR FEATURES MODULE]: MeshUploadFlag request");
+// m_log.DebugFormat("[MESH UPLOAD FLAG MODULE]: MeshUploadFlag request");
OSDMap data = new OSDMap();
ScenePresence sp = m_scene.GetScenePresence(m_agentID);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
index b7e79cc..b2f04f9 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
@@ -160,8 +160,6 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
// }
-
-
string assetName = llsdRequest.name;
string assetDes = llsdRequest.description;
@@ -208,12 +206,10 @@ namespace OpenSim.Region.ClientStack.Linden
return uploadResponse;
}
-
public void UploadCompleteHandler(string assetName, string assetDescription, UUID assetID,
UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType,
string assetType,UUID AgentID)
{
-
sbyte assType = 0;
sbyte inType = 0;
@@ -266,10 +262,10 @@ namespace OpenSim.Region.ClientStack.Linden
item.CurrentPermissions = (uint)PermissionMask.All;
item.BasePermissions = (uint)PermissionMask.All;
item.EveryOnePermissions = 0;
- item.NextPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer);
+ item.NextPermissions = (uint)PermissionMask.All;
item.CreationDate = Util.UnixTimeSinceEpoch();
m_scene.AddInventoryItem(item);
}
}
-}
+}
\ No newline at end of file
--
cgit v1.1
From 3e5b2d52ff7e9fd0c968608c4a705740f51b9bc2 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Jul 2011 22:58:29 +0100
Subject: minor: method doc for baked texture uploading
---
.../ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index b11210a..8db4e67 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -331,14 +331,22 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
+ ///
+ /// Handle a request from the client for a Uri to upload a baked texture.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The upload response if the request is successful, null otherwise.
public string UploadBakedTexture(string request, string path,
string param, OSHttpRequest httpRequest,
OSHttpResponse httpResponse)
{
try
{
- // m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " +
- // m_regionName);
+// m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " + m_regionName);
string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
@@ -374,6 +382,11 @@ namespace OpenSim.Region.ClientStack.Linden
return null;
}
+ ///
+ /// Called when a baked texture has been successfully uploaded by a client.
+ ///
+ ///
+ ///
public void BakedTextureUploaded(UUID assetID, byte[] data)
{
// m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString());
--
cgit v1.1
From a9ba9d4a9ee2515d2541fc536525ebed3d101606 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Jul 2011 23:51:55 +0100
Subject: change async parameter name in AddLocalPacketHandler since it becomes
a reserved keyword in .net 5
Also adds some method doc.
---
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 24 ++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index c176c2b..8414f8b 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -574,22 +574,42 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return result;
}
+ ///
+ /// Add a handler for the given packet type.
+ ///
+ /// The packet is handled on its own thread. If packets must be handled in the order in which thye
+ /// are received then please us ethe synchronous version of this method.
+ ///
+ ///
+ /// true if the handler was added. This is currently always the case.
public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler)
{
return AddLocalPacketHandler(packetType, handler, true);
}
- public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler, bool async)
+ ///
+ /// Add a handler for the given packet type.
+ ///
+ ///
+ ///
+ ///
+ /// If true, when the packet is received it is handled on its own thread rather than on the main inward bound
+ /// packet handler thread. This vastly increases respnosiveness but some packets need to be handled
+ /// synchronously.
+ ///
+ /// true if the handler was added. This is currently always the case.
+ public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler, bool doAsync)
{
bool result = false;
lock (m_packetHandlers)
{
if (!m_packetHandlers.ContainsKey(packetType))
{
- m_packetHandlers.Add(packetType, new PacketProcessor() { method = handler, Async = async });
+ m_packetHandlers.Add(packetType, new PacketProcessor() { method = handler, Async = doAsync });
result = true;
}
}
+
return result;
}
--
cgit v1.1
From df2a59d31b1ae21f99c1b18976b8d799b935a762 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 16 Jul 2011 03:30:14 +0100
Subject: refactor: make SceneObjectGroup.GroupScale() a property rather than a
mehod
---
.../Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index 15ed3b3..8189518 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -129,7 +129,7 @@ namespace OpenSim.Region.ClientStack.Linden
///
- /// Parses ad request
+ /// Parses add request
///
///
///
@@ -312,11 +312,11 @@ namespace OpenSim.Region.ClientStack.Linden
primFace.RepeatV = face.ScaleT;
primFace.TexMapType = (MappingType) (face.MediaFlags & 6);
}
+
pbs.TextureEntry = tmp.GetBytes();
prim.Shape = pbs;
prim.Scale = obj.Scale;
-
SceneObjectGroup grp = new SceneObjectGroup();
grp.SetRootPart(prim);
@@ -339,8 +339,8 @@ namespace OpenSim.Region.ClientStack.Linden
m_scene.AddSceneObject(grp);
grp.AbsolutePosition = obj.Position;
}
+
allparts[i] = grp;
-
}
for (int j = 1; j < allparts.Length; j++)
@@ -351,7 +351,9 @@ namespace OpenSim.Region.ClientStack.Linden
}
rootGroup.ScheduleGroupForFullUpdate();
- pos = m_scene.GetNewRezLocation(Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale(), false);
+ pos
+ = m_scene.GetNewRezLocation(
+ Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale, false);
responsedata["int_response_code"] = 200; //501; //410; //404;
responsedata["content_type"] = "text/plain";
--
cgit v1.1
From 6fc74b36d1d0f7dcd6f013893c3189a3f989431c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 18 Jul 2011 04:54:21 +0100
Subject: Make various tweaks to undo code in an effort to get things working
better.
Undo rotation and position appear to be working.
Resizing a single prim appears to be working, though the undo has to be done twice.
Resizing a group of prims still does not work properly - possibly because in the UndoState we don't store a knowledge of when we're resizing a whole group rather than individual prims.
This needs to be addressed.
---
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 27 +++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 8414f8b..fa35bd8 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -11242,6 +11242,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
else
{
+ // Do this once since fetch parts creates a new array.
+ SceneObjectPart[] parts = part.ParentGroup.Parts;
+ for (int j = 0; j < parts.Length; j++)
+ {
+ part.StoreUndoState();
+ parts[j].IgnoreUndoUpdate = true;
+ }
+
// UUID partId = part.UUID;
UpdatePrimGroupRotation handlerUpdatePrimGroupRotation;
@@ -11257,6 +11265,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimSinglePosition(localId, pos1, this);
}
break;
+
case 2:
Quaternion rot1 = new Quaternion(block.Data, 0, true);
@@ -11267,6 +11276,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimSingleRotation(localId, rot1, this);
}
break;
+
case 3:
Vector3 rotPos = new Vector3(block.Data, 0);
Quaternion rot2 = new Quaternion(block.Data, 12, true);
@@ -11279,6 +11289,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this);
}
break;
+
case 4:
case 20:
Vector3 scale4 = new Vector3(block.Data, 0);
@@ -11290,8 +11301,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimScale(localId, scale4, this);
}
break;
- case 5:
+ case 5:
Vector3 scale1 = new Vector3(block.Data, 12);
Vector3 pos11 = new Vector3(block.Data, 0);
@@ -11308,6 +11319,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
break;
+
case 9:
Vector3 pos2 = new Vector3(block.Data, 0);
@@ -11315,10 +11327,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (handlerUpdateVector != null)
{
-
handlerUpdateVector(localId, pos2, this);
}
break;
+
case 10:
Quaternion rot3 = new Quaternion(block.Data, 0, true);
@@ -11329,6 +11341,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimRotation(localId, rot3, this);
}
break;
+
case 11:
Vector3 pos3 = new Vector3(block.Data, 0);
Quaternion rot4 = new Quaternion(block.Data, 12, true);
@@ -11352,6 +11365,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimGroupScale(localId, scale7, this);
}
break;
+
case 13:
Vector3 scale2 = new Vector3(block.Data, 12);
Vector3 pos4 = new Vector3(block.Data, 0);
@@ -11371,6 +11385,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
break;
+
case 29:
Vector3 scale5 = new Vector3(block.Data, 12);
Vector3 pos5 = new Vector3(block.Data, 0);
@@ -11388,6 +11403,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
break;
+
case 21:
Vector3 scale6 = new Vector3(block.Data, 12);
Vector3 pos6 = new Vector3(block.Data, 0);
@@ -11404,13 +11420,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
break;
+
default:
- m_log.Debug("[CLIENT] MultipleObjUpdate recieved an unknown packet type: " + (block.Type));
+ m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type));
break;
}
+
+ for (int j = 0; j < parts.Length; j++)
+ parts[j].IgnoreUndoUpdate = false;
}
}
}
+
return true;
}
--
cgit v1.1
From 430a4aeba8e98b8285ea3ebdf264baf429a55e22 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 19 Jul 2011 03:01:54 +0100
Subject: Fix undo for resizing linksets
This involves implementing a boolean in UndoState to signal whether the undo needs to be done for an entire group/linkset or just a single prim
Resizing individual components of linksets is still dodgy.
Resizing still has to be down twice, since for some reason the client is sending two multiobjectupdate packets on every resize except the very first. This applies to single prims and linksets. Need to look into this.
---
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 37 +++++++++++++++-------
1 file changed, 25 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index fa35bd8..4c0b53c 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -11220,8 +11220,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected bool HandleMultipleObjUpdate(IClientAPI simClient, Packet packet)
{
MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet;
- if (multipleupdate.AgentData.SessionID != SessionId) return false;
- // m_log.Debug("new multi update packet " + multipleupdate.ToString());
+
+ if (multipleupdate.AgentData.SessionID != SessionId)
+ return false;
+
+// m_log.DebugFormat(
+// "[CLIENT]: Incoming MultipleObjectUpdatePacket contained {0} blocks", multipleupdate.ObjectData.Length);
+
Scene tScene = (Scene)m_scene;
for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
@@ -11242,15 +11247,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
else
{
- // Do this once since fetch parts creates a new array.
- SceneObjectPart[] parts = part.ParentGroup.Parts;
- for (int j = 0; j < parts.Length; j++)
- {
- part.StoreUndoState();
- parts[j].IgnoreUndoUpdate = true;
- }
+// m_log.DebugFormat(
+// "[CLIENT]: Processing block {0} type {1} for {2} {3}",
+// i, block.Type, part.Name, part.LocalId);
+
+// // Do this once since fetch parts creates a new array.
+// SceneObjectPart[] parts = part.ParentGroup.Parts;
+// for (int j = 0; j < parts.Length; j++)
+// {
+// part.StoreUndoState();
+// parts[j].IgnoreUndoUpdate = true;
+// }
- // UUID partId = part.UUID;
UpdatePrimGroupRotation handlerUpdatePrimGroupRotation;
switch (block.Type)
@@ -11394,6 +11402,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (handlerUpdatePrimGroupScale != null)
{
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
+ part.StoreUndoState(true);
+ part.IgnoreUndoUpdate = true;
handlerUpdatePrimGroupScale(localId, scale5, this);
handlerUpdateVector = OnUpdatePrimGroupPosition;
@@ -11401,7 +11411,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
handlerUpdateVector(localId, pos5, this);
}
+
+ part.IgnoreUndoUpdate = false;
}
+
break;
case 21:
@@ -11426,8 +11439,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break;
}
- for (int j = 0; j < parts.Length; j++)
- parts[j].IgnoreUndoUpdate = false;
+// for (int j = 0; j < parts.Length; j++)
+// parts[j].IgnoreUndoUpdate = false;
}
}
}
--
cgit v1.1
From c94dc95844c5a43483a30807353aaebf658b015e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 19 Jul 2011 03:27:16 +0100
Subject: fix undo when resizing of non-root individual prims in a linkset
undo resize, rotation and position still needs fixing when only editing root prim of a linkset
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 4c0b53c..a34ad62 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -11424,6 +11424,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
+ part.StoreUndoState(false);
+ part.IgnoreUndoUpdate = true;
+
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
handlerUpdatePrimScale(localId, scale6, this);
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
@@ -11431,6 +11434,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
handlerUpdatePrimSinglePosition(localId, pos6, this);
}
+
+ part.IgnoreUndoUpdate = false;
}
break;
--
cgit v1.1
From 7c468cda360b9a9382986c3a029b799fd49bf898 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 19 Jul 2011 03:38:22 +0100
Subject: Stop undo of just the root prim position in the linkset from shifting
the whole linkset.
However, what happens now is that undo just doesn't do anything when the root prim is selected on its own. This requires more code than just fiddling with undo states.
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index a34ad62..00115cc 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -11224,8 +11224,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (multipleupdate.AgentData.SessionID != SessionId)
return false;
-// m_log.DebugFormat(
-// "[CLIENT]: Incoming MultipleObjectUpdatePacket contained {0} blocks", multipleupdate.ObjectData.Length);
+ m_log.DebugFormat(
+ "[CLIENT]: Incoming MultipleObjectUpdatePacket contained {0} blocks", multipleupdate.ObjectData.Length);
Scene tScene = (Scene)m_scene;
@@ -11247,9 +11247,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
else
{
-// m_log.DebugFormat(
-// "[CLIENT]: Processing block {0} type {1} for {2} {3}",
-// i, block.Type, part.Name, part.LocalId);
+ m_log.DebugFormat(
+ "[CLIENT]: Processing block {0} type {1} for {2} {3}",
+ i, block.Type, part.Name, part.LocalId);
// // Do this once since fetch parts creates a new array.
// SceneObjectPart[] parts = part.ParentGroup.Parts;
--
cgit v1.1
From 62325829ecab7d956416ff0450faa3f90f267e6c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 19 Jul 2011 05:14:58 +0100
Subject: comment out all kinds of debugging guff
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 00115cc..a34ad62 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -11224,8 +11224,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (multipleupdate.AgentData.SessionID != SessionId)
return false;
- m_log.DebugFormat(
- "[CLIENT]: Incoming MultipleObjectUpdatePacket contained {0} blocks", multipleupdate.ObjectData.Length);
+// m_log.DebugFormat(
+// "[CLIENT]: Incoming MultipleObjectUpdatePacket contained {0} blocks", multipleupdate.ObjectData.Length);
Scene tScene = (Scene)m_scene;
@@ -11247,9 +11247,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
else
{
- m_log.DebugFormat(
- "[CLIENT]: Processing block {0} type {1} for {2} {3}",
- i, block.Type, part.Name, part.LocalId);
+// m_log.DebugFormat(
+// "[CLIENT]: Processing block {0} type {1} for {2} {3}",
+// i, block.Type, part.Name, part.LocalId);
// // Do this once since fetch parts creates a new array.
// SceneObjectPart[] parts = part.ParentGroup.Parts;
--
cgit v1.1
From 4cdc8806fbc0d0d9b0ff878b30a4491b347cf2dc Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sat, 23 Jul 2011 11:39:32 +0100
Subject: Fix LLTextBox to work with the updated libOMV
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index a34ad62..60f0075 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -12083,7 +12083,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task);
}
- public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
+ public void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId)
{
ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog);
dialog.Data.ObjectID = objectId;
@@ -12099,6 +12099,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
buttons[0] = new ScriptDialogPacket.ButtonsBlock();
buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!");
dialog.Buttons = buttons;
+
+ dialog.OwnerData = new ScriptDialogPacket.OwnerDataBlock[1];
+ dialog.OwnerData[0] = new ScriptDialogPacket.OwnerDataBlock();
+ dialog.OwnerData[0].OwnerID = ownerID;
+
OutPacket(dialog, ThrottleOutPacketType.Task);
}
--
cgit v1.1
From c4ffcd4b7d978ad3a675da0f8ae3f97f027beae8 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 27 Jul 2011 08:35:19 +0200
Subject: Ensure that packet headers get parsed correctly
---
.../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index aff90c5..f2388cd 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -160,6 +160,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public Socket Server { get { return null; } }
+ private int m_malformedCount = 0; // Guard against a spamming attack
+
public LLUDPServer(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager)
: base(listenIP, (int)port)
{
@@ -612,6 +614,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Decoding
+ if (buffer.DataLength < 7)
+ return; // Drop undersizd packet
+
+ int headerLen = 7;
+ if (buffer.Data[6] == 0xFF)
+ {
+ if (buffer.Data[7] == 0xFF)
+ headerLen = 10;
+ else
+ headerLen = 8;
+ }
+
+ if (buffer.DataLength < headerLen)
+ return; // Malformed header
+
try
{
packet = Packet.BuildPacket(buffer.Data, ref packetEnd,
@@ -621,6 +638,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
catch (MalformedDataException)
{
}
+ catch (IndexOutOfRangeException)
+ {
+ return; // Drop short packet
+ }
+ catch(Exception e)
+ {
+ if (m_malformedCount < 100)
+ m_log.DebugFormat("[LLUDPSERVER]: Dropped malformed packet: " + e.ToString());
+ m_malformedCount++;
+ if ((m_malformedCount % 100000) == 0)
+ m_log.DebugFormat("[LLUDPSERVER]: Received {0} malformed packets so far, probable network attack.", m_malformedCount);
+ }
// Fail-safe check
if (packet == null)
--
cgit v1.1
From 9fc59e2bf230b94d7efebedffff37724d64bb59a Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 30 Jul 2011 03:19:00 +0100
Subject: minor: remove some mono compiler warnings
---
OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
index 29fd1a4..4c33db5 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static Int32 m_counter = 0;
- private Int32 m_identifier;
+// private Int32 m_identifier;
///
/// Number of ticks (ms) per quantum, drip rate and max burst
@@ -173,7 +173,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// second. If zero, the bucket always remains full
public TokenBucket(TokenBucket parent, Int64 dripRate)
{
- m_identifier = m_counter++;
+// m_identifier = m_counter++;
+ m_counter++;
Parent = parent;
RequestedDripRate = dripRate;
@@ -320,7 +321,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public class AdaptiveTokenBucket : TokenBucket
{
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
///
/// The minimum rate for flow control. Minimum drip rate is one
--
cgit v1.1
From c122489e0947300753281e88771b7a74d49869c7 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 2 Aug 2011 23:41:12 +0100
Subject: Partially fix autopilot/go here
This now works again except that it requires a click or avatar mvmt to get going
This is because the ScenePresence.HandleAgentUpdate() method doesn't trigger until the client does something significant, at which point autopilot takes over.
Even clicking is enough to trigger.
This will be improved presently.
---
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 79 ++++++++++------------
1 file changed, 34 insertions(+), 45 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 60f0075..bb491a1 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -5266,6 +5266,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AddLocalPacketHandler(PacketType.GroupVoteHistoryRequest, HandleGroupVoteHistoryRequest);
AddLocalPacketHandler(PacketType.SimWideDeletes, HandleSimWideDeletes);
AddLocalPacketHandler(PacketType.SendPostcard, HandleSendPostcard);
+
+ AddGenericPacketHandler("autopilot", HandleAutopilot);
}
#region Packet Handlers
@@ -5308,7 +5310,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
);
}
else
+ {
update = true;
+ }
// These should be ordered from most-likely to
// least likely to change. I've made an initial
@@ -5316,6 +5320,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (update)
{
+// m_log.DebugFormat("[LLCLIENTVIEW]: Triggered AgentUpdate for {0}", sener.Name);
+
AgentUpdateArgs arg = new AgentUpdateArgs();
arg.AgentID = x.AgentID;
arg.BodyRotation = x.BodyRotation;
@@ -11609,54 +11615,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return false;
}
- ///
- /// Breaks down the genericMessagePacket into specific events
- ///
- ///
- ///
- ///
- public void DecipherGenericMessage(string gmMethod, UUID gmInvoice, GenericMessagePacket.ParamListBlock[] gmParams)
+ protected void HandleAutopilot(Object sender, string method, List args)
{
- switch (gmMethod)
+ try
{
- case "autopilot":
- float locx;
- float locy;
- float locz;
-
- try
- {
- uint regionX;
- uint regionY;
- Utils.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY);
- locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - regionX;
- locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - regionY;
- locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter));
- }
- catch (InvalidCastException)
- {
- m_log.Error("[CLIENT]: Invalid autopilot request");
- return;
- }
-
- UpdateVector handlerAutoPilotGo = OnAutoPilotGo;
- if (handlerAutoPilotGo != null)
- {
- handlerAutoPilotGo(0, new Vector3(locx, locy, locz), this);
- }
- m_log.InfoFormat("[CLIENT]: Client Requests autopilot to position <{0},{1},{2}>", locx, locy, locz);
-
-
- break;
- default:
- m_log.Debug("[CLIENT]: Unknown Generic Message, Method: " + gmMethod + ". Invoice: " + gmInvoice + ". Dumping Params:");
- for (int hi = 0; hi < gmParams.Length; hi++)
- {
- Console.WriteLine(gmParams[hi].ToString());
- }
- //gmpack.MethodData.
- break;
+ float locx = 0f;
+ float locy = 0f;
+ float locz = 0f;
+ uint regionX = 0;
+ uint regionY = 0;
+ try
+ {
+ Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out regionX, out regionY);
+ locx = Convert.ToSingle(args[0]) - (float)regionX;
+ locy = Convert.ToSingle(args[1]) - (float)regionY;
+ locz = Convert.ToSingle(args[2]);
+ }
+ catch (InvalidCastException)
+ {
+ m_log.Error("[CLIENT]: Invalid autopilot request");
+ return;
+ }
+ UpdateVector handlerAutoPilotGo = OnAutoPilotGo;
+ if (handlerAutoPilotGo != null)
+ {
+ handlerAutoPilotGo(0, new Vector3(locx, locy, locz), this);
+ }
+ }
+ catch (Exception e)
+ {
+ m_log.ErrorFormat("[LLCLIENTVIEW]: HandleAutopilot exception {0} {1}", e.Message, e.StackTrace);
}
}
--
cgit v1.1
From 2964467708871f5932c46ad04e002a5506dd7732 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 3 Aug 2011 22:11:05 +0100
Subject: get rid of vestigal move to parameters
---
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 44 +++++++---------------
1 file changed, 14 insertions(+), 30 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index bb491a1..4a36b5d 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -231,7 +231,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event ScriptReset OnScriptReset;
public event GetScriptRunning OnGetScriptRunning;
public event SetScriptRunning OnSetScriptRunning;
- public event UpdateVector OnAutoPilotGo;
+ public event Action OnAutoPilotGo;
public event TerrainUnacked OnUnackedTerrain;
public event ActivateGesture OnActivateGesture;
public event DeactivateGesture OnDeactivateGesture;
@@ -11617,36 +11617,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected void HandleAutopilot(Object sender, string method, List args)
{
- try
- {
- float locx = 0f;
- float locy = 0f;
- float locz = 0f;
- uint regionX = 0;
- uint regionY = 0;
- try
- {
- Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out regionX, out regionY);
- locx = Convert.ToSingle(args[0]) - (float)regionX;
- locy = Convert.ToSingle(args[1]) - (float)regionY;
- locz = Convert.ToSingle(args[2]);
- }
- catch (InvalidCastException)
- {
- m_log.Error("[CLIENT]: Invalid autopilot request");
- return;
- }
+ float locx = 0;
+ float locy = 0;
+ float locz = 0;
+ uint regionX = 0;
+ uint regionY = 0;
- UpdateVector handlerAutoPilotGo = OnAutoPilotGo;
- if (handlerAutoPilotGo != null)
- {
- handlerAutoPilotGo(0, new Vector3(locx, locy, locz), this);
- }
- }
- catch (Exception e)
- {
- m_log.ErrorFormat("[LLCLIENTVIEW]: HandleAutopilot exception {0} {1}", e.Message, e.StackTrace);
- }
+ Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out regionX, out regionY);
+ locx = Convert.ToSingle(args[0]) - (float)regionX;
+ locy = Convert.ToSingle(args[1]) - (float)regionY;
+ locz = Convert.ToSingle(args[2]);
+
+ Action handlerAutoPilotGo = OnAutoPilotGo;
+ if (handlerAutoPilotGo != null)
+ handlerAutoPilotGo(new Vector3(locx, locy, locz));
}
///
--
cgit v1.1
From f999acd095a71fb054e34a3987a13828bc2d3427 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 4 Aug 2011 01:46:34 +0100
Subject: minor: remove some mono compiler warnings
---
.../Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs | 4 ++--
OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
index 14160ae..66b865f 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
@@ -48,8 +48,8 @@ namespace OpenSim.Region.ClientStack.Linden
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class BunchOfCapsModule : INonSharedRegionModule
{
- private static readonly ILog m_log =
- LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+// private static readonly ILog m_log =
+// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_Scene;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
index 29a9199..18c7eae 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
@@ -48,8 +48,8 @@ namespace OpenSim.Region.ClientStack.Linden
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class MeshUploadFlagModule : INonSharedRegionModule
{
- private static readonly ILog m_log =
- LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+// private static readonly ILog m_log =
+// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
///
/// Is this module enabled?
--
cgit v1.1
From 92e96d394a1712ed16b0a7835dd2ccfde01f3fee Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 9 Aug 2011 23:11:07 +0100
Subject: When an NPC is created, stop telling neighbouring regions to expect a
child agent
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 4a36b5d..46d7f78 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event ObjectAttach OnObjectAttach;
public event ObjectDeselect OnObjectDetach;
public event ObjectDrop OnObjectDrop;
- public event GenericCall1 OnCompleteMovementToRegion;
+ public event Action OnCompleteMovementToRegion;
public event UpdateAgent OnPreAgentUpdate;
public event UpdateAgent OnAgentUpdate;
public event AgentRequestSit OnAgentRequestSit;
@@ -6195,10 +6195,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private bool HandleCompleteAgentMovement(IClientAPI sender, Packet Pack)
{
- GenericCall1 handlerCompleteMovementToRegion = OnCompleteMovementToRegion;
+ Action handlerCompleteMovementToRegion = OnCompleteMovementToRegion;
if (handlerCompleteMovementToRegion != null)
{
- handlerCompleteMovementToRegion(sender);
+ handlerCompleteMovementToRegion(sender, true);
}
handlerCompleteMovementToRegion = null;
--
cgit v1.1
From 4cb8d6379ddb39cfb8b30a63475e154a00a78110 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 10 Aug 2011 00:59:31 +0100
Subject: Stop trying to deregister caps or close child agents when an NPC is
removed
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 46d7f78..977918a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -512,7 +512,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_udpServer.Flush(m_udpClient);
// Remove ourselves from the scene
- m_scene.RemoveClient(AgentId);
+ m_scene.RemoveClient(AgentId, true);
// We can't reach into other scenes and close the connection
// We need to do this over grid communications
--
cgit v1.1
From 5d6c9644faf6aeac38410af9cff97adfef88d7aa Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 10 Aug 2011 01:47:37 +0100
Subject: early code to allow scripts to force npcs not to fly when moving to
target
this is to allow walking on prims. it will be up to the script writer to be sure that there is a continuous path.
currently implemented in osNpcMoveToTarget(), but none of this is final.
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 977918a..1d35973 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -231,7 +231,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event ScriptReset OnScriptReset;
public event GetScriptRunning OnGetScriptRunning;
public event SetScriptRunning OnSetScriptRunning;
- public event Action OnAutoPilotGo;
+ public event Action OnAutoPilotGo;
public event TerrainUnacked OnUnackedTerrain;
public event ActivateGesture OnActivateGesture;
public event DeactivateGesture OnDeactivateGesture;
@@ -11628,9 +11628,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
locy = Convert.ToSingle(args[1]) - (float)regionY;
locz = Convert.ToSingle(args[2]);
- Action handlerAutoPilotGo = OnAutoPilotGo;
+ Action handlerAutoPilotGo = OnAutoPilotGo;
if (handlerAutoPilotGo != null)
- handlerAutoPilotGo(new Vector3(locx, locy, locz));
+ handlerAutoPilotGo(new Vector3(locx, locy, locz), false);
}
///
--
cgit v1.1
From cace6eaa8a82018fbb21ab83ce1bf95ea0a1e154 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 11 Aug 2011 02:06:32 +0100
Subject: comment out some of the currently less useful debug log messages
---
OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 2 +-
OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | 4 ++--
OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 8db4e67..ff889ea 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -232,7 +232,7 @@ namespace OpenSim.Region.ClientStack.Linden
public string SeedCapRequest(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
- m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
+// m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint))
{
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
index e0807ee..22c05c4 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
@@ -118,7 +118,7 @@ namespace OpenSim.Region.ClientStack.Linden
//caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture));
if (m_URL == "localhost")
{
- m_log.InfoFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
+// m_log.DebugFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService);
IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(),
delegate(Hashtable m_dhttpMethod)
@@ -130,7 +130,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
else
{
- m_log.InfoFormat("[GETMESH]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName);
+// m_log.DebugFormat("[GETMESH]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName);
caps.RegisterHandler("GetMesh", m_URL);
}
}
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index 35eedb4..24ab06a 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -128,12 +128,12 @@ namespace OpenSim.Region.ClientStack.Linden
//caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture));
if (m_URL == "localhost")
{
- m_log.InfoFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
+// m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
caps.RegisterHandler("GetTexture", new GetTextureHandler("/CAPS/" + capID + "/", m_assetService));
}
else
{
- m_log.InfoFormat("[GETTEXTURE]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName);
+// m_log.DebugFormat("[GETTEXTURE]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName);
caps.RegisterHandler("GetTexture", m_URL);
}
}
--
cgit v1.1
From 8d866ae8c3e2c866f8b4b905d5a74370042100c3 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 16 Aug 2011 21:45:01 +0100
Subject: minor: remove some mono compiler warnings
---
OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | 6 +++---
OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
index 22c05c4..e7bd2e7 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
@@ -50,8 +50,8 @@ namespace OpenSim.Region.ClientStack.Linden
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class GetMeshModule : INonSharedRegionModule
{
- private static readonly ILog m_log =
- LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+// private static readonly ILog m_log =
+// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene;
private IAssetService m_AssetService;
@@ -113,7 +113,7 @@ namespace OpenSim.Region.ClientStack.Linden
public void RegisterCaps(UUID agentID, Caps caps)
{
- UUID capID = UUID.Random();
+// UUID capID = UUID.Random();
//caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture));
if (m_URL == "localhost")
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index 24ab06a..fffcee2 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -54,8 +54,9 @@ namespace OpenSim.Region.ClientStack.Linden
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class GetTextureModule : INonSharedRegionModule
{
- private static readonly ILog m_log =
- LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+// private static readonly ILog m_log =
+// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
private Scene m_scene;
private IAssetService m_assetService;
--
cgit v1.1
From c1a34cd8da293e63d3cba70b5271c9a297789db2 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 18 Aug 2011 00:53:05 +0100
Subject: Don't try to save changed attachment states when an NPC with
attachments is removed from the scene.
This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc.
This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 1d35973..f71871e 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -692,7 +692,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public virtual void Start()
{
- m_scene.AddNewClient(this);
+ m_scene.AddNewClient(this, PresenceType.User);
RefreshGroupMembership();
}
--
cgit v1.1
From 7cf4bb5256be8e4b6a585e5128ccfc4b132bee04 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 22 Aug 2011 22:13:07 +0100
Subject: Add ISimulatorFeaturesModule so that other modules can register
features in addition to the hardcoded ones.
---
.../Linden/Caps/SimulatorFeaturesModule.cs | 122 +++++++++++++++------
1 file changed, 86 insertions(+), 36 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
index 9f78948..b531c1f 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
@@ -43,21 +43,29 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
namespace OpenSim.Region.ClientStack.Linden
{
///
- /// SimulatorFeatures capability. This is required for uploading Mesh.
+ /// SimulatorFeatures capability.
+ ///
+ ///
+ /// This is required for uploading Mesh.
/// Since is accepts an open-ended response, we also send more information
/// for viewers that care to interpret it.
///
/// NOTE: Part of this code was adapted from the Aurora project, specifically
/// the normal part of the response in the capability handler.
- ///
- ///
+ ///
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
- public class SimulatorFeaturesModule : ISharedRegionModule
+ public class SimulatorFeaturesModule : ISharedRegionModule, ISimulatorFeaturesModule
{
private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
private Scene m_scene;
+ ///
+ /// Simulator features
+ ///
+ private OSDMap m_features = new OSDMap();
+
private string m_MapImageServerURL = string.Empty;
private string m_SearchURL = string.Empty;
@@ -66,18 +74,20 @@ namespace OpenSim.Region.ClientStack.Linden
public void Initialise(IConfigSource source)
{
IConfig config = source.Configs["SimulatorFeatures"];
- if (config == null)
- return;
-
- m_MapImageServerURL = config.GetString("MapImageServerURI", string.Empty);
- if (m_MapImageServerURL != string.Empty)
+ if (config != null)
{
- m_MapImageServerURL = m_MapImageServerURL.Trim();
- if (!m_MapImageServerURL.EndsWith("/"))
- m_MapImageServerURL = m_MapImageServerURL + "/";
+ m_MapImageServerURL = config.GetString("MapImageServerURI", string.Empty);
+ if (m_MapImageServerURL != string.Empty)
+ {
+ m_MapImageServerURL = m_MapImageServerURL.Trim();
+ if (!m_MapImageServerURL.EndsWith("/"))
+ m_MapImageServerURL = m_MapImageServerURL + "/";
+ }
+
+ m_SearchURL = config.GetString("SearchServerURI", string.Empty);
}
- m_SearchURL = config.GetString("SearchServerURI", string.Empty);
+ AddDefaultFeatures();
}
public void AddRegion(Scene s)
@@ -110,43 +120,83 @@ namespace OpenSim.Region.ClientStack.Linden
#endregion
+ ///
+ /// Add default features
+ ///
+ ///
+ /// TODO: These should be added from other modules rather than hardcoded.
+ ///
+ private void AddDefaultFeatures()
+ {
+ lock (m_features)
+ {
+ m_features["MeshRezEnabled"] = true;
+ m_features["MeshUploadEnabled"] = true;
+ m_features["MeshXferEnabled"] = true;
+ m_features["PhysicsMaterialsEnabled"] = true;
+
+ OSDMap typesMap = new OSDMap();
+ typesMap["convex"] = true;
+ typesMap["none"] = true;
+ typesMap["prim"] = true;
+ m_features["PhysicsShapeTypes"] = typesMap;
+
+ // Extra information for viewers that want to use it
+ OSDMap gridServicesMap = new OSDMap();
+ if (m_MapImageServerURL != string.Empty)
+ gridServicesMap["map-server-url"] = m_MapImageServerURL;
+ if (m_SearchURL != string.Empty)
+ gridServicesMap["search"] = m_SearchURL;
+ m_features["GridServices"] = gridServicesMap;
+ }
+ }
+
public void RegisterCaps(UUID agentID, Caps caps)
{
- IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), SimulatorFeatures);
+ IRequestHandler reqHandler
+ = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), HandleSimulatorFeaturesRequest);
+
caps.RegisterHandler("SimulatorFeatures", reqHandler);
}
- private Hashtable SimulatorFeatures(Hashtable mDhttpMethod)
+ public void AddFeature(string name, OSD value)
+ {
+ lock (m_features)
+ m_features[name] = value;
+ }
+
+ public bool RemoveFeature(string name)
+ {
+ lock (m_features)
+ return m_features.Remove(name);
+ }
+
+ public bool TryGetFeature(string name, out OSD value)
+ {
+ lock (m_features)
+ return m_features.TryGetValue(name, out value);
+ }
+
+ public OSDMap GetFeatures()
+ {
+ lock (m_features)
+ return new OSDMap(m_features);
+ }
+
+ private Hashtable HandleSimulatorFeaturesRequest(Hashtable mDhttpMethod)
{
m_log.DebugFormat("[SIMULATOR FEATURES MODULE]: SimulatorFeatures request");
- OSDMap data = new OSDMap();
- data["MeshRezEnabled"] = true;
- data["MeshUploadEnabled"] = true;
- data["MeshXferEnabled"] = true;
- data["PhysicsMaterialsEnabled"] = true;
-
- OSDMap typesMap = new OSDMap();
- typesMap["convex"] = true;
- typesMap["none"] = true;
- typesMap["prim"] = true;
- data["PhysicsShapeTypes"] = typesMap;
-
- // Extra information for viewers that want to use it
- OSDMap gridServicesMap = new OSDMap();
- if (m_MapImageServerURL != string.Empty)
- gridServicesMap["map-server-url"] = m_MapImageServerURL;
- if (m_SearchURL != string.Empty)
- gridServicesMap["search"] = m_SearchURL;
- data["GridServices"] = gridServicesMap;
//Send back data
Hashtable responsedata = new Hashtable();
responsedata["int_response_code"] = 200;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
- responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(data);
+
+ lock (m_features)
+ responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(m_features);
+
return responsedata;
}
-
}
}
--
cgit v1.1
From 940a248c3d3227ef8da4bba3034b25ad1f1cb241 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 22 Aug 2011 22:44:49 +0100
Subject: minor: comment out simulator features log line
---
OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
index b531c1f..7b70790 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
@@ -185,7 +185,7 @@ namespace OpenSim.Region.ClientStack.Linden
private Hashtable HandleSimulatorFeaturesRequest(Hashtable mDhttpMethod)
{
- m_log.DebugFormat("[SIMULATOR FEATURES MODULE]: SimulatorFeatures request");
+// m_log.DebugFormat("[SIMULATOR FEATURES MODULE]: SimulatorFeatures request");
//Send back data
Hashtable responsedata = new Hashtable();
--
cgit v1.1
From 4b4c5e69e59eb7461ccaa67fd4467e0606ffbe8e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 24 Aug 2011 22:45:51 +0100
Subject: Remove forcing of phantom on ground attached objects - attachments
can be both non-phantom and flagged as physical.
As per Melanie
---
OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
index 7b70790..1dd8938 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
@@ -56,8 +56,8 @@ namespace OpenSim.Region.ClientStack.Linden
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimulatorFeaturesModule : ISharedRegionModule, ISimulatorFeaturesModule
{
- private static readonly ILog m_log =
- LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+// private static readonly ILog m_log =
+// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene;
--
cgit v1.1
From 33a894f3d2cc95a7a512b86f39f3c6a6afabb015 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 27 Aug 2011 00:15:21 +0100
Subject: refactor: move SOP.IsAttachment and AttachmentPoint up into SOG to
avoid pointless duplication of identical values
---
.../Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | 2 +-
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index 8189518..c07fc73 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -330,7 +330,7 @@ namespace OpenSim.Region.ClientStack.Linden
grp.AbsolutePosition = obj.Position;
prim.RotationOffset = obj.Rotation;
- grp.RootPart.IsAttachment = false;
+ grp.IsAttachment = false;
// Required for linking
grp.RootPart.UpdateFlag = 0;
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index f71871e..dc9a6ed 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -4756,7 +4756,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
SceneObjectPart part = (SceneObjectPart)entity;
- attachPoint = part.AttachmentPoint;
+ if (part.ParentGroup != null)
+ attachPoint = part.ParentGroup.AttachmentPoint;
+ else
+ attachPoint = 0;
+
collisionPlane = Vector4.Zero;
position = part.RelativePosition;
velocity = part.Velocity;
@@ -4913,10 +4917,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//update.JointType = 0;
update.Material = data.Material;
update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim
- if (data.IsAttachment)
+ if (data.ParentGroup != null && data.ParentGroup.IsAttachment)
{
update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.FromItemID);
- update.State = (byte)((data.AttachmentPoint % 16) * 16 + (data.AttachmentPoint / 16));
+ update.State = (byte)((data.ParentGroup.AttachmentPoint % 16) * 16 + (data.ParentGroup.AttachmentPoint / 16));
}
else
{
--
cgit v1.1
From be357f8feeb438e3292292d163918a307d69c69a Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 30 Aug 2011 01:58:32 +0100
Subject: Fix bug in persisting saved appearances for npcs
Assets have to be marked non-local as well as non-temporary to persist. This is now done.
Hopefully addresses http://opensimulator.org/mantis/view.php?id=5660
---
OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 1 -
1 file changed, 1 deletion(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index ff889ea..d1ce5df 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -136,7 +136,6 @@ namespace OpenSim.Region.ClientStack.Linden
TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset;
CAPSFetchInventoryDescendents = m_Scene.HandleFetchInventoryDescendentsCAPS;
GetClient = m_Scene.SceneContents.GetControllingClient;
-
}
///
--
cgit v1.1
From 083ba72b28fb424e1e3edbc90c6a79d49d2215bf Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 31 Aug 2011 23:33:01 +0100
Subject: Fix a bug where the non-root parts of rezzed objects that had
previously been attachments were sending their old attachment values to the
client.
The root part state is the canonical value, so always send that instead.
Sending conflicting attachments states for non-root parts of a rezzed object is enough to crash the client.
Fixes http://opensimulator.org/mantis/view.php?id=5664.
Many thanks to mewtwo0641 for some fantastic qa work on this one.
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index dc9a6ed..661e9db 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -4761,6 +4761,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
else
attachPoint = 0;
+// m_log.DebugFormat(
+// "[LLCLIENTVIEW]: Sending attachPoint {0} for {1} {2} to {3}",
+// attachPoint, part.Name, part.LocalId, Name);
+
collisionPlane = Vector4.Zero;
position = part.RelativePosition;
velocity = part.Velocity;
@@ -4925,9 +4929,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
else
{
update.NameValue = Utils.EmptyBytes;
- update.State = data.Shape.State;
+
+ // The root part state is the canonical state for all parts of the object. The other part states in the
+ // case for attachments may contain conflicting values that can end up crashing the viewer.
+ update.State = data.ParentGroup.RootPart.Shape.State;
}
+// m_log.DebugFormat(
+// "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}",
+// update.State, data.Name, data.LocalId, Name);
+
update.ObjectData = objectData;
update.ParentID = data.ParentID;
update.PathBegin = data.Shape.PathBegin;
--
cgit v1.1
From 095b3e5756bb3160b30c9c5670ba008fa13d2e66 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 1 Sep 2011 01:22:28 +0100
Subject: Remove pointless cluttering SOP.ParentGroup != null checks.
The only times when ParentGroup might be null is during regression tests (which might not be a valid thing) and when scene objects are being constructed from the database.
At all other times it's not possible for a SOP not to have a SOG parent.
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 661e9db..e9ee7be 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -4756,10 +4756,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
SceneObjectPart part = (SceneObjectPart)entity;
- if (part.ParentGroup != null)
- attachPoint = part.ParentGroup.AttachmentPoint;
- else
- attachPoint = 0;
+ attachPoint = part.ParentGroup.AttachmentPoint;
// m_log.DebugFormat(
// "[LLCLIENTVIEW]: Sending attachPoint {0} for {1} {2} to {3}",
@@ -4921,7 +4918,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//update.JointType = 0;
update.Material = data.Material;
update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim
- if (data.ParentGroup != null && data.ParentGroup.IsAttachment)
+ if (data.ParentGroup.IsAttachment)
{
update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.FromItemID);
update.State = (byte)((data.ParentGroup.AttachmentPoint % 16) * 16 + (data.ParentGroup.AttachmentPoint / 16));
--
cgit v1.1
From 7eca929686bd2db1cb42f5c9740fd1d186cdc8b1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 1 Sep 2011 02:09:41 +0100
Subject: Eliminate pointless checks of SOG.RootPart != null
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
---
OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs | 2 --
1 file changed, 2 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
index 15139a3..1c47f0e 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
@@ -322,8 +322,6 @@ namespace OpenSim.Region.ClientStack.Linden
rootpart.NextOwnerMask = next_owner_mask;
rootpart.Material = (byte)material;
-
-
m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor);
responsedata["int_response_code"] = 200; //501; //410; //404;
--
cgit v1.1