aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie Thielker2010-09-14 22:14:23 +0200
committerMelanie Thielker2010-09-14 22:14:23 +0200
commit540a1912cea13f42b3fb6f4e4152de2be46f062c (patch)
tree1ba8209dc0f40780181499be8556c8fe6fc97ceb /OpenSim/Region/Framework
parentAdjust the code for ghost prim removal to new information from Kitto (diff)
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC_OLD-540a1912cea13f42b3fb6f4e4152de2be46f062c.zip
opensim-SC_OLD-540a1912cea13f42b3fb6f4e4152de2be46f062c.tar.gz
opensim-SC_OLD-540a1912cea13f42b3fb6f4e4152de2be46f062c.tar.bz2
opensim-SC_OLD-540a1912cea13f42b3fb6f4e4152de2be46f062c.tar.xz
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs14
-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.cs10
5 files changed, 18 insertions, 33 deletions
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..ac2246c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1343,16 +1343,17 @@ namespace OpenSim.Region.Framework.Scenes
1343 // Check if any objects have reached their targets 1343 // Check if any objects have reached their targets
1344 CheckAtTargets(); 1344 CheckAtTargets();
1345 1345
1346 // Run through all ScenePresences looking for updates
1347 // Presence updates and queued object updates for each presence are sent to clients
1348 if (m_frame % m_update_presences == 0)
1349 m_sceneGraph.UpdatePresences();
1350
1351 // Update SceneObjectGroups that have scheduled themselves for updates 1346 // Update SceneObjectGroups that have scheduled themselves for updates
1352 // Objects queue their updates onto all scene presences 1347 // Objects queue their updates onto all scene presences
1353 if (m_frame % m_update_objects == 0) 1348 if (m_frame % m_update_objects == 0)
1354 m_sceneGraph.UpdateObjectGroups(); 1349 m_sceneGraph.UpdateObjectGroups();
1355 1350
1351 // Run through all ScenePresences looking for updates
1352 // Presence updates and queued object updates for each presence are sent to clients
1353 if (m_frame % m_update_presences == 0)
1354 m_sceneGraph.UpdatePresences();
1355
1356 // Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client)
1356 if (m_frame % m_update_coarse_locations == 0) 1357 if (m_frame % m_update_coarse_locations == 0)
1357 { 1358 {
1358 List<Vector3> coarseLocations; 1359 List<Vector3> coarseLocations;
@@ -1370,9 +1371,12 @@ namespace OpenSim.Region.Framework.Scenes
1370 m_sceneGraph.UpdatePreparePhysics(); 1371 m_sceneGraph.UpdatePreparePhysics();
1371 physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2); 1372 physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2);
1372 1373
1374 // Apply any pending avatar force input to the avatar's velocity
1373 if (m_frame % m_update_entitymovement == 0) 1375 if (m_frame % m_update_entitymovement == 0)
1374 m_sceneGraph.UpdateScenePresenceMovement(); 1376 m_sceneGraph.UpdateScenePresenceMovement();
1375 1377
1378 // Perform the main physics update. This will do the actual work of moving objects and avatars according to their
1379 // velocity
1376 int tmpPhysicsMS = Util.EnvironmentTickCount(); 1380 int tmpPhysicsMS = Util.EnvironmentTickCount();
1377 if (m_frame % m_update_physics == 0) 1381 if (m_frame % m_update_physics == 0)
1378 { 1382 {
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 e933e77..52f6c1a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1800,9 +1800,9 @@ namespace OpenSim.Region.Framework.Scenes
1800 } 1800 }
1801 } 1801 }
1802 } 1802 }
1803 // m_log.DebugFormat( 1803// m_log.DebugFormat(
1804 // "[SCENE]: Storing {0}, {1} in {2}", 1804// "[SCENE]: Storing {0}, {1} in {2}",
1805 // Name, UUID, m_scene.RegionInfo.RegionName); 1805// Name, UUID, m_scene.RegionInfo.RegionName);
1806 1806
1807 SceneObjectGroup backup_group = Copy(false); 1807 SceneObjectGroup backup_group = Copy(false);
1808 backup_group.RootPart.Velocity = RootPart.Velocity; 1808 backup_group.RootPart.Velocity = RootPart.Velocity;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6d0ecf0..ed92d86 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)
@@ -4328,12 +4330,12 @@ if (m_animator.m_jumping) force.Z = m_animator.m_jumpVelocity; // add for ju
4328 } 4330 }
4329 4331
4330 m_log.InfoFormat( 4332 m_log.InfoFormat(
4331 "[ATTACHMENT]: Rezzed attachment in point {0} from item {1} and asset {2} ({3})", 4333 "[ATTACHMENT]: Rezzed attachment in point {0} from item {1} and asset {3}",
4332 p, itemID, assetID, asset); 4334 p, itemID, asset);
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 }