diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 262 |
1 files changed, 131 insertions, 131 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1964ef4..32dc7d5 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
98 | /// Each agent has its own capabilities handler. | 98 | /// Each agent has its own capabilities handler. |
99 | /// </summary> | 99 | /// </summary> |
100 | protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>(); | 100 | protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>(); |
101 | 101 | ||
102 | protected BaseHttpServer m_httpListener; | 102 | protected BaseHttpServer m_httpListener; |
103 | 103 | ||
104 | protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); | 104 | protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); |
@@ -135,7 +135,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
135 | private int m_update_backup = 200; | 135 | private int m_update_backup = 200; |
136 | private int m_update_terrain = 50; | 136 | private int m_update_terrain = 50; |
137 | private int m_update_land = 1; | 137 | private int m_update_land = 1; |
138 | 138 | ||
139 | 139 | ||
140 | private int frameMS = 0; | 140 | private int frameMS = 0; |
141 | private int physicsMS2 = 0; | 141 | private int physicsMS2 = 0; |
@@ -201,7 +201,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
201 | get { return m_innerScene.Entities; } | 201 | get { return m_innerScene.Entities; } |
202 | set { m_innerScene.Entities = value; } | 202 | set { m_innerScene.Entities = value; } |
203 | } | 203 | } |
204 | 204 | ||
205 | public Dictionary<LLUUID, ScenePresence> m_restorePresences | 205 | public Dictionary<LLUUID, ScenePresence> m_restorePresences |
206 | { | 206 | { |
207 | get { return m_innerScene.RestorePresences; } | 207 | get { return m_innerScene.RestorePresences; } |
@@ -324,14 +324,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
324 | 324 | ||
325 | public override bool OtherRegionUp(RegionInfo otherRegion) | 325 | public override bool OtherRegionUp(RegionInfo otherRegion) |
326 | { | 326 | { |
327 | // Another region is up. | 327 | // Another region is up. |
328 | // Gets called from Grid Comms (SceneCommunicationService<---RegionListener<----LocalBackEnd<----OGS1) | 328 | // Gets called from Grid Comms (SceneCommunicationService<---RegionListener<----LocalBackEnd<----OGS1) |
329 | // We have to tell all our ScenePresences about it.. | 329 | // We have to tell all our ScenePresences about it.. |
330 | // and add it to the neighbor list. | 330 | // and add it to the neighbor list. |
331 | 331 | ||
332 | // We only add it to the neighbor list if it's within 1 region from here. | 332 | // We only add it to the neighbor list if it's within 1 region from here. |
333 | // Agents may have draw distance values that cross two regions though, so | 333 | // Agents may have draw distance values that cross two regions though, so |
334 | // we add it to the notify list regardless of distance. | 334 | // we add it to the notify list regardless of distance. |
335 | // We'll check the agent's draw distance before notifying them though. | 335 | // We'll check the agent's draw distance before notifying them though. |
336 | 336 | ||
337 | 337 | ||
@@ -339,9 +339,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
339 | { | 339 | { |
340 | for (int i = 0; i < m_neighbours.Count; i++) | 340 | for (int i = 0; i < m_neighbours.Count; i++) |
341 | { | 341 | { |
342 | // The purpose of this loop is to re-update the known neighbors | 342 | // The purpose of this loop is to re-update the known neighbors |
343 | // when another region comes up on top of another one. | 343 | // when another region comes up on top of another one. |
344 | // The latest region in that location ends up in the | 344 | // The latest region in that location ends up in the |
345 | // 'known neighbors list' | 345 | // 'known neighbors list' |
346 | // Additionally, the commFailTF property gets reset to false. | 346 | // Additionally, the commFailTF property gets reset to false. |
347 | if (m_neighbours[i].RegionHandle == otherRegion.RegionHandle) | 347 | if (m_neighbours[i].RegionHandle == otherRegion.RegionHandle) |
@@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
354 | } | 354 | } |
355 | 355 | ||
356 | // If the value isn't in the neighbours, add it. | 356 | // If the value isn't in the neighbours, add it. |
357 | // If the RegionInfo isn't exact but is for the same XY World location, | 357 | // If the RegionInfo isn't exact but is for the same XY World location, |
358 | // then the above loop will fix that. | 358 | // then the above loop will fix that. |
359 | 359 | ||
360 | if (!(CheckNeighborRegion(otherRegion))) | 360 | if (!(CheckNeighborRegion(otherRegion))) |
@@ -431,8 +431,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
431 | } | 431 | } |
432 | } | 432 | } |
433 | return found; | 433 | return found; |
434 | 434 | ||
435 | 435 | ||
436 | } | 436 | } |
437 | public virtual void Restart(float seconds) | 437 | public virtual void Restart(float seconds) |
438 | { | 438 | { |
@@ -461,8 +461,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
461 | } | 461 | } |
462 | } | 462 | } |
463 | 463 | ||
464 | // The Restart timer has occured. | 464 | // The Restart timer has occured. |
465 | // We have to figure out if this is a notification or if the number of seconds specified in Restart | 465 | // We have to figure out if this is a notification or if the number of seconds specified in Restart |
466 | // have elapsed. | 466 | // have elapsed. |
467 | // If they have elapsed, call RestartNow() | 467 | // If they have elapsed, call RestartNow() |
468 | public void RestartTimer_Elapsed(object sender, ElapsedEventArgs e) | 468 | public void RestartTimer_Elapsed(object sender, ElapsedEventArgs e) |
@@ -500,7 +500,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
500 | } | 500 | } |
501 | 501 | ||
502 | // This is a helper function that notifies root agents in this region that a new sim near them has come up | 502 | // This is a helper function that notifies root agents in this region that a new sim near them has come up |
503 | // This is in the form of a timer because when an instance of OpenSim.exe is started, | 503 | // This is in the form of a timer because when an instance of OpenSim.exe is started, |
504 | // Even though the sims initialize, they don't listen until 'all of the sims are initialized' | 504 | // Even though the sims initialize, they don't listen until 'all of the sims are initialized' |
505 | // If we tell an agent about a sim that's not listening yet, the agent will not be able to connect to it. | 505 | // If we tell an agent about a sim that's not listening yet, the agent will not be able to connect to it. |
506 | // subsequently the agent will never see the region come back online. | 506 | // subsequently the agent will never see the region come back online. |
@@ -730,7 +730,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
730 | if (m_frame % m_update_entities == 0) | 730 | if (m_frame % m_update_entities == 0) |
731 | m_innerScene.UpdateEntities(); | 731 | m_innerScene.UpdateEntities(); |
732 | 732 | ||
733 | // run through entities that have scheduled themselves for | 733 | // run through entities that have scheduled themselves for |
734 | // updates looking for updates(faster) | 734 | // updates looking for updates(faster) |
735 | if (m_frame % m_update_entitiesquick == 0) | 735 | if (m_frame % m_update_entitiesquick == 0) |
736 | m_innerScene.ProcessUpdates(); | 736 | m_innerScene.ProcessUpdates(); |
@@ -743,13 +743,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
743 | { | 743 | { |
744 | if (m_frame % m_update_events == 0) | 744 | if (m_frame % m_update_events == 0) |
745 | UpdateEvents(); | 745 | UpdateEvents(); |
746 | 746 | ||
747 | if (m_frame % m_update_backup == 0) | 747 | if (m_frame % m_update_backup == 0) |
748 | UpdateStorageBackup(); | 748 | UpdateStorageBackup(); |
749 | 749 | ||
750 | if (m_frame % m_update_terrain == 0) | 750 | if (m_frame % m_update_terrain == 0) |
751 | UpdateTerrain(); | 751 | UpdateTerrain(); |
752 | 752 | ||
753 | if (m_frame % m_update_land == 0) | 753 | if (m_frame % m_update_land == 0) |
754 | UpdateLand(); | 754 | UpdateLand(); |
755 | otherMS = System.Environment.TickCount - otherMS; | 755 | otherMS = System.Environment.TickCount - otherMS; |
@@ -800,14 +800,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
800 | // Get actual time dilation | 800 | // Get actual time dilation |
801 | float tmpval = (m_timespan / (float)SinceLastFrame.TotalSeconds); | 801 | float tmpval = (m_timespan / (float)SinceLastFrame.TotalSeconds); |
802 | 802 | ||
803 | // If actual time dilation is greater then one, we're catching up, so subtract | 803 | // If actual time dilation is greater then one, we're catching up, so subtract |
804 | // the amount that's greater then 1 from the time dilation | 804 | // the amount that's greater then 1 from the time dilation |
805 | if (tmpval > 1.0) | 805 | if (tmpval > 1.0) |
806 | { | 806 | { |
807 | tmpval = tmpval - (tmpval - 1.0f); | 807 | tmpval = tmpval - (tmpval - 1.0f); |
808 | } | 808 | } |
809 | m_timedilation = tmpval; | 809 | m_timedilation = tmpval; |
810 | 810 | ||
811 | m_lastupdate = DateTime.Now; | 811 | m_lastupdate = DateTime.Now; |
812 | } | 812 | } |
813 | } | 813 | } |
@@ -858,9 +858,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
858 | { | 858 | { |
859 | ForEachScenePresence(delegate(ScenePresence presence) { whatToDo(presence.ControllingClient); }); | 859 | ForEachScenePresence(delegate(ScenePresence presence) { whatToDo(presence.ControllingClient); }); |
860 | } | 860 | } |
861 | 861 | ||
862 | /// <summary> | 862 | /// <summary> |
863 | /// | 863 | /// |
864 | /// </summary> | 864 | /// </summary> |
865 | /// <returns></returns> | 865 | /// <returns></returns> |
866 | public bool Backup() | 866 | public bool Backup() |
@@ -929,7 +929,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
929 | /// <summary> | 929 | /// <summary> |
930 | /// Loads the World heightmap | 930 | /// Loads the World heightmap |
931 | /// </summary> | 931 | /// </summary> |
932 | /// | 932 | /// |
933 | public override void LoadWorldMap() | 933 | public override void LoadWorldMap() |
934 | { | 934 | { |
935 | try | 935 | try |
@@ -946,7 +946,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
946 | { | 946 | { |
947 | Heightmap = new TerrainChannel(map); | 947 | Heightmap = new TerrainChannel(map); |
948 | } | 948 | } |
949 | 949 | ||
950 | } | 950 | } |
951 | catch (Exception e) | 951 | catch (Exception e) |
952 | { | 952 | { |
@@ -961,13 +961,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
961 | public void RegisterRegionWithGrid() | 961 | public void RegisterRegionWithGrid() |
962 | { | 962 | { |
963 | RegisterCommsEvents(); | 963 | RegisterCommsEvents(); |
964 | 964 | ||
965 | // These two 'commands' *must be* next to each other or sim rebooting fails. | 965 | // These two 'commands' *must be* next to each other or sim rebooting fails. |
966 | m_sceneGridService.RegisterRegion(RegionInfo); | 966 | m_sceneGridService.RegisterRegion(RegionInfo); |
967 | m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo); | 967 | m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo); |
968 | 968 | ||
969 | Dictionary<string, string> dGridSettings = m_sceneGridService.GetGridSettings(); | 969 | Dictionary<string, string> dGridSettings = m_sceneGridService.GetGridSettings(); |
970 | 970 | ||
971 | if (dGridSettings.ContainsKey("allow_forceful_banlines")) | 971 | if (dGridSettings.ContainsKey("allow_forceful_banlines")) |
972 | { | 972 | { |
973 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") | 973 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") |
@@ -984,11 +984,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
984 | } | 984 | } |
985 | 985 | ||
986 | /// <summary> | 986 | /// <summary> |
987 | /// | 987 | /// |
988 | /// </summary> | 988 | /// </summary> |
989 | public void CreateTerrainTexture(bool temporary) | 989 | public void CreateTerrainTexture(bool temporary) |
990 | { | 990 | { |
991 | //create a texture asset of the terrain | 991 | //create a texture asset of the terrain |
992 | IMapImageGenerator terrain = RequestModuleInterface<IMapImageGenerator>(); | 992 | IMapImageGenerator terrain = RequestModuleInterface<IMapImageGenerator>(); |
993 | 993 | ||
994 | // Cannot create a map for a nonexistant heightmap yet. | 994 | // Cannot create a map for a nonexistant heightmap yet. |
@@ -1129,7 +1129,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1129 | AssetCache.AddAsset(asset); | 1129 | AssetCache.AddAsset(asset); |
1130 | } | 1130 | } |
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | #endregion | 1135 | #endregion |
@@ -1211,7 +1211,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1211 | if (RayTargetID != LLUUID.Zero) | 1211 | if (RayTargetID != LLUUID.Zero) |
1212 | { | 1212 | { |
1213 | SceneObjectPart target = GetSceneObjectPart(RayTargetID); | 1213 | SceneObjectPart target = GetSceneObjectPart(RayTargetID); |
1214 | 1214 | ||
1215 | LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); | 1215 | LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); |
1216 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); | 1216 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); |
1217 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | 1217 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); |
@@ -1220,9 +1220,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1220 | { | 1220 | { |
1221 | pos = target.AbsolutePosition; | 1221 | pos = target.AbsolutePosition; |
1222 | //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()); | 1222 | //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()); |
1223 | 1223 | ||
1224 | // TODO: Raytrace better here | 1224 | // TODO: Raytrace better here |
1225 | 1225 | ||
1226 | //EntityIntersection ei = m_innerScene.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection)); | 1226 | //EntityIntersection ei = m_innerScene.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection)); |
1227 | Ray NewRay = new Ray(AXOrigin, AXdirection); | 1227 | Ray NewRay = new Ray(AXOrigin, AXdirection); |
1228 | 1228 | ||
@@ -1246,13 +1246,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1246 | // Set the position to the intersection point | 1246 | // Set the position to the intersection point |
1247 | LLVector3 offset = (normal * (ScaleOffset / 2f)); | 1247 | LLVector3 offset = (normal * (ScaleOffset / 2f)); |
1248 | pos = (intersectionpoint + offset); | 1248 | pos = (intersectionpoint + offset); |
1249 | 1249 | ||
1250 | // Un-offset the prim (it gets offset later by the consumer method) | 1250 | // Un-offset the prim (it gets offset later by the consumer method) |
1251 | pos.Z -= 0.25F; | 1251 | pos.Z -= 0.25F; |
1252 | 1252 | ||
1253 | } | 1253 | } |
1254 | 1254 | ||
1255 | 1255 | ||
1256 | return pos; | 1256 | return pos; |
1257 | } | 1257 | } |
1258 | else | 1258 | else |
@@ -1267,8 +1267,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1267 | if (ei.HitTF) | 1267 | if (ei.HitTF) |
1268 | { | 1268 | { |
1269 | pos = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); | 1269 | pos = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); |
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | return pos; | 1272 | return pos; |
1273 | } | 1273 | } |
1274 | } | 1274 | } |
@@ -1284,7 +1284,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1284 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, | 1284 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, |
1285 | byte RayEndIsIntersection) | 1285 | byte RayEndIsIntersection) |
1286 | { | 1286 | { |
1287 | 1287 | ||
1288 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new LLVector3(0.5f,0.5f,0.5f), false); | 1288 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new LLVector3(0.5f,0.5f,0.5f), false); |
1289 | 1289 | ||
1290 | if ( ExternalChecks.ExternalChecksCanRezObject(1,ownerID,pos)) | 1290 | if ( ExternalChecks.ExternalChecksCanRezObject(1,ownerID,pos)) |
@@ -1386,11 +1386,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1386 | 1386 | ||
1387 | /// <summary> | 1387 | /// <summary> |
1388 | /// Locate New region Handle and offset the prim position for the new region | 1388 | /// Locate New region Handle and offset the prim position for the new region |
1389 | /// | 1389 | /// |
1390 | /// </summary> | 1390 | /// </summary> |
1391 | /// <param name="position">current position of Group</param> | 1391 | /// <param name="position">current position of Group</param> |
1392 | /// <param name="grp">Scene Object Group that we're crossing</param> | 1392 | /// <param name="grp">Scene Object Group that we're crossing</param> |
1393 | 1393 | ||
1394 | public void CrossPrimGroupIntoNewRegion(LLVector3 position, SceneObjectGroup grp) | 1394 | public void CrossPrimGroupIntoNewRegion(LLVector3 position, SceneObjectGroup grp) |
1395 | { | 1395 | { |
1396 | if (grp == null) | 1396 | if (grp == null) |
@@ -1424,7 +1424,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1424 | pos.X = ((pos.X - Constants.RegionSize)); | 1424 | pos.X = ((pos.X - Constants.RegionSize)); |
1425 | 1425 | ||
1426 | newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize)); | 1426 | newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize)); |
1427 | 1427 | ||
1428 | // x + 1 | 1428 | // x + 1 |
1429 | } | 1429 | } |
1430 | else if (position.X < -0.1f) | 1430 | else if (position.X < -0.1f) |
@@ -1449,7 +1449,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1449 | 1449 | ||
1450 | // Offset the positions for the new region across the border | 1450 | // Offset the positions for the new region across the border |
1451 | grp.OffsetForNewRegion(pos); | 1451 | grp.OffsetForNewRegion(pos); |
1452 | 1452 | ||
1453 | CrossPrimGroupIntoNewRegion(newRegionHandle, grp); | 1453 | CrossPrimGroupIntoNewRegion(newRegionHandle, grp); |
1454 | 1454 | ||
1455 | } | 1455 | } |
@@ -1507,7 +1507,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1507 | if (sp != null) | 1507 | if (sp != null) |
1508 | { | 1508 | { |
1509 | // hack assetID until we get assetID into the XML format. | 1509 | // hack assetID until we get assetID into the XML format. |
1510 | // LastOwnerID is used for group deeding, so when you do stuff | 1510 | // LastOwnerID is used for group deeding, so when you do stuff |
1511 | // with the deeded object, it goes back to them | 1511 | // with the deeded object, it goes back to them |
1512 | 1512 | ||
1513 | grp.SetFromAssetID(grp.RootPart.LastOwnerID); | 1513 | grp.SetFromAssetID(grp.RootPart.LastOwnerID); |
@@ -1515,7 +1515,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1515 | } | 1515 | } |
1516 | } | 1516 | } |
1517 | } | 1517 | } |
1518 | 1518 | ||
1519 | 1519 | ||
1520 | } | 1520 | } |
1521 | } | 1521 | } |
@@ -1533,16 +1533,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
1533 | #region Add/Remove Avatar Methods | 1533 | #region Add/Remove Avatar Methods |
1534 | 1534 | ||
1535 | /// <summary> | 1535 | /// <summary> |
1536 | /// | 1536 | /// |
1537 | /// </summary> | 1537 | /// </summary> |
1538 | /// <param name="client"></param | 1538 | /// <param name="client"></param |
1539 | /// <param name="child"></param> | 1539 | /// <param name="child"></param> |
1540 | public override void AddNewClient(IClientAPI client, bool child) | 1540 | public override void AddNewClient(IClientAPI client, bool child) |
1541 | { | 1541 | { |
1542 | m_log.DebugFormat( | 1542 | m_log.DebugFormat( |
1543 | "[CONNECTION DEBUGGING]: Creating new client for {0} at {1}", | 1543 | "[CONNECTION DEBUGGING]: Creating new client for {0} at {1}", |
1544 | client.AgentId, RegionInfo.RegionName); | 1544 | client.AgentId, RegionInfo.RegionName); |
1545 | 1545 | ||
1546 | SubscribeToClientEvents(client); | 1546 | SubscribeToClientEvents(client); |
1547 | ScenePresence presence; | 1547 | ScenePresence presence; |
1548 | 1548 | ||
@@ -1618,7 +1618,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1618 | client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; | 1618 | client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; |
1619 | client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; | 1619 | client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; |
1620 | client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily; | 1620 | client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily; |
1621 | 1621 | ||
1622 | client.OnRequestGodlikePowers += handleRequestGodlikePowers; | 1622 | client.OnRequestGodlikePowers += handleRequestGodlikePowers; |
1623 | client.OnGodKickUser += HandleGodlikeKickUser; | 1623 | client.OnGodKickUser += HandleGodlikeKickUser; |
1624 | client.OnObjectPermissions += HandleObjectPermissionsUpdate; | 1624 | client.OnObjectPermissions += HandleObjectPermissionsUpdate; |
@@ -1655,7 +1655,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1655 | 1655 | ||
1656 | client.OnSetStartLocationRequest += SetHomeRezPoint; | 1656 | client.OnSetStartLocationRequest += SetHomeRezPoint; |
1657 | client.OnUndo += m_innerScene.HandleUndo; | 1657 | client.OnUndo += m_innerScene.HandleUndo; |
1658 | 1658 | ||
1659 | EventManager.TriggerOnNewClient(client); | 1659 | EventManager.TriggerOnNewClient(client); |
1660 | } | 1660 | } |
1661 | public virtual void TeleportClientHome(LLUUID AgentId, IClientAPI client) | 1661 | public virtual void TeleportClientHome(LLUUID AgentId, IClientAPI client) |
@@ -1669,14 +1669,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1669 | RequestTeleportLocation(client, homeRegion, homePostion,homeLookat,(uint)0); | 1669 | RequestTeleportLocation(client, homeRegion, homePostion,homeLookat,(uint)0); |
1670 | } | 1670 | } |
1671 | } | 1671 | } |
1672 | 1672 | ||
1673 | public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, | 1673 | public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, |
1674 | LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, | 1674 | LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, |
1675 | bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) | 1675 | bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) |
1676 | { | 1676 | { |
1677 | LLVector3 pos; | 1677 | LLVector3 pos; |
1678 | const bool frontFacesOnly = true; | 1678 | const bool frontFacesOnly = true; |
1679 | 1679 | ||
1680 | SceneObjectPart target = GetSceneObjectPart(localID); | 1680 | SceneObjectPart target = GetSceneObjectPart(localID); |
1681 | SceneObjectPart target2 = GetSceneObjectPart(RayTargetObj); | 1681 | SceneObjectPart target2 = GetSceneObjectPart(RayTargetObj); |
1682 | 1682 | ||
@@ -1685,8 +1685,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1685 | 1685 | ||
1686 | LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); | 1686 | LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); |
1687 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); | 1687 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); |
1688 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | 1688 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); |
1689 | 1689 | ||
1690 | if (target2.ParentGroup != null) | 1690 | if (target2.ParentGroup != null) |
1691 | { | 1691 | { |
1692 | pos = target2.AbsolutePosition; | 1692 | pos = target2.AbsolutePosition; |
@@ -1717,7 +1717,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1717 | LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); | 1717 | LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); |
1718 | LLVector3 offset = (normal * (ScaleOffset / 2f)); | 1718 | LLVector3 offset = (normal * (ScaleOffset / 2f)); |
1719 | pos = (intersectionpoint + offset); | 1719 | pos = (intersectionpoint + offset); |
1720 | 1720 | ||
1721 | if (CopyCenters) | 1721 | if (CopyCenters) |
1722 | { | 1722 | { |
1723 | // now we cast a ray from inside the prim(absolute position) to one of it's faces along the face normal. | 1723 | // now we cast a ray from inside the prim(absolute position) to one of it's faces along the face normal. |
@@ -1735,7 +1735,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1735 | normal.Z = ei2.normal.z; | 1735 | normal.Z = ei2.normal.z; |
1736 | } | 1736 | } |
1737 | } | 1737 | } |
1738 | 1738 | ||
1739 | // Set the position to the intersection point | 1739 | // Set the position to the intersection point |
1740 | offset = (normal * (ScaleOffset / 2f)); | 1740 | offset = (normal * (ScaleOffset / 2f)); |
1741 | pos = (intersectionpoint + offset); | 1741 | pos = (intersectionpoint + offset); |
@@ -1749,8 +1749,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1749 | return; | 1749 | return; |
1750 | } | 1750 | } |
1751 | return; | 1751 | return; |
1752 | 1752 | ||
1753 | 1753 | ||
1754 | } | 1754 | } |
1755 | 1755 | ||
1756 | 1756 | ||
@@ -1776,7 +1776,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1776 | UserProfile.HomeLookAtY = (int)lookAt.Y; | 1776 | UserProfile.HomeLookAtY = (int)lookAt.Y; |
1777 | UserProfile.HomeLookAtZ = (int)lookAt.Z; | 1777 | UserProfile.HomeLookAtZ = (int)lookAt.Z; |
1778 | CommsManager.UserService.UpdateUserProfileProperties(UserProfile); | 1778 | CommsManager.UserService.UpdateUserProfileProperties(UserProfile); |
1779 | 1779 | ||
1780 | remoteClient.SendAgentAlertMessage("Set home to here if supported by login service",false); | 1780 | remoteClient.SendAgentAlertMessage("Set home to here if supported by login service",false); |
1781 | } | 1781 | } |
1782 | else | 1782 | else |
@@ -1784,7 +1784,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1784 | remoteClient.SendAgentAlertMessage("Set Home request Failed",false); | 1784 | remoteClient.SendAgentAlertMessage("Set Home request Failed",false); |
1785 | } | 1785 | } |
1786 | } | 1786 | } |
1787 | 1787 | ||
1788 | protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child) | 1788 | protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child) |
1789 | { | 1789 | { |
1790 | AvatarAppearance appearance; | 1790 | AvatarAppearance appearance; |
@@ -1844,7 +1844,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1844 | m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions); | 1844 | m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions); |
1845 | 1845 | ||
1846 | RemoveCapsHandler(agentID); | 1846 | RemoveCapsHandler(agentID); |
1847 | 1847 | ||
1848 | CommsManager.UserProfileCacheService.RemoveUser(agentID); | 1848 | CommsManager.UserProfileCacheService.RemoveUser(agentID); |
1849 | } | 1849 | } |
1850 | 1850 | ||
@@ -1870,7 +1870,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1870 | 1870 | ||
1871 | ForEachScenePresence( | 1871 | ForEachScenePresence( |
1872 | delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); | 1872 | delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); |
1873 | 1873 | ||
1874 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | 1874 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); |
1875 | if (agentTransactions != null) | 1875 | if (agentTransactions != null) |
1876 | { | 1876 | { |
@@ -1921,7 +1921,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1921 | } | 1921 | } |
1922 | 1922 | ||
1923 | //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); | 1923 | //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); |
1924 | //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); | 1924 | //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); |
1925 | } | 1925 | } |
1926 | 1926 | ||
1927 | public void HandleRemoveKnownRegionsFromAvatar(LLUUID avatarID, List<ulong> regionslst) | 1927 | public void HandleRemoveKnownRegionsFromAvatar(LLUUID avatarID, List<ulong> regionslst) |
@@ -1931,7 +1931,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1931 | { | 1931 | { |
1932 | lock (av) | 1932 | lock (av) |
1933 | { | 1933 | { |
1934 | 1934 | ||
1935 | for (int i = 0; i < regionslst.Count; i++) | 1935 | for (int i = 0; i < regionslst.Count; i++) |
1936 | { | 1936 | { |
1937 | av.KnownChildRegions.Remove(regionslst[i]); | 1937 | av.KnownChildRegions.Remove(regionslst[i]); |
@@ -1957,7 +1957,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1957 | #region Entities | 1957 | #region Entities |
1958 | 1958 | ||
1959 | /// <summary> | 1959 | /// <summary> |
1960 | /// | 1960 | /// |
1961 | /// </summary> | 1961 | /// </summary> |
1962 | /// <param name="entID"></param> | 1962 | /// <param name="entID"></param> |
1963 | /// <returns></returns> | 1963 | /// <returns></returns> |
@@ -1983,7 +1983,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1983 | #region RegionComms | 1983 | #region RegionComms |
1984 | 1984 | ||
1985 | /// <summary> | 1985 | /// <summary> |
1986 | /// | 1986 | /// |
1987 | /// </summary> | 1987 | /// </summary> |
1988 | public void RegisterCommsEvents() | 1988 | public void RegisterCommsEvents() |
1989 | { | 1989 | { |
@@ -1999,7 +1999,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1999 | } | 1999 | } |
2000 | 2000 | ||
2001 | /// <summary> | 2001 | /// <summary> |
2002 | /// | 2002 | /// |
2003 | /// </summary> | 2003 | /// </summary> |
2004 | public void UnRegisterReginWithComms() | 2004 | public void UnRegisterReginWithComms() |
2005 | { | 2005 | { |
@@ -2026,7 +2026,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2026 | if (regionHandle == m_regInfo.RegionHandle) | 2026 | if (regionHandle == m_regInfo.RegionHandle) |
2027 | { | 2027 | { |
2028 | capsPaths[agent.AgentID] = agent.CapsPath; | 2028 | capsPaths[agent.AgentID] = agent.CapsPath; |
2029 | 2029 | ||
2030 | if (!agent.child) | 2030 | if (!agent.child) |
2031 | { | 2031 | { |
2032 | AddCapsHandler(agent.AgentID); | 2032 | AddCapsHandler(agent.AgentID); |
@@ -2041,44 +2041,44 @@ namespace OpenSim.Region.Environment.Scenes | |||
2041 | } | 2041 | } |
2042 | } | 2042 | } |
2043 | } | 2043 | } |
2044 | 2044 | ||
2045 | m_log.DebugFormat( | 2045 | m_log.DebugFormat( |
2046 | "[CONNECTION DEBUGGING]: Creating new circuit code ({0}) for avatar {1} at {2}", | 2046 | "[CONNECTION DEBUGGING]: Creating new circuit code ({0}) for avatar {1} at {2}", |
2047 | agent.circuitcode, agent.AgentID, RegionInfo.RegionName); | 2047 | agent.circuitcode, agent.AgentID, RegionInfo.RegionName); |
2048 | 2048 | ||
2049 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); | 2049 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); |
2050 | } | 2050 | } |
2051 | else | 2051 | else |
2052 | { | 2052 | { |
2053 | m_log.WarnFormat( | 2053 | m_log.WarnFormat( |
2054 | "[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}", | 2054 | "[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}", |
2055 | agent.AgentID, regionHandle, RegionInfo.RegionName); | 2055 | agent.AgentID, regionHandle, RegionInfo.RegionName); |
2056 | } | 2056 | } |
2057 | } | 2057 | } |
2058 | 2058 | ||
2059 | /// <summary> | 2059 | /// <summary> |
2060 | /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent, | 2060 | /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent, |
2061 | /// then it is replaced by a new CAPS handler. | 2061 | /// then it is replaced by a new CAPS handler. |
2062 | /// | 2062 | /// |
2063 | /// FIXME: On login this is called twice, once for the login and once when the connection is made. | 2063 | /// FIXME: On login this is called twice, once for the login and once when the connection is made. |
2064 | /// This is somewhat innefficient and should be fixed. The initial login creation is necessary | 2064 | /// This is somewhat innefficient and should be fixed. The initial login creation is necessary |
2065 | /// since the client asks for capabilities immediately after being informed of the seed. | 2065 | /// since the client asks for capabilities immediately after being informed of the seed. |
2066 | /// </summary> | 2066 | /// </summary> |
2067 | /// <param name="agentId"></param> | 2067 | /// <param name="agentId"></param> |
2068 | /// <param name="capsObjectPath"></param> | 2068 | /// <param name="capsObjectPath"></param> |
2069 | public void AddCapsHandler(LLUUID agentId) | 2069 | public void AddCapsHandler(LLUUID agentId) |
2070 | { | 2070 | { |
2071 | String capsObjectPath = GetCapsPath(agentId); | 2071 | String capsObjectPath = GetCapsPath(agentId); |
2072 | 2072 | ||
2073 | m_log.DebugFormat( | 2073 | m_log.DebugFormat( |
2074 | "[CAPS]: Setting up CAPS handler for root agent {0} in {1}", | 2074 | "[CAPS]: Setting up CAPS handler for root agent {0} in {1}", |
2075 | agentId, RegionInfo.RegionName); | 2075 | agentId, RegionInfo.RegionName); |
2076 | 2076 | ||
2077 | Caps cap = | 2077 | Caps cap = |
2078 | new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, | 2078 | new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, |
2079 | capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName); | 2079 | capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName); |
2080 | cap.RegisterHandlers(); | 2080 | cap.RegisterHandlers(); |
2081 | 2081 | ||
2082 | EventManager.TriggerOnRegisterCaps(agentId, cap); | 2082 | EventManager.TriggerOnRegisterCaps(agentId, cap); |
2083 | 2083 | ||
2084 | cap.AddNewInventoryItem = AddInventoryItem; | 2084 | cap.AddNewInventoryItem = AddInventoryItem; |
@@ -2087,7 +2087,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2087 | cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; | 2087 | cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; |
2088 | cap.GetClient = m_innerScene.GetControllingClient; | 2088 | cap.GetClient = m_innerScene.GetControllingClient; |
2089 | m_capsHandlers[agentId] = cap; | 2089 | m_capsHandlers[agentId] = cap; |
2090 | } | 2090 | } |
2091 | 2091 | ||
2092 | /// <summary> | 2092 | /// <summary> |
2093 | /// Remove the caps handler for a given agent. | 2093 | /// Remove the caps handler for a given agent. |
@@ -2100,9 +2100,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
2100 | if (m_capsHandlers.ContainsKey(agentId)) | 2100 | if (m_capsHandlers.ContainsKey(agentId)) |
2101 | { | 2101 | { |
2102 | m_log.DebugFormat( | 2102 | m_log.DebugFormat( |
2103 | "[CAPS]: Removing CAPS handler for root agent {0} in {1}", | 2103 | "[CAPS]: Removing CAPS handler for root agent {0} in {1}", |
2104 | agentId, RegionInfo.RegionName); | 2104 | agentId, RegionInfo.RegionName); |
2105 | 2105 | ||
2106 | m_capsHandlers[agentId].DeregisterHandlers(); | 2106 | m_capsHandlers[agentId].DeregisterHandlers(); |
2107 | EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]); | 2107 | EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]); |
2108 | 2108 | ||
@@ -2118,7 +2118,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2118 | } | 2118 | } |
2119 | 2119 | ||
2120 | /// <summary> | 2120 | /// <summary> |
2121 | /// | 2121 | /// |
2122 | /// </summary> | 2122 | /// </summary> |
2123 | /// <param name="regionHandle"></param> | 2123 | /// <param name="regionHandle"></param> |
2124 | /// <param name="agentID"></param> | 2124 | /// <param name="agentID"></param> |
@@ -2152,8 +2152,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2152 | ScenePresence childAgentUpdate = GetScenePresence(new LLUUID(cAgentData.AgentID)); | 2152 | ScenePresence childAgentUpdate = GetScenePresence(new LLUUID(cAgentData.AgentID)); |
2153 | if (childAgentUpdate != null) | 2153 | if (childAgentUpdate != null) |
2154 | { | 2154 | { |
2155 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. | 2155 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. |
2156 | // however to avoid a race condition crossing borders.. | 2156 | // however to avoid a race condition crossing borders.. |
2157 | if (childAgentUpdate.IsChildAgent) | 2157 | if (childAgentUpdate.IsChildAgent) |
2158 | { | 2158 | { |
2159 | uint rRegionX = (uint)(cAgentData.regionHandle >> 40); | 2159 | uint rRegionX = (uint)(cAgentData.regionHandle >> 40); |
@@ -2193,7 +2193,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2193 | } | 2193 | } |
2194 | // Tell a single agent to disconnect from the region. | 2194 | // Tell a single agent to disconnect from the region. |
2195 | presence.ControllingClient.SendShutdownConnectionNotice(); | 2195 | presence.ControllingClient.SendShutdownConnectionNotice(); |
2196 | 2196 | ||
2197 | presence.ControllingClient.Close(true); | 2197 | presence.ControllingClient.Close(true); |
2198 | } | 2198 | } |
2199 | } | 2199 | } |
@@ -2202,11 +2202,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2202 | 2202 | ||
2203 | /// <summary> | 2203 | /// <summary> |
2204 | /// Tell neighboring regions about this agent | 2204 | /// Tell neighboring regions about this agent |
2205 | /// When the regions respond with a true value, | 2205 | /// When the regions respond with a true value, |
2206 | /// tell the agents about the region. | 2206 | /// tell the agents about the region. |
2207 | /// | 2207 | /// |
2208 | /// We have to tell the regions about the agents first otherwise it'll deny them access | 2208 | /// We have to tell the regions about the agents first otherwise it'll deny them access |
2209 | /// | 2209 | /// |
2210 | /// </summary> | 2210 | /// </summary> |
2211 | /// <param name="presence"></param> | 2211 | /// <param name="presence"></param> |
2212 | public void InformClientOfNeighbours(ScenePresence presence) | 2212 | public void InformClientOfNeighbours(ScenePresence presence) |
@@ -2309,7 +2309,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2309 | #region Module Methods | 2309 | #region Module Methods |
2310 | 2310 | ||
2311 | /// <summary> | 2311 | /// <summary> |
2312 | /// | 2312 | /// |
2313 | /// </summary> | 2313 | /// </summary> |
2314 | /// <param name="name"></param> | 2314 | /// <param name="name"></param> |
2315 | /// <param name="module"></param> | 2315 | /// <param name="module"></param> |
@@ -2379,21 +2379,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
2379 | m_statsReporter.SetObjectCapacity(objects); | 2379 | m_statsReporter.SetObjectCapacity(objects); |
2380 | } | 2380 | } |
2381 | objectCapacity = objects; | 2381 | objectCapacity = objects; |
2382 | 2382 | ||
2383 | } | 2383 | } |
2384 | 2384 | ||
2385 | public List<FriendListItem> GetFriendList(LLUUID avatarID) | 2385 | public List<FriendListItem> GetFriendList(LLUUID avatarID) |
2386 | { | 2386 | { |
2387 | return CommsManager.GetUserFriendList(avatarID); | 2387 | return CommsManager.GetUserFriendList(avatarID); |
2388 | } | 2388 | } |
2389 | 2389 | ||
2390 | 2390 | ||
2391 | #endregion | 2391 | #endregion |
2392 | 2392 | ||
2393 | #region Other Methods | 2393 | #region Other Methods |
2394 | 2394 | ||
2395 | /// <summary> | 2395 | /// <summary> |
2396 | /// | 2396 | /// |
2397 | /// </summary> | 2397 | /// </summary> |
2398 | /// <param name="phase"></param> | 2398 | /// <param name="phase"></param> |
2399 | public void SetTimePhase(int phase) | 2399 | public void SetTimePhase(int phase) |
@@ -2402,7 +2402,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2402 | } | 2402 | } |
2403 | 2403 | ||
2404 | /// <summary> | 2404 | /// <summary> |
2405 | /// | 2405 | /// |
2406 | /// </summary> | 2406 | /// </summary> |
2407 | /// <param name="avatarID"></param> | 2407 | /// <param name="avatarID"></param> |
2408 | /// <param name="objectName"></param> | 2408 | /// <param name="objectName"></param> |
@@ -2437,7 +2437,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2437 | } | 2437 | } |
2438 | 2438 | ||
2439 | /// <summary> | 2439 | /// <summary> |
2440 | /// | 2440 | /// |
2441 | /// </summary> | 2441 | /// </summary> |
2442 | /// <param name="url"></param> | 2442 | /// <param name="url"></param> |
2443 | /// <param name="type"></param> | 2443 | /// <param name="type"></param> |
@@ -2451,14 +2451,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
2451 | } | 2451 | } |
2452 | return LLUUID.Zero; | 2452 | return LLUUID.Zero; |
2453 | } | 2453 | } |
2454 | 2454 | ||
2455 | 2455 | ||
2456 | /// <summary> | 2456 | /// <summary> |
2457 | /// This method is a way for the Friends Module to create an instant | 2457 | /// This method is a way for the Friends Module to create an instant |
2458 | /// message to the avatar and for Instant Messages that travel across | 2458 | /// message to the avatar and for Instant Messages that travel across |
2459 | /// gridcomms to make it to the Instant Message Module. | 2459 | /// gridcomms to make it to the Instant Message Module. |
2460 | /// | 2460 | /// |
2461 | /// Friendship establishment and groups are unfortunately tied with instant messaging and | 2461 | /// Friendship establishment and groups are unfortunately tied with instant messaging and |
2462 | /// there's no way to separate them completely. | 2462 | /// there's no way to separate them completely. |
2463 | /// </summary> | 2463 | /// </summary> |
2464 | /// <param name="message">object containing the instant message data</param> | 2464 | /// <param name="message">object containing the instant message data</param> |
@@ -2525,7 +2525,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2525 | } | 2525 | } |
2526 | 2526 | ||
2527 | /// <summary> | 2527 | /// <summary> |
2528 | /// | 2528 | /// |
2529 | /// </summary> | 2529 | /// </summary> |
2530 | /// <param name="message"></param> | 2530 | /// <param name="message"></param> |
2531 | public void SendGeneralAlert(string message) | 2531 | public void SendGeneralAlert(string message) |
@@ -2539,7 +2539,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2539 | } | 2539 | } |
2540 | 2540 | ||
2541 | /// <summary> | 2541 | /// <summary> |
2542 | /// | 2542 | /// |
2543 | /// </summary> | 2543 | /// </summary> |
2544 | /// <param name="agentID"></param> | 2544 | /// <param name="agentID"></param> |
2545 | /// <param name="message"></param> | 2545 | /// <param name="message"></param> |
@@ -2556,7 +2556,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2556 | } | 2556 | } |
2557 | 2557 | ||
2558 | /// <summary> | 2558 | /// <summary> |
2559 | /// | 2559 | /// |
2560 | /// </summary> | 2560 | /// </summary> |
2561 | /// <param name="agentID"></param> | 2561 | /// <param name="agentID"></param> |
2562 | /// <param name="sessionID"></param> | 2562 | /// <param name="sessionID"></param> |
@@ -2569,7 +2569,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2569 | { | 2569 | { |
2570 | // User needs to be logged into this sim | 2570 | // User needs to be logged into this sim |
2571 | if (m_scenePresences.ContainsKey(agentID)) | 2571 | if (m_scenePresences.ContainsKey(agentID)) |
2572 | { | 2572 | { |
2573 | // First check that this is the sim owner | 2573 | // First check that this is the sim owner |
2574 | if (ExternalChecks.ExternalChecksCanBeGodLike(agentID)) | 2574 | if (ExternalChecks.ExternalChecksCanBeGodLike(agentID)) |
2575 | { | 2575 | { |
@@ -2632,8 +2632,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2632 | 2632 | ||
2633 | /// <summary> | 2633 | /// <summary> |
2634 | /// Kicks User specified from the simulator. This logs them off of the grid | 2634 | /// Kicks User specified from the simulator. This logs them off of the grid |
2635 | /// If the client gets the UUID: 44e87126e7944ded05b37c42da3d5cdb it assumes | 2635 | /// If the client gets the UUID: 44e87126e7944ded05b37c42da3d5cdb it assumes |
2636 | /// that you're kicking it even if the avatar's UUID isn't the UUID that the | 2636 | /// that you're kicking it even if the avatar's UUID isn't the UUID that the |
2637 | /// agent is assigned | 2637 | /// agent is assigned |
2638 | /// </summary> | 2638 | /// </summary> |
2639 | /// <param name="godID">The person doing the kicking</param> | 2639 | /// <param name="godID">The person doing the kicking</param> |
@@ -2662,7 +2662,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2662 | 2662 | ||
2663 | } | 2663 | } |
2664 | ); | 2664 | ); |
2665 | 2665 | ||
2666 | // This is a bit crude. It seems the client will be null before it actually stops the thread | 2666 | // This is a bit crude. It seems the client will be null before it actually stops the thread |
2667 | // The thread will kill itself eventually :/ | 2667 | // The thread will kill itself eventually :/ |
2668 | // Is there another way to make sure *all* clients get this 'inter region' message? | 2668 | // Is there another way to make sure *all* clients get this 'inter region' message? |
@@ -2722,7 +2722,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2722 | } | 2722 | } |
2723 | 2723 | ||
2724 | /// <summary> | 2724 | /// <summary> |
2725 | /// | 2725 | /// |
2726 | /// </summary> | 2726 | /// </summary> |
2727 | /// <param name="firstName"></param> | 2727 | /// <param name="firstName"></param> |
2728 | /// <param name="lastName"></param> | 2728 | /// <param name="lastName"></param> |
@@ -2743,7 +2743,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2743 | } | 2743 | } |
2744 | 2744 | ||
2745 | /// <summary> | 2745 | /// <summary> |
2746 | /// | 2746 | /// |
2747 | /// </summary> | 2747 | /// </summary> |
2748 | /// <param name="commandParams"></param> | 2748 | /// <param name="commandParams"></param> |
2749 | public void HandleAlertCommand(string[] commandParams) | 2749 | public void HandleAlertCommand(string[] commandParams) |
@@ -2931,7 +2931,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2931 | private bool m_dumpAssetsToFile; | 2931 | private bool m_dumpAssetsToFile; |
2932 | 2932 | ||
2933 | /// <summary> | 2933 | /// <summary> |
2934 | /// | 2934 | /// |
2935 | /// </summary> | 2935 | /// </summary> |
2936 | /// <param name="scriptEngine"></param> | 2936 | /// <param name="scriptEngine"></param> |
2937 | public void AddScriptEngine(ScriptEngineInterface scriptEngine) | 2937 | public void AddScriptEngine(ScriptEngineInterface scriptEngine) |
@@ -2978,7 +2978,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2978 | { | 2978 | { |
2979 | return false; | 2979 | return false; |
2980 | } | 2980 | } |
2981 | } | 2981 | } |
2982 | else | 2982 | else |
2983 | { | 2983 | { |
2984 | if (part.OwnerID == parcel.landData.ownerID) | 2984 | if (part.OwnerID == parcel.landData.ownerID) |
@@ -2996,7 +2996,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2996 | 2996 | ||
2997 | if (pos.X > 0f && pos.X < Constants.RegionSize && pos.Y > 0f && pos.Y < Constants.RegionSize) | 2997 | if (pos.X > 0f && pos.X < Constants.RegionSize && pos.Y > 0f && pos.Y < Constants.RegionSize) |
2998 | { | 2998 | { |
2999 | // The only time parcel != null when an object is inside a region is when | 2999 | // The only time parcel != null when an object is inside a region is when |
3000 | // there is nothing behind the landchannel. IE, no land plugin loaded. | 3000 | // there is nothing behind the landchannel. IE, no land plugin loaded. |
3001 | return true; | 3001 | return true; |
3002 | } | 3002 | } |
@@ -3027,7 +3027,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3027 | 3027 | ||
3028 | public bool pipeEventsForScript(uint localID) | 3028 | public bool pipeEventsForScript(uint localID) |
3029 | { | 3029 | { |
3030 | 3030 | ||
3031 | SceneObjectPart part = GetSceneObjectPart(localID); | 3031 | SceneObjectPart part = GetSceneObjectPart(localID); |
3032 | if (part != null) | 3032 | if (part != null) |
3033 | { | 3033 | { |
@@ -3046,7 +3046,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3046 | #region InnerScene wrapper methods | 3046 | #region InnerScene wrapper methods |
3047 | 3047 | ||
3048 | /// <summary> | 3048 | /// <summary> |
3049 | /// | 3049 | /// |
3050 | /// </summary> | 3050 | /// </summary> |
3051 | /// <param name="localID"></param> | 3051 | /// <param name="localID"></param> |
3052 | /// <returns></returns> | 3052 | /// <returns></returns> |
@@ -3071,7 +3071,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3071 | } | 3071 | } |
3072 | 3072 | ||
3073 | /// <summary> | 3073 | /// <summary> |
3074 | /// | 3074 | /// |
3075 | /// </summary> | 3075 | /// </summary> |
3076 | /// <param name="presence"></param> | 3076 | /// <param name="presence"></param> |
3077 | public void SendAllSceneObjectsToClient(ScenePresence presence) | 3077 | public void SendAllSceneObjectsToClient(ScenePresence presence) |
@@ -3080,10 +3080,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
3080 | } | 3080 | } |
3081 | 3081 | ||
3082 | //The idea is to have a group of method that return a list of avatars meeting some requirement | 3082 | //The idea is to have a group of method that return a list of avatars meeting some requirement |
3083 | // ie it could be all m_scenePresences within a certain range of the calling prim/avatar. | 3083 | // ie it could be all m_scenePresences within a certain range of the calling prim/avatar. |
3084 | 3084 | ||
3085 | /// <summary> | 3085 | /// <summary> |
3086 | /// | 3086 | /// |
3087 | /// </summary> | 3087 | /// </summary> |
3088 | /// <returns></returns> | 3088 | /// <returns></returns> |
3089 | public List<ScenePresence> GetAvatars() | 3089 | public List<ScenePresence> GetAvatars() |
@@ -3132,7 +3132,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3132 | } | 3132 | } |
3133 | 3133 | ||
3134 | /// <summary> | 3134 | /// <summary> |
3135 | /// | 3135 | /// |
3136 | /// </summary> | 3136 | /// </summary> |
3137 | /// <param name="action"></param> | 3137 | /// <param name="action"></param> |
3138 | public void ForEachScenePresence(Action<ScenePresence> action) | 3138 | public void ForEachScenePresence(Action<ScenePresence> action) |
@@ -3154,13 +3154,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
3154 | } | 3154 | } |
3155 | } | 3155 | } |
3156 | } | 3156 | } |
3157 | 3157 | ||
3158 | /// <summary> | 3158 | /// <summary> |
3159 | /// Delete this object from the scene. | 3159 | /// Delete this object from the scene. |
3160 | /// </summary> | 3160 | /// </summary> |
3161 | /// <param name="group"></param> | 3161 | /// <param name="group"></param> |
3162 | public void DeleteSceneObjectGroup(SceneObjectGroup group) | 3162 | public void DeleteSceneObjectGroup(SceneObjectGroup group) |
3163 | { | 3163 | { |
3164 | SceneObjectPart rootPart = (group).GetChildPart(group.UUID); | 3164 | SceneObjectPart rootPart = (group).GetChildPart(group.UUID); |
3165 | if (rootPart.PhysActor != null) | 3165 | if (rootPart.PhysActor != null) |
3166 | { | 3166 | { |
@@ -3177,18 +3177,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
3177 | m_innerScene.RemoveAPrimCount(); | 3177 | m_innerScene.RemoveAPrimCount(); |
3178 | } | 3178 | } |
3179 | group.DeleteParts(); | 3179 | group.DeleteParts(); |
3180 | 3180 | ||
3181 | // In case anybody else retains a reference to this group, signal deletion by changing the name | 3181 | // In case anybody else retains a reference to this group, signal deletion by changing the name |
3182 | // to null. We can't zero out the UUID because this is taken from the root part, which has already | 3182 | // to null. We can't zero out the UUID because this is taken from the root part, which has already |
3183 | // been removed. | 3183 | // been removed. |
3184 | // FIXME: This is a really poor temporary solution, since it still leaves plenty of scope for race | 3184 | // FIXME: This is a really poor temporary solution, since it still leaves plenty of scope for race |
3185 | // conditions where a user deletes an entity while it is being stored. Really, the update | 3185 | // conditions where a user deletes an entity while it is being stored. Really, the update |
3186 | // code needs a redesign. | 3186 | // code needs a redesign. |
3187 | group.Name = null; | 3187 | group.Name = null; |
3188 | } | 3188 | } |
3189 | 3189 | ||
3190 | /// <summary> | 3190 | /// <summary> |
3191 | /// | 3191 | /// |
3192 | /// </summary> | 3192 | /// </summary> |
3193 | /// <param name="action"></param> | 3193 | /// <param name="action"></param> |
3194 | // public void ForEachObject(Action<SceneObjectGroup> action) | 3194 | // public void ForEachObject(Action<SceneObjectGroup> action) |
@@ -3207,7 +3207,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3207 | // } | 3207 | // } |
3208 | 3208 | ||
3209 | /// <summary> | 3209 | /// <summary> |
3210 | /// | 3210 | /// |
3211 | /// </summary> | 3211 | /// </summary> |
3212 | /// <param name="localID"></param> | 3212 | /// <param name="localID"></param> |
3213 | /// <returns></returns> | 3213 | /// <returns></returns> |
@@ -3217,7 +3217,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3217 | } | 3217 | } |
3218 | 3218 | ||
3219 | /// <summary> | 3219 | /// <summary> |
3220 | /// | 3220 | /// |
3221 | /// </summary> | 3221 | /// </summary> |
3222 | /// <param name="fullID"></param> | 3222 | /// <param name="fullID"></param> |
3223 | /// <returns></returns> | 3223 | /// <returns></returns> |