diff options
author | Jeff Ames | 2008-05-18 23:06:50 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-18 23:06:50 +0000 |
commit | 6ec680918bc6876f1c1382fb534b653fc34da052 (patch) | |
tree | 7eedbb3fa05b9540de9bba4a583795f1ba919de4 /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | Update svn properties. (diff) | |
download | opensim-SC_OLD-6ec680918bc6876f1c1382fb534b653fc34da052.zip opensim-SC_OLD-6ec680918bc6876f1c1382fb534b653fc34da052.tar.gz opensim-SC_OLD-6ec680918bc6876f1c1382fb534b653fc34da052.tar.bz2 opensim-SC_OLD-6ec680918bc6876f1c1382fb534b653fc34da052.tar.xz |
Formatting cleanup, minor refactoring. Fixed some comparisons of value types and null.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d4b85c2..e1764b5 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2658,7 +2658,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2658 | ClientManager.ForEachClient(delegate(IClientAPI controller) | 2658 | ClientManager.ForEachClient(delegate(IClientAPI controller) |
2659 | { | 2659 | { |
2660 | ScenePresence p = GetScenePresence(controller.AgentId); | 2660 | ScenePresence p = GetScenePresence(controller.AgentId); |
2661 | bool childagent = !p.Equals(null) && p.IsChildAgent; | 2661 | bool childagent = p != null && p.IsChildAgent; |
2662 | if (controller.AgentId != godID && !childagent) | 2662 | if (controller.AgentId != godID && !childagent) |
2663 | // Do we really want to kick the initiator of this madness? | 2663 | // Do we really want to kick the initiator of this madness? |
2664 | { | 2664 | { |
@@ -2669,14 +2669,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2669 | } | 2669 | } |
2670 | else | 2670 | else |
2671 | { | 2671 | { |
2672 | if (m_scenePresences[agentID].IsChildAgent) | 2672 | m_innerScene.removeUserCount(!m_scenePresences[agentID].IsChildAgent); |
2673 | { | ||
2674 | m_innerScene.removeUserCount(false); | ||
2675 | } | ||
2676 | else | ||
2677 | { | ||
2678 | m_innerScene.removeUserCount(true); | ||
2679 | } | ||
2680 | 2673 | ||
2681 | m_scenePresences[agentID].ControllingClient.Kick(Helpers.FieldToUTF8String(reason)); | 2674 | m_scenePresences[agentID].ControllingClient.Kick(Helpers.FieldToUTF8String(reason)); |
2682 | m_scenePresences[agentID].ControllingClient.Close(true); | 2675 | m_scenePresences[agentID].ControllingClient.Close(true); |
@@ -2696,7 +2689,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
2696 | // Check for spoofing.. since this is permissions we're talking about here! | 2689 | // Check for spoofing.. since this is permissions we're talking about here! |
2697 | if ((controller.SessionId == sessionID) && (controller.AgentId == agentID)) | 2690 | if ((controller.SessionId == sessionID) && (controller.AgentId == agentID)) |
2698 | { | 2691 | { |
2699 | |||
2700 | // Tell the object to do permission update | 2692 | // Tell the object to do permission update |
2701 | if (localId != 0) | 2693 | if (localId != 0) |
2702 | { | 2694 | { |
@@ -2706,7 +2698,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
2706 | chObjectGroup.UpdatePermissions(agentID, field, localId, mask, set); | 2698 | chObjectGroup.UpdatePermissions(agentID, field, localId, mask, set); |
2707 | } | 2699 | } |
2708 | } | 2700 | } |
2709 | |||
2710 | } | 2701 | } |
2711 | } | 2702 | } |
2712 | 2703 | ||
@@ -3126,8 +3117,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
3126 | /// <param name="action"></param> | 3117 | /// <param name="action"></param> |
3127 | public void ForEachScenePresence(Action<ScenePresence> action) | 3118 | public void ForEachScenePresence(Action<ScenePresence> action) |
3128 | { | 3119 | { |
3129 | // We don't want to try to send messages if there are no avatar. | 3120 | // We don't want to try to send messages if there are no avatars. |
3130 | if (!(m_scenePresences.Equals(null))) | 3121 | if (m_scenePresences != null) |
3131 | { | 3122 | { |
3132 | try | 3123 | try |
3133 | { | 3124 | { |