aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
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
parentFixes a case where, when inventory is not currently accessible due (diff)
downloadopensim-SC-dde21314e75acdaeff27af70077f283493401961.zip
opensim-SC-dde21314e75acdaeff27af70077f283493401961.tar.gz
opensim-SC-dde21314e75acdaeff27af70077f283493401961.tar.bz2
opensim-SC-dde21314e75acdaeff27af70077f283493401961.tar.xz
Update svn properties, formatting cleanup, fix a couple compiler warnings.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/Communications/Local/LocalBackEndServices.cs8
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs14
-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
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
10 files changed, 45 insertions, 37 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index bfc7b41..74f4d44 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2669,7 +2669,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2669 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); 2669 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
2670 edata.CovenantID = covenant; 2670 edata.CovenantID = covenant;
2671 edata.CovenantTimestamp = 0; 2671 edata.CovenantTimestamp = 0;
2672 if(m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 2672 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
2673 edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 2673 edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
2674 else 2674 else
2675 edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 2675 edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
index a608da0..5cf62f3 100644
--- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
@@ -175,9 +175,10 @@ namespace OpenSim.Region.Communications.Local
175 public RegionInfo RequestNeighbourInfo(LLUUID regionID) 175 public RegionInfo RequestNeighbourInfo(LLUUID regionID)
176 { 176 {
177 // TODO add a dictionary for faster lookup 177 // TODO add a dictionary for faster lookup
178 foreach(RegionInfo info in m_regions.Values) 178 foreach (RegionInfo info in m_regions.Values)
179 { 179 {
180 if(info.RegionID == regionID) return info; 180 if (info.RegionID == regionID)
181 return info;
181 } 182 }
182 return null; 183 return null;
183 } 184 }
@@ -186,7 +187,8 @@ namespace OpenSim.Region.Communications.Local
186 { 187 {
187 foreach (RegionInfo regInfo in m_regions.Values) 188 foreach (RegionInfo regInfo in m_regions.Values)
188 { 189 {
189 if (regInfo.RegionName == regionName) return regInfo; 190 if (regInfo.RegionName == regionName)
191 return regInfo;
190 } 192 }
191 return null; 193 return null;
192 } 194 }
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index ee5c7bb..01b1933 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -75,8 +75,10 @@ namespace OpenSim.Region.Communications.OGS1
75 userData.Image = new LLUUID((string) data["profile_image"]); 75 userData.Image = new LLUUID((string) data["profile_image"]);
76 userData.LastLogin = Convert.ToInt32((string) data["profile_lastlogin"]); 76 userData.LastLogin = Convert.ToInt32((string) data["profile_lastlogin"]);
77 userData.HomeRegion = Convert.ToUInt64((string) data["home_region"]); 77 userData.HomeRegion = Convert.ToUInt64((string) data["home_region"]);
78 if(data.Contains("home_region_id")) userData.HomeRegionID = new LLUUID((string)data["home_region_id"]); 78 if (data.Contains("home_region_id"))
79 else userData.HomeRegionID = LLUUID.Zero; 79 userData.HomeRegionID = new LLUUID((string)data["home_region_id"]);
80 else
81 userData.HomeRegionID = LLUUID.Zero;
80 userData.HomeLocation = 82 userData.HomeLocation =
81 new LLVector3((float) Convert.ToDecimal((string) data["home_coordinates_x"]), 83 new LLVector3((float) Convert.ToDecimal((string) data["home_coordinates_x"]),
82 (float) Convert.ToDecimal((string) data["home_coordinates_y"]), 84 (float) Convert.ToDecimal((string) data["home_coordinates_y"]),
@@ -85,10 +87,10 @@ namespace OpenSim.Region.Communications.OGS1
85 new LLVector3((float) Convert.ToDecimal((string) data["home_look_x"]), 87 new LLVector3((float) Convert.ToDecimal((string) data["home_look_x"]),
86 (float) Convert.ToDecimal((string) data["home_look_y"]), 88 (float) Convert.ToDecimal((string) data["home_look_y"]),
87 (float) Convert.ToDecimal((string) data["home_look_z"])); 89 (float) Convert.ToDecimal((string) data["home_look_z"]));
88 if(data.Contains("user_flags")) 90 if (data.Contains("user_flags"))
89 userData.UserFlags = Convert.ToInt32((string) data["user_flags"]); 91 userData.UserFlags = Convert.ToInt32((string) data["user_flags"]);
90 if(data.Contains("god_level")) 92 if (data.Contains("god_level"))
91 userData.GodLevel = Convert.ToInt32((string) data["god_level"]); 93 userData.GodLevel = Convert.ToInt32((string) data["god_level"]);
92 94
93 return userData; 95 return userData;
94 } 96 }
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 }
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index e1a4648..f6cc7f0 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -6907,7 +6907,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6907 6907
6908 if (aList.Data[i] != null) 6908 if (aList.Data[i] != null)
6909 { 6909 {
6910 switch((ParcelMediaCommandEnum)aList.Data[i]) 6910 switch ((ParcelMediaCommandEnum) aList.Data[i])
6911 { 6911 {
6912 case ParcelMediaCommandEnum.Url: 6912 case ParcelMediaCommandEnum.Url:
6913 list.Add(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL); 6913 list.Add(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
index 7dfac62..255ab99 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
43 /// </summary> 43 /// </summary>
44 public class EventQueueThreadClass : iScriptEngineFunctionModule 44 public class EventQueueThreadClass : iScriptEngineFunctionModule
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 /// <summary> 48 /// <summary>
49 /// How many ms to sleep if queue is empty 49 /// How many ms to sleep if queue is empty
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6c4f34a..825379d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6662,7 +6662,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6662 6662
6663 if (aList.Data[i] != null) 6663 if (aList.Data[i] != null)
6664 { 6664 {
6665 switch((ParcelMediaCommandEnum)aList.Data[i]) 6665 switch ((ParcelMediaCommandEnum) aList.Data[i])
6666 { 6666 {
6667 case ParcelMediaCommandEnum.Url: 6667 case ParcelMediaCommandEnum.Url:
6668 list.Add(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL); 6668 list.Add(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL);