aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs6
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs10
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs30
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs6
10 files changed, 49 insertions, 49 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 0e17496..393cd03 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -5222,11 +5222,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5222 } 5222 }
5223 catch (Exception e) 5223 catch (Exception e)
5224 { 5224 {
5225 m_log.Error("[GENERICMESSAGE] " + e); 5225 m_log.ErrorFormat(
5226 "[LLCLIENTVIEW]: Exeception when handling generic message {0}{1}", e.Message, e.StackTrace);
5226 } 5227 }
5227 } 5228 }
5228 } 5229 }
5229 m_log.Error("[GENERICMESSAGE] Not handling GenericMessage with method-type of: " + method); 5230
5231 //m_log.Debug("[LLCLIENTVIEW]: Not handling GenericMessage with method-type of: " + method);
5230 return false; 5232 return false;
5231 } 5233 }
5232 5234
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 209e35c..5aeca83 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -695,9 +695,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
695 if (packet.Header.Reliable && !udpClient.PacketArchive.TryEnqueue(packet.Header.Sequence)) 695 if (packet.Header.Reliable && !udpClient.PacketArchive.TryEnqueue(packet.Header.Sequence))
696 { 696 {
697 if (packet.Header.Resent) 697 if (packet.Header.Resent)
698 m_log.Debug("[LLUDPSERVER]: Received a resend of already processed packet #" + packet.Header.Sequence + ", type: " + packet.Type); 698 m_log.DebugFormat(
699 else 699 "[LLUDPSERVER]: Received a resend of already processed packet #{0}, type {1} from {2}",
700 m_log.Warn("[LLUDPSERVER]: Received a duplicate (not marked as resend) of packet #" + packet.Header.Sequence + ", type: " + packet.Type); 700 packet.Header.Sequence, packet.Type, client.Name);
701 else
702 m_log.WarnFormat(
703 "[LLUDPSERVER]: Received a duplicate (not marked as resend) of packet #{0}, type {1} from {2}",
704 packet.Header.Sequence, packet.Type, client.Name);
701 705
702 // Avoid firing a callback twice for the same packet 706 // Avoid firing a callback twice for the same packet
703 return; 707 return;
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
index 8aa87fd..a3238df 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
@@ -187,18 +187,20 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
187 int start, end; 187 int start, end;
188 if (TryParseRange(range, out start, out end)) 188 if (TryParseRange(range, out start, out end))
189 { 189 {
190 end = Utils.Clamp(end, 1, texture.Data.Length); 190 end = Utils.Clamp(end, 1, texture.Data.Length - 1);
191 start = Utils.Clamp(start, 0, end - 1); 191 start = Utils.Clamp(start, 0, end - 1);
192 int len = end - start + 1;
192 193
193 //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); 194 //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
194 195
195 if (end - start < texture.Data.Length) 196 if (len < texture.Data.Length)
196 response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent; 197 response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent;
197 198
198 response.ContentLength = end - start; 199 response.ContentLength = len;
199 response.ContentType = texture.Metadata.ContentType; 200 response.ContentType = texture.Metadata.ContentType;
201 response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length));
200 202
201 response.Body.Write(texture.Data, start, end - start); 203 response.Body.Write(texture.Data, start, len);
202 } 204 }
203 else 205 else
204 { 206 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index e1c0949..5378930 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -191,7 +191,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
191 itemID = group.GetFromItemID(); 191 itemID = group.GetFromItemID();
192 } 192 }
193 193
194 SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemID, group); 194 ShowAttachInUserInventory(remoteClient, AttachmentPt, itemID, group);
195 195
196 AttachToAgent(sp, group, AttachmentPt, attachPos, silent); 196 AttachToAgent(sp, group, AttachmentPt, attachPos, silent);
197 } 197 }
@@ -219,8 +219,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
219 219
220 public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) 220 public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
221 { 221 {
222 m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name);
223
224 return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true); 222 return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true);
225 } 223 }
226 224
@@ -238,11 +236,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
238 if (updateInventoryStatus) 236 if (updateInventoryStatus)
239 { 237 {
240 if (att == null) 238 if (att == null)
241 {
242 ShowDetachInUserInventory(itemID, remoteClient); 239 ShowDetachInUserInventory(itemID, remoteClient);
243 } 240 else
244 241 ShowAttachInUserInventory(att, remoteClient, itemID, AttachmentPt);
245 SetAttachmentInventoryStatus(att, remoteClient, itemID, AttachmentPt);
246 } 242 }
247 243
248 if (null == att) 244 if (null == att)
@@ -313,12 +309,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
313 return null; 309 return null;
314 } 310 }
315 311
316 public UUID SetAttachmentInventoryStatus( 312 /// <summary>
313 /// Update the user inventory to the attachment of an item
314 /// </summary>
315 /// <param name="att"></param>
316 /// <param name="remoteClient"></param>
317 /// <param name="itemID"></param>
318 /// <param name="AttachmentPt"></param>
319 /// <returns></returns>
320 protected UUID ShowAttachInUserInventory(
317 SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) 321 SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
318 { 322 {
319 m_log.DebugFormat( 323// m_log.DebugFormat(
320 "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})", 324// "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})",
321 remoteClient.Name, att.Name, itemID); 325// remoteClient.Name, att.Name, itemID);
322 326
323 if (!att.IsDeleted) 327 if (!att.IsDeleted)
324 AttachmentPt = att.RootPart.AttachmentPoint; 328 AttachmentPt = att.RootPart.AttachmentPoint;
@@ -343,7 +347,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
343 /// <param name="AttachmentPt"></param> 347 /// <param name="AttachmentPt"></param>
344 /// <param name="itemID"></param> 348 /// <param name="itemID"></param>
345 /// <param name="att"></param> 349 /// <param name="att"></param>
346 public void SetAttachmentInventoryStatus( 350 protected void ShowAttachInUserInventory(
347 IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) 351 IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
348 { 352 {
349// m_log.DebugFormat( 353// m_log.DebugFormat(
@@ -407,7 +411,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
407 // Save avatar attachment information 411 // Save avatar attachment information
408 if (m_scene.AvatarFactory != null) 412 if (m_scene.AvatarFactory != null)
409 { 413 {
410 m_log.Debug("[ATTACHMENTS MODULE]: Dettaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID); 414 m_log.Debug("[ATTACHMENTS MODULE]: Detaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID);
411 m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); 415 m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
412 } 416 }
413 } 417 }
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 7e5a8ec..22c8937 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
198 198
199 public void UpdateDatabase(UUID user, AvatarAppearance appearance) 199 public void UpdateDatabase(UUID user, AvatarAppearance appearance)
200 { 200 {
201 m_log.DebugFormat("[APPEARANCE]: UpdateDatabase"); 201 //m_log.DebugFormat("[APPEARANCE]: UpdateDatabase");
202 AvatarData adata = new AvatarData(appearance); 202 AvatarData adata = new AvatarData(appearance);
203 m_scene.AvatarService.SetAvatar(user, adata); 203 m_scene.AvatarService.SetAvatar(user, adata);
204 } 204 }
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index 6a0fb63..a675928 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -114,17 +114,6 @@ namespace OpenSim.Region.Framework.Interfaces
114 /// <param name="itemID"></param> 114 /// <param name="itemID"></param>
115 /// <param name="remoteClient"></param> 115 /// <param name="remoteClient"></param>
116 void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient); 116 void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient);
117
118 /// <summary>
119 /// Update the user inventory to the attachment of an item
120 /// </summary>
121 /// <param name="att"></param>
122 /// <param name="remoteClient"></param>
123 /// <param name="itemID"></param>
124 /// <param name="AttachmentPt"></param>
125 /// <returns></returns>
126 UUID SetAttachmentInventoryStatus(
127 SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
128 117
129 /// <summary> 118 /// <summary>
130 /// Update the user inventory to show a detach. 119 /// Update the user inventory to show a detach.
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0e1b4b1..abec699 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1348,11 +1348,15 @@ namespace OpenSim.Region.Framework.Scenes
1348 if (m_frame % m_update_presences == 0) 1348 if (m_frame % m_update_presences == 0)
1349 m_sceneGraph.UpdatePresences(); 1349 m_sceneGraph.UpdatePresences();
1350 1350
1351<<<<<<< HEAD:OpenSim/Region/Framework/Scenes/Scene.cs
1351 // Update SceneObjectGroups that have scheduled themselves for updates 1352 // Update SceneObjectGroups that have scheduled themselves for updates
1352 // Objects queue their updates onto all scene presences 1353 // Objects queue their updates onto all scene presences
1353 if (m_frame % m_update_objects == 0) 1354 if (m_frame % m_update_objects == 0)
1354 m_sceneGraph.UpdateObjectGroups(); 1355 m_sceneGraph.UpdateObjectGroups();
1355 1356
1357=======
1358 // Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client)
1359>>>>>>> master:OpenSim/Region/Framework/Scenes/Scene.cs
1356 if (m_frame % m_update_coarse_locations == 0) 1360 if (m_frame % m_update_coarse_locations == 0)
1357 { 1361 {
1358 List<Vector3> coarseLocations; 1362 List<Vector3> coarseLocations;
@@ -1370,9 +1374,12 @@ namespace OpenSim.Region.Framework.Scenes
1370 m_sceneGraph.UpdatePreparePhysics(); 1374 m_sceneGraph.UpdatePreparePhysics();
1371 physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2); 1375 physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2);
1372 1376
1377 // Apply any pending avatar force input to the avatar's velocity
1373 if (m_frame % m_update_entitymovement == 0) 1378 if (m_frame % m_update_entitymovement == 0)
1374 m_sceneGraph.UpdateScenePresenceMovement(); 1379 m_sceneGraph.UpdateScenePresenceMovement();
1375 1380
1381 // Perform the main physics update. This will do the actual work of moving objects and avatars according to their
1382 // velocity
1376 int tmpPhysicsMS = Util.EnvironmentTickCount(); 1383 int tmpPhysicsMS = Util.EnvironmentTickCount();
1377 if (m_frame % m_update_physics == 0) 1384 if (m_frame % m_update_physics == 0)
1378 { 1385 {
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 6246400..9c3486e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -568,16 +568,6 @@ namespace OpenSim.Region.Framework.Scenes
568 m_parentScene.AttachmentsModule.DetachSingleAttachmentToGround(group.UUID, remoteClient); 568 m_parentScene.AttachmentsModule.DetachSingleAttachmentToGround(group.UUID, remoteClient);
569 } 569 }
570 570
571 protected internal void DetachObject(uint objectLocalID, IClientAPI remoteClient)
572 {
573 SceneObjectGroup group = GetGroupByPrim(objectLocalID);
574 if (group != null)
575 {
576 //group.DetachToGround();
577 m_parentScene.AttachmentsModule.ShowDetachInUserInventory(group.GetFromItemID(), remoteClient);
578 }
579 }
580
581 protected internal void HandleUndo(IClientAPI remoteClient, UUID primId) 571 protected internal void HandleUndo(IClientAPI remoteClient, UUID primId)
582 { 572 {
583 if (primId != UUID.Zero) 573 if (primId != UUID.Zero)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 37630e0..5b610d3 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1796,9 +1796,9 @@ namespace OpenSim.Region.Framework.Scenes
1796 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); 1796 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
1797 } 1797 }
1798 } 1798 }
1799 // m_log.DebugFormat( 1799// m_log.DebugFormat(
1800 // "[SCENE]: Storing {0}, {1} in {2}", 1800// "[SCENE]: Storing {0}, {1} in {2}",
1801 // Name, UUID, m_scene.RegionInfo.RegionName); 1801// Name, UUID, m_scene.RegionInfo.RegionName);
1802 1802
1803 SceneObjectGroup backup_group = Copy(false); 1803 SceneObjectGroup backup_group = Copy(false);
1804 backup_group.RootPart.Velocity = RootPart.Velocity; 1804 backup_group.RootPart.Velocity = RootPart.Velocity;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6d0ecf0..caf376b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1663,6 +1663,8 @@ namespace OpenSim.Region.Framework.Scenes
1663 } 1663 }
1664 } 1664 }
1665 1665
1666 // If the agent update does move the avatar, then calculate the force ready for the velocity update,
1667 // which occurs later in the main scene loop
1666 if (update_movementflag || (update_rotation && DCFlagKeyPressed)) 1668 if (update_movementflag || (update_rotation && DCFlagKeyPressed))
1667 { 1669 {
1668 // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); 1670 // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));
@@ -4294,8 +4296,8 @@ if (m_animator.m_jumping) force.Z = m_animator.m_jumpVelocity; // add for ju
4294 return; 4296 return;
4295 4297
4296 UUID itemID = m_appearance.GetAttachedItem(p); 4298 UUID itemID = m_appearance.GetAttachedItem(p);
4297 UUID assetID = m_appearance.GetAttachedAsset(p);
4298 4299
4300 //UUID assetID = m_appearance.GetAttachedAsset(p);
4299 // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down 4301 // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down
4300 // But they're not used anyway, the item is being looked up for now, so let's proceed. 4302 // But they're not used anyway, the item is being looked up for now, so let's proceed.
4301 //if (UUID.Zero == assetID) 4303 //if (UUID.Zero == assetID)
@@ -4333,7 +4335,7 @@ if (m_animator.m_jumping) force.Z = m_animator.m_jumpVelocity; // add for ju
4333 } 4335 }
4334 catch (Exception e) 4336 catch (Exception e)
4335 { 4337 {
4336 m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e.ToString()); 4338 m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}{1}", e.Message, e.StackTrace);
4337 } 4339 }
4338 } 4340 }
4339 } 4341 }