diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 73 |
1 files changed, 38 insertions, 35 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 684745f..a81ee79 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -787,7 +787,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
787 | } | 787 | } |
788 | } | 788 | } |
789 | 789 | ||
790 | m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme"); | 790 | m_log.InfoFormat("[SCENE]: Using the {0} prioritization scheme", m_priorityScheme); |
791 | 791 | ||
792 | #endregion Interest Management | 792 | #endregion Interest Management |
793 | 793 | ||
@@ -918,9 +918,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
918 | } | 918 | } |
919 | else | 919 | else |
920 | { | 920 | { |
921 | m_log.Info("[INTERGRID]: Got notice about far away Region: " + otherRegion.RegionName.ToString() + | 921 | m_log.InfoFormat( |
922 | " at (" + otherRegion.RegionLocX.ToString() + ", " + | 922 | "[INTERGRID]: Got notice about far away Region: {0} at ({1}, {2})", |
923 | otherRegion.RegionLocY.ToString() + ")"); | 923 | otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY); |
924 | } | 924 | } |
925 | } | 925 | } |
926 | } | 926 | } |
@@ -1414,7 +1414,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1414 | } | 1414 | } |
1415 | catch (AccessViolationException e) | 1415 | catch (AccessViolationException e) |
1416 | { | 1416 | { |
1417 | m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 1417 | m_log.ErrorFormat( |
1418 | "[REGION]: Failed on region {0} with exception {1}{2}", | ||
1419 | RegionInfo.RegionName, e.Message, e.StackTrace); | ||
1418 | } | 1420 | } |
1419 | //catch (NullReferenceException e) | 1421 | //catch (NullReferenceException e) |
1420 | //{ | 1422 | //{ |
@@ -1422,11 +1424,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1422 | //} | 1424 | //} |
1423 | catch (InvalidOperationException e) | 1425 | catch (InvalidOperationException e) |
1424 | { | 1426 | { |
1425 | m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 1427 | m_log.ErrorFormat( |
1428 | "[REGION]: Failed on region {0} with exception {1}{2}", | ||
1429 | RegionInfo.RegionName, e.Message, e.StackTrace); | ||
1426 | } | 1430 | } |
1427 | catch (Exception e) | 1431 | catch (Exception e) |
1428 | { | 1432 | { |
1429 | m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 1433 | m_log.ErrorFormat( |
1434 | "[REGION]: Failed on region {0} with exception {1}{2}", | ||
1435 | RegionInfo.RegionName, e.Message, e.StackTrace); | ||
1430 | } | 1436 | } |
1431 | 1437 | ||
1432 | maintc = Util.EnvironmentTickCountSubtract(maintc); | 1438 | maintc = Util.EnvironmentTickCountSubtract(maintc); |
@@ -1652,7 +1658,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1652 | } | 1658 | } |
1653 | catch (IOException e) | 1659 | catch (IOException e) |
1654 | { | 1660 | { |
1655 | m_log.Warn("[TERRAIN]: Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString() + " Regenerating"); | 1661 | m_log.WarnFormat( |
1662 | "[TERRAIN]: Scene.cs: LoadWorldMap() - Regenerating as failed with exception {0}{1}", | ||
1663 | e.Message, e.StackTrace); | ||
1656 | 1664 | ||
1657 | // Non standard region size. If there's an old terrain in the database, it might read past the buffer | 1665 | // Non standard region size. If there's an old terrain in the database, it might read past the buffer |
1658 | #pragma warning disable 0162 | 1666 | #pragma warning disable 0162 |
@@ -1665,7 +1673,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1665 | } | 1673 | } |
1666 | catch (Exception e) | 1674 | catch (Exception e) |
1667 | { | 1675 | { |
1668 | m_log.Warn("[TERRAIN]: Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString()); | 1676 | m_log.WarnFormat( |
1677 | "[TERRAIN]: Scene.cs: LoadWorldMap() - Failed with exception {0}{1}", e.Message, e.StackTrace); | ||
1669 | } | 1678 | } |
1670 | } | 1679 | } |
1671 | 1680 | ||
@@ -1739,7 +1748,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1739 | 1748 | ||
1740 | List<SceneObjectGroup> PrimsFromDB = SimulationDataService.LoadObjects(regionID); | 1749 | List<SceneObjectGroup> PrimsFromDB = SimulationDataService.LoadObjects(regionID); |
1741 | 1750 | ||
1742 | m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count + " objects from the datastore"); | 1751 | m_log.InfoFormat("[SCENE]: Loaded {0} objects from the datastore", PrimsFromDB.Count); |
1743 | 1752 | ||
1744 | foreach (SceneObjectGroup group in PrimsFromDB) | 1753 | foreach (SceneObjectGroup group in PrimsFromDB) |
1745 | { | 1754 | { |
@@ -1753,7 +1762,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1753 | // group.CheckSculptAndLoad(); | 1762 | // group.CheckSculptAndLoad(); |
1754 | } | 1763 | } |
1755 | 1764 | ||
1756 | m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); | ||
1757 | LoadingPrims = false; | 1765 | LoadingPrims = false; |
1758 | EventManager.TriggerPrimsLoaded(this); | 1766 | EventManager.TriggerPrimsLoaded(this); |
1759 | } | 1767 | } |
@@ -2413,7 +2421,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2413 | } | 2421 | } |
2414 | catch (Exception e) | 2422 | catch (Exception e) |
2415 | { | 2423 | { |
2416 | m_log.WarnFormat("[SCENE]: Problem casting object: " + e.ToString()); | 2424 | m_log.WarnFormat("[SCENE]: Problem casting object, exception {0}{1}", e.Message, e.StackTrace); |
2417 | return false; | 2425 | return false; |
2418 | } | 2426 | } |
2419 | 2427 | ||
@@ -2496,8 +2504,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2496 | int flags = GetUserFlags(sceneObject.OwnerID); | 2504 | int flags = GetUserFlags(sceneObject.OwnerID); |
2497 | if (m_regInfo.EstateSettings.IsBanned(sceneObject.OwnerID, flags)) | 2505 | if (m_regInfo.EstateSettings.IsBanned(sceneObject.OwnerID, flags)) |
2498 | { | 2506 | { |
2499 | m_log.Info("[INTERREGION]: Denied prim crossing for " + | 2507 | m_log.InfoFormat("[INTERREGION]: Denied prim crossing for banned avatar {0}", sceneObject.OwnerID); |
2500 | "banned avatar"); | ||
2501 | 2508 | ||
2502 | return false; | 2509 | return false; |
2503 | } | 2510 | } |
@@ -2565,8 +2572,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2565 | { | 2572 | { |
2566 | // Deny non attachments based on parcel settings | 2573 | // Deny non attachments based on parcel settings |
2567 | // | 2574 | // |
2568 | m_log.Info("[INTERREGION]: Denied prim crossing " + | 2575 | m_log.Info("[INTERREGION]: Denied prim crossing because of parcel settings"); |
2569 | "because of parcel settings"); | ||
2570 | 2576 | ||
2571 | DeleteSceneObject(sceneObject, false); | 2577 | DeleteSceneObject(sceneObject, false); |
2572 | 2578 | ||
@@ -2629,7 +2635,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2629 | // connected. | 2635 | // connected. |
2630 | if (sp == null) | 2636 | if (sp == null) |
2631 | { | 2637 | { |
2632 | m_log.Debug("[SCENE]: Adding new child scene presence " + client.Name + " to scene " + RegionInfo.RegionName); | 2638 | m_log.DebugFormat( |
2639 | "[SCENE]: Adding new child scene presence {0} to scene {1}", client.Name, RegionInfo.RegionName); | ||
2633 | 2640 | ||
2634 | m_clientManager.Add(client); | 2641 | m_clientManager.Add(client); |
2635 | SubscribeToClientEvents(client); | 2642 | SubscribeToClientEvents(client); |
@@ -3277,7 +3284,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3277 | } | 3284 | } |
3278 | catch (Exception e) | 3285 | catch (Exception e) |
3279 | { | 3286 | { |
3280 | m_log.Error("[SCENE] Scene.cs:RemoveClient exception: " + e.ToString()); | 3287 | m_log.ErrorFormat("[SCENE] Scene.cs:RemoveClient exception {0}{1}", e.Message, e.StackTrace); |
3281 | } | 3288 | } |
3282 | m_log.Debug("[Scene] Done. Firing RemoveCircuit"); | 3289 | m_log.Debug("[Scene] Done. Firing RemoveCircuit"); |
3283 | m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode); | 3290 | m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode); |
@@ -3426,7 +3433,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3426 | } | 3433 | } |
3427 | catch (Exception e) | 3434 | catch (Exception e) |
3428 | { | 3435 | { |
3429 | m_log.ErrorFormat("[CONNECTION BEGIN]: Exception verifying presence " + e.ToString()); | 3436 | m_log.ErrorFormat( |
3437 | "[CONNECTION BEGIN]: Exception verifying presence {0}{1}", e.Message, e.StackTrace); | ||
3430 | return false; | 3438 | return false; |
3431 | } | 3439 | } |
3432 | } | 3440 | } |
@@ -3443,7 +3451,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3443 | } | 3451 | } |
3444 | catch (Exception e) | 3452 | catch (Exception e) |
3445 | { | 3453 | { |
3446 | m_log.ErrorFormat("[CONNECTION BEGIN]: Exception authorizing user " + e.ToString()); | 3454 | m_log.ErrorFormat( |
3455 | "[CONNECTION BEGIN]: Exception authorizing user {0}{1}", e.Message, e.StackTrace); | ||
3447 | return false; | 3456 | return false; |
3448 | } | 3457 | } |
3449 | 3458 | ||
@@ -3664,7 +3673,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3664 | } | 3673 | } |
3665 | } | 3674 | } |
3666 | else | 3675 | else |
3676 | { | ||
3667 | m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!"); | 3677 | m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!"); |
3678 | } | ||
3668 | 3679 | ||
3669 | IGroupsModule groupsModule = | 3680 | IGroupsModule groupsModule = |
3670 | RequestModuleInterface<IGroupsModule>(); | 3681 | RequestModuleInterface<IGroupsModule>(); |
@@ -3682,7 +3693,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3682 | agentGroups.Add(GroupMembership[i].GroupID); | 3693 | agentGroups.Add(GroupMembership[i].GroupID); |
3683 | } | 3694 | } |
3684 | else | 3695 | else |
3696 | { | ||
3685 | m_log.ErrorFormat("[CONNECTION BEGIN]: GroupMembership is null!"); | 3697 | m_log.ErrorFormat("[CONNECTION BEGIN]: GroupMembership is null!"); |
3698 | } | ||
3686 | } | 3699 | } |
3687 | 3700 | ||
3688 | bool groupAccess = false; | 3701 | bool groupAccess = false; |
@@ -3700,7 +3713,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3700 | } | 3713 | } |
3701 | } | 3714 | } |
3702 | else | 3715 | else |
3716 | { | ||
3703 | m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!"); | 3717 | m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!"); |
3718 | } | ||
3704 | 3719 | ||
3705 | if (!m_regInfo.EstateSettings.PublicAccess && | 3720 | if (!m_regInfo.EstateSettings.PublicAccess && |
3706 | !m_regInfo.EstateSettings.HasAccess(agent.AgentID) && | 3721 | !m_regInfo.EstateSettings.HasAccess(agent.AgentID) && |
@@ -3817,7 +3832,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3817 | } | 3832 | } |
3818 | catch (Exception e) | 3833 | catch (Exception e) |
3819 | { | 3834 | { |
3820 | m_log.ErrorFormat("[SCENE]: Unable to do agent crossing, exception {0}", e); | 3835 | m_log.ErrorFormat("[SCENE]: Unable to do agent crossing, exception {0}{1}", e.Message, e.StackTrace); |
3821 | } | 3836 | } |
3822 | } | 3837 | } |
3823 | else | 3838 | else |
@@ -4143,7 +4158,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4143 | /// <param name="cmdparams"></param> | 4158 | /// <param name="cmdparams"></param> |
4144 | public void HandleEditCommand(string[] cmdparams) | 4159 | public void HandleEditCommand(string[] cmdparams) |
4145 | { | 4160 | { |
4146 | m_log.Debug("Searching for Primitive: '" + cmdparams[2] + "'"); | 4161 | m_log.DebugFormat("Searching for Primitive: '{0}'", cmdparams[2]); |
4147 | 4162 | ||
4148 | EntityBase[] entityList = GetEntities(); | 4163 | EntityBase[] entityList = GetEntities(); |
4149 | foreach (EntityBase ent in entityList) | 4164 | foreach (EntityBase ent in entityList) |
@@ -4159,7 +4174,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4159 | new Vector3(Convert.ToSingle(cmdparams[3]), Convert.ToSingle(cmdparams[4]), | 4174 | new Vector3(Convert.ToSingle(cmdparams[3]), Convert.ToSingle(cmdparams[4]), |
4160 | Convert.ToSingle(cmdparams[5]))); | 4175 | Convert.ToSingle(cmdparams[5]))); |
4161 | 4176 | ||
4162 | m_log.Debug("Edited scale of Primitive: " + part.Name); | 4177 | m_log.DebugFormat("Edited scale of Primitive: {0}", part.Name); |
4163 | } | 4178 | } |
4164 | } | 4179 | } |
4165 | } | 4180 | } |
@@ -4188,7 +4203,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4188 | return LandChannel.GetLandObject((int)x, (int)y).LandData; | 4203 | return LandChannel.GetLandObject((int)x, (int)y).LandData; |
4189 | } | 4204 | } |
4190 | 4205 | ||
4191 | |||
4192 | #endregion | 4206 | #endregion |
4193 | 4207 | ||
4194 | #region Script Engine | 4208 | #region Script Engine |
@@ -4368,17 +4382,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4368 | } | 4382 | } |
4369 | 4383 | ||
4370 | /// <summary> | 4384 | /// <summary> |
4371 | /// Returns true if scene presence is a child (no avatar in this scene) | ||
4372 | /// </summary> | ||
4373 | /// <param name="avatarID"></param> | ||
4374 | /// <returns></returns> | ||
4375 | public override bool PresenceChildStatus(UUID avatarID) | ||
4376 | { | ||
4377 | ScenePresence sp; | ||
4378 | return TryGetScenePresence(avatarID, out sp) && sp.IsChildAgent; | ||
4379 | } | ||
4380 | |||
4381 | /// <summary> | ||
4382 | /// Performs action on all avatars in the scene (root scene presences) | 4385 | /// Performs action on all avatars in the scene (root scene presences) |
4383 | /// Avatars may be an NPC or a 'real' client. | 4386 | /// Avatars may be an NPC or a 'real' client. |
4384 | /// </summary> | 4387 | /// </summary> |