diff options
author | UbitUmarov | 2017-08-24 02:11:40 +0100 |
---|---|---|
committer | UbitUmarov | 2017-08-24 02:11:40 +0100 |
commit | 05b8ead8b236c041b9128ae07ce8160c12a44f35 (patch) | |
tree | d4d425e6f0f4b7684c5ad7d7679c829be1d9f2fb /OpenSim | |
parent | change a few more parcel eject code paths (diff) | |
download | opensim-SC_OLD-05b8ead8b236c041b9128ae07ce8160c12a44f35.zip opensim-SC_OLD-05b8ead8b236c041b9128ae07ce8160c12a44f35.tar.gz opensim-SC_OLD-05b8ead8b236c041b9128ae07ce8160c12a44f35.tar.bz2 opensim-SC_OLD-05b8ead8b236c041b9128ae07ce8160c12a44f35.tar.xz |
frozen avatars should not do local teleports. Possible none should not be allowed, but that may be abusive
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index c93c54d..9b094f7 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -371,7 +371,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
371 | teleportFlags |= (uint)TeleportFlags.Godlike; | 371 | teleportFlags |= (uint)TeleportFlags.Godlike; |
372 | } | 372 | } |
373 | 373 | ||
374 | if (!sp.Scene.Permissions.CanTeleport(sp.UUID)) | 374 | else if (!sp.Scene.Permissions.CanTeleport(sp.UUID)) |
375 | return; | 375 | return; |
376 | 376 | ||
377 | string destinationRegionName = "(not found)"; | 377 | string destinationRegionName = "(not found)"; |
@@ -391,17 +391,27 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
391 | 391 | ||
392 | try | 392 | try |
393 | { | 393 | { |
394 | // Reset animations; the viewer does that in teleports. | ||
395 | sp.Animator.ResetAnimations(); | ||
396 | 394 | ||
397 | if (regionHandle == sp.Scene.RegionInfo.RegionHandle) | 395 | if (regionHandle == sp.Scene.RegionInfo.RegionHandle) |
398 | { | 396 | { |
397 | if(!sp.AllowMovement) | ||
398 | { | ||
399 | sp.ControllingClient.SendTeleportFailed("You are frozen"); | ||
400 | m_entityTransferStateMachine.ResetFromTransit(sp.UUID); | ||
401 | return; | ||
402 | } | ||
403 | |||
404 | // Reset animations; the viewer does that in teleports. | ||
405 | sp.Animator.ResetAnimations(); | ||
399 | destinationRegionName = sp.Scene.RegionInfo.RegionName; | 406 | destinationRegionName = sp.Scene.RegionInfo.RegionName; |
400 | 407 | ||
401 | TeleportAgentWithinRegion(sp, position, lookAt, teleportFlags); | 408 | TeleportAgentWithinRegion(sp, position, lookAt, teleportFlags); |
402 | } | 409 | } |
403 | else // Another region possibly in another simulator | 410 | else // Another region possibly in another simulator |
404 | { | 411 | { |
412 | // Reset animations; the viewer does that in teleports. | ||
413 | sp.Animator.ResetAnimations(); | ||
414 | |||
405 | GridRegion finalDestination = null; | 415 | GridRegion finalDestination = null; |
406 | try | 416 | try |
407 | { | 417 | { |