diff options
author | UbitUmarov | 2016-09-03 07:51:53 +0100 |
---|---|---|
committer | UbitUmarov | 2016-09-03 07:51:53 +0100 |
commit | 9aec227767cf726216514d0494f11b5d8bf5b807 (patch) | |
tree | 8f308f4c1eefa19954fc30a560ac780f8a8e916a /OpenSim/Region/CoreModules/Framework | |
parent | merge issue (diff) | |
parent | tests making sure evering thing is coerently wrong.. (diff) | |
download | opensim-SC-9aec227767cf726216514d0494f11b5d8bf5b807.zip opensim-SC-9aec227767cf726216514d0494f11b5d8bf5b807.tar.gz opensim-SC-9aec227767cf726216514d0494f11b5d8bf5b807.tar.bz2 opensim-SC-9aec227767cf726216514d0494f11b5d8bf5b807.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 76 |
2 files changed, 44 insertions, 40 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 58f3dde..71a0e52 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -478,9 +478,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
478 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); | 478 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); |
479 | 479 | ||
480 | sp.ControllingClient.SendTeleportStart(teleportFlags); | 480 | sp.ControllingClient.SendTeleportStart(teleportFlags); |
481 | lookAt.Z = 0f; | ||
482 | |||
483 | if(Math.Abs(lookAt.X) < 0.01f && Math.Abs(lookAt.Y) < 0.01f) | ||
484 | { | ||
485 | lookAt.X = 1.0f; | ||
486 | lookAt.Y = 0; | ||
487 | } | ||
481 | 488 | ||
482 | sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags); | 489 | sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags); |
483 | sp.TeleportFlags = (Constants.TeleportFlags)teleportFlags; | 490 | sp.TeleportFlags = (Constants.TeleportFlags)teleportFlags; |
491 | sp.RotateToLookAt(lookAt); | ||
484 | sp.Velocity = Vector3.Zero; | 492 | sp.Velocity = Vector3.Zero; |
485 | sp.Teleport(position); | 493 | sp.Teleport(position); |
486 | 494 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 00e2670..fa7803f 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -261,64 +261,60 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
261 | { | 261 | { |
262 | InventoryItemBase item = m_Scene.InventoryService.GetItem(remoteClient.AgentId, itemID); | 262 | InventoryItemBase item = m_Scene.InventoryService.GetItem(remoteClient.AgentId, itemID); |
263 | 263 | ||
264 | if (item == null) | ||
265 | { | ||
266 | m_log.ErrorFormat( | ||
267 | "[INVENTORY ACCESS MODULE]: Could not find item {0} for caps inventory update", itemID); | ||
268 | return UUID.Zero; | ||
269 | } | ||
270 | |||
264 | if (item.Owner != remoteClient.AgentId) | 271 | if (item.Owner != remoteClient.AgentId) |
265 | return UUID.Zero; | 272 | return UUID.Zero; |
266 | 273 | ||
267 | if (item != null) | 274 | if ((InventoryType)item.InvType == InventoryType.Notecard) |
268 | { | 275 | { |
269 | if ((InventoryType)item.InvType == InventoryType.Notecard) | 276 | if (!m_Scene.Permissions.CanEditNotecard(itemID, UUID.Zero, remoteClient.AgentId)) |
270 | { | 277 | { |
271 | if (!m_Scene.Permissions.CanEditNotecard(itemID, UUID.Zero, remoteClient.AgentId)) | 278 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit notecard", false); |
272 | { | 279 | return UUID.Zero; |
273 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit notecard", false); | ||
274 | return UUID.Zero; | ||
275 | } | ||
276 | |||
277 | remoteClient.SendAlertMessage("Notecard saved"); | ||
278 | } | 280 | } |
279 | else if ((InventoryType)item.InvType == InventoryType.LSL) | ||
280 | { | ||
281 | if (!m_Scene.Permissions.CanEditScript(itemID, UUID.Zero, remoteClient.AgentId)) | ||
282 | { | ||
283 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit script", false); | ||
284 | return UUID.Zero; | ||
285 | } | ||
286 | 281 | ||
287 | remoteClient.SendAlertMessage("Script saved"); | 282 | remoteClient.SendAlertMessage("Notecard saved"); |
288 | } | 283 | } |
289 | else if ((CustomInventoryType)item.InvType == CustomInventoryType.AnimationSet) | 284 | else if ((InventoryType)item.InvType == InventoryType.LSL) |
285 | { | ||
286 | if (!m_Scene.Permissions.CanEditScript(itemID, UUID.Zero, remoteClient.AgentId)) | ||
290 | { | 287 | { |
291 | AnimationSet animSet = new AnimationSet(data); | 288 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit script", false); |
292 | if (!animSet.Validate(x => { | 289 | return UUID.Zero; |
290 | } | ||
291 | |||
292 | remoteClient.SendAlertMessage("Script saved"); | ||
293 | } | ||
294 | else if ((CustomInventoryType)item.InvType == CustomInventoryType.AnimationSet) | ||
295 | { | ||
296 | AnimationSet animSet = new AnimationSet(data); | ||
297 | if (!animSet.Validate(x => { | ||
293 | int perms = m_Scene.InventoryService.GetAssetPermissions(remoteClient.AgentId, x); | 298 | int perms = m_Scene.InventoryService.GetAssetPermissions(remoteClient.AgentId, x); |
294 | int required = (int)(PermissionMask.Transfer | PermissionMask.Copy); | 299 | int required = (int)(PermissionMask.Transfer | PermissionMask.Copy); |
295 | if ((perms & required) != required) | 300 | if ((perms & required) != required) |
296 | return false; | 301 | return false; |
297 | return true; | 302 | return true; |
298 | })) | 303 | })) |
299 | { | 304 | { |
300 | data = animSet.ToBytes(); | 305 | data = animSet.ToBytes(); |
301 | } | ||
302 | } | 306 | } |
307 | } | ||
303 | 308 | ||
304 | AssetBase asset = | 309 | AssetBase asset = |
305 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data, remoteClient.AgentId.ToString()); | 310 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data, remoteClient.AgentId.ToString()); |
306 | item.AssetID = asset.FullID; | 311 | item.AssetID = asset.FullID; |
307 | m_Scene.AssetService.Store(asset); | 312 | m_Scene.AssetService.Store(asset); |
308 | |||
309 | m_Scene.InventoryService.UpdateItem(item); | ||
310 | 313 | ||
311 | // remoteClient.SendInventoryItemCreateUpdate(item); | 314 | m_Scene.InventoryService.UpdateItem(item); |
312 | return (asset.FullID); | ||
313 | } | ||
314 | else | ||
315 | { | ||
316 | m_log.ErrorFormat( | ||
317 | "[INVENTORY ACCESS MODULE]: Could not find item {0} for caps inventory update", | ||
318 | itemID); | ||
319 | } | ||
320 | 315 | ||
321 | return UUID.Zero; | 316 | // remoteClient.SendInventoryItemCreateUpdate(item); |
317 | return (asset.FullID); | ||
322 | } | 318 | } |
323 | 319 | ||
324 | public virtual bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset) | 320 | public virtual bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset) |