aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-05 19:07:37 +0000
committerMelanie Thielker2017-01-05 19:07:37 +0000
commitb16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch)
tree6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentMake it possible to disable the bakes module in the way it is described in co... (diff)
downloadopensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs278
1 files changed, 139 insertions, 139 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index c1b1a63..29e139b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -108,8 +108,8 @@ namespace OpenSim.Region.Framework.Scenes
108 /// The current state of this presence. Governs only the existence lifecycle. See ScenePresenceStateMachine 108 /// The current state of this presence. Governs only the existence lifecycle. See ScenePresenceStateMachine
109 /// for more details. 109 /// for more details.
110 /// </summary> 110 /// </summary>
111 public ScenePresenceState LifecycleState 111 public ScenePresenceState LifecycleState
112 { 112 {
113 get 113 get
114 { 114 {
115 return m_stateMachine.GetState(); 115 return m_stateMachine.GetState();
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Framework.Scenes
126 /// the viewer fires these in quick succession. 126 /// the viewer fires these in quick succession.
127 /// </summary> 127 /// </summary>
128 /// <remarks> 128 /// <remarks>
129 /// TODO: The child -> agent transition should be folded into LifecycleState and the CompleteMovement 129 /// TODO: The child -> agent transition should be folded into LifecycleState and the CompleteMovement
130 /// regulation done there. 130 /// regulation done there.
131 /// </remarks> 131 /// </remarks>
132 private object m_completeMovementLock = new object(); 132 private object m_completeMovementLock = new object();
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Framework.Scenes
134// private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes(); 134// private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes();
135 private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags)); 135 private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags));
136 private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f); 136 private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f);
137 137
138 /// <summary> 138 /// <summary>
139 /// Experimentally determined "fudge factor" to make sit-target positions 139 /// Experimentally determined "fudge factor" to make sit-target positions
140 /// the same as in SecondLife. Fudge factor was tested for 36 different 140 /// the same as in SecondLife. Fudge factor was tested for 36 different
@@ -241,7 +241,7 @@ namespace OpenSim.Region.Framework.Scenes
241 return m_currentParcelHide; 241 return m_currentParcelHide;
242 } 242 }
243 } 243 }
244 244
245 /// <value> 245 /// <value>
246 /// The animator for this avatar 246 /// The animator for this avatar
247 /// </value> 247 /// </value>
@@ -356,7 +356,7 @@ namespace OpenSim.Region.Framework.Scenes
356 protected bool m_reprioritizationBusy; 356 protected bool m_reprioritizationBusy;
357 protected Vector3 m_reprioritizationLastPosition; 357 protected Vector3 m_reprioritizationLastPosition;
358 protected float m_reprioritizationLastDrawDistance; 358 protected float m_reprioritizationLastDrawDistance;
359 359
360 private Quaternion m_headrotation = Quaternion.Identity; 360 private Quaternion m_headrotation = Quaternion.Identity;
361 361
362 //PauPaw:Proper PID Controler for autopilot************ 362 //PauPaw:Proper PID Controler for autopilot************
@@ -377,7 +377,7 @@ namespace OpenSim.Region.Framework.Scenes
377 377
378 //private bool m_collisionEventFlag = false; 378 //private bool m_collisionEventFlag = false;
379 private object m_collisionEventLock = new Object(); 379 private object m_collisionEventLock = new Object();
380 380
381 private int m_movementAnimationUpdateCounter = 0; 381 private int m_movementAnimationUpdateCounter = 0;
382 382
383 public Vector3 PrevSitOffset { get; set; } 383 public Vector3 PrevSitOffset { get; set; }
@@ -424,7 +424,7 @@ namespace OpenSim.Region.Framework.Scenes
424 DIR_CONTROL_FLAG_UP_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS, 424 DIR_CONTROL_FLAG_UP_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS,
425 DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG 425 DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG
426 } 426 }
427 427
428 /// <summary> 428 /// <summary>
429 /// Position at which a significant movement was made 429 /// Position at which a significant movement was made
430 /// </summary> 430 /// </summary>
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Framework.Scenes
528 m_rootRegionHandle = value; 528 m_rootRegionHandle = value;
529 // position rounded to lower multiple of 256m 529 // position rounded to lower multiple of 256m
530 m_rootRegionPosition.X = (float)((m_rootRegionHandle >> 32) & 0xffffff00); 530 m_rootRegionPosition.X = (float)((m_rootRegionHandle >> 32) & 0xffffff00);
531 m_rootRegionPosition.Y = (float)(m_rootRegionHandle & 0xffffff00); 531 m_rootRegionPosition.Y = (float)(m_rootRegionHandle & 0xffffff00);
532 } 532 }
533 } 533 }
534 534
@@ -562,7 +562,7 @@ namespace OpenSim.Region.Framework.Scenes
562 return a; 562 return a;
563 } 563 }
564 } 564 }
565 #endregion 565 #endregion
566 566
567 public string Firstname { get; private set; } 567 public string Firstname { get; private set; }
568 public string Lastname { get; private set; } 568 public string Lastname { get; private set; }
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Framework.Scenes
603 public bool AllowMovement { get; set; } 603 public bool AllowMovement { get; set; }
604 604
605 private bool m_setAlwaysRun; 605 private bool m_setAlwaysRun;
606 606
607 public bool SetAlwaysRun 607 public bool SetAlwaysRun
608 { 608 {
609 get 609 get
@@ -689,7 +689,7 @@ namespace OpenSim.Region.Framework.Scenes
689 return rootPart.AbsolutePosition + (m_pos * rootPart.GetWorldRotation()); 689 return rootPart.AbsolutePosition + (m_pos * rootPart.GetWorldRotation());
690 } 690 }
691 } 691 }
692 692
693 return m_pos; 693 return m_pos;
694 } 694 }
695 set 695 set
@@ -777,7 +777,7 @@ namespace OpenSim.Region.Framework.Scenes
777 777
778// m_log.DebugFormat( 778// m_log.DebugFormat(
779// "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}", 779// "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}",
780// Scene.RegionInfo.RegionName, Name, m_velocity); 780// Scene.RegionInfo.RegionName, Name, m_velocity);
781 } 781 }
782 } 782 }
783 783
@@ -821,9 +821,9 @@ namespace OpenSim.Region.Framework.Scenes
821 /// </remarks> 821 /// </remarks>
822 public Quaternion Rotation 822 public Quaternion Rotation
823 { 823 {
824 get 824 get
825 { 825 {
826 return m_bodyRot; 826 return m_bodyRot;
827 } 827 }
828 828
829 set 829 set
@@ -963,10 +963,10 @@ namespace OpenSim.Region.Framework.Scenes
963 } 963 }
964 964
965 DropOldNeighbours(old); 965 DropOldNeighbours(old);
966 966
967 if (Scene.CapsModule != null) 967 if (Scene.CapsModule != null)
968 Scene.CapsModule.SetChildrenSeed(UUID, seeds); 968 Scene.CapsModule.SetChildrenSeed(UUID, seeds);
969*/ 969*/
970 KnownRegions = seeds; 970 KnownRegions = seeds;
971 //m_log.Debug(" ++++++++++AFTER+++++++++++++ "); 971 //m_log.Debug(" ++++++++++AFTER+++++++++++++ ");
972 //DumpKnownRegions(); 972 //DumpKnownRegions();
@@ -991,13 +991,13 @@ namespace OpenSim.Region.Framework.Scenes
991 /// <summary> 991 /// <summary>
992 /// This signals whether the presence is in transit between neighbouring regions. 992 /// This signals whether the presence is in transit between neighbouring regions.
993 /// </summary> 993 /// </summary>
994 /// <remarks> 994 /// <remarks>
995 /// It is not set when the presence is teleporting or logging in/out directly to a region. 995 /// It is not set when the presence is teleporting or logging in/out directly to a region.
996 /// </remarks> 996 /// </remarks>
997 public bool IsInTransit 997 public bool IsInTransit
998 { 998 {
999 get { return m_inTransit; } 999 get { return m_inTransit; }
1000 set { 1000 set {
1001 if(value) 1001 if(value)
1002 { 1002 {
1003 if (Flying) 1003 if (Flying)
@@ -1051,14 +1051,14 @@ namespace OpenSim.Region.Framework.Scenes
1051 { 1051 {
1052 get { return Util.GetViewerName(m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode)); } 1052 get { return Util.GetViewerName(m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode)); }
1053 } 1053 }
1054 1054
1055 #endregion 1055 #endregion
1056 1056
1057 #region Constructor(s) 1057 #region Constructor(s)
1058 1058
1059 public ScenePresence( 1059 public ScenePresence(
1060 IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) 1060 IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type)
1061 { 1061 {
1062 m_scene = world; 1062 m_scene = world;
1063 AttachmentsSyncLock = new Object(); 1063 AttachmentsSyncLock = new Object();
1064 AllowMovement = true; 1064 AllowMovement = true;
@@ -1092,16 +1092,16 @@ namespace OpenSim.Region.Framework.Scenes
1092 // Grouptitle = gm.GetGroupTitle(m_uuid); 1092 // Grouptitle = gm.GetGroupTitle(m_uuid);
1093 1093
1094 m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>(); 1094 m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>();
1095 1095
1096 AbsolutePosition = posLastMove = posLastSignificantMove = CameraPosition = 1096 AbsolutePosition = posLastMove = posLastSignificantMove = CameraPosition =
1097 m_reprioritizationLastPosition = ControllingClient.StartPos; 1097 m_reprioritizationLastPosition = ControllingClient.StartPos;
1098 1098
1099 m_reprioritizationLastDrawDistance = DrawDistance; 1099 m_reprioritizationLastDrawDistance = DrawDistance;
1100 1100
1101 // disable updates workjobs for now 1101 // disable updates workjobs for now
1102 childUpdatesBusy = true; 1102 childUpdatesBusy = true;
1103 m_reprioritizationBusy = true; 1103 m_reprioritizationBusy = true;
1104 1104
1105 AdjustKnownSeeds(); 1105 AdjustKnownSeeds();
1106 1106
1107 RegisterToClientEvents(); 1107 RegisterToClientEvents();
@@ -1189,7 +1189,7 @@ namespace OpenSim.Region.Framework.Scenes
1189 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); 1189 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
1190 // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); 1190 // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
1191 } 1191 }
1192 1192
1193 public void RemoveClientEvents() 1193 public void RemoveClientEvents()
1194 { 1194 {
1195 ControllingClient.OnCompleteMovementToRegion -= CompleteMovement; 1195 ControllingClient.OnCompleteMovementToRegion -= CompleteMovement;
@@ -1237,7 +1237,7 @@ namespace OpenSim.Region.Framework.Scenes
1237 /// This method is on the critical path for transferring an avatar from one region to another. Delay here 1237 /// This method is on the critical path for transferring an avatar from one region to another. Delay here
1238 /// delays that crossing. 1238 /// delays that crossing.
1239 /// </remarks> 1239 /// </remarks>
1240 1240
1241 // constants for physics position search 1241 // constants for physics position search
1242 const float PhysSearchHeight = 600f; 1242 const float PhysSearchHeight = 600f;
1243 const float PhysMinSkipGap = 50f; 1243 const float PhysMinSkipGap = 50f;
@@ -1280,7 +1280,7 @@ namespace OpenSim.Region.Framework.Scenes
1280 // if not actually on the target invalidate it 1280 // if not actually on the target invalidate it
1281 if(gotCrossUpdate && (crossingFlags & 0x04) == 0) 1281 if(gotCrossUpdate && (crossingFlags & 0x04) == 0)
1282 part.SitTargetAvatar = UUID.Zero; 1282 part.SitTargetAvatar = UUID.Zero;
1283 1283
1284 ParentID = part.LocalId; 1284 ParentID = part.LocalId;
1285 ParentPart = part; 1285 ParentPart = part;
1286 m_pos = PrevSitOffset; 1286 m_pos = PrevSitOffset;
@@ -1380,7 +1380,7 @@ namespace OpenSim.Region.Framework.Scenes
1380 int physcount = PhysNumberCollisions; 1380 int physcount = PhysNumberCollisions;
1381 1381
1382 float dist = physTestHeight - groundHeight + localAVHalfHeight; 1382 float dist = physTestHeight - groundHeight + localAVHalfHeight;
1383 1383
1384 Vector3 direction = new Vector3(0f, 0f, -1f); 1384 Vector3 direction = new Vector3(0f, 0f, -1f);
1385 Vector3 RayStart = pos; 1385 Vector3 RayStart = pos;
1386 RayStart.Z = physTestHeight; 1386 RayStart.Z = physTestHeight;
@@ -1426,7 +1426,7 @@ namespace OpenSim.Region.Framework.Scenes
1426 AbsolutePosition = pos; 1426 AbsolutePosition = pos;
1427 1427
1428// m_log.DebugFormat( 1428// m_log.DebugFormat(
1429// "Set pos {0}, vel {1} in {1} to {2} from input position of {3} on MakeRootAgent", 1429// "Set pos {0}, vel {1} in {1} to {2} from input position of {3} on MakeRootAgent",
1430// Name, Scene.Name, AbsolutePosition, pos); 1430// Name, Scene.Name, AbsolutePosition, pos);
1431// 1431//
1432 if (m_teleportFlags == TeleportFlags.Default) 1432 if (m_teleportFlags == TeleportFlags.Default)
@@ -1453,8 +1453,8 @@ namespace OpenSim.Region.Framework.Scenes
1453 Flying = false; 1453 Flying = false;
1454 } 1454 }
1455 } 1455 }
1456 1456
1457 1457
1458 m_log.DebugFormat("[MakeRootAgent] position and physical: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 1458 m_log.DebugFormat("[MakeRootAgent] position and physical: {0}ms", Util.EnvironmentTickCountSubtract(ts));
1459 m_scene.SwapRootAgentCount(false); 1459 m_scene.SwapRootAgentCount(false);
1460 1460
@@ -1519,7 +1519,7 @@ namespace OpenSim.Region.Framework.Scenes
1519 m_log.DebugFormat("[SCENE PRESENCE]: Forcing viewers to update the avatar name for " + Name); 1519 m_log.DebugFormat("[SCENE PRESENCE]: Forcing viewers to update the avatar name for " + Name);
1520 1520
1521 UseFakeGroupTitle = true; 1521 UseFakeGroupTitle = true;
1522 1522
1523 1523
1524 Util.FireAndForget(o => 1524 Util.FireAndForget(o =>
1525 { 1525 {
@@ -1587,7 +1587,7 @@ namespace OpenSim.Region.Framework.Scenes
1587 else 1587 else
1588 Animator.ResetAnimations(); 1588 Animator.ResetAnimations();
1589 1589
1590 1590
1591// m_log.DebugFormat( 1591// m_log.DebugFormat(
1592// "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", 1592// "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}",
1593// Name, UUID, m_scene.RegionInfo.RegionName); 1593// Name, UUID, m_scene.RegionInfo.RegionName);
@@ -1595,7 +1595,7 @@ namespace OpenSim.Region.Framework.Scenes
1595 // Don't zero out the velocity since this can cause problems when an avatar is making a region crossing, 1595 // Don't zero out the velocity since this can cause problems when an avatar is making a region crossing,
1596 // depending on the exact timing. This shouldn't matter anyway since child agent positions are not updated. 1596 // depending on the exact timing. This shouldn't matter anyway since child agent positions are not updated.
1597 //Velocity = new Vector3(0, 0, 0); 1597 //Velocity = new Vector3(0, 0, 0);
1598 1598
1599 IsChildAgent = true; 1599 IsChildAgent = true;
1600 m_scene.SwapRootAgentCount(true); 1600 m_scene.SwapRootAgentCount(true);
1601 RemoveFromPhysicalScene(); 1601 RemoveFromPhysicalScene();
@@ -1656,7 +1656,7 @@ namespace OpenSim.Region.Framework.Scenes
1656 bool isFlying = Flying; 1656 bool isFlying = Flying;
1657 Vector3 vel = Velocity; 1657 Vector3 vel = Velocity;
1658 RemoveFromPhysicalScene(); 1658 RemoveFromPhysicalScene();
1659 1659
1660 AbsolutePosition = pos; 1660 AbsolutePosition = pos;
1661 AddToPhysicalScene(isFlying); 1661 AddToPhysicalScene(isFlying);
1662 if (PhysicsActor != null) 1662 if (PhysicsActor != null)
@@ -1709,7 +1709,7 @@ namespace OpenSim.Region.Framework.Scenes
1709 if (IsInTransit) 1709 if (IsInTransit)
1710 return; 1710 return;
1711 1711
1712 Vector3 pos = AbsolutePosition; 1712 Vector3 pos = AbsolutePosition;
1713 if (Appearance.AvatarHeight != 127.0f) 1713 if (Appearance.AvatarHeight != 127.0f)
1714 pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f)); 1714 pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f));
1715 else 1715 else
@@ -1737,7 +1737,7 @@ namespace OpenSim.Region.Framework.Scenes
1737 /// <param name="amount">Postive or negative roll amount in radians</param> 1737 /// <param name="amount">Postive or negative roll amount in radians</param>
1738 private void ApplyFlyingRoll(float amount, bool PressingUp, bool PressingDown) 1738 private void ApplyFlyingRoll(float amount, bool PressingUp, bool PressingDown)
1739 { 1739 {
1740 1740
1741 float rollAmount = Util.Clamp(m_AngularVelocity.Z + amount, -FLY_ROLL_MAX_RADIANS, FLY_ROLL_MAX_RADIANS); 1741 float rollAmount = Util.Clamp(m_AngularVelocity.Z + amount, -FLY_ROLL_MAX_RADIANS, FLY_ROLL_MAX_RADIANS);
1742 m_AngularVelocity.Z = rollAmount; 1742 m_AngularVelocity.Z = rollAmount;
1743 1743
@@ -1789,7 +1789,7 @@ namespace OpenSim.Region.Framework.Scenes
1789 1789
1790 if (m_AngularVelocity.Z > 0) 1790 if (m_AngularVelocity.Z > 0)
1791 { 1791 {
1792 1792
1793 float leftOverToMin = m_AngularVelocity.Z - rollMinRadians; 1793 float leftOverToMin = m_AngularVelocity.Z - rollMinRadians;
1794 if (amount > leftOverToMin) 1794 if (amount > leftOverToMin)
1795 return -leftOverToMin; 1795 return -leftOverToMin;
@@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes
1799 } 1799 }
1800 else 1800 else
1801 { 1801 {
1802 1802
1803 float leftOverToMin = -m_AngularVelocity.Z - rollMinRadians; 1803 float leftOverToMin = -m_AngularVelocity.Z - rollMinRadians;
1804 if (amount > leftOverToMin) 1804 if (amount > leftOverToMin)
1805 return leftOverToMin; 1805 return leftOverToMin;
@@ -1807,7 +1807,7 @@ namespace OpenSim.Region.Framework.Scenes
1807 return amount; 1807 return amount;
1808 } 1808 }
1809 } 1809 }
1810 1810
1811 1811
1812 1812
1813 // neighbouring regions we have enabled a child agent in 1813 // neighbouring regions we have enabled a child agent in
@@ -1943,15 +1943,15 @@ namespace OpenSim.Region.Framework.Scenes
1943 private bool WaitForUpdateAgent(IClientAPI client) 1943 private bool WaitForUpdateAgent(IClientAPI client)
1944 { 1944 {
1945 // Before the source region executes UpdateAgent 1945 // Before the source region executes UpdateAgent
1946 // (which triggers Scene.IncomingUpdateChildAgent(AgentData cAgentData) here in the destination, 1946 // (which triggers Scene.IncomingUpdateChildAgent(AgentData cAgentData) here in the destination,
1947 // m_originRegionID is UUID.Zero; after, it's non-Zero. The CompleteMovement sequence initiated from the 1947 // m_originRegionID is UUID.Zero; after, it's non-Zero. The CompleteMovement sequence initiated from the
1948 // viewer (in turn triggered by the source region sending it a TeleportFinish event) waits until it's non-zero 1948 // viewer (in turn triggered by the source region sending it a TeleportFinish event) waits until it's non-zero
1949// m_updateAgentReceivedAfterTransferEvent.WaitOne(10000); 1949// m_updateAgentReceivedAfterTransferEvent.WaitOne(10000);
1950 int count = 50; 1950 int count = 50;
1951 UUID originID = UUID.Zero; 1951 UUID originID = UUID.Zero;
1952 1952
1953 lock (m_originRegionIDAccessLock) 1953 lock (m_originRegionIDAccessLock)
1954 originID = m_originRegionID; 1954 originID = m_originRegionID;
1955 1955
1956 1956
1957 while (originID.Equals(UUID.Zero) && count-- > 0) 1957 while (originID.Equals(UUID.Zero) && count-- > 0)
@@ -2014,7 +2014,7 @@ namespace OpenSim.Region.Framework.Scenes
2014 m_log.InfoFormat( 2014 m_log.InfoFormat(
2015 "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}", 2015 "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}",
2016 client.Name, Scene.Name, AbsolutePosition); 2016 client.Name, Scene.Name, AbsolutePosition);
2017 2017
2018 m_inTransit = true; 2018 m_inTransit = true;
2019 2019
2020 try 2020 try
@@ -2110,7 +2110,7 @@ namespace OpenSim.Region.Framework.Scenes
2110// client.Name, client.AgentId, m_scene.RegionInfo.RegionName); 2110// client.Name, client.AgentId, m_scene.RegionInfo.RegionName);
2111// } 2111// }
2112 2112
2113 2113
2114 m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 2114 m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2115 2115
2116 2116
@@ -2138,7 +2138,7 @@ namespace OpenSim.Region.Framework.Scenes
2138 m_currentParcelHide = false; 2138 m_currentParcelHide = false;
2139 m_currentParcelUUID = UUID.Zero; 2139 m_currentParcelUUID = UUID.Zero;
2140 2140
2141 // send initial land overlay and parcel 2141 // send initial land overlay and parcel
2142 ILandChannel landch = m_scene.LandChannel; 2142 ILandChannel landch = m_scene.LandChannel;
2143 if (landch != null) 2143 if (landch != null)
2144 landch.sendClientInitialLandInfo(client); 2144 landch.sendClientInitialLandInfo(client);
@@ -2193,7 +2193,7 @@ namespace OpenSim.Region.Framework.Scenes
2193 2193
2194 // send look and animations to others 2194 // send look and animations to others
2195 // if not cached we send greys 2195 // if not cached we send greys
2196 // uncomented if will wait till avatar does baking 2196 // uncomented if will wait till avatar does baking
2197 //if (cachedbaked) 2197 //if (cachedbaked)
2198 { 2198 {
2199 foreach (ScenePresence p in allpresences) 2199 foreach (ScenePresence p in allpresences)
@@ -2292,7 +2292,7 @@ namespace OpenSim.Region.Framework.Scenes
2292 { 2292 {
2293 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); 2293 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
2294 if (friendsModule != null) 2294 if (friendsModule != null)
2295 { 2295 {
2296 if(gotCrossUpdate) 2296 if(gotCrossUpdate)
2297 friendsModule.IsNowRoot(this); 2297 friendsModule.IsNowRoot(this);
2298 else 2298 else
@@ -2331,7 +2331,7 @@ namespace OpenSim.Region.Framework.Scenes
2331 /// <param name="collisionPoint"></param> 2331 /// <param name="collisionPoint"></param>
2332 /// <param name="localid"></param> 2332 /// <param name="localid"></param>
2333 /// <param name="distance"></param> 2333 /// <param name="distance"></param>
2334 /// 2334 ///
2335 2335
2336 private void checkCameraCollision() 2336 private void checkCameraCollision()
2337 { 2337 {
@@ -2486,7 +2486,7 @@ namespace OpenSim.Region.Framework.Scenes
2486 2486
2487 // The Agent's Draw distance setting 2487 // The Agent's Draw distance setting
2488 // When we get to the point of re-computing neighbors everytime this 2488 // When we get to the point of re-computing neighbors everytime this
2489 // changes, then start using the agent's drawdistance rather than the 2489 // changes, then start using the agent's drawdistance rather than the
2490 // region's draw distance. 2490 // region's draw distance.
2491 2491
2492 DrawDistance = agentData.Far; 2492 DrawDistance = agentData.Far;
@@ -2495,7 +2495,7 @@ namespace OpenSim.Region.Framework.Scenes
2495 2495
2496 // FIXME: This does not work as intended because the viewer only sends the lbutton down when the button 2496 // FIXME: This does not work as intended because the viewer only sends the lbutton down when the button
2497 // is first pressed, not whilst it is held down. If this is required in the future then need to look 2497 // is first pressed, not whilst it is held down. If this is required in the future then need to look
2498 // for an AGENT_CONTROL_LBUTTON_UP event and make sure to handle cases where an initial DOWN is not 2498 // for an AGENT_CONTROL_LBUTTON_UP event and make sure to handle cases where an initial DOWN is not
2499 // received (e.g. on holding LMB down on the avatar in a viewer). 2499 // received (e.g. on holding LMB down on the avatar in a viewer).
2500 m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0; 2500 m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0;
2501 2501
@@ -2549,7 +2549,7 @@ namespace OpenSim.Region.Framework.Scenes
2549 2549
2550 if (AllowMovement && !SitGround) 2550 if (AllowMovement && !SitGround)
2551 { 2551 {
2552// m_log.DebugFormat("[SCENE PRESENCE]: Initial body rotation {0} for {1}", agentData.BodyRotation, Name); 2552// m_log.DebugFormat("[SCENE PRESENCE]: Initial body rotation {0} for {1}", agentData.BodyRotation, Name);
2553 bool update_rotation = false; 2553 bool update_rotation = false;
2554 if (agentData.BodyRotation != Rotation) 2554 if (agentData.BodyRotation != Rotation)
2555 { 2555 {
@@ -2617,7 +2617,7 @@ namespace OpenSim.Region.Framework.Scenes
2617 } 2617 }
2618 2618
2619 if (((MovementFlag & (uint)DCF) == 0)) 2619 if (((MovementFlag & (uint)DCF) == 0))
2620 { 2620 {
2621 //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF); 2621 //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF);
2622 MovementFlag |= (uint)DCF; 2622 MovementFlag |= (uint)DCF;
2623 update_movementflag = true; 2623 update_movementflag = true;
@@ -2715,11 +2715,11 @@ namespace OpenSim.Region.Framework.Scenes
2715 if (m_AngularVelocity.Z != 0) 2715 if (m_AngularVelocity.Z != 0)
2716 m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE); 2716 m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE);
2717 } 2717 }
2718 2718
2719 /* 2719 /*
2720 if (Flying && IsColliding && controlland) 2720 if (Flying && IsColliding && controlland)
2721 { 2721 {
2722 // nesting this check because LengthSquared() is expensive and we don't 2722 // nesting this check because LengthSquared() is expensive and we don't
2723 // want to do it every step when flying. 2723 // want to do it every step when flying.
2724 if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX)) 2724 if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX))
2725 StopFlying(); 2725 StopFlying();
@@ -2730,7 +2730,7 @@ namespace OpenSim.Region.Framework.Scenes
2730 else if (IsColliding && agent_control_v3.Z < 0f) 2730 else if (IsColliding && agent_control_v3.Z < 0f)
2731 agent_control_v3.Z = 0; 2731 agent_control_v3.Z = 0;
2732// else if(AgentControlStopActive %% Velocity.Z <0.01f) 2732// else if(AgentControlStopActive %% Velocity.Z <0.01f)
2733 2733
2734 2734
2735// m_log.DebugFormat("[SCENE PRESENCE]: MovementFlag {0} for {1}", MovementFlag, Name); 2735// m_log.DebugFormat("[SCENE PRESENCE]: MovementFlag {0} for {1}", MovementFlag, Name);
2736 2736
@@ -2738,9 +2738,9 @@ namespace OpenSim.Region.Framework.Scenes
2738 // which occurs later in the main scene loop 2738 // which occurs later in the main scene loop
2739 // We also need to update if the user rotates their avatar whilst it is slow walking/running (if they 2739 // We also need to update if the user rotates their avatar whilst it is slow walking/running (if they
2740 // held down AGENT_CONTROL_STOP whilst normal walking/running). However, we do not want to update 2740 // held down AGENT_CONTROL_STOP whilst normal walking/running). However, we do not want to update
2741 // if the user rotated whilst holding down AGENT_CONTROL_STOP when already still (which locks the 2741 // if the user rotated whilst holding down AGENT_CONTROL_STOP when already still (which locks the
2742 // avatar location in place). 2742 // avatar location in place).
2743 if (update_movementflag 2743 if (update_movementflag
2744 || (update_rotation && DCFlagKeyPressed && (!AgentControlStopActive || MovementFlag != 0))) 2744 || (update_rotation && DCFlagKeyPressed && (!AgentControlStopActive || MovementFlag != 0)))
2745 { 2745 {
2746 2746
@@ -2810,9 +2810,9 @@ namespace OpenSim.Region.Framework.Scenes
2810 2810
2811 // The Agent's Draw distance setting 2811 // The Agent's Draw distance setting
2812 // When we get to the point of re-computing neighbors everytime this 2812 // When we get to the point of re-computing neighbors everytime this
2813 // changes, then start using the agent's drawdistance rather than the 2813 // changes, then start using the agent's drawdistance rather than the
2814 // region's draw distance. 2814 // region's draw distance.
2815 2815
2816 DrawDistance = agentData.Far; 2816 DrawDistance = agentData.Far;
2817 2817
2818 2818
@@ -2839,7 +2839,7 @@ namespace OpenSim.Region.Framework.Scenes
2839 2839
2840 TriggerScenePresenceUpdated(); 2840 TriggerScenePresenceUpdated();
2841 } 2841 }
2842 2842
2843 /// <summary> 2843 /// <summary>
2844 /// Calculate an update to move the presence to the set target. 2844 /// Calculate an update to move the presence to the set target.
2845 /// </summary> 2845 /// </summary>
@@ -2853,7 +2853,7 @@ namespace OpenSim.Region.Framework.Scenes
2853// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name); 2853// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name);
2854 2854
2855 bool updated = false; 2855 bool updated = false;
2856 2856
2857 Vector3 LocalVectorToTarget3D = MoveToPositionTarget - AbsolutePosition; 2857 Vector3 LocalVectorToTarget3D = MoveToPositionTarget - AbsolutePosition;
2858 2858
2859// m_log.DebugFormat( 2859// m_log.DebugFormat(
@@ -3030,11 +3030,11 @@ namespace OpenSim.Region.Framework.Scenes
3030 || pos.Y < 0 || pos.Y >= regionSize.Y 3030 || pos.Y < 0 || pos.Y >= regionSize.Y
3031 || pos.Z < 0) 3031 || pos.Z < 0)
3032 return; 3032 return;
3033 3033
3034 float terrainHeight; 3034 float terrainHeight;
3035 Scene targetScene = m_scene; 3035 Scene targetScene = m_scene;
3036 terrainHeight = m_scene.GetGroundHeight(pos.X, pos.Y); 3036 terrainHeight = m_scene.GetGroundHeight(pos.X, pos.Y);
3037 3037
3038 // dont try to land underground 3038 // dont try to land underground
3039 terrainHeight += Appearance.AvatarHeight * 0.5f + 0.2f; 3039 terrainHeight += Appearance.AvatarHeight * 0.5f + 0.2f;
3040 3040
@@ -3044,7 +3044,7 @@ namespace OpenSim.Region.Framework.Scenes
3044// m_log.DebugFormat( 3044// m_log.DebugFormat(
3045// "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", 3045// "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}",
3046// Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); 3046// Name, pos, terrainHeight, m_scene.RegionInfo.RegionName);
3047 3047
3048 if (noFly) 3048 if (noFly)
3049 Flying = false; 3049 Flying = false;
3050 else if (pos.Z > terrainHeight || Flying) 3050 else if (pos.Z > terrainHeight || Flying)
@@ -3068,7 +3068,7 @@ namespace OpenSim.Region.Framework.Scenes
3068 3068
3069 Rotation = Quaternion.CreateFromEulers(angle); 3069 Rotation = Quaternion.CreateFromEulers(angle);
3070// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); 3070// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation);
3071 3071
3072 Vector3 control = Vector3.Zero; 3072 Vector3 control = Vector3.Zero;
3073 if(HandleMoveToTargetUpdate(1f, ref control)) 3073 if(HandleMoveToTargetUpdate(1f, ref control))
3074 AddNewMovement(control); 3074 AddNewMovement(control);
@@ -3162,7 +3162,7 @@ namespace OpenSim.Region.Framework.Scenes
3162 m_pos = standPos; 3162 m_pos = standPos;
3163 } 3163 }
3164 3164
3165 // We need to wait until we have calculated proper stand positions before sitting up the physical 3165 // We need to wait until we have calculated proper stand positions before sitting up the physical
3166 // avatar to avoid race conditions. 3166 // avatar to avoid race conditions.
3167 if (PhysicsActor == null) 3167 if (PhysicsActor == null)
3168 AddToPhysicalScene(false); 3168 AddToPhysicalScene(false);
@@ -3178,7 +3178,7 @@ namespace OpenSim.Region.Framework.Scenes
3178 3178
3179 // reset to default sitAnimation 3179 // reset to default sitAnimation
3180 sitAnimation = "SIT"; 3180 sitAnimation = "SIT";
3181 3181
3182// Animator.TrySetMovementAnimation("STAND"); 3182// Animator.TrySetMovementAnimation("STAND");
3183 Animator.SetMovementAnimations("STAND"); 3183 Animator.SetMovementAnimations("STAND");
3184 3184
@@ -3244,7 +3244,7 @@ namespace OpenSim.Region.Framework.Scenes
3244 } 3244 }
3245 else 3245 else
3246 { 3246 {
3247 if (PhysicsSit(part,offset)) // physics engine 3247 if (PhysicsSit(part,offset)) // physics engine
3248 return; 3248 return;
3249 3249
3250 Vector3 pos = part.AbsolutePosition + offset; 3250 Vector3 pos = part.AbsolutePosition + offset;
@@ -3275,7 +3275,7 @@ namespace OpenSim.Region.Framework.Scenes
3275 3275
3276 cameraAtOffset = part.GetCameraAtOffset(); 3276 cameraAtOffset = part.GetCameraAtOffset();
3277 cameraEyeOffset = part.GetCameraEyeOffset(); 3277 cameraEyeOffset = part.GetCameraEyeOffset();
3278 3278
3279 forceMouselook = part.GetForceMouselook(); 3279 forceMouselook = part.GetForceMouselook();
3280 3280
3281 if (!part.IsRoot) 3281 if (!part.IsRoot)
@@ -3398,7 +3398,7 @@ namespace OpenSim.Region.Framework.Scenes
3398 if (part == null) 3398 if (part == null)
3399 return; 3399 return;
3400 3400
3401 Vector3 targetPos = part.GetWorldPosition() + offset * part.GetWorldRotation(); 3401 Vector3 targetPos = part.GetWorldPosition() + offset * part.GetWorldRotation();
3402 if(!CanEnterLandPosition(targetPos)) 3402 if(!CanEnterLandPosition(targetPos))
3403 { 3403 {
3404 ControllingClient.SendAlertMessage(" Sit position on restricted land, try another spot"); 3404 ControllingClient.SendAlertMessage(" Sit position on restricted land, try another spot");
@@ -3530,7 +3530,7 @@ namespace OpenSim.Region.Framework.Scenes
3530 else 3530 else
3531 { 3531 {
3532 m = r.X * r.X + r.Y * r.Y + r.Z * r.Z + r.W * r.W; 3532 m = r.X * r.X + r.Y * r.Y + r.Z * r.Z + r.W * r.W;
3533 3533
3534 if (Math.Abs(1.0 - m) > 0.000001) 3534 if (Math.Abs(1.0 - m) > 0.000001)
3535 { 3535 {
3536 if(m != 0) 3536 if(m != 0)
@@ -3554,7 +3554,7 @@ namespace OpenSim.Region.Framework.Scenes
3554 x = 2 * (r.X * r.Z + r.Y * r.W); 3554 x = 2 * (r.X * r.Z + r.Y * r.W);
3555 y = 2 * (-r.X * r.W + r.Y * r.Z); 3555 y = 2 * (-r.X * r.W + r.Y * r.Z);
3556 z = -r.X * r.X - r.Y * r.Y + r.Z * r.Z + r.W * r.W; 3556 z = -r.X * r.X - r.Y * r.Y + r.Z * r.Z + r.W * r.W;
3557 Vector3 up = new Vector3((float)x, (float)y, (float)z); 3557 Vector3 up = new Vector3((float)x, (float)y, (float)z);
3558 sitOffset = up * Appearance.AvatarHeight * 0.02638f; 3558 sitOffset = up * Appearance.AvatarHeight * 0.02638f;
3559 newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; 3559 newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT;
3560 } 3560 }
@@ -3670,7 +3670,7 @@ namespace OpenSim.Region.Framework.Scenes
3670 public void AddNewMovement(Vector3 vec, float thisAddSpeedModifier = 1, bool breaking = false) 3670 public void AddNewMovement(Vector3 vec, float thisAddSpeedModifier = 1, bool breaking = false)
3671 { 3671 {
3672 // m_log.DebugFormat( 3672 // m_log.DebugFormat(
3673 // "[SCENE PRESENCE]: Adding new movement {0} with rotation {1}, thisAddSpeedModifier {2} for {3}", 3673 // "[SCENE PRESENCE]: Adding new movement {0} with rotation {1}, thisAddSpeedModifier {2} for {3}",
3674 // vec, Rotation, thisAddSpeedModifier, Name); 3674 // vec, Rotation, thisAddSpeedModifier, Name);
3675 3675
3676 // rotate from avatar coord space to world 3676 // rotate from avatar coord space to world
@@ -3792,11 +3792,11 @@ namespace OpenSim.Region.Framework.Scenes
3792 Math.Abs(dpos.X) > POSITION_LARGETOLERANCE || 3792 Math.Abs(dpos.X) > POSITION_LARGETOLERANCE ||
3793 Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE || 3793 Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE ||
3794 Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE || 3794 Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE ||
3795 3795
3796 ( (Math.Abs(dpos.X) > POSITION_SMALLTOLERANCE || 3796 ( (Math.Abs(dpos.X) > POSITION_SMALLTOLERANCE ||
3797 Math.Abs(dpos.Y) > POSITION_SMALLTOLERANCE || 3797 Math.Abs(dpos.Y) > POSITION_SMALLTOLERANCE ||
3798 Math.Abs(dpos.Z) > POSITION_SMALLTOLERANCE) 3798 Math.Abs(dpos.Z) > POSITION_SMALLTOLERANCE)
3799 && vel.LengthSquared() < LOWVELOCITYSQ 3799 && vel.LengthSquared() < LOWVELOCITYSQ
3800 )) 3800 ))
3801 { 3801 {
3802*/ 3802*/
@@ -3833,7 +3833,7 @@ namespace OpenSim.Region.Framework.Scenes
3833 } 3833 }
3834 3834
3835 // this is diferente from SendTerseUpdateToClient 3835 // this is diferente from SendTerseUpdateToClient
3836 // this sends bypassing entities updates 3836 // this sends bypassing entities updates
3837 public void SendAgentTerseUpdate(ISceneEntity p) 3837 public void SendAgentTerseUpdate(ISceneEntity p)
3838 { 3838 {
3839 ControllingClient.SendAgentTerseUpdate(p); 3839 ControllingClient.SendAgentTerseUpdate(p);
@@ -3982,7 +3982,7 @@ namespace OpenSim.Region.Framework.Scenes
3982 3982
3983 p.SendAppearanceToAgentNF(this); 3983 p.SendAppearanceToAgentNF(this);
3984 p.SendAnimPackToAgentNF(this); 3984 p.SendAnimPackToAgentNF(this);
3985 p.SendAttachmentsToAgentNF(this); 3985 p.SendAttachmentsToAgentNF(this);
3986 count++; 3986 count++;
3987 }); 3987 });
3988 3988
@@ -3991,7 +3991,7 @@ namespace OpenSim.Region.Framework.Scenes
3991 3991
3992 /// <summary> 3992 /// <summary>
3993 /// Send this agent's avatar data to all other root and child agents in the scene 3993 /// Send this agent's avatar data to all other root and child agents in the scene
3994 /// This agent must be root. This avatar will receive its own update. 3994 /// This agent must be root. This avatar will receive its own update.
3995 /// </summary> 3995 /// </summary>
3996 public void SendAvatarDataToAllAgents() 3996 public void SendAvatarDataToAllAgents()
3997 { 3997 {
@@ -4222,7 +4222,7 @@ namespace OpenSim.Region.Framework.Scenes
4222 posLastMove = pos; 4222 posLastMove = pos;
4223 m_scene.EventManager.TriggerOnClientMovement(this); 4223 m_scene.EventManager.TriggerOnClientMovement(this);
4224 } 4224 }
4225 4225
4226 diff = pos - posLastSignificantMove; 4226 diff = pos - posLastSignificantMove;
4227 if (diff.LengthSquared() > SIGNIFICANT_MOVEMENT) 4227 if (diff.LengthSquared() > SIGNIFICANT_MOVEMENT)
4228 { 4228 {
@@ -4235,18 +4235,18 @@ namespace OpenSim.Region.Framework.Scenes
4235 4235
4236 if(childUpdatesBusy) 4236 if(childUpdatesBusy)
4237 return; 4237 return;
4238 4238
4239 //possible KnownRegionHandles always contains current region and this check is not needed 4239 //possible KnownRegionHandles always contains current region and this check is not needed
4240 int minhandles = 0; 4240 int minhandles = 0;
4241 if(KnownRegionHandles.Contains(RegionHandle)) 4241 if(KnownRegionHandles.Contains(RegionHandle))
4242 minhandles++; 4242 minhandles++;
4243 4243
4244 if(KnownRegionHandles.Count > minhandles) 4244 if(KnownRegionHandles.Count > minhandles)
4245 { 4245 {
4246 int tdiff = Util.EnvironmentTickCountSubtract(lastChildUpdatesTime); 4246 int tdiff = Util.EnvironmentTickCountSubtract(lastChildUpdatesTime);
4247 if(tdiff > CHILDUPDATES_TIME) 4247 if(tdiff > CHILDUPDATES_TIME)
4248 { 4248 {
4249 diff = pos - m_lastChildAgentUpdatePosition; 4249 diff = pos - m_lastChildAgentUpdatePosition;
4250 if (diff.LengthSquared() > CHILDUPDATES_MOVEMENT) 4250 if (diff.LengthSquared() > CHILDUPDATES_MOVEMENT)
4251 { 4251 {
4252 childUpdatesBusy = true; 4252 childUpdatesBusy = true;
@@ -4268,7 +4268,7 @@ namespace OpenSim.Region.Framework.Scenes
4268 Util.FireAndForget( 4268 Util.FireAndForget(
4269 o => 4269 o =>
4270 { 4270 {
4271 m_scene.SendOutChildAgentUpdates(agentpos, this); 4271 m_scene.SendOutChildAgentUpdates(agentpos, this);
4272 lastChildUpdatesTime = Util.EnvironmentTickCount(); 4272 lastChildUpdatesTime = Util.EnvironmentTickCount();
4273 childUpdatesBusy = false; 4273 childUpdatesBusy = false;
4274 }, null, "ScenePresence.SendOutChildAgentUpdates"); 4274 }, null, "ScenePresence.SendOutChildAgentUpdates");
@@ -4309,7 +4309,7 @@ namespace OpenSim.Region.Framework.Scenes
4309 pos2.Z += vel.Z * timeStep; 4309 pos2.Z += vel.Z * timeStep;
4310 4310
4311// m_log.DebugFormat( 4311// m_log.DebugFormat(
4312// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}", 4312// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}",
4313// pos2, Name, Scene.Name); 4313// pos2, Name, Scene.Name);
4314 4314
4315 if (Scene.PositionIsInCurrentRegion(pos2)) 4315 if (Scene.PositionIsInCurrentRegion(pos2))
@@ -4399,7 +4399,7 @@ namespace OpenSim.Region.Framework.Scenes
4399 // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); 4399 // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName);
4400 4400
4401 // Put the child agent back at the center 4401 // Put the child agent back at the center
4402 AbsolutePosition 4402 AbsolutePosition
4403 = new Vector3(((float)m_scene.RegionInfo.RegionSizeX * 0.5f), ((float)m_scene.RegionInfo.RegionSizeY * 0.5f), 70); 4403 = new Vector3(((float)m_scene.RegionInfo.RegionSizeX * 0.5f), ((float)m_scene.RegionInfo.RegionSizeY * 0.5f), 70);
4404 4404
4405 Animator.ResetAnimations(); 4405 Animator.ResetAnimations();
@@ -4511,7 +4511,7 @@ namespace OpenSim.Region.Framework.Scenes
4511 public void GrantGodlikePowers(UUID token, bool godStatus) 4511 public void GrantGodlikePowers(UUID token, bool godStatus)
4512 { 4512 {
4513 int oldgodlevel = GodLevel; 4513 int oldgodlevel = GodLevel;
4514 4514
4515 if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID)) 4515 if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID))
4516 { 4516 {
4517 GodLevel = 200; 4517 GodLevel = 200;
@@ -4519,7 +4519,7 @@ namespace OpenSim.Region.Framework.Scenes
4519 GodLevel = UserLevel; 4519 GodLevel = UserLevel;
4520 } 4520 }
4521 else 4521 else
4522 GodLevel = 0; 4522 GodLevel = 0;
4523 4523
4524 ControllingClient.SendAdminResponse(token, (uint)GodLevel); 4524 ControllingClient.SendAdminResponse(token, (uint)GodLevel);
4525 if(oldgodlevel != GodLevel) 4525 if(oldgodlevel != GodLevel)
@@ -4535,7 +4535,7 @@ namespace OpenSim.Region.Framework.Scenes
4535 return; 4535 return;
4536 4536
4537 CopyFrom(cAgentData); 4537 CopyFrom(cAgentData);
4538 4538
4539 } 4539 }
4540 4540
4541 private static Vector3 marker = new Vector3(-1f, -1f, -1f); 4541 private static Vector3 marker = new Vector3(-1f, -1f, -1f);
@@ -4621,7 +4621,7 @@ namespace OpenSim.Region.Framework.Scenes
4621 4621
4622 cAgent.Far = DrawDistance; 4622 cAgent.Far = DrawDistance;
4623 4623
4624 // Throttles 4624 // Throttles
4625 cAgent.Throttles = ControllingClient.GetThrottlesPacked(1); 4625 cAgent.Throttles = ControllingClient.GetThrottlesPacked(1);
4626 4626
4627 cAgent.HeadRotation = m_headrotation; 4627 cAgent.HeadRotation = m_headrotation;
@@ -4630,7 +4630,7 @@ namespace OpenSim.Region.Framework.Scenes
4630 4630
4631 if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) 4631 if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID))
4632 cAgent.GodLevel = (byte)GodLevel; 4632 cAgent.GodLevel = (byte)GodLevel;
4633 else 4633 else
4634 cAgent.GodLevel = (byte) 0; 4634 cAgent.GodLevel = (byte) 0;
4635 4635
4636 cAgent.AlwaysRun = SetAlwaysRun; 4636 cAgent.AlwaysRun = SetAlwaysRun;
@@ -4640,7 +4640,7 @@ namespace OpenSim.Region.Framework.Scenes
4640 4640
4641 cAgent.ParentPart = ParentUUID; 4641 cAgent.ParentPart = ParentUUID;
4642 cAgent.SitOffset = PrevSitOffset; 4642 cAgent.SitOffset = PrevSitOffset;
4643 4643
4644 lock (scriptedcontrols) 4644 lock (scriptedcontrols)
4645 { 4645 {
4646 ControllerData[] controls = new ControllerData[scriptedcontrols.Count]; 4646 ControllerData[] controls = new ControllerData[scriptedcontrols.Count];
@@ -4675,7 +4675,7 @@ namespace OpenSim.Region.Framework.Scenes
4675 cAgent.CrossingFlags |= 1; 4675 cAgent.CrossingFlags |= 1;
4676 } 4676 }
4677 else 4677 else
4678 cAgent.CrossingFlags = 0; 4678 cAgent.CrossingFlags = 0;
4679 4679
4680 if(isCrossUpdate) 4680 if(isCrossUpdate)
4681 { 4681 {
@@ -4708,7 +4708,7 @@ namespace OpenSim.Region.Framework.Scenes
4708 PrevSitOffset = cAgent.SitOffset; 4708 PrevSitOffset = cAgent.SitOffset;
4709 4709
4710 // When we get to the point of re-computing neighbors everytime this 4710 // When we get to the point of re-computing neighbors everytime this
4711 // changes, then start using the agent's drawdistance rather than the 4711 // changes, then start using the agent's drawdistance rather than the
4712 // region's draw distance. 4712 // region's draw distance.
4713 DrawDistance = cAgent.Far; 4713 DrawDistance = cAgent.Far;
4714 //DrawDistance = Scene.DefaultDrawDistance; 4714 //DrawDistance = Scene.DefaultDrawDistance;
@@ -4727,7 +4727,7 @@ namespace OpenSim.Region.Framework.Scenes
4727 4727
4728 m_headrotation = cAgent.HeadRotation; 4728 m_headrotation = cAgent.HeadRotation;
4729 Rotation = cAgent.BodyRotation; 4729 Rotation = cAgent.BodyRotation;
4730 m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; 4730 m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags;
4731 4731
4732 if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID)) 4732 if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID))
4733 GodLevel = cAgent.GodLevel; 4733 GodLevel = cAgent.GodLevel;
@@ -4738,14 +4738,14 @@ namespace OpenSim.Region.Framework.Scenes
4738 4738
4739 Appearance = new AvatarAppearance(cAgent.Appearance); 4739 Appearance = new AvatarAppearance(cAgent.Appearance);
4740/* 4740/*
4741 bool isFlying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); 4741 bool isFlying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
4742 4742
4743 if (PhysicsActor != null) 4743 if (PhysicsActor != null)
4744 { 4744 {
4745 RemoveFromPhysicalScene(); 4745 RemoveFromPhysicalScene();
4746 AddToPhysicalScene(isFlying); 4746 AddToPhysicalScene(isFlying);
4747 } 4747 }
4748*/ 4748*/
4749 try 4749 try
4750 { 4750 {
4751 lock (scriptedcontrols) 4751 lock (scriptedcontrols)
@@ -4800,7 +4800,7 @@ namespace OpenSim.Region.Framework.Scenes
4800 ControllingClient.ActiveGroupId = cAgent.ActiveGroupID; 4800 ControllingClient.ActiveGroupId = cAgent.ActiveGroupID;
4801 ControllingClient.ActiveGroupName = cAgent.ActiveGroupName; 4801 ControllingClient.ActiveGroupName = cAgent.ActiveGroupName;
4802 Grouptitle = cAgent.ActiveGroupTitle; 4802 Grouptitle = cAgent.ActiveGroupTitle;
4803 ControllingClient.ActiveGroupPowers = 4803 ControllingClient.ActiveGroupPowers =
4804 ControllingClient.GetGroupPowers(cAgent.ActiveGroupID); 4804 ControllingClient.GetGroupPowers(cAgent.ActiveGroupID);
4805 } 4805 }
4806 else 4806 else
@@ -4871,7 +4871,7 @@ namespace OpenSim.Region.Framework.Scenes
4871// m_forceToApplyValid = false; 4871// m_forceToApplyValid = false;
4872 4872
4873 PhysicsScene scene = m_scene.PhysicsScene; 4873 PhysicsScene scene = m_scene.PhysicsScene;
4874 Vector3 pVec = AbsolutePosition; 4874 Vector3 pVec = AbsolutePosition;
4875 4875
4876 PhysicsActor = scene.AddAvatar( 4876 PhysicsActor = scene.AddAvatar(
4877 LocalId, Firstname + "." + Lastname, pVec, 4877 LocalId, Firstname + "." + Lastname, pVec,
@@ -5007,7 +5007,7 @@ namespace OpenSim.Region.Framework.Scenes
5007 } 5007 }
5008 else 5008 else
5009 { 5009 {
5010 5010
5011 } 5011 }
5012 } 5012 }
5013 5013
@@ -5040,13 +5040,13 @@ namespace OpenSim.Region.Framework.Scenes
5040 { 5040 {
5041 // Clear known regions 5041 // Clear known regions
5042 KnownRegions = new Dictionary<ulong, string>(); 5042 KnownRegions = new Dictionary<ulong, string>();
5043 5043
5044 // I don't get it but mono crashes when you try to dispose of this timer, 5044 // I don't get it but mono crashes when you try to dispose of this timer,
5045 // unsetting the elapsed callback should be enough to allow for cleanup however. 5045 // unsetting the elapsed callback should be enough to allow for cleanup however.
5046 // m_reprioritizationTimer.Dispose(); 5046 // m_reprioritizationTimer.Dispose();
5047 5047
5048 RemoveFromPhysicalScene(); 5048 RemoveFromPhysicalScene();
5049 5049
5050 m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; 5050 m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd;
5051 RemoveClientEvents(); 5051 RemoveClientEvents();
5052 5052
@@ -5106,7 +5106,7 @@ namespace OpenSim.Region.Framework.Scenes
5106 } 5106 }
5107 } 5107 }
5108 } 5108 }
5109 5109
5110 return attachments; 5110 return attachments;
5111 } 5111 }
5112 5112
@@ -5269,7 +5269,7 @@ namespace OpenSim.Region.Framework.Scenes
5269 foreach (SceneObjectGroup sog in m_attachments) 5269 foreach (SceneObjectGroup sog in m_attachments)
5270 { 5270 {
5271 SendAttachmentFullUpdateToAgentNF(sog, p); 5271 SendAttachmentFullUpdateToAgentNF(sog, p);
5272 } 5272 }
5273 } 5273 }
5274 } 5274 }
5275 5275
@@ -5689,14 +5689,14 @@ namespace OpenSim.Region.Framework.Scenes
5689 return; 5689 return;
5690 if(objectID == m_scene.RegionInfo.RegionID) // for all objects 5690 if(objectID == m_scene.RegionInfo.RegionID) // for all objects
5691 { 5691 {
5692 5692
5693 } 5693 }
5694 else 5694 else
5695 { 5695 {
5696 SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); 5696 SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
5697 if(part != null) 5697 if(part != null)
5698 { 5698 {
5699 5699
5700 } 5700 }
5701 } 5701 }
5702 } 5702 }
@@ -5759,7 +5759,7 @@ namespace OpenSim.Region.Framework.Scenes
5759 return; 5759 return;
5760 5760
5761 ScriptControlled allflags = ScriptControlled.CONTROL_ZERO; 5761 ScriptControlled allflags = ScriptControlled.CONTROL_ZERO;
5762 5762
5763 if (MouseDown) 5763 if (MouseDown)
5764 { 5764 {
5765 allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON); 5765 allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON);
@@ -5769,35 +5769,35 @@ namespace OpenSim.Region.Framework.Scenes
5769 MouseDown = true; 5769 MouseDown = true;
5770 } 5770 }
5771 } 5771 }
5772 5772
5773 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0) 5773 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0)
5774 { 5774 {
5775 allflags |= ScriptControlled.CONTROL_ML_LBUTTON; 5775 allflags |= ScriptControlled.CONTROL_ML_LBUTTON;
5776 MouseDown = true; 5776 MouseDown = true;
5777 } 5777 }
5778 5778
5779 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0) 5779 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0)
5780 { 5780 {
5781 allflags |= ScriptControlled.CONTROL_LBUTTON; 5781 allflags |= ScriptControlled.CONTROL_LBUTTON;
5782 MouseDown = true; 5782 MouseDown = true;
5783 } 5783 }
5784 5784
5785 // find all activated controls, whether the scripts are interested in them or not 5785 // find all activated controls, whether the scripts are interested in them or not
5786 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0) 5786 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0)
5787 { 5787 {
5788 allflags |= ScriptControlled.CONTROL_FWD; 5788 allflags |= ScriptControlled.CONTROL_FWD;
5789 } 5789 }
5790 5790
5791 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) != 0) 5791 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) != 0)
5792 { 5792 {
5793 allflags |= ScriptControlled.CONTROL_BACK; 5793 allflags |= ScriptControlled.CONTROL_BACK;
5794 } 5794 }
5795 5795
5796 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS) != 0) 5796 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS) != 0)
5797 { 5797 {
5798 allflags |= ScriptControlled.CONTROL_UP; 5798 allflags |= ScriptControlled.CONTROL_UP;
5799 } 5799 }
5800 5800
5801 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0) 5801 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)
5802 { 5802 {
5803 allflags |= ScriptControlled.CONTROL_DOWN; 5803 allflags |= ScriptControlled.CONTROL_DOWN;
@@ -5807,17 +5807,17 @@ namespace OpenSim.Region.Framework.Scenes
5807 { 5807 {
5808 allflags |= ScriptControlled.CONTROL_LEFT; 5808 allflags |= ScriptControlled.CONTROL_LEFT;
5809 } 5809 }
5810 5810
5811 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) != 0) 5811 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) != 0)
5812 { 5812 {
5813 allflags |= ScriptControlled.CONTROL_RIGHT; 5813 allflags |= ScriptControlled.CONTROL_RIGHT;
5814 } 5814 }
5815 5815
5816 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0) 5816 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0)
5817 { 5817 {
5818 allflags |= ScriptControlled.CONTROL_ROT_RIGHT; 5818 allflags |= ScriptControlled.CONTROL_ROT_RIGHT;
5819 } 5819 }
5820 5820
5821 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0) 5821 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0)
5822 { 5822 {
5823 allflags |= ScriptControlled.CONTROL_ROT_LEFT; 5823 allflags |= ScriptControlled.CONTROL_ROT_LEFT;
@@ -5830,7 +5830,7 @@ namespace OpenSim.Region.Framework.Scenes
5830 { 5830 {
5831 UUID scriptUUID = kvp.Key; 5831 UUID scriptUUID = kvp.Key;
5832 ScriptControllers scriptControlData = kvp.Value; 5832 ScriptControllers scriptControlData = kvp.Value;
5833 5833
5834 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us 5834 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us
5835 ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle 5835 ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle
5836 ScriptControlled localChange = localHeld ^ localLast; // the changed bits 5836 ScriptControlled localChange = localHeld ^ localLast; // the changed bits
@@ -5842,7 +5842,7 @@ namespace OpenSim.Region.Framework.Scenes
5842 } 5842 }
5843 } 5843 }
5844 } 5844 }
5845 5845
5846 LastCommands = allflags; 5846 LastCommands = allflags;
5847 } 5847 }
5848 } 5848 }
@@ -5885,7 +5885,7 @@ namespace OpenSim.Region.Framework.Scenes
5885 } 5885 }
5886 5886
5887 // returns true it local teleport allowed and sets the destiny position into pos 5887 // returns true it local teleport allowed and sets the destiny position into pos
5888 5888
5889 private bool CheckLocalTPLandingPoint(ref Vector3 pos) 5889 private bool CheckLocalTPLandingPoint(ref Vector3 pos)
5890 { 5890 {
5891 // Never constrain lures 5891 // Never constrain lures
@@ -5930,7 +5930,7 @@ namespace OpenSim.Region.Framework.Scenes
5930 spawnPos = spawnPoints[0].GetLocation(hubPos, hubRot); 5930 spawnPos = spawnPoints[0].GetLocation(hubPos, hubRot);
5931 spawnDistSQ = Vector3.DistanceSquared(spawnPos, pos); 5931 spawnDistSQ = Vector3.DistanceSquared(spawnPos, pos);
5932 5932
5933 float testDistSQ; 5933 float testDistSQ;
5934 Vector3 testSpawnPos; 5934 Vector3 testSpawnPos;
5935 for(int i = 1; i< spawnPoints.Length; i++) 5935 for(int i = 1; i< spawnPoints.Length; i++)
5936 { 5936 {
@@ -5960,7 +5960,7 @@ namespace OpenSim.Region.Framework.Scenes
5960 5960
5961 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); 5961 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
5962 5962
5963 if (land.LandData.LandingType != (byte)LandingType.LandingPoint 5963 if (land.LandData.LandingType != (byte)LandingType.LandingPoint
5964 || land.LandData.OwnerID == m_uuid) 5964 || land.LandData.OwnerID == m_uuid)
5965 return true; 5965 return true;
5966 5966
@@ -5978,7 +5978,7 @@ namespace OpenSim.Region.Framework.Scenes
5978 return true; 5978 return true;
5979 } 5979 }
5980 5980
5981 const TeleportFlags TeleHubTPFlags = TeleportFlags.ViaLogin 5981 const TeleportFlags TeleHubTPFlags = TeleportFlags.ViaLogin
5982 | TeleportFlags.ViaHGLogin | TeleportFlags.ViaLocation; 5982 | TeleportFlags.ViaHGLogin | TeleportFlags.ViaLocation;
5983 5983
5984 private bool CheckAndAdjustTelehub(SceneObjectGroup telehub, ref Vector3 pos, ref bool positionChanged) 5984 private bool CheckAndAdjustTelehub(SceneObjectGroup telehub, ref Vector3 pos, ref bool positionChanged)
@@ -6011,7 +6011,7 @@ namespace OpenSim.Region.Framework.Scenes
6011 bool selected = false; 6011 bool selected = false;
6012 bool validhub = false; 6012 bool validhub = false;
6013 Vector3 spawnPosition; 6013 Vector3 spawnPosition;
6014 6014
6015 Quaternion teleHubRotation = telehub.GroupRotation; 6015 Quaternion teleHubRotation = telehub.GroupRotation;
6016 6016
6017 switch(m_scene.SpawnPointRouting) 6017 switch(m_scene.SpawnPointRouting)
@@ -6033,14 +6033,14 @@ namespace OpenSim.Region.Framework.Scenes
6033 6033
6034 if(tries <= 0) 6034 if(tries <= 0)
6035 goto case "sequence"; 6035 goto case "sequence";
6036 6036
6037 pos = spawnPosition; 6037 pos = spawnPosition;
6038 return true; 6038 return true;
6039 6039
6040 case "sequence": 6040 case "sequence":
6041 tries = spawnPoints.Length; 6041 tries = spawnPoints.Length;
6042 selected = false; 6042 selected = false;
6043 validhub = false; 6043 validhub = false;
6044 do 6044 do
6045 { 6045 {
6046 index = m_scene.SpawnPoint(); 6046 index = m_scene.SpawnPoint();
@@ -6092,7 +6092,7 @@ namespace OpenSim.Region.Framework.Scenes
6092 closest = i; 6092 closest = i;
6093 } 6093 }
6094 6094
6095 if(!validhub) 6095 if(!validhub)
6096 return false; 6096 return false;
6097 6097
6098 if(closest < 0) 6098 if(closest < 0)
@@ -6437,28 +6437,28 @@ namespace OpenSim.Region.Framework.Scenes
6437 } 6437 }
6438 6438
6439 private void TeleportFlagsDebug() { 6439 private void TeleportFlagsDebug() {
6440 6440
6441 // Some temporary debugging help to show all the TeleportFlags we have... 6441 // Some temporary debugging help to show all the TeleportFlags we have...
6442 bool HG = false; 6442 bool HG = false;
6443 if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin) 6443 if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin)
6444 HG = true; 6444 HG = true;
6445 6445
6446 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); 6446 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
6447 6447
6448 uint i = 0u; 6448 uint i = 0u;
6449 for (int x = 0; x <= 30 ; x++, i = 1u << x) 6449 for (int x = 0; x <= 30 ; x++, i = 1u << x)
6450 { 6450 {
6451 i = 1u << x; 6451 i = 1u << x;
6452 6452
6453 if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i) 6453 if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i)
6454 if (HG == false) 6454 if (HG == false)
6455 m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString()); 6455 m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString());
6456 else 6456 else
6457 m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString()); 6457 m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString());
6458 } 6458 }
6459 6459
6460 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); 6460 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
6461 6461
6462 } 6462 }
6463 6463
6464 private void parcelGodCheck(UUID currentParcelID, bool isGod) 6464 private void parcelGodCheck(UUID currentParcelID, bool isGod)
@@ -6509,7 +6509,7 @@ namespace OpenSim.Region.Framework.Scenes
6509 6509
6510 // those on not on parcel see me 6510 // those on not on parcel see me
6511 if (currentParcelID != p.currentParcelUUID) 6511 if (currentParcelID != p.currentParcelUUID)
6512 { 6512 {
6513 viewsToSendto.Add(p); // they see me 6513 viewsToSendto.Add(p); // they see me
6514 } 6514 }
6515 } 6515 }
@@ -6584,7 +6584,7 @@ namespace OpenSim.Region.Framework.Scenes
6584 } 6584 }
6585 } 6585 }
6586 allpresences.Clear(); 6586 allpresences.Clear();
6587 } // now on a private parcel end 6587 } // now on a private parcel end
6588 6588
6589 else 6589 else
6590 { 6590 {