aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJeff Ames2008-08-15 10:24:04 +0000
committerJeff Ames2008-08-15 10:24:04 +0000
commitdde21314e75acdaeff27af70077f283493401961 (patch)
tree490ab065895adb41ee4771fce623f99faa60b507 /OpenSim/Region/Environment
parentFixes a case where, when inventory is not currently accessible due (diff)
downloadopensim-SC_OLD-dde21314e75acdaeff27af70077f283493401961.zip
opensim-SC_OLD-dde21314e75acdaeff27af70077f283493401961.tar.gz
opensim-SC_OLD-dde21314e75acdaeff27af70077f283493401961.tar.bz2
opensim-SC_OLD-dde21314e75acdaeff27af70077f283493401961.tar.xz
Update svn properties, formatting cleanup, fix a couple compiler warnings.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs22
4 files changed, 28 insertions, 24 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index 25ea282..0fbd4fb 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -238,12 +238,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
238 // If there is no master avatar, return false 238 // If there is no master avatar, return false
239 if (m_scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero) 239 if (m_scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero)
240 { 240 {
241 if(m_scene.RegionInfo.MasterAvatarAssignedUUID == user) 241 if (m_scene.RegionInfo.MasterAvatarAssignedUUID == user)
242 return true; 242 return true;
243 } 243 }
244 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 244 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
245 { 245 {
246 if(m_scene.RegionInfo.EstateSettings.EstateOwner == user) 246 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user)
247 return true; 247 return true;
248 } 248 }
249 249
diff --git a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
index cb69b47..98b3bf8 100644
--- a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
@@ -98,9 +98,9 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
98 { 98 {
99 if (args[0] == "tree") 99 if (args[0] == "tree")
100 { 100 {
101 LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; 101 LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
102 if(uuid == LLUUID.Zero) 102 if (uuid == LLUUID.Zero)
103 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; 103 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
104 m_log.Debug("[TREES]: New tree planting"); 104 m_log.Debug("[TREES]: New tree planting");
105 CreateTree(uuid, new LLVector3(128.0f, 128.0f, 0.0f)); 105 CreateTree(uuid, new LLVector3(128.0f, 128.0f, 0.0f));
106 } 106 }
@@ -223,9 +223,9 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
223 position.X += (float) randX; 223 position.X += (float) randX;
224 position.Y += (float) randY; 224 position.Y += (float) randY;
225 225
226 LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; 226 LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
227 if(uuid == LLUUID.Zero) 227 if (uuid == LLUUID.Zero)
228 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; 228 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
229 229
230 CreateTree(uuid, position); 230 CreateTree(uuid, position);
231 } 231 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 4e7e764..22251e9 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2122,10 +2122,10 @@ namespace OpenSim.Region.Environment.Scenes
2122 LLVector3 homePostion = new LLVector3(UserProfile.HomeLocationX,UserProfile.HomeLocationY,UserProfile.HomeLocationZ); 2122 LLVector3 homePostion = new LLVector3(UserProfile.HomeLocationX,UserProfile.HomeLocationY,UserProfile.HomeLocationZ);
2123 LLVector3 homeLookat = new LLVector3(UserProfile.HomeLookAt); 2123 LLVector3 homeLookat = new LLVector3(UserProfile.HomeLookAt);
2124 ulong homeRegionHandle = UserProfile.HomeRegion; 2124 ulong homeRegionHandle = UserProfile.HomeRegion;
2125 if(homeRegionID == LLUUID.Zero) 2125 if (homeRegionID == LLUUID.Zero)
2126 { 2126 {
2127 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); 2127 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion);
2128 if(info == null) 2128 if (info == null)
2129 { 2129 {
2130 // can't find the region: Tell viewer and abort 2130 // can't find the region: Tell viewer and abort
2131 client.SendTeleportFailed("Your home-region could not be found."); 2131 client.SendTeleportFailed("Your home-region could not be found.");
@@ -2137,7 +2137,7 @@ namespace OpenSim.Region.Environment.Scenes
2137 else 2137 else
2138 { 2138 {
2139 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(homeRegionID); 2139 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(homeRegionID);
2140 if(info == null) 2140 if (info == null)
2141 { 2141 {
2142 // can't find the region: Tell viewer and abort 2142 // can't find the region: Tell viewer and abort
2143 client.SendTeleportFailed("Your home-region could not be found."); 2143 client.SendTeleportFailed("Your home-region could not be found.");
@@ -2762,7 +2762,7 @@ namespace OpenSim.Region.Environment.Scenes
2762 public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position) 2762 public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position)
2763 { 2763 {
2764 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID); 2764 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID);
2765 if(info == null) 2765 if (info == null)
2766 { 2766 {
2767 // can't find the region: Tell viewer and abort 2767 // can't find the region: Tell viewer and abort
2768 remoteClient.SendTeleportFailed("The teleport destination could not be found."); 2768 remoteClient.SendTeleportFailed("The teleport destination could not be found.");
@@ -3518,10 +3518,10 @@ namespace OpenSim.Region.Environment.Scenes
3518 // their scripts will actually run. 3518 // their scripts will actually run.
3519 // -- Leaf, Tue Aug 12 14:17:05 EDT 2008 3519 // -- Leaf, Tue Aug 12 14:17:05 EDT 2008
3520 SceneObjectPart parent = part.ParentGroup.RootPart; 3520 SceneObjectPart parent = part.ParentGroup.RootPart;
3521 if( parent != null && parent.IsAttachment ) 3521 if (parent != null && parent.IsAttachment)
3522 return scriptDanger(parent, parent.GetWorldPosition() ); 3522 return scriptDanger(parent, parent.GetWorldPosition());
3523 else 3523 else
3524 return scriptDanger(part, part.GetWorldPosition() ); 3524 return scriptDanger(part, part.GetWorldPosition());
3525 } 3525 }
3526 else 3526 else
3527 { 3527 {
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 636d08c..d8d534e 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1102,12 +1102,13 @@ namespace OpenSim.Region.Environment.Scenes
1102 1102
1103 // Get our own copy of the part array, and sort into the order we want to test 1103 // Get our own copy of the part array, and sort into the order we want to test
1104 SceneObjectPart[] partArray = targetPart.ParentGroup.GetParts(); 1104 SceneObjectPart[] partArray = targetPart.ParentGroup.GetParts();
1105 Array.Sort(partArray, delegate(SceneObjectPart p1, SceneObjectPart p2) { 1105 Array.Sort(partArray, delegate(SceneObjectPart p1, SceneObjectPart p2)
1106 // we want the originally selected part first, then the rest in link order -- so make the selected part link num (-1) 1106 {
1107 int linkNum1 = p1==targetPart ? -1 : p1.LinkNum; 1107 // we want the originally selected part first, then the rest in link order -- so make the selected part link num (-1)
1108 int linkNum2 = p2==targetPart ? -1 : p2.LinkNum; 1108 int linkNum1 = p1==targetPart ? -1 : p1.LinkNum;
1109 return linkNum1 - linkNum2; 1109 int linkNum2 = p2==targetPart ? -1 : p2.LinkNum;
1110 } 1110 return linkNum1 - linkNum2;
1111 }
1111 ); 1112 );
1112 1113
1113 //look for prims with explicit sit targets that are available 1114 //look for prims with explicit sit targets that are available
@@ -1772,7 +1773,8 @@ namespace OpenSim.Region.Environment.Scenes
1772 // Because appearance setting is in a module, we actually need 1773 // Because appearance setting is in a module, we actually need
1773 // to give it access to our appearance directly, otherwise we 1774 // to give it access to our appearance directly, otherwise we
1774 // get a synchronization issue. 1775 // get a synchronization issue.
1775 public AvatarAppearance Appearance { 1776 public AvatarAppearance Appearance
1777 {
1776 get { return m_appearance; } 1778 get { return m_appearance; }
1777 set { m_appearance = value; } 1779 set { m_appearance = value; }
1778 } 1780 }
@@ -2789,7 +2791,8 @@ namespace OpenSim.Region.Environment.Scenes
2789 } 2791 }
2790 2792
2791 // optimization; we have to check per script, but if nothing is pressed and nothing changed, we can skip that 2793 // optimization; we have to check per script, but if nothing is pressed and nothing changed, we can skip that
2792 if(allflags != ScriptControlled.CONTROL_ZERO || allflags != LastCommands) { 2794 if (allflags != ScriptControlled.CONTROL_ZERO || allflags != LastCommands)
2795 {
2793 lock (scriptedcontrols) 2796 lock (scriptedcontrols)
2794 { 2797 {
2795 foreach (LLUUID scriptUUID in scriptedcontrols.Keys) 2798 foreach (LLUUID scriptUUID in scriptedcontrols.Keys)
@@ -2798,7 +2801,8 @@ namespace OpenSim.Region.Environment.Scenes
2798 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us 2801 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us
2799 ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle 2802 ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle
2800 ScriptControlled localChange = localHeld ^ localLast; // the changed bits 2803 ScriptControlled localChange = localHeld ^ localLast; // the changed bits
2801 if(localHeld != ScriptControlled.CONTROL_ZERO || localChange != ScriptControlled.CONTROL_ZERO) { 2804 if (localHeld != ScriptControlled.CONTROL_ZERO || localChange != ScriptControlled.CONTROL_ZERO)
2805 {
2802 // only send if still pressed or just changed 2806 // only send if still pressed or just changed
2803 m_scene.EventManager.TriggerControlEvent(scriptControlData.objID, scriptUUID, UUID, (uint)localHeld, (uint)localChange); 2807 m_scene.EventManager.TriggerControlEvent(scriptControlData.objID, scriptUUID, UUID, (uint)localHeld, (uint)localChange);
2804 } 2808 }