aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJeff Ames2008-05-18 23:06:50 +0000
committerJeff Ames2008-05-18 23:06:50 +0000
commit6ec680918bc6876f1c1382fb534b653fc34da052 (patch)
tree7eedbb3fa05b9540de9bba4a583795f1ba919de4 /OpenSim/Region/Environment
parentUpdate svn properties. (diff)
downloadopensim-SC-6ec680918bc6876f1c1382fb534b653fc34da052.zip
opensim-SC-6ec680918bc6876f1c1382fb534b653fc34da052.tar.gz
opensim-SC-6ec680918bc6876f1c1382fb534b653fc34da052.tar.bz2
opensim-SC-6ec680918bc6876f1c1382fb534b653fc34da052.tar.xz
Formatting cleanup, minor refactoring. Fixed some comparisons of value types and null.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Interfaces/IMoneyModule.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneManager.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs30
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs4
5 files changed, 23 insertions, 32 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/IMoneyModule.cs b/OpenSim/Region/Environment/Interfaces/IMoneyModule.cs
index 0531d5c..de39d0f 100644
--- a/OpenSim/Region/Environment/Interfaces/IMoneyModule.cs
+++ b/OpenSim/Region/Environment/Interfaces/IMoneyModule.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Environment.Interfaces
33{ 33{
34 public delegate void ObjectPaid(LLUUID objectID, LLUUID agentID, int amount); 34 public delegate void ObjectPaid(LLUUID objectID, LLUUID agentID, int amount);
35 public interface IMoneyModule : IRegionModule 35 public interface IMoneyModule : IRegionModule
36 { 36 {
37 bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, 37 bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID,
38 int amount); 38 int amount);
39 39
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 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 8f3de51..1568632 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Scenes
140 Result = m_localScenes[i].RegionInfo; 140 Result = m_localScenes[i].RegionInfo;
141 } 141 }
142 } 142 }
143 if (!(Result.Equals(null))) 143 if (Result != null)
144 { 144 {
145 for (int i = 0; i < m_localScenes.Count; i++) 145 for (int i = 0; i < m_localScenes.Count; i++)
146 { 146 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 8c5737c..d63260d 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -497,26 +497,26 @@ namespace OpenSim.Region.Environment.Scenes
497 { 497 {
498 foreach (TaskInventoryItem item in m_taskInventory.Values) 498 foreach (TaskInventoryItem item in m_taskInventory.Values)
499 { 499 {
500 LLUUID ownerID=item.OwnerID; 500 LLUUID ownerID = item.OwnerID;
501 uint everyoneMask=0; 501 uint everyoneMask = 0;
502 uint baseMask=item.BaseMask; 502 uint baseMask = item.BaseMask;
503 uint ownerMask=item.OwnerMask; 503 uint ownerMask = item.OwnerMask;
504 504
505 if(item.InvType == 10) // Script 505 if (item.InvType == 10) // Script
506 { 506 {
507 if((item.OwnerID != client.AgentId) && m_parentGroup.Scene.ExternalChecks.ExternalChecksCanViewScript(item.ItemID, UUID, client.AgentId)) 507 if ((item.OwnerID != client.AgentId) && m_parentGroup.Scene.ExternalChecks.ExternalChecksCanViewScript(item.ItemID, UUID, client.AgentId))
508 { 508 {
509 ownerID=client.AgentId; 509 ownerID = client.AgentId;
510 baseMask=0x7fffffff; 510 baseMask = 0x7fffffff;
511 ownerMask=0x7fffffff; 511 ownerMask = 0x7fffffff;
512 everyoneMask=(uint)(PermissionMask.Move | PermissionMask.Transfer); 512 everyoneMask = (uint)(PermissionMask.Move | PermissionMask.Transfer);
513 } 513 }
514 if((item.OwnerID != client.AgentId) && m_parentGroup.Scene.ExternalChecks.ExternalChecksCanEditScript(item.ItemID, UUID, client.AgentId)) 514 if ((item.OwnerID != client.AgentId) && m_parentGroup.Scene.ExternalChecks.ExternalChecksCanEditScript(item.ItemID, UUID, client.AgentId))
515 { 515 {
516 ownerID=client.AgentId; 516 ownerID = client.AgentId;
517 baseMask=0x7fffffff; 517 baseMask = 0x7fffffff;
518 ownerMask=0x7fffffff; 518 ownerMask = 0x7fffffff;
519 everyoneMask=(uint)(PermissionMask.Move | PermissionMask.Transfer | PermissionMask.Modify); 519 everyoneMask = (uint)(PermissionMask.Move | PermissionMask.Transfer | PermissionMask.Modify);
520 } 520 }
521 } 521 }
522 522
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 5221914..93ec138 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1469,7 +1469,7 @@ namespace OpenSim.Region.Environment.Scenes
1469 1469
1470 public void SetWearable(IClientAPI client, int wearableId, AvatarWearable wearable) 1470 public void SetWearable(IClientAPI client, int wearableId, AvatarWearable wearable)
1471 { 1471 {
1472 m_log.Info("[APPEARANCE] Setting wearable with client, wearableid, wearable"); 1472 m_log.Info("[APPEARANCE] Setting wearable with client, wearableid, wearable");
1473 m_appearance.SetWearable(wearableId, wearable); 1473 m_appearance.SetWearable(wearableId, wearable);
1474 m_scene.CommsManager.UserService.UpdateUserAppearance(client.AgentId, m_appearance); 1474 m_scene.CommsManager.UserService.UpdateUserAppearance(client.AgentId, m_appearance);
1475 client.SendWearables(m_appearance.Wearables, m_appearance.Serial++); 1475 client.SendWearables(m_appearance.Wearables, m_appearance.Serial++);
@@ -1524,7 +1524,7 @@ namespace OpenSim.Region.Environment.Scenes
1524 1524
1525 public void SetWearable(int wearableId, AvatarWearable wearable) 1525 public void SetWearable(int wearableId, AvatarWearable wearable)
1526 { 1526 {
1527 m_log.Warn("[APPEARANCE] Setting Wearable"); 1527 m_log.Warn("[APPEARANCE] Setting Wearable");
1528 m_appearance.SetWearable(wearableId, wearable); 1528 m_appearance.SetWearable(wearableId, wearable);
1529 m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); 1529 m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance);
1530 } 1530 }