aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
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
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 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs8
-rw-r--r--OpenSim/Framework/Cache.cs58
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs2
-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
13 files changed, 80 insertions, 70 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
index e5ec94b..ce564dd 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
@@ -133,7 +133,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
133 return XmlWriterResult; 133 return XmlWriterResult;
134 } 134 }
135 135
136 if (2 == comps.Length) { 136 if (2 == comps.Length)
137 {
137 string resp = ShortRegionInfo(comps[1], details[comps[1]]); 138 string resp = ShortRegionInfo(comps[1], details[comps[1]]);
138 if (null != resp) return resp; 139 if (null != resp) return resp;
139 140
@@ -153,7 +154,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
153 } 154 }
154 } 155 }
155 156
156 if (3 == comps.Length) { 157 if (3 == comps.Length)
158 {
157 switch (comps[1].ToLower()) 159 switch (comps[1].ToLower())
158 { 160 {
159 case "prims": 161 case "prims":
@@ -166,7 +168,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
166 min = new LLVector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2])); 168 min = new LLVector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2]));
167 max = new LLVector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5])); 169 max = new LLVector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5]));
168 } 170 }
169 catch (Exception e) 171 catch (Exception)
170 { 172 {
171 return Failure(httpResponse, OSHttpStatusCode.ClientErrorBadRequest, 173 return Failure(httpResponse, OSHttpStatusCode.ClientErrorBadRequest,
172 "GET", "invalid subregion parameter"); 174 "GET", "invalid subregion parameter");
diff --git a/OpenSim/Framework/Cache.cs b/OpenSim/Framework/Cache.cs
index 8d93d3e..4746d3c 100644
--- a/OpenSim/Framework/Cache.cs
+++ b/OpenSim/Framework/Cache.cs
@@ -173,8 +173,8 @@ namespace Opensim.Framework
173 public class Cache 173 public class Cache
174 { 174 {
175 private List<CacheItemBase> m_Index = new List<CacheItemBase>(); 175 private List<CacheItemBase> m_Index = new List<CacheItemBase>();
176 private Dictionary<LLUUID, CacheItemBase> m_Lookup = 176 private Dictionary<LLUUID, CacheItemBase> m_Lookup =
177 new Dictionary<LLUUID, CacheItemBase>(); 177 new Dictionary<LLUUID, CacheItemBase>();
178 178
179 private CacheStrategy m_Strategy; 179 private CacheStrategy m_Strategy;
180 private CacheMedium m_Medium; 180 private CacheMedium m_Medium;
@@ -270,10 +270,10 @@ namespace Opensim.Framework
270 m_Index.RemoveRange(newSize, Count - newSize); 270 m_Index.RemoveRange(newSize, Count - newSize);
271 m_Size = newSize; 271 m_Size = newSize;
272 272
273 m_Lookup.Clear(); 273 m_Lookup.Clear();
274 274
275 foreach (CacheItemBase item in m_Index) 275 foreach (CacheItemBase item in m_Index)
276 m_Lookup[item.uuid] = item; 276 m_Lookup[item.uuid] = item;
277 } 277 }
278 } 278 }
279 279
@@ -291,8 +291,8 @@ namespace Opensim.Framework
291 291
292 lock (m_Index) 292 lock (m_Index)
293 { 293 {
294 if(m_Lookup.ContainsKey(index)) 294 if (m_Lookup.ContainsKey(index))
295 item = m_Lookup[index]; 295 item = m_Lookup[index];
296 } 296 }
297 297
298 if (item == null) 298 if (item == null)
@@ -340,10 +340,10 @@ namespace Opensim.Framework
340 { 340 {
341 CacheItemBase missing = new CacheItemBase(index); 341 CacheItemBase missing = new CacheItemBase(index);
342 if (!m_Index.Contains(missing)) 342 if (!m_Index.Contains(missing))
343 { 343 {
344 m_Index.Add(missing); 344 m_Index.Add(missing);
345 m_Lookup[index] = missing; 345 m_Lookup[index] = missing;
346 } 346 }
347 } 347 }
348 } 348 }
349 return null; 349 return null;
@@ -354,17 +354,17 @@ namespace Opensim.Framework
354 return data; 354 return data;
355 } 355 }
356 356
357 // Find an object in cache by delegate. 357 // Find an object in cache by delegate.
358 // 358 //
359 public Object Find(Predicate<Opensim.Framework.CacheItemBase> d) 359 public Object Find(Predicate<Opensim.Framework.CacheItemBase> d)
360 { 360 {
361 CacheItemBase item = m_Index.Find(d); 361 CacheItemBase item = m_Index.Find(d);
362 362
363 if(item == null) 363 if (item == null)
364 return null; 364 return null;
365 365
366 return item.Retrieve(); 366 return item.Retrieve();
367 } 367 }
368 368
369 public virtual void Store(LLUUID index, Object data) 369 public virtual void Store(LLUUID index, Object data)
370 { 370 {
@@ -421,7 +421,7 @@ namespace Opensim.Framework
421 item.expires = DateTime.Now + m_DefaultTTL; 421 item.expires = DateTime.Now + m_DefaultTTL;
422 422
423 m_Index.Add(item); 423 m_Index.Add(item);
424 m_Lookup[index] = item; 424 m_Lookup[index] = item;
425 } 425 }
426 item.Store(data); 426 item.Store(data);
427 } 427 }
@@ -439,10 +439,10 @@ namespace Opensim.Framework
439 { 439 {
440 if (item.expires.Ticks == 0 || 440 if (item.expires.Ticks == 0 ||
441 item.expires <= now) 441 item.expires <= now)
442 { 442 {
443 m_Index.Remove(item); 443 m_Index.Remove(item);
444 m_Lookup.Remove(item.uuid); 444 m_Lookup.Remove(item.uuid);
445 } 445 }
446 } 446 }
447 } 447 }
448 448
@@ -471,20 +471,20 @@ namespace Opensim.Framework
471 foreach (CacheItemBase i in candidates) 471 foreach (CacheItemBase i in candidates)
472 { 472 {
473 if (doExpire(i.uuid)) 473 if (doExpire(i.uuid))
474 { 474 {
475 m_Index.Remove(i); 475 m_Index.Remove(i);
476 m_Lookup.Remove(i.uuid); 476 m_Lookup.Remove(i.uuid);
477 } 477 }
478 } 478 }
479 } 479 }
480 else 480 else
481 { 481 {
482 m_Index.RemoveRange(target, Count - target); 482 m_Index.RemoveRange(target, Count - target);
483 483
484 m_Lookup.Clear(); 484 m_Lookup.Clear();
485 485
486 foreach (CacheItemBase item in m_Index) 486 foreach (CacheItemBase item in m_Index)
487 m_Lookup[item.uuid] = item; 487 m_Lookup[item.uuid] = item;
488 } 488 }
489 } 489 }
490 break; 490 break;
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index 2a70534..0e61b3c 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -153,7 +153,7 @@ namespace OpenSim.Grid.UserServer
153 else if (startLocationRequest == "home") 153 else if (startLocationRequest == "home")
154 { 154 {
155 // use the homeRegionID if it is stored already. If not, use the regionHandle as before 155 // use the homeRegionID if it is stored already. If not, use the regionHandle as before
156 if(theUser.HomeRegionID != LLUUID.Zero) 156 if (theUser.HomeRegionID != LLUUID.Zero)
157 { 157 {
158 SimInfo = 158 SimInfo =
159 RegionProfileData.RequestSimProfileData( 159 RegionProfileData.RequestSimProfileData(
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);