aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs192
1 files changed, 96 insertions, 96 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d7a4ca4..352bc05 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes
61 { 61 {
62 private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L; 62 private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L;
63 private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L; 63 private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L;
64 64
65 65
66 public delegate void SynchronizeSceneHandler(Scene scene); 66 public delegate void SynchronizeSceneHandler(Scene scene);
67 67
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Framework.Scenes
88 /// </summary> 88 /// </summary>
89 /// <remarks> 89 /// <remarks>
90 /// Even if false, the scene will still be saved on clean shutdown. 90 /// Even if false, the scene will still be saved on clean shutdown.
91 /// FIXME: Currently, setting this to false will mean that objects are not periodically returned from parcels. 91 /// FIXME: Currently, setting this to false will mean that objects are not periodically returned from parcels.
92 /// This needs to be fixed. 92 /// This needs to be fixed.
93 /// </remarks> 93 /// </remarks>
94 public bool PeriodicBackup { get; set; } 94 public bool PeriodicBackup { get; set; }
@@ -103,9 +103,9 @@ namespace OpenSim.Region.Framework.Scenes
103 /// If false then physical objects are disabled, though collisions will continue as normal. 103 /// If false then physical objects are disabled, though collisions will continue as normal.
104 /// </summary> 104 /// </summary>
105 105
106 public bool PhysicsEnabled 106 public bool PhysicsEnabled
107 { 107 {
108 get 108 get
109 { 109 {
110 return m_physicsEnabled; 110 return m_physicsEnabled;
111 } 111 }
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Framework.Scenes
237 /// to compensate for SL bug 237 /// to compensate for SL bug
238 /// </summary> 238 /// </summary>
239 public bool LegacySitOffsets = true; 239 public bool LegacySitOffsets = true;
240 240
241 /// <summary> 241 /// <summary>
242 /// Can avatars cross from and to this region? 242 /// Can avatars cross from and to this region?
243 /// </summary> 243 /// </summary>
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Framework.Scenes
245 245
246 /// Max prims an Physical object will hold 246 /// Max prims an Physical object will hold
247 /// </summary> 247 /// </summary>
248 /// 248 ///
249 public int m_linksetPhysCapacity = 0; 249 public int m_linksetPhysCapacity = 0;
250 250
251 /// <summary> 251 /// <summary>
@@ -383,9 +383,9 @@ namespace OpenSim.Region.Framework.Scenes
383 /// <summary> 383 /// <summary>
384 /// Frame time 384 /// Frame time
385 /// </remarks> 385 /// </remarks>
386 public float FrameTime { get; private set; } 386 public float FrameTime { get; private set; }
387 public int FrameTimeWarnPercent { get; private set; } 387 public int FrameTimeWarnPercent { get; private set; }
388 public int FrameTimeCritPercent { get; private set; } 388 public int FrameTimeCritPercent { get; private set; }
389 389
390 // Normalize the frame related stats to nominal 55fps for viewer and scripts option 390 // Normalize the frame related stats to nominal 55fps for viewer and scripts option
391 // see SimStatsReporter.cs 391 // see SimStatsReporter.cs
@@ -397,7 +397,7 @@ namespace OpenSim.Region.Framework.Scenes
397 /// <remarks> 397 /// <remarks>
398 /// Always derived from MinFrameTicks. 398 /// Always derived from MinFrameTicks.
399 /// </remarks> 399 /// </remarks>
400 public float MinMaintenanceTime { get; private set; } 400 public float MinMaintenanceTime { get; private set; }
401 401
402 private int m_update_physics = 1; 402 private int m_update_physics = 1;
403 private int m_update_entitymovement = 1; 403 private int m_update_entitymovement = 1;
@@ -529,7 +529,7 @@ namespace OpenSim.Region.Framework.Scenes
529 529
530// private int m_lastUpdate; 530// private int m_lastUpdate;
531 private bool m_firstHeartbeat = true; 531 private bool m_firstHeartbeat = true;
532 532
533// private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; 533// private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time;
534// private bool m_reprioritizationEnabled = true; 534// private bool m_reprioritizationEnabled = true;
535// private double m_reprioritizationInterval = 5000.0; 535// private double m_reprioritizationInterval = 5000.0;
@@ -868,7 +868,7 @@ namespace OpenSim.Region.Framework.Scenes
868 868
869 #region Constructors 869 #region Constructors
870 870
871 public Scene(RegionInfo regInfo, AgentCircuitManager authen, 871 public Scene(RegionInfo regInfo, AgentCircuitManager authen,
872 ISimulationDataService simDataService, IEstateDataService estateDataService, 872 ISimulationDataService simDataService, IEstateDataService estateDataService,
873 IConfigSource config, string simulatorVersion) 873 IConfigSource config, string simulatorVersion)
874 : this(regInfo) 874 : this(regInfo)
@@ -951,7 +951,7 @@ namespace OpenSim.Region.Framework.Scenes
951 951
952 RegisterDefaultSceneEvents(); 952 RegisterDefaultSceneEvents();
953 953
954 // XXX: Don't set the public property since we don't want to activate here. This needs to be handled 954 // XXX: Don't set the public property since we don't want to activate here. This needs to be handled
955 // better in the future. 955 // better in the future.
956 m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts; 956 m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts;
957 957
@@ -1212,7 +1212,7 @@ namespace OpenSim.Region.Framework.Scenes
1212 1212
1213 StatsReporter.OnSendStatsResult += SendSimStatsPackets; 1213 StatsReporter.OnSendStatsResult += SendSimStatsPackets;
1214 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; 1214 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
1215 1215
1216 } 1216 }
1217 1217
1218 public Scene(RegionInfo regInfo) 1218 public Scene(RegionInfo regInfo)
@@ -1549,7 +1549,7 @@ namespace OpenSim.Region.Framework.Scenes
1549 /// </summary> 1549 /// </summary>
1550 /// <param name='startScripts'> 1550 /// <param name='startScripts'>
1551 /// Start the scripts within the scene. 1551 /// Start the scripts within the scene.
1552 /// </param> 1552 /// </param>
1553 public void Start(bool startScripts) 1553 public void Start(bool startScripts)
1554 { 1554 {
1555 if (IsRunning) 1555 if (IsRunning)
@@ -1569,7 +1569,7 @@ namespace OpenSim.Region.Framework.Scenes
1569 1569
1570//int pid = System.Diagnostics.Process.GetCurrentProcess().Id; 1570//int pid = System.Diagnostics.Process.GetCurrentProcess().Id;
1571//System.Diagnostics.Process proc = new System.Diagnostics.Process(); 1571//System.Diagnostics.Process proc = new System.Diagnostics.Process();
1572//proc.EnableRaisingEvents=false; 1572//proc.EnableRaisingEvents=false;
1573//proc.StartInfo.FileName = "/bin/kill"; 1573//proc.StartInfo.FileName = "/bin/kill";
1574//proc.StartInfo.Arguments = "-QUIT " + pid.ToString(); 1574//proc.StartInfo.Arguments = "-QUIT " + pid.ToString();
1575//proc.Start(); 1575//proc.Start();
@@ -1637,7 +1637,7 @@ namespace OpenSim.Region.Framework.Scenes
1637 Update(-1); 1637 Update(-1);
1638 1638
1639 Watchdog.RemoveThread(); 1639 Watchdog.RemoveThread();
1640 } 1640 }
1641 1641
1642 private void Maintenance() 1642 private void Maintenance()
1643 { 1643 {
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Framework.Scenes
1706 previousMaintenanceTick = m_lastMaintenanceTick; 1706 previousMaintenanceTick = m_lastMaintenanceTick;
1707 m_lastMaintenanceTick = Util.EnvironmentTickCount(); 1707 m_lastMaintenanceTick = Util.EnvironmentTickCount();
1708 runtc = Util.EnvironmentTickCountSubtract(m_lastMaintenanceTick, runtc); 1708 runtc = Util.EnvironmentTickCountSubtract(m_lastMaintenanceTick, runtc);
1709 runtc = (int)(MinMaintenanceTime * 1000) - runtc; 1709 runtc = (int)(MinMaintenanceTime * 1000) - runtc;
1710 1710
1711 if (runtc > 0) 1711 if (runtc > 0)
1712 m_maintenanceWaitEvent.WaitOne(runtc); 1712 m_maintenanceWaitEvent.WaitOne(runtc);
@@ -1783,7 +1783,7 @@ namespace OpenSim.Region.Framework.Scenes
1783 if (Frame % m_update_entitymovement == 0) 1783 if (Frame % m_update_entitymovement == 0)
1784 m_sceneGraph.UpdateScenePresenceMovement(); 1784 m_sceneGraph.UpdateScenePresenceMovement();
1785 1785
1786 // Get the simulation frame time that the avatar force input 1786 // Get the simulation frame time that the avatar force input
1787 // took 1787 // took
1788 tmpMS2 = Util.GetTimeStampMS(); 1788 tmpMS2 = Util.GetTimeStampMS();
1789 agentMS = (float)(tmpMS2 - tmpMS); 1789 agentMS = (float)(tmpMS2 - tmpMS);
@@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes
1799 if (SynchronizeScene != null) 1799 if (SynchronizeScene != null)
1800 SynchronizeScene(this); 1800 SynchronizeScene(this);
1801 } 1801 }
1802 1802
1803 tmpMS2 = Util.GetTimeStampMS(); 1803 tmpMS2 = Util.GetTimeStampMS();
1804 physicsMS = (float)(tmpMS2 - tmpMS); 1804 physicsMS = (float)(tmpMS2 - tmpMS);
1805 tmpMS = tmpMS2; 1805 tmpMS = tmpMS2;
@@ -1820,17 +1820,17 @@ namespace OpenSim.Region.Framework.Scenes
1820 tmpMS2 = Util.GetTimeStampMS(); 1820 tmpMS2 = Util.GetTimeStampMS();
1821 agentMS += (float)(tmpMS2 - tmpMS); 1821 agentMS += (float)(tmpMS2 - tmpMS);
1822 tmpMS = tmpMS2; 1822 tmpMS = tmpMS2;
1823 1823
1824 // Delete temp-on-rez stuff 1824 // Delete temp-on-rez stuff
1825 if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps) 1825 if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps)
1826 { 1826 {
1827 m_cleaningTemps = true; 1827 m_cleaningTemps = true;
1828 Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; }); 1828 Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; });
1829 tmpMS2 = Util.GetTimeStampMS(); 1829 tmpMS2 = Util.GetTimeStampMS();
1830 tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects 1830 tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects
1831 tmpMS = tmpMS2; 1831 tmpMS = tmpMS2;
1832 } 1832 }
1833 1833
1834 if (Frame % m_update_events == 0) 1834 if (Frame % m_update_events == 0)
1835 { 1835 {
1836 UpdateEvents(); 1836 UpdateEvents();
@@ -1916,7 +1916,7 @@ namespace OpenSim.Region.Framework.Scenes
1916 1916
1917 // reuse frameMS as temporary 1917 // reuse frameMS as temporary
1918 frameMS = (float)tmpMS2; 1918 frameMS = (float)tmpMS2;
1919 1919
1920 // sleep if we can 1920 // sleep if we can
1921 if (tmpMS2 > 0) 1921 if (tmpMS2 > 0)
1922 { 1922 {
@@ -1939,9 +1939,9 @@ namespace OpenSim.Region.Framework.Scenes
1939 // script time is not scene frame time, but is displayed per frame 1939 // script time is not scene frame time, but is displayed per frame
1940 float scriptTimeMS = GetAndResetScriptExecutionTime(); 1940 float scriptTimeMS = GetAndResetScriptExecutionTime();
1941 StatsReporter.AddFrameStats(TimeDilation, physicsFPS, agentMS, 1941 StatsReporter.AddFrameStats(TimeDilation, physicsFPS, agentMS,
1942 physicsMS + physicsMS2, otherMS , sleepMS, frameMS, scriptTimeMS); 1942 physicsMS + physicsMS2, otherMS , sleepMS, frameMS, scriptTimeMS);
1943 1943
1944 1944
1945 1945
1946 // if (Frame%m_update_avatars == 0) 1946 // if (Frame%m_update_avatars == 0)
1947 // UpdateInWorldTime(); 1947 // UpdateInWorldTime();
@@ -2129,7 +2129,7 @@ namespace OpenSim.Region.Framework.Scenes
2129 } 2129 }
2130 2130
2131 /// <summary> 2131 /// <summary>
2132 /// Tell an agent that their object has been returned. 2132 /// Tell an agent that their object has been returned.
2133 /// </summary> 2133 /// </summary>
2134 /// <remarks> 2134 /// <remarks>
2135 /// The actual return is handled by the caller. 2135 /// The actual return is handled by the caller.
@@ -2221,7 +2221,7 @@ namespace OpenSim.Region.Framework.Scenes
2221 { 2221 {
2222 if(Bakedmap != null) 2222 if(Bakedmap != null)
2223 { 2223 {
2224 m_log.Warn("[TERRAIN]: terrain not found. Used stored baked terrain."); 2224 m_log.Warn("[TERRAIN]: terrain not found. Used stored baked terrain.");
2225 Heightmap = Bakedmap.MakeCopy(); 2225 Heightmap = Bakedmap.MakeCopy();
2226 SimulationDataService.StoreTerrain(Heightmap.GetTerrainData(), RegionInfo.RegionID); 2226 SimulationDataService.StoreTerrain(Heightmap.GetTerrainData(), RegionInfo.RegionID);
2227 } 2227 }
@@ -2290,7 +2290,7 @@ namespace OpenSim.Region.Framework.Scenes
2290 GridRegion region = new GridRegion(RegionInfo); 2290 GridRegion region = new GridRegion(RegionInfo);
2291 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); 2291 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
2292 // m_log.DebugFormat("[SCENE]: RegisterRegionWithGrid. name={0},id={1},loc=<{2},{3}>,size=<{4},{5}>", 2292 // m_log.DebugFormat("[SCENE]: RegisterRegionWithGrid. name={0},id={1},loc=<{2},{3}>,size=<{4},{5}>",
2293 // m_regionName, 2293 // m_regionName,
2294 // RegionInfo.RegionID, 2294 // RegionInfo.RegionID,
2295 // RegionInfo.RegionLocX, RegionInfo.RegionLocY, 2295 // RegionInfo.RegionLocX, RegionInfo.RegionLocY,
2296 // RegionInfo.RegionSizeX, RegionInfo.RegionSizeY); 2296 // RegionInfo.RegionSizeX, RegionInfo.RegionSizeY);
@@ -2369,7 +2369,7 @@ namespace OpenSim.Region.Framework.Scenes
2369 return PhysicsScene.SupportsRaycastWorldFiltered(); 2369 return PhysicsScene.SupportsRaycastWorldFiltered();
2370 } 2370 }
2371 2371
2372 public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter) 2372 public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter)
2373 { 2373 {
2374 if (PhysicsScene == null) 2374 if (PhysicsScene == null)
2375 return null; 2375 return null;
@@ -2463,7 +2463,7 @@ namespace OpenSim.Region.Framework.Scenes
2463 if (wpos.Z > pos.Z) pos = wpos; 2463 if (wpos.Z > pos.Z) pos = wpos;
2464 return pos; 2464 return pos;
2465 } 2465 }
2466 } 2466 }
2467 } 2467 }
2468 // else the first we got 2468 // else the first we got
2469 pos = physresults[0].Normal * scale; 2469 pos = physresults[0].Normal * scale;
@@ -2775,7 +2775,7 @@ namespace OpenSim.Region.Framework.Scenes
2775 } 2775 }
2776 else 2776 else
2777 { 2777 {
2778 toReturn.Add((SceneObjectGroup)e); 2778 toReturn.Add((SceneObjectGroup)e);
2779 } 2779 }
2780 } 2780 }
2781 } 2781 }
@@ -2847,7 +2847,7 @@ namespace OpenSim.Region.Framework.Scenes
2847 if (removeScripts) 2847 if (removeScripts)
2848 group.Clear(); 2848 group.Clear();
2849 partList = null; 2849 partList = null;
2850 // m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID); 2850 // m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID);
2851 } 2851 }
2852 2852
2853 /// <summary> 2853 /// <summary>
@@ -3023,7 +3023,7 @@ namespace OpenSim.Region.Framework.Scenes
3023 sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); 3023 sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez);
3024// sceneObject.RootPart.AddFlag(PrimFlags.Phantom); 3024// sceneObject.RootPart.AddFlag(PrimFlags.Phantom);
3025 3025
3026 // Don't sent a full update here because this will cause full updates to be sent twice for 3026 // Don't sent a full update here because this will cause full updates to be sent twice for
3027 // attachments on region crossings, resulting in viewer glitches. 3027 // attachments on region crossings, resulting in viewer glitches.
3028 AddRestoredSceneObject(sceneObject, false, false, false); 3028 AddRestoredSceneObject(sceneObject, false, false, false);
3029 3029
@@ -3044,7 +3044,7 @@ namespace OpenSim.Region.Framework.Scenes
3044 3044
3045 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 3045 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
3046 3046
3047 // We must currently not resume scripts at this stage since AttachmentsModule does not have the 3047 // We must currently not resume scripts at this stage since AttachmentsModule does not have the
3048 // information that this is due to a teleport/border cross rather than an ordinary attachment. 3048 // information that this is due to a teleport/border cross rather than an ordinary attachment.
3049 // We currently do this in Scene.MakeRootAgent() instead. 3049 // We currently do this in Scene.MakeRootAgent() instead.
3050 if (AttachmentsModule != null) 3050 if (AttachmentsModule != null)
@@ -3141,7 +3141,7 @@ namespace OpenSim.Region.Framework.Scenes
3141 vialogin 3141 vialogin
3142 = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 3142 = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0
3143 || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0; 3143 || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
3144 3144
3145 CheckHeartbeat(); 3145 CheckHeartbeat();
3146 3146
3147 sp = GetScenePresence(client.AgentId); 3147 sp = GetScenePresence(client.AgentId);
@@ -3152,10 +3152,10 @@ namespace OpenSim.Region.Framework.Scenes
3152 "[SCENE]: Adding new child scene presence {0} {1} to scene {2} at pos {3}, tpflags: {4}", 3152 "[SCENE]: Adding new child scene presence {0} {1} to scene {2} at pos {3}, tpflags: {4}",
3153 client.Name, client.AgentId, RegionInfo.RegionName, client.StartPos, 3153 client.Name, client.AgentId, RegionInfo.RegionName, client.StartPos,
3154 ((TPFlags)aCircuit.teleportFlags).ToString()); 3154 ((TPFlags)aCircuit.teleportFlags).ToString());
3155 3155
3156 m_clientManager.Add(client); 3156 m_clientManager.Add(client);
3157 SubscribeToClientEvents(client); 3157 SubscribeToClientEvents(client);
3158 3158
3159 sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type); 3159 sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type);
3160 3160
3161 sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags; 3161 sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags;
@@ -3167,9 +3167,9 @@ namespace OpenSim.Region.Framework.Scenes
3167 // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the 3167 // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the
3168 // client is for a root or child agent. 3168 // client is for a root or child agent.
3169 // XXX: This may be better set for a new client before that client is added to the client manager. 3169 // XXX: This may be better set for a new client before that client is added to the client manager.
3170 // But need to know what happens in the case where a ScenePresence is already present (and if this 3170 // But need to know what happens in the case where a ScenePresence is already present (and if this
3171 // actually occurs). 3171 // actually occurs).
3172 3172
3173 3173
3174 m_log.WarnFormat( 3174 m_log.WarnFormat(
3175 "[SCENE]: Already found {0} scene presence for {1} in {2} when asked to add new scene presence", 3175 "[SCENE]: Already found {0} scene presence for {1} in {2} when asked to add new scene presence",
@@ -3177,9 +3177,9 @@ namespace OpenSim.Region.Framework.Scenes
3177 3177
3178 reallyNew = false; 3178 reallyNew = false;
3179 } 3179 }
3180 client.SceneAgent = sp; 3180 client.SceneAgent = sp;
3181 3181
3182 // This is currently also being done earlier in NewUserConnection for real users to see if this 3182 // This is currently also being done earlier in NewUserConnection for real users to see if this
3183 // resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other 3183 // resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other
3184 // places. However, we still need to do it here for NPCs. 3184 // places. However, we still need to do it here for NPCs.
3185 CacheUserName(sp, aCircuit); 3185 CacheUserName(sp, aCircuit);
@@ -3610,7 +3610,7 @@ namespace OpenSim.Region.Framework.Scenes
3610 } 3610 }
3611 3611
3612 /// <summary> 3612 /// <summary>
3613 /// Duplicates object specified by localID at position raycasted against RayTargetObject using 3613 /// Duplicates object specified by localID at position raycasted against RayTargetObject using
3614 /// RayEnd and RayStart to determine what the angle of the ray is 3614 /// RayEnd and RayStart to determine what the angle of the ray is
3615 /// </summary> 3615 /// </summary>
3616 /// <param name="localID">ID of object to duplicate</param> 3616 /// <param name="localID">ID of object to duplicate</param>
@@ -3637,7 +3637,7 @@ namespace OpenSim.Region.Framework.Scenes
3637 if (target != null && target2 != null) 3637 if (target != null && target2 != null)
3638 { 3638 {
3639 Vector3 direction = Vector3.Normalize(RayEnd - RayStart); 3639 Vector3 direction = Vector3.Normalize(RayEnd - RayStart);
3640 3640
3641 pos = target2.AbsolutePosition; 3641 pos = target2.AbsolutePosition;
3642 //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString()); 3642 //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString());
3643 3643
@@ -3715,7 +3715,7 @@ namespace OpenSim.Region.Framework.Scenes
3715 } 3715 }
3716 3716
3717 /// <summary> 3717 /// <summary>
3718 /// Remove the given client from the scene. 3718 /// Remove the given client from the scene.
3719 /// </summary> 3719 /// </summary>
3720 /// <remarks> 3720 /// <remarks>
3721 /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead 3721 /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead
@@ -3726,7 +3726,7 @@ namespace OpenSim.Region.Framework.Scenes
3726 /// <param name='closeChildAgents'> 3726 /// <param name='closeChildAgents'>
3727 /// Close the neighbour child agents associated with this client. 3727 /// Close the neighbour child agents associated with this client.
3728 /// </param> 3728 /// </param>
3729 /// 3729 ///
3730 3730
3731 private object m_removeClientPrivLock = new Object(); 3731 private object m_removeClientPrivLock = new Object();
3732 3732
@@ -3734,7 +3734,7 @@ namespace OpenSim.Region.Framework.Scenes
3734 { 3734 {
3735 AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID); 3735 AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID);
3736 3736
3737 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which 3737 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which
3738 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not 3738 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not
3739 // However, will keep for now just in case. 3739 // However, will keep for now just in case.
3740 if (acd == null) 3740 if (acd == null)
@@ -3747,12 +3747,12 @@ namespace OpenSim.Region.Framework.Scenes
3747 3747
3748 // TODO: Can we now remove this lock? 3748 // TODO: Can we now remove this lock?
3749 lock (m_removeClientPrivLock) 3749 lock (m_removeClientPrivLock)
3750 { 3750 {
3751 bool isChildAgent = false; 3751 bool isChildAgent = false;
3752 3752
3753 ScenePresence avatar = GetScenePresence(agentID); 3753 ScenePresence avatar = GetScenePresence(agentID);
3754 3754
3755 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which 3755 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which
3756 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not 3756 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not
3757 // However, will keep for now just in case. 3757 // However, will keep for now just in case.
3758 if (avatar == null) 3758 if (avatar == null)
@@ -3792,7 +3792,7 @@ namespace OpenSim.Region.Framework.Scenes
3792 // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI 3792 // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI
3793 if (closeChildAgents && CapsModule != null) 3793 if (closeChildAgents && CapsModule != null)
3794 CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode); 3794 CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode);
3795 3795
3796 if (closeChildAgents && !isChildAgent) 3796 if (closeChildAgents && !isChildAgent)
3797 { 3797 {
3798 List<ulong> regions = avatar.KnownRegionHandles; 3798 List<ulong> regions = avatar.KnownRegionHandles;
@@ -3806,7 +3806,7 @@ namespace OpenSim.Region.Framework.Scenes
3806// m_log.Debug("[Scene]TriggerClientClosed done"); 3806// m_log.Debug("[Scene]TriggerClientClosed done");
3807 m_eventManager.TriggerOnRemovePresence(agentID); 3807 m_eventManager.TriggerOnRemovePresence(agentID);
3808// m_log.Debug("[Scene]TriggerOnRemovePresence done"); 3808// m_log.Debug("[Scene]TriggerOnRemovePresence done");
3809 3809
3810 if (!isChildAgent) 3810 if (!isChildAgent)
3811 { 3811 {
3812 if (AttachmentsModule != null) 3812 if (AttachmentsModule != null)
@@ -3865,7 +3865,7 @@ namespace OpenSim.Region.Framework.Scenes
3865 3865
3866 /// <summary> 3866 /// <summary>
3867 /// Removes region from an avatar's known region list. This coincides with child agents. For each child agent, there will be a known region entry. 3867 /// Removes region from an avatar's known region list. This coincides with child agents. For each child agent, there will be a known region entry.
3868 /// 3868 ///
3869 /// </summary> 3869 /// </summary>
3870 /// <param name="avatarID"></param> 3870 /// <param name="avatarID"></param>
3871 /// <param name="regionslst"></param> 3871 /// <param name="regionslst"></param>
@@ -3914,7 +3914,7 @@ namespace OpenSim.Region.Framework.Scenes
3914 /// <param name="teleportFlags"></param> 3914 /// <param name="teleportFlags"></param>
3915 /// <param name="source">Source region (may be null)</param> 3915 /// <param name="source">Source region (may be null)</param>
3916 /// <param name="reason">Outputs the reason for the false response on this string</param> 3916 /// <param name="reason">Outputs the reason for the false response on this string</param>
3917 /// <returns>True if the region accepts this agent. False if it does not. False will 3917 /// <returns>True if the region accepts this agent. False if it does not. False will
3918 /// also return a reason.</returns> 3918 /// also return a reason.</returns>
3919 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, GridRegion source, out string reason) 3919 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, GridRegion source, out string reason)
3920 { 3920 {
@@ -3942,9 +3942,9 @@ namespace OpenSim.Region.Framework.Scenes
3942 /// <param name="reason">Outputs the reason for the false response on this string</param> 3942 /// <param name="reason">Outputs the reason for the false response on this string</param>
3943 /// <param name="requirePresenceLookup">True for normal presence. False for NPC 3943 /// <param name="requirePresenceLookup">True for normal presence. False for NPC
3944 /// or other applications where a full grid/Hypergrid presence may not be required.</param> 3944 /// or other applications where a full grid/Hypergrid presence may not be required.</param>
3945 /// <returns>True if the region accepts this agent. False if it does not. False will 3945 /// <returns>True if the region accepts this agent. False if it does not. False will
3946 /// also return a reason.</returns> 3946 /// also return a reason.</returns>
3947 /// 3947 ///
3948 private object m_newUserConnLock = new object(); 3948 private object m_newUserConnLock = new object();
3949 3949
3950 public bool NewUserConnection(AgentCircuitData acd, uint teleportFlags, GridRegion source, out string reason, bool requirePresenceLookup) 3950 public bool NewUserConnection(AgentCircuitData acd, uint teleportFlags, GridRegion source, out string reason, bool requirePresenceLookup)
@@ -4037,7 +4037,7 @@ namespace OpenSim.Region.Framework.Scenes
4037 { 4037 {
4038 sp = GetScenePresence(acd.AgentID); 4038 sp = GetScenePresence(acd.AgentID);
4039 4039
4040 // We need to ensure that we are not already removing the scene presence before we ask it not to be 4040 // We need to ensure that we are not already removing the scene presence before we ask it not to be
4041 // closed. 4041 // closed.
4042 if (sp != null && sp.IsChildAgent 4042 if (sp != null && sp.IsChildAgent
4043 && (sp.LifecycleState == ScenePresenceState.Running 4043 && (sp.LifecycleState == ScenePresenceState.Running
@@ -4051,16 +4051,16 @@ namespace OpenSim.Region.Framework.Scenes
4051 // teleport from A -> D, but then -> C before A has asked B to close its old child agent. When C 4051 // teleport from A -> D, but then -> C before A has asked B to close its old child agent. When C
4052 // renews the lease on the child agent at B, we must make sure that the close from A does not succeed. 4052 // renews the lease on the child agent at B, we must make sure that the close from A does not succeed.
4053 // 4053 //
4054 // XXX: In the end, this should not be necessary if child agents are closed without delay on 4054 // XXX: In the end, this should not be necessary if child agents are closed without delay on
4055 // teleport, since realistically, the close request should always be processed before any other 4055 // teleport, since realistically, the close request should always be processed before any other
4056 // region tried to re-establish a child agent. This is much simpler since the logic below is 4056 // region tried to re-establish a child agent. This is much simpler since the logic below is
4057 // vulnerable to an issue when a viewer quits a region without sending a proper logout but then 4057 // vulnerable to an issue when a viewer quits a region without sending a proper logout but then
4058 // re-establishes the connection on a relogin. This could wrongly set the DoNotCloseAfterTeleport 4058 // re-establishes the connection on a relogin. This could wrongly set the DoNotCloseAfterTeleport
4059 // flag when no teleport had taken place (and hence no close was going to come). 4059 // flag when no teleport had taken place (and hence no close was going to come).
4060// if (!acd.ChildrenCapSeeds.ContainsKey(RegionInfo.RegionHandle)) 4060// if (!acd.ChildrenCapSeeds.ContainsKey(RegionInfo.RegionHandle))
4061// { 4061// {
4062// m_log.DebugFormat( 4062// m_log.DebugFormat(
4063// "[SCENE]: Setting DoNotCloseAfterTeleport for child scene presence {0} in {1} because source will attempt close.", 4063// "[SCENE]: Setting DoNotCloseAfterTeleport for child scene presence {0} in {1} because source will attempt close.",
4064// sp.Name, Name); 4064// sp.Name, Name);
4065// 4065//
4066// sp.DoNotCloseAfterTeleport = true; 4066// sp.DoNotCloseAfterTeleport = true;
@@ -4074,7 +4074,7 @@ namespace OpenSim.Region.Framework.Scenes
4074 sp.DoNotCloseAfterTeleport = true; 4074 sp.DoNotCloseAfterTeleport = true;
4075 4075
4076 m_log.DebugFormat( 4076 m_log.DebugFormat(
4077 "[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt end-of-teleport close from a previous close.", 4077 "[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt end-of-teleport close from a previous close.",
4078 sp.Name, Name); 4078 sp.Name, Name);
4079 } 4079 }
4080 } 4080 }
@@ -4094,7 +4094,7 @@ namespace OpenSim.Region.Framework.Scenes
4094 if (sp.LifecycleState == ScenePresenceState.Removing) 4094 if (sp.LifecycleState == ScenePresenceState.Removing)
4095 { 4095 {
4096 m_log.WarnFormat( 4096 m_log.WarnFormat(
4097 "[SCENE]: Agent {0} in {1} was still being removed after {2}s. Aborting NewUserConnection.", 4097 "[SCENE]: Agent {0} in {1} was still being removed after {2}s. Aborting NewUserConnection.",
4098 sp.Name, Name, polls * pollInterval / 1000); 4098 sp.Name, Name, polls * pollInterval / 1000);
4099 4099
4100 return false; 4100 return false;
@@ -4115,7 +4115,7 @@ namespace OpenSim.Region.Framework.Scenes
4115 // We have a root agent. Is it in transit? 4115 // We have a root agent. Is it in transit?
4116 if (!EntityTransferModule.IsInTransit(sp.UUID)) 4116 if (!EntityTransferModule.IsInTransit(sp.UUID))
4117 { 4117 {
4118 // We have a zombie from a crashed session. 4118 // We have a zombie from a crashed session.
4119 // Or the same user is trying to be root twice here, won't work. 4119 // Or the same user is trying to be root twice here, won't work.
4120 // Kill it. 4120 // Kill it.
4121 m_log.WarnFormat( 4121 m_log.WarnFormat(
@@ -4210,7 +4210,7 @@ namespace OpenSim.Region.Framework.Scenes
4210 { 4210 {
4211 m_log.DebugFormat( 4211 m_log.DebugFormat(
4212 "[SCENE]: Adjusting known seeds for existing agent {0} in {1}", 4212 "[SCENE]: Adjusting known seeds for existing agent {0} in {1}",
4213 acd.AgentID, RegionInfo.RegionName); 4213 acd.AgentID, RegionInfo.RegionName);
4214 4214
4215 if (CapsModule != null) 4215 if (CapsModule != null)
4216 { 4216 {
@@ -4253,7 +4253,7 @@ namespace OpenSim.Region.Framework.Scenes
4253 // only check access, actual relocations will happen later on ScenePresence MakeRoot 4253 // only check access, actual relocations will happen later on ScenePresence MakeRoot
4254 // allow child agents creation 4254 // allow child agents creation
4255 if(!godlike && teleportFlags != (uint) TPFlags.Default) 4255 if(!godlike && teleportFlags != (uint) TPFlags.Default)
4256 { 4256 {
4257 bool checkTeleHub; 4257 bool checkTeleHub;
4258 4258
4259 // don't check hubs if via home or via lure 4259 // don't check hubs if via home or via lure
@@ -4264,7 +4264,7 @@ namespace OpenSim.Region.Framework.Scenes
4264 checkTeleHub = vialogin 4264 checkTeleHub = vialogin
4265 || (TelehubAllowLandmarks == true ? false : ((teleportFlags & (uint)TPFlags.ViaLandmark) != 0 )) 4265 || (TelehubAllowLandmarks == true ? false : ((teleportFlags & (uint)TPFlags.ViaLandmark) != 0 ))
4266 || (teleportFlags & (uint) TPFlags.ViaLocation) != 0; 4266 || (teleportFlags & (uint) TPFlags.ViaLocation) != 0;
4267 4267
4268 if(!CheckLandPositionAccess(acd.AgentID, true, checkTeleHub, acd.startpos, out reason)) 4268 if(!CheckLandPositionAccess(acd.AgentID, true, checkTeleHub, acd.startpos, out reason))
4269 { 4269 {
4270 m_authenticateHandler.RemoveCircuit(acd.circuitcode); 4270 m_authenticateHandler.RemoveCircuit(acd.circuitcode);
@@ -4351,7 +4351,7 @@ namespace OpenSim.Region.Framework.Scenes
4351 /// </summary> 4351 /// </summary>
4352 /// <param name="agent">Circuit Data of the Agent we're verifying</param> 4352 /// <param name="agent">Circuit Data of the Agent we're verifying</param>
4353 /// <param name="reason">Outputs the reason for the false response on this string</param> 4353 /// <param name="reason">Outputs the reason for the false response on this string</param>
4354 /// <returns>True if the user has a session on the grid. False if it does not. False will 4354 /// <returns>True if the user has a session on the grid. False if it does not. False will
4355 /// also return a reason.</returns> 4355 /// also return a reason.</returns>
4356 public virtual bool VerifyUserPresence(AgentCircuitData agent, out string reason) 4356 public virtual bool VerifyUserPresence(AgentCircuitData agent, out string reason)
4357 { 4357 {
@@ -4380,7 +4380,7 @@ namespace OpenSim.Region.Framework.Scenes
4380 /// </summary> 4380 /// </summary>
4381 /// <param name="agent">The circuit data for the agent</param> 4381 /// <param name="agent">The circuit data for the agent</param>
4382 /// <param name="reason">outputs the reason to this string</param> 4382 /// <param name="reason">outputs the reason to this string</param>
4383 /// <returns>True if the region accepts this agent. False if it does not. False will 4383 /// <returns>True if the region accepts this agent. False if it does not. False will
4384 /// also return a reason.</returns> 4384 /// also return a reason.</returns>
4385 protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason) 4385 protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason)
4386 { 4386 {
@@ -4434,7 +4434,7 @@ namespace OpenSim.Region.Framework.Scenes
4434 // in access list / owner / manager 4434 // in access list / owner / manager
4435 if (RegionInfo.EstateSettings.HasAccess(agent.AgentID)) 4435 if (RegionInfo.EstateSettings.HasAccess(agent.AgentID))
4436 return true; 4436 return true;
4437 4437
4438 // finally test groups 4438 // finally test groups
4439 bool groupAccess = false; 4439 bool groupAccess = false;
4440 4440
@@ -4576,7 +4576,7 @@ Label_GroupsDone:
4576// } 4576// }
4577 4577
4578 /// <summary> 4578 /// <summary>
4579 /// We've got an update about an agent that sees into this region, 4579 /// We've got an update about an agent that sees into this region,
4580 /// send it to ScenePresence for processing It's the full data. 4580 /// send it to ScenePresence for processing It's the full data.
4581 /// </summary> 4581 /// </summary>
4582 /// <param name="cAgentData">Agent that contains all of the relevant things about an agent. 4582 /// <param name="cAgentData">Agent that contains all of the relevant things about an agent.
@@ -4604,7 +4604,7 @@ Label_GroupsDone:
4604 } 4604 }
4605 4605
4606 // TODO: This check should probably be in QueryAccess(). 4606 // TODO: This check should probably be in QueryAccess().
4607 ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, 4607 ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID,
4608 (float)RegionInfo.RegionSizeX * 0.5f, (float)RegionInfo.RegionSizeY * 0.5f); 4608 (float)RegionInfo.RegionSizeX * 0.5f, (float)RegionInfo.RegionSizeY * 0.5f);
4609 if (nearestParcel == null) 4609 if (nearestParcel == null)
4610 { 4610 {
@@ -4616,12 +4616,12 @@ Label_GroupsDone:
4616 } 4616 }
4617 4617
4618 // We have to wait until the viewer contacts this region 4618 // We have to wait until the viewer contacts this region
4619 // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol) 4619 // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol)
4620 // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send 4620 // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send
4621 // a UseCircuitCode packet which in turn calls AddNewAgent which finally creates the ScenePresence. 4621 // a UseCircuitCode packet which in turn calls AddNewAgent which finally creates the ScenePresence.
4622 ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID); 4622 ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID);
4623 4623
4624 if (sp != null) 4624 if (sp != null)
4625 { 4625 {
4626 if (!sp.IsChildAgent) 4626 if (!sp.IsChildAgent)
4627 { 4627 {
@@ -4632,10 +4632,10 @@ Label_GroupsDone:
4632 if (cAgentData.SessionID != sp.ControllingClient.SessionId) 4632 if (cAgentData.SessionID != sp.ControllingClient.SessionId)
4633 { 4633 {
4634 m_log.WarnFormat( 4634 m_log.WarnFormat(
4635 "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", 4635 "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).",
4636 sp.UUID, cAgentData.SessionID); 4636 sp.UUID, cAgentData.SessionID);
4637 4637
4638 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", 4638 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}",
4639 sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID)); 4639 sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID));
4640 } 4640 }
4641 4641
@@ -4667,7 +4667,7 @@ Label_GroupsDone:
4667 } 4667 }
4668 4668
4669 /// <summary> 4669 /// <summary>
4670 /// We've got an update about an agent that sees into this region, 4670 /// We've got an update about an agent that sees into this region,
4671 /// send it to ScenePresence for processing It's only positional data 4671 /// send it to ScenePresence for processing It's only positional data
4672 /// </summary> 4672 /// </summary>
4673 /// <param name="cAgentData">AgentPosition that contains agent positional data so we can know what to send</param> 4673 /// <param name="cAgentData">AgentPosition that contains agent positional data so we can know what to send</param>
@@ -4675,7 +4675,7 @@ Label_GroupsDone:
4675 public virtual bool IncomingUpdateChildAgent(AgentPosition cAgentData) 4675 public virtual bool IncomingUpdateChildAgent(AgentPosition cAgentData)
4676 { 4676 {
4677// m_log.DebugFormat( 4677// m_log.DebugFormat(
4678// "[SCENE PRESENCE]: IncomingChildAgentDataUpdate POSITION for {0} in {1}, position {2}", 4678// "[SCENE PRESENCE]: IncomingChildAgentDataUpdate POSITION for {0} in {1}, position {2}",
4679// cAgentData.AgentID, Name, cAgentData.Position); 4679// cAgentData.AgentID, Name, cAgentData.Position);
4680 4680
4681 ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); 4681 ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
@@ -4683,7 +4683,7 @@ Label_GroupsDone:
4683 { 4683 {
4684// if (childAgentUpdate.ControllingClient.SessionId != cAgentData.SessionID) 4684// if (childAgentUpdate.ControllingClient.SessionId != cAgentData.SessionID)
4685// // Only warn for now 4685// // Only warn for now
4686// m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}. Neighbor running older version?", 4686// m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}. Neighbor running older version?",
4687// childAgentUpdate.UUID, cAgentData.SessionID); 4687// childAgentUpdate.UUID, cAgentData.SessionID);
4688 4688
4689 // I can't imagine *yet* why we would get an update if the agent is a root agent.. 4689 // I can't imagine *yet* why we would get an update if the agent is a root agent..
@@ -4743,7 +4743,7 @@ Label_GroupsDone:
4743 if (acd == null) 4743 if (acd == null)
4744 { 4744 {
4745 m_log.DebugFormat( 4745 m_log.DebugFormat(
4746 "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.", 4746 "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.",
4747 agentID, Name); 4747 agentID, Name);
4748 4748
4749 return false; 4749 return false;
@@ -4756,7 +4756,7 @@ Label_GroupsDone:
4756 else 4756 else
4757 { 4757 {
4758 m_log.WarnFormat( 4758 m_log.WarnFormat(
4759 "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}", 4759 "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}",
4760 agentID, auth_token, Name); 4760 agentID, auth_token, Name);
4761 } 4761 }
4762 4762
@@ -4850,7 +4850,7 @@ Label_GroupsDone:
4850 return true; 4850 return true;
4851 } 4851 }
4852 m_log.DebugFormat( 4852 m_log.DebugFormat(
4853 "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}", 4853 "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}",
4854 agentID, Name); 4854 agentID, Name);
4855 4855
4856 return false; 4856 return false;
@@ -5361,7 +5361,7 @@ Label_GroupsDone:
5361 /// Get a scene object group that contains the prim with the given local id 5361 /// Get a scene object group that contains the prim with the given local id
5362 /// </summary> 5362 /// </summary>
5363 /// <param name="localID"></param> 5363 /// <param name="localID"></param>
5364 /// <returns>null if no scene object group containing that prim is found</returns> 5364 /// <returns>null if no scene object group containing that prim is found</returns>
5365 public SceneObjectGroup GetGroupByPrim(uint localID) 5365 public SceneObjectGroup GetGroupByPrim(uint localID)
5366 { 5366 {
5367 return m_sceneGraph.GetGroupByPrim(localID); 5367 return m_sceneGraph.GetGroupByPrim(localID);
@@ -5371,7 +5371,7 @@ Label_GroupsDone:
5371 /// Get a scene object group that contains the prim with the given uuid 5371 /// Get a scene object group that contains the prim with the given uuid
5372 /// </summary> 5372 /// </summary>
5373 /// <param name="fullID"></param> 5373 /// <param name="fullID"></param>
5374 /// <returns>null if no scene object group containing that prim is found</returns> 5374 /// <returns>null if no scene object group containing that prim is found</returns>
5375 public SceneObjectGroup GetGroupByPrim(UUID fullID) 5375 public SceneObjectGroup GetGroupByPrim(UUID fullID)
5376 { 5376 {
5377 return m_sceneGraph.GetGroupByPrim(fullID); 5377 return m_sceneGraph.GetGroupByPrim(fullID);
@@ -5484,7 +5484,7 @@ Label_GroupsDone:
5484 // 1 = sim is up and accepting http requests. The heartbeat has 5484 // 1 = sim is up and accepting http requests. The heartbeat has
5485 // stopped and the sim is probably locked up, but a remote 5485 // stopped and the sim is probably locked up, but a remote
5486 // admin restart may succeed 5486 // admin restart may succeed
5487 // 5487 //
5488 // 2 = Sim is up and the heartbeat is running. The sim is likely 5488 // 2 = Sim is up and the heartbeat is running. The sim is likely
5489 // usable for people within 5489 // usable for people within
5490 // 5490 //
@@ -5533,7 +5533,7 @@ Label_GroupsDone:
5533 { 5533 {
5534int pid = System.Diagnostics.Process.GetCurrentProcess().Id; 5534int pid = System.Diagnostics.Process.GetCurrentProcess().Id;
5535System.Diagnostics.Process proc = new System.Diagnostics.Process(); 5535System.Diagnostics.Process proc = new System.Diagnostics.Process();
5536proc.EnableRaisingEvents=false; 5536proc.EnableRaisingEvents=false;
5537proc.StartInfo.FileName = "/bin/kill"; 5537proc.StartInfo.FileName = "/bin/kill";
5538proc.StartInfo.Arguments = "-QUIT " + pid.ToString(); 5538proc.StartInfo.Arguments = "-QUIT " + pid.ToString();
5539proc.Start(); 5539proc.Start();
@@ -5979,7 +5979,7 @@ Environment.Exit(1);
5979 g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ); 5979 g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ);
5980 5980
5981// m_log.DebugFormat( 5981// m_log.DebugFormat(
5982// "[SCENE]: For {0} found AxisAlignedBoundingBoxRaw {1}, {2}", 5982// "[SCENE]: For {0} found AxisAlignedBoundingBoxRaw {1}, {2}",
5983// g.Name, new Vector3(ominX, ominY, ominZ), new Vector3(omaxX, omaxY, omaxZ)); 5983// g.Name, new Vector3(ominX, ominY, ominZ), new Vector3(omaxX, omaxY, omaxZ));
5984 5984
5985 ominX += vec.X; 5985 ominX += vec.X;
@@ -6175,11 +6175,11 @@ Environment.Exit(1);
6175 reason = "Error authorizing agent: " + e.Message; 6175 reason = "Error authorizing agent: " + e.Message;
6176 return false; 6176 return false;
6177 } 6177 }
6178 6178
6179 // last check aditional land access restrictions and relocations 6179 // last check aditional land access restrictions and relocations
6180 // if crossing (viaTeleport false) check only the specified parcel 6180 // if crossing (viaTeleport false) check only the specified parcel
6181 return CheckLandPositionAccess(agentID, viaTeleport, true, position, out reason); 6181 return CheckLandPositionAccess(agentID, viaTeleport, true, position, out reason);
6182 } 6182 }
6183 6183
6184 // check access to land. 6184 // check access to land.
6185 public bool CheckLandPositionAccess(UUID agentID, bool NotCrossing, bool checkTeleHub, Vector3 position, out string reason) 6185 public bool CheckLandPositionAccess(UUID agentID, bool NotCrossing, bool checkTeleHub, Vector3 position, out string reason)
@@ -6192,7 +6192,7 @@ Environment.Exit(1);
6192 bool isAdmin = Permissions.IsAdministrator(agentID); 6192 bool isAdmin = Permissions.IsAdministrator(agentID);
6193 if(isAdmin) 6193 if(isAdmin)
6194 return true; 6194 return true;
6195 6195
6196 // also honor estate managers access rights 6196 // also honor estate managers access rights
6197 bool isManager = Permissions.IsEstateManager(agentID); 6197 bool isManager = Permissions.IsEstateManager(agentID);
6198 if(isManager) 6198 if(isManager)
@@ -6204,14 +6204,14 @@ Environment.Exit(1);
6204 { 6204 {
6205 SceneObjectGroup telehub; 6205 SceneObjectGroup telehub;
6206 if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup (RegionInfo.RegionSettings.TelehubObject)) != null && checkTeleHub) 6206 if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup (RegionInfo.RegionSettings.TelehubObject)) != null && checkTeleHub)
6207 { 6207 {
6208 bool banned = true; 6208 bool banned = true;
6209 bool validTelehub = false; 6209 bool validTelehub = false;
6210 List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints(); 6210 List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints();
6211 Vector3 spawnPoint; 6211 Vector3 spawnPoint;
6212 ILandObject land = null; 6212 ILandObject land = null;
6213 Vector3 telehubPosition = telehub.AbsolutePosition; 6213 Vector3 telehubPosition = telehub.AbsolutePosition;
6214 6214
6215 if(spawnPoints.Count == 0) 6215 if(spawnPoints.Count == 0)
6216 { 6216 {
6217 // will this ever happen? 6217 // will this ever happen?
@@ -6225,7 +6225,7 @@ Environment.Exit(1);
6225 } 6225 }
6226 } 6226 }
6227 else 6227 else
6228 { 6228 {
6229 Quaternion telehubRotation = telehub.GroupRotation; 6229 Quaternion telehubRotation = telehub.GroupRotation;
6230 foreach (SpawnPoint spawn in spawnPoints) 6230 foreach (SpawnPoint spawn in spawnPoints)
6231 { 6231 {
@@ -6293,7 +6293,7 @@ Environment.Exit(1);
6293 return true; 6293 return true;
6294 } 6294 }
6295 6295
6296 public void StartTimerWatchdog() 6296 public void StartTimerWatchdog()
6297 { 6297 {
6298 m_timerWatchdog.Interval = 1000; 6298 m_timerWatchdog.Interval = 1000;
6299 m_timerWatchdog.Elapsed += TimerWatchdog; 6299 m_timerWatchdog.Elapsed += TimerWatchdog;
@@ -6304,7 +6304,7 @@ Environment.Exit(1);
6304 public void TimerWatchdog(object sender, ElapsedEventArgs e) 6304 public void TimerWatchdog(object sender, ElapsedEventArgs e)
6305 { 6305 {
6306 CheckHeartbeat(); 6306 CheckHeartbeat();
6307 } 6307 }
6308 6308
6309 /// This method deals with movement when an avatar is automatically moving (but this is distinct from the 6309 /// This method deals with movement when an avatar is automatically moving (but this is distinct from the
6310 /// autopilot that moves an avatar to a sit target!. 6310 /// autopilot that moves an avatar to a sit target!.
@@ -6391,7 +6391,7 @@ Environment.Exit(1);
6391 } 6391 }
6392 6392
6393 /// <summary> 6393 /// <summary>
6394 /// Wrappers to get physics modules retrieve assets. 6394 /// Wrappers to get physics modules retrieve assets.
6395 /// </summary> 6395 /// </summary>
6396 /// <remarks> 6396 /// <remarks>
6397 /// Has to be done this way 6397 /// Has to be done this way