diff options
author | Adam Frisby | 2008-04-21 07:09:17 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-21 07:09:17 +0000 |
commit | fef3b3689492dea63693c964bcdbec9f5137eb5e (patch) | |
tree | 7791eef001d85d3e1de863a68f26ff9434d062ca /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | * Terrain Module code has been reformatted to comply with guidelines. (diff) | |
download | opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.zip opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.gz opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.bz2 opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.xz |
* Optimised using statements and namespace references across entire project (this took a while to run).
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index a3f6948..6d8d481 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -40,11 +40,12 @@ using OpenSim.Framework.Communications; | |||
40 | using OpenSim.Framework.Communications.Cache; | 40 | using OpenSim.Framework.Communications.Cache; |
41 | using OpenSim.Framework.Servers; | 41 | using OpenSim.Framework.Servers; |
42 | using OpenSim.Region.Environment.Interfaces; | 42 | using OpenSim.Region.Environment.Interfaces; |
43 | using OpenSim.Region.Environment.Modules.Terrain; | ||
43 | using OpenSim.Region.Environment.Scenes.Scripting; | 44 | using OpenSim.Region.Environment.Scenes.Scripting; |
44 | using OpenSim.Region.Physics.Manager; | 45 | using OpenSim.Region.Physics.Manager; |
45 | using Caps = OpenSim.Region.Capabilities.Caps; | 46 | using Caps=OpenSim.Region.Capabilities.Caps; |
46 | using Image = System.Drawing.Image; | 47 | using Image=System.Drawing.Image; |
47 | using Timer = System.Timers.Timer; | 48 | using Timer=System.Timers.Timer; |
48 | 49 | ||
49 | namespace OpenSim.Region.Environment.Scenes | 50 | namespace OpenSim.Region.Environment.Scenes |
50 | { | 51 | { |
@@ -580,7 +581,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
580 | if (!avatar.IsChildAgent) | 581 | if (!avatar.IsChildAgent) |
581 | avatar.ControllingClient.Kick("The simulator is going down."); | 582 | avatar.ControllingClient.Kick("The simulator is going down."); |
582 | 583 | ||
583 | avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator), | 584 | avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(PacketType.DisableSimulator), |
584 | ThrottleOutPacketType.Task); | 585 | ThrottleOutPacketType.Task); |
585 | }); | 586 | }); |
586 | 587 | ||
@@ -755,17 +756,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
755 | { | 756 | { |
756 | throw; | 757 | throw; |
757 | } | 758 | } |
758 | catch (System.AccessViolationException e) | 759 | catch (AccessViolationException e) |
759 | { | 760 | { |
760 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 761 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
761 | 762 | ||
762 | } | 763 | } |
763 | catch (System.NullReferenceException e) | 764 | catch (NullReferenceException e) |
764 | { | 765 | { |
765 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 766 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
766 | 767 | ||
767 | } | 768 | } |
768 | catch (System.InvalidOperationException e) | 769 | catch (InvalidOperationException e) |
769 | { | 770 | { |
770 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 771 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
771 | 772 | ||
@@ -941,13 +942,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
941 | if (map == null) | 942 | if (map == null) |
942 | { | 943 | { |
943 | m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain."); | 944 | m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain."); |
944 | Heightmap = new Modules.Terrain.TerrainChannel(); | 945 | Heightmap = new TerrainChannel(); |
945 | 946 | ||
946 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 947 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
947 | } | 948 | } |
948 | else | 949 | else |
949 | { | 950 | { |
950 | Heightmap = new Modules.Terrain.TerrainChannel(map); | 951 | Heightmap = new TerrainChannel(map); |
951 | } | 952 | } |
952 | 953 | ||
953 | } | 954 | } |
@@ -1094,7 +1095,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1094 | byte[] data; | 1095 | byte[] data; |
1095 | try | 1096 | try |
1096 | { | 1097 | { |
1097 | data = OpenJPEGNet.OpenJPEG.EncodeFromImage(mapbmp, false); | 1098 | data = OpenJPEG.EncodeFromImage(mapbmp, false); |
1098 | } | 1099 | } |
1099 | catch (Exception) | 1100 | catch (Exception) |
1100 | { | 1101 | { |
@@ -1420,7 +1421,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1420 | { | 1421 | { |
1421 | DeleteSceneObjectGroup(grp); | 1422 | DeleteSceneObjectGroup(grp); |
1422 | } | 1423 | } |
1423 | catch (System.Exception) | 1424 | catch (Exception) |
1424 | { | 1425 | { |
1425 | m_log.Warn("[DATABASE]: exception when trying to remove the prim that crossed the border."); | 1426 | m_log.Warn("[DATABASE]: exception when trying to remove the prim that crossed the border."); |
1426 | } | 1427 | } |
@@ -1714,7 +1715,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1714 | { | 1715 | { |
1715 | client.SendKillObject(avatar.RegionHandle, avatar.LocalId); | 1716 | client.SendKillObject(avatar.RegionHandle, avatar.LocalId); |
1716 | } | 1717 | } |
1717 | catch (System.NullReferenceException) | 1718 | catch (NullReferenceException) |
1718 | { | 1719 | { |
1719 | //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway. | 1720 | //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway. |
1720 | } | 1721 | } |
@@ -2041,7 +2042,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2041 | m_innerScene.removeUserCount(true); | 2042 | m_innerScene.removeUserCount(true); |
2042 | } | 2043 | } |
2043 | // Tell a single agent to disconnect from the region. | 2044 | // Tell a single agent to disconnect from the region. |
2044 | libsecondlife.Packets.DisableSimulatorPacket disable = (libsecondlife.Packets.DisableSimulatorPacket)PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator); | 2045 | DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); |
2045 | presence.ControllingClient.OutPacket(disable, ThrottleOutPacketType.Unknown); | 2046 | presence.ControllingClient.OutPacket(disable, ThrottleOutPacketType.Unknown); |
2046 | presence.ControllingClient.Close(true); | 2047 | presence.ControllingClient.Close(true); |
2047 | } | 2048 | } |