diff options
Diffstat (limited to 'OpenSim/Region')
5 files changed, 46 insertions, 30 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index a1451ce..4d360f6 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | |||
@@ -134,7 +134,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
134 | 134 | ||
135 | foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids) | 135 | foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids) |
136 | { | 136 | { |
137 | m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); | 137 | if (kvp.Key != UUID.Zero) |
138 | m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); | ||
138 | } | 139 | } |
139 | 140 | ||
140 | m_requestCallbackTimer.Enabled = true; | 141 | m_requestCallbackTimer.Enabled = true; |
@@ -269,7 +270,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
269 | } | 270 | } |
270 | catch (Exception e) | 271 | catch (Exception e) |
271 | { | 272 | { |
272 | m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}", e); | 273 | m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}{1}", e.Message, e.StackTrace); |
273 | } | 274 | } |
274 | } | 275 | } |
275 | 276 | ||
@@ -285,7 +286,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
285 | catch (Exception e) | 286 | catch (Exception e) |
286 | { | 287 | { |
287 | m_log.ErrorFormat( | 288 | m_log.ErrorFormat( |
288 | "[ARCHIVER]: Terminating archive creation since asset requster callback failed with {0}", e); | 289 | "[ARCHIVER]: Terminating archive creation since asset requester callback failed with {0}{1}", |
290 | e.Message, e.StackTrace); | ||
289 | } | 291 | } |
290 | } | 292 | } |
291 | } | 293 | } |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 91c8130..cfee1b0 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1303,18 +1303,31 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1303 | 1303 | ||
1304 | public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data) | 1304 | public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data) |
1305 | { | 1305 | { |
1306 | for (int i = 0; i < data.Count; i++) | 1306 | lock (m_landList) |
1307 | { | 1307 | { |
1308 | IncomingLandObjectFromStorage(data[i]); | 1308 | //Remove all the land objects in the sim and then process our new data |
1309 | foreach (int n in m_landList.Keys) | ||
1310 | { | ||
1311 | m_scene.EventManager.TriggerLandObjectRemoved(m_landList[n].LandData.GlobalID); | ||
1312 | } | ||
1313 | m_landIDList.Initialize(); | ||
1314 | m_landList.Clear(); | ||
1315 | |||
1316 | for (int i = 0; i < data.Count; i++) | ||
1317 | { | ||
1318 | IncomingLandObjectFromStorage(data[i]); | ||
1319 | } | ||
1309 | } | 1320 | } |
1310 | } | 1321 | } |
1311 | 1322 | ||
1312 | public void IncomingLandObjectFromStorage(LandData data) | 1323 | public void IncomingLandObjectFromStorage(LandData data) |
1313 | { | 1324 | { |
1325 | |||
1314 | ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); | 1326 | ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); |
1315 | new_land.LandData = data.Copy(); | 1327 | new_land.LandData = data.Copy(); |
1316 | new_land.SetLandBitmapFromByteArray(); | 1328 | new_land.SetLandBitmapFromByteArray(); |
1317 | AddLandObject(new_land); | 1329 | AddLandObject(new_land); |
1330 | new_land.SendLandUpdateToAvatarsOverMe(); | ||
1318 | } | 1331 | } |
1319 | 1332 | ||
1320 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) | 1333 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0380199..6532537 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -400,9 +400,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
400 | if (Permissions.PropagatePermissions() && recipient != senderId) | 400 | if (Permissions.PropagatePermissions() && recipient != senderId) |
401 | { | 401 | { |
402 | // First, make sore base is limited to the next perms | 402 | // First, make sore base is limited to the next perms |
403 | itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; | 403 | itemCopy.BasePermissions = item.BasePermissions & (item.NextPermissions | (uint)PermissionMask.Move); |
404 | // By default, current equals base | 404 | // By default, current equals base |
405 | itemCopy.CurrentPermissions = itemCopy.BasePermissions; | 405 | itemCopy.CurrentPermissions = itemCopy.BasePermissions & item.CurrentPermissions; |
406 | 406 | ||
407 | // If this is an object, replace current perms | 407 | // If this is an object, replace current perms |
408 | // with folded perms | 408 | // with folded perms |
@@ -413,7 +413,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
413 | } | 413 | } |
414 | 414 | ||
415 | // Ensure there is no escalation | 415 | // Ensure there is no escalation |
416 | itemCopy.CurrentPermissions &= item.NextPermissions; | 416 | itemCopy.CurrentPermissions &= (item.NextPermissions | (uint)PermissionMask.Move); |
417 | 417 | ||
418 | // Need slam bit on xfer | 418 | // Need slam bit on xfer |
419 | itemCopy.CurrentPermissions |= 8; | 419 | itemCopy.CurrentPermissions |= 8; |
@@ -916,14 +916,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
916 | 916 | ||
917 | if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) | 917 | if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) |
918 | { | 918 | { |
919 | agentItem.BasePermissions = taskItem.BasePermissions & taskItem.NextPermissions; | 919 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
920 | if (taskItem.InvType == (int)InventoryType.Object) | 920 | if (taskItem.InvType == (int)InventoryType.Object) |
921 | agentItem.CurrentPermissions = agentItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13); | 921 | agentItem.CurrentPermissions = agentItem.BasePermissions & (((taskItem.CurrentPermissions & 7) << 13) | (taskItem.CurrentPermissions & (uint)PermissionMask.Move)); |
922 | agentItem.CurrentPermissions = agentItem.BasePermissions ; | 922 | else |
923 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; | ||
923 | 924 | ||
924 | agentItem.CurrentPermissions |= 8; | 925 | agentItem.CurrentPermissions |= 8; |
925 | agentItem.NextPermissions = taskItem.NextPermissions; | 926 | agentItem.NextPermissions = taskItem.NextPermissions; |
926 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions; | 927 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
927 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; | 928 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; |
928 | } | 929 | } |
929 | else | 930 | else |
@@ -1105,13 +1106,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1105 | if (Permissions.PropagatePermissions()) | 1106 | if (Permissions.PropagatePermissions()) |
1106 | { | 1107 | { |
1107 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions & | 1108 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions & |
1108 | srcTaskItem.NextPermissions; | 1109 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1109 | destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions & | 1110 | destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions & |
1110 | srcTaskItem.NextPermissions; | 1111 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1111 | destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions & | 1112 | destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions & |
1112 | srcTaskItem.NextPermissions; | 1113 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1113 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & | 1114 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & |
1114 | srcTaskItem.NextPermissions; | 1115 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1115 | destTaskItem.CurrentPermissions |= 8; // Slam! | 1116 | destTaskItem.CurrentPermissions |= 8; // Slam! |
1116 | } | 1117 | } |
1117 | } | 1118 | } |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs b/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs index 9beeabb..2342bfa 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs | |||
@@ -675,7 +675,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
675 | m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity | 675 | m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity |
676 | 676 | ||
677 | d.Vector3 pos = d.BodyGetPosition(Body); | 677 | d.Vector3 pos = d.BodyGetPosition(Body); |
678 | Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f); | 678 | // Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f); |
679 | Vector3 posChange = new Vector3(); | 679 | Vector3 posChange = new Vector3(); |
680 | posChange.X = pos.X - m_lastPositionVector.X; | 680 | posChange.X = pos.X - m_lastPositionVector.X; |
681 | posChange.Y = pos.Y - m_lastPositionVector.Y; | 681 | posChange.Y = pos.Y - m_lastPositionVector.Y; |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index be7c348..2e39726 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -1576,19 +1576,19 @@ Console.WriteLine(" JointCreateFixed"); | |||
1576 | //Console.WriteLine("Move " + m_primName); | 1576 | //Console.WriteLine("Move " + m_primName); |
1577 | if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 | 1577 | if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 |
1578 | // NON-'VEHICLES' are dealt with here | 1578 | // NON-'VEHICLES' are dealt with here |
1579 | if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) | 1579 | // if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) |
1580 | { | 1580 | // { |
1581 | d.Vector3 avel2 = d.BodyGetAngularVel(Body); | 1581 | // d.Vector3 avel2 = d.BodyGetAngularVel(Body); |
1582 | /* | 1582 | // /* |
1583 | if (m_angularlock.X == 1) | 1583 | // if (m_angularlock.X == 1) |
1584 | avel2.X = 0; | 1584 | // avel2.X = 0; |
1585 | if (m_angularlock.Y == 1) | 1585 | // if (m_angularlock.Y == 1) |
1586 | avel2.Y = 0; | 1586 | // avel2.Y = 0; |
1587 | if (m_angularlock.Z == 1) | 1587 | // if (m_angularlock.Z == 1) |
1588 | avel2.Z = 0; | 1588 | // avel2.Z = 0; |
1589 | d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z); | 1589 | // d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z); |
1590 | */ | 1590 | // */ |
1591 | } | 1591 | // } |
1592 | //float PID_P = 900.0f; | 1592 | //float PID_P = 900.0f; |
1593 | 1593 | ||
1594 | float m_mass = CalculateMass(); | 1594 | float m_mass = CalculateMass(); |