aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandObject.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs136
-rw-r--r--OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs2
10 files changed, 94 insertions, 94 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
index b5d5e6e..82341a9 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
41 #region Constants 41 #region Constants
42 42
43 //Land types set with flags in ParcelOverlay. 43 //Land types set with flags in ParcelOverlay.
44 //Only one of these can be used. 44 //Only one of these can be used.
45 public const float BAN_LINE_SAFETY_HIEGHT = 100; 45 public const float BAN_LINE_SAFETY_HIEGHT = 100;
46 public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = 128; //Equals 10000000 46 public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = 128; //Equals 10000000
47 public const byte LAND_FLAG_PROPERTY_BORDER_WEST = 64; //Equals 01000000 47 public const byte LAND_FLAG_PROPERTY_BORDER_WEST = 64; //Equals 01000000
@@ -584,7 +584,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
584 if (byteArrayCount >= LAND_BLOCKS_PER_PACKET) 584 if (byteArrayCount >= LAND_BLOCKS_PER_PACKET)
585 { 585 {
586 remote_client.sendLandParcelOverlay(byteArray, sequenceID); 586 remote_client.sendLandParcelOverlay(byteArray, sequenceID);
587 byteArrayCount = 0; 587 byteArrayCount = 0;
588 sequenceID++; 588 sequenceID++;
589 byteArray = new byte[LAND_BLOCKS_PER_PACKET]; 589 byteArray = new byte[LAND_BLOCKS_PER_PACKET];
590 } 590 }
@@ -655,7 +655,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
655 655
656 public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client) 656 public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client)
657 { 657 {
658 658
659 landList[local_id].sendForceObjectSelect(local_id, request_type, remote_client); 659 landList[local_id].sendForceObjectSelect(local_id, request_type, remote_client);
660 } 660 }
661 661
@@ -870,7 +870,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
870 } 870 }
871 871
872 public void handleAnyClientMovement(ScenePresence avatar) 872 public void handleAnyClientMovement(ScenePresence avatar)
873 //Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance. 873 //Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance.
874 { 874 {
875 ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); 875 ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
876 if (over != null) 876 if (over != null)
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index b319370..54870d8 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
622 /// <summary> 622 /// <summary>
623 /// Notify the parcel owner each avatar that owns prims situated on their land. This notification includes 623 /// Notify the parcel owner each avatar that owns prims situated on their land. This notification includes
624 /// aggreagete details such as the number of prims. 624 /// aggreagete details such as the number of prims.
625 /// 625 ///
626 /// </summary> 626 /// </summary>
627 /// <param name="remote_client"> 627 /// <param name="remote_client">
628 /// A <see cref="IClientAPI"/> 628 /// A <see cref="IClientAPI"/>
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index d31a250..43e8f36 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
47 47
48 #region Constants 48 #region Constants
49 // These are here for testing. They will be taken out 49 // These are here for testing. They will be taken out
50 50
51 //private uint PERM_ALL = (uint)2147483647; 51 //private uint PERM_ALL = (uint)2147483647;
52 private uint PERM_COPY = (uint)32768; 52 private uint PERM_COPY = (uint)32768;
53 //private uint PERM_MODIFY = (uint)16384; 53 //private uint PERM_MODIFY = (uint)16384;
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
59 59
60 #region Bypass Permissions / Debug Permissions Stuff 60 #region Bypass Permissions / Debug Permissions Stuff
61 61
62 // Bypasses the permissions engine 62 // Bypasses the permissions engine
63 private bool m_bypassPermissions = false; 63 private bool m_bypassPermissions = false;
64 private bool m_bypassPermissionsValue = true; 64 private bool m_bypassPermissionsValue = true;
65 private bool m_debugPermissions = false; 65 private bool m_debugPermissions = false;
@@ -126,18 +126,18 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
126 public void Initialise(Scene scene, IConfigSource config) 126 public void Initialise(Scene scene, IConfigSource config)
127 { 127 {
128 m_scene = scene; 128 m_scene = scene;
129 129
130 IConfig myConfig = config.Configs["Startup"]; 130 IConfig myConfig = config.Configs["Startup"];
131
132 string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
133 131
134 List<string> modules=new List<string>(permissionModules.Split(',')); 132 string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
133
134 List<string> modules=new List<string>(permissionModules.Split(','));
135 135
136 if(!modules.Contains("DefaultPermissionsModule")) 136 if (!modules.Contains("DefaultPermissionsModule"))
137 return; 137 return;
138
139 m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
138 140
139 m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
140
141 m_scene.RegisterModuleInterface<IScenePermissions>(this); 141 m_scene.RegisterModuleInterface<IScenePermissions>(this);
142 142
143 //Register functions with Scene External Checks! 143 //Register functions with Scene External Checks!
@@ -212,7 +212,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
212 get { return false; } 212 get { return false; }
213 } 213 }
214 214
215 #endregion 215 #endregion
216 216
217 #region Helper Functions 217 #region Helper Functions
218 protected void SendPermissionError(LLUUID user, string reason) 218 protected void SendPermissionError(LLUUID user, string reason)
@@ -252,38 +252,38 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
252 } 252 }
253#endregion 253#endregion
254 254
255 public bool PropagatePermissions() 255 public bool PropagatePermissions()
256 { 256 {
257 return false; 257 return false;
258 } 258 }
259 259
260 public bool BypassPermissions() 260 public bool BypassPermissions()
261 { 261 {
262 return m_bypassPermissions; 262 return m_bypassPermissions;
263 } 263 }
264 264
265 public void SetBypassPermissions(bool value) 265 public void SetBypassPermissions(bool value)
266 { 266 {
267 m_bypassPermissions=value; 267 m_bypassPermissions=value;
268 } 268 }
269 269
270 #region Object Permissions 270 #region Object Permissions
271 271
272 public uint GenerateClientFlags(LLUUID user, LLUUID objID) 272 public uint GenerateClientFlags(LLUUID user, LLUUID objID)
273 { 273 {
274 // Here's the way this works, 274 // Here's the way this works,
275 // ObjectFlags and Permission flags are two different enumerations 275 // ObjectFlags and Permission flags are two different enumerations
276 // ObjectFlags, however, tells the client to change what it will allow the user to do. 276 // ObjectFlags, however, tells the client to change what it will allow the user to do.
277 // So, that means that all of the permissions type ObjectFlags are /temporary/ and only 277 // So, that means that all of the permissions type ObjectFlags are /temporary/ and only
278 // supposed to be set when customizing the objectflags for the client. 278 // supposed to be set when customizing the objectflags for the client.
279 279
280 // These temporary objectflags get computed and added in this function based on the 280 // These temporary objectflags get computed and added in this function based on the
281 // Permission mask that's appropriate! 281 // Permission mask that's appropriate!
282 // Outside of this method, they should never be added to objectflags! 282 // Outside of this method, they should never be added to objectflags!
283 // -teravus 283 // -teravus
284 284
285 SceneObjectPart task=m_scene.GetSceneObjectPart(objID); 285 SceneObjectPart task=m_scene.GetSceneObjectPart(objID);
286 286
287 // this shouldn't ever happen.. return no permissions/objectflags. 287 // this shouldn't ever happen.. return no permissions/objectflags.
288 if (task == null) 288 if (task == null)
289 return (uint)0; 289 return (uint)0;
@@ -292,7 +292,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
292 LLUUID objectOwner = task.OwnerID; 292 LLUUID objectOwner = task.OwnerID;
293 293
294 294
295 // Remove any of the objectFlags that are temporary. These will get added back if appropriate 295 // Remove any of the objectFlags that are temporary. These will get added back if appropriate
296 // in the next bit of code 296 // in the next bit of code
297 297
298 objflags &= (uint) 298 objflags &= (uint)
@@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
354 354
355 private uint ApplyObjectModifyMasks(uint setPermissionMask, uint objectFlagsMask) 355 private uint ApplyObjectModifyMasks(uint setPermissionMask, uint objectFlagsMask)
356 { 356 {
357 // We are adding the temporary objectflags to the object's objectflags based on the 357 // We are adding the temporary objectflags to the object's objectflags based on the
358 // permission flag given. These change the F flags on the client. 358 // permission flag given. These change the F flags on the client.
359 359
360 if ((setPermissionMask & (uint)PermissionMask.Copy) != 0) 360 if ((setPermissionMask & (uint)PermissionMask.Copy) != 0)
@@ -404,7 +404,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
404 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); 404 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0);
405 405
406 // People shouldn't be able to do anything with locked objects, except the Administrator 406 // People shouldn't be able to do anything with locked objects, except the Administrator
407 // The 'set permissions' runs through a different permission check, so when an object owner 407 // The 'set permissions' runs through a different permission check, so when an object owner
408 // sets an object locked, the only thing that they can do is unlock it. 408 // sets an object locked, the only thing that they can do is unlock it.
409 // 409 //
410 // Nobody but the object owner can set permissions on an object 410 // Nobody but the object owner can set permissions on an object
@@ -458,7 +458,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
458 bool permission = false; 458 bool permission = false;
459 string reason = "Only registered users may communicate with another account."; 459 string reason = "Only registered users may communicate with another account.";
460 460
461 461
462 if (IsAdministrator(user)) 462 if (IsAdministrator(user))
463 permission = true; 463 permission = true;
464 464
@@ -521,7 +521,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
521 return GenericParcelPermission(user, parcel); 521 return GenericParcelPermission(user, parcel);
522 } 522 }
523#endregion 523#endregion
524 524
525 #region Permission Checks 525 #region Permission Checks
526 private bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene) 526 private bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene)
527 { 527 {
@@ -607,7 +607,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
607 { 607 {
608 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 608 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
609 if (m_bypassPermissions) return m_bypassPermissionsValue; 609 if (m_bypassPermissions) return m_bypassPermissionsValue;
610 610
611 return GenericCommunicationPermission(user, target); 611 return GenericCommunicationPermission(user, target);
612 } 612 }
613 613
@@ -632,8 +632,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
632 return false; 632 return false;
633 } 633 }
634 634
635 // The client 635 // The client
636 // may request to edit linked parts, and therefore, it needs 636 // may request to edit linked parts, and therefore, it needs
637 // to also check for SceneObjectPart 637 // to also check for SceneObjectPart
638 638
639 // If it's not an object, we cant edit it. 639 // If it's not an object, we cant edit it.
@@ -647,7 +647,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
647 647
648 648
649 LLUUID taskOwner = null; 649 LLUUID taskOwner = null;
650 // Added this because at this point in time it wouldn't be wise for 650 // Added this because at this point in time it wouldn't be wise for
651 // the administrator object permissions to take effect. 651 // the administrator object permissions to take effect.
652 LLUUID objectOwner = task.OwnerID; 652 LLUUID objectOwner = task.OwnerID;
653 653
@@ -682,12 +682,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
682 682
683 683
684 // This is an exception to the generic object permission. 684 // This is an exception to the generic object permission.
685 // Administrators who lock their objects should not be able to move them, 685 // Administrators who lock their objects should not be able to move them,
686 // however generic object permission should return true. 686 // however generic object permission should return true.
687 // This keeps locked objects from being affected by random click + drag actions by accident 687 // This keeps locked objects from being affected by random click + drag actions by accident
688 // and allows the administrator to grab or delete a locked object. 688 // and allows the administrator to grab or delete a locked object.
689 689
690 // Administrators and estate managers are still able to click+grab locked objects not 690 // Administrators and estate managers are still able to click+grab locked objects not
691 // owned by them in the scene 691 // owned by them in the scene
692 // This is by design. 692 // This is by design.
693 693
@@ -834,7 +834,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
834 834
835 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; 835 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
836 LLUUID taskOwner = null; 836 LLUUID taskOwner = null;
837 // Added this because at this point in time it wouldn't be wise for 837 // Added this because at this point in time it wouldn't be wise for
838 // the administrator object permissions to take effect. 838 // the administrator object permissions to take effect.
839 LLUUID objectOwner = task.OwnerID; 839 LLUUID objectOwner = task.OwnerID;
840 840
@@ -895,61 +895,61 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
895 895
896 #endregion 896 #endregion
897 897
898 public bool CanLinkObject(LLUUID userID, LLUUID objectID) 898 public bool CanLinkObject(LLUUID userID, LLUUID objectID)
899 { 899 {
900 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 900 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
901 if (m_bypassPermissions) return m_bypassPermissionsValue; 901 if (m_bypassPermissions) return m_bypassPermissionsValue;
902 902
903 return true; 903 return true;
904 } 904 }
905 905
906 public bool CanDelinkObject(LLUUID userID, LLUUID objectID) 906 public bool CanDelinkObject(LLUUID userID, LLUUID objectID)
907 { 907 {
908 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 908 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
909 if (m_bypassPermissions) return m_bypassPermissionsValue; 909 if (m_bypassPermissions) return m_bypassPermissionsValue;
910 910
911 return true; 911 return true;
912 } 912 }
913 913
914 public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene) 914 public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene)
915 { 915 {
916 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 916 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
917 if (m_bypassPermissions) return m_bypassPermissionsValue; 917 if (m_bypassPermissions) return m_bypassPermissionsValue;
918 918
919 return true; 919 return true;
920 } 920 }
921 921
922 public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) 922 public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID)
923 { 923 {
924 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 924 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
925 if (m_bypassPermissions) return m_bypassPermissionsValue; 925 if (m_bypassPermissions) return m_bypassPermissionsValue;
926 926
927 return true; 927 return true;
928 } 928 }
929 929
930 public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) 930 public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID)
931 { 931 {
932 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 932 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
933 if (m_bypassPermissions) return m_bypassPermissionsValue; 933 if (m_bypassPermissions) return m_bypassPermissionsValue;
934 934
935 return true; 935 return true;
936 } 936 }
937 937
938 public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) 938 public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID)
939 { 939 {
940 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 940 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
941 if (m_bypassPermissions) return m_bypassPermissionsValue; 941 if (m_bypassPermissions) return m_bypassPermissionsValue;
942 942
943 return true; 943 return true;
944 } 944 }
945 945
946 public bool CanTeleport(LLUUID userID) 946 public bool CanTeleport(LLUUID userID)
947 { 947 {
948 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 948 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
949 if (m_bypassPermissions) return m_bypassPermissionsValue; 949 if (m_bypassPermissions) return m_bypassPermissionsValue;
950 950
951 return true; 951 return true;
952 } 952 }
953 953
954 954
955 } 955 }
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
index beb74ce..1bdc702 100644
--- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules
99 // Current time in elpased seconds since Jan 1st 1970 99 // Current time in elpased seconds since Jan 1st 1970
100 private ulong CurrentTime 100 private ulong CurrentTime
101 { 101 {
102 get { 102 get {
103 return (ulong)(((System.DateTime.Now.Ticks) - TicksToEpoch + TicksOffset)/10000000); 103 return (ulong)(((System.DateTime.Now.Ticks) - TicksToEpoch + TicksOffset)/10000000);
104 } 104 }
105 } 105 }
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules
118 118
119 TimeZone local = TimeZone.CurrentTimeZone; 119 TimeZone local = TimeZone.CurrentTimeZone;
120 TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks; 120 TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks;
121 121
122 m_log.Debug("[SUN] localtime offset is " + TicksOffset); 122 m_log.Debug("[SUN] localtime offset is " + TicksOffset);
123 123
124 // Align ticks with Second Life 124 // Align ticks with Second Life
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment.Modules
246 avatar.ControllingClient.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); 246 avatar.ControllingClient.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition);
247 } 247 }
248 248
249 // set estate settings for region access to sun position 249 // set estate settings for region access to sun position
250 m_scene.RegionInfo.EstateSettings.sunPosition = Position; 250 m_scene.RegionInfo.EstateSettings.sunPosition = Position;
251 } 251 }
252 252
@@ -281,7 +281,7 @@ namespace OpenSim.Region.Environment.Modules
281 281
282 Position = LLVector3.Rot(Position,Tilt); 282 Position = LLVector3.Rot(Position,Tilt);
283 283
284 // Finally we shift the axis so that more of the 284 // Finally we shift the axis so that more of the
285 // circle is above the horizon than below. This 285 // circle is above the horizon than below. This
286 // makes the nights shorter than the days. 286 // makes the nights shorter than the days.
287 287
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs
index eb981d9..98d69a5 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs
@@ -31,9 +31,9 @@ using OpenSim.Region.Environment.Interfaces;
31namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders 31namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// A generic windows bitmap loader. 34 /// A generic windows bitmap loader.
35 /// Should be capable of handling 24-bit RGB images. 35 /// Should be capable of handling 24-bit RGB images.
36 /// 36 ///
37 /// Uses the System.Drawing filesystem loader. 37 /// Uses the System.Drawing filesystem loader.
38 /// </summary> 38 /// </summary>
39 internal class BMP : GenericSystemDrawing 39 internal class BMP : GenericSystemDrawing
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
index 484bb89..bb819e1 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
@@ -33,7 +33,7 @@ using OpenSim.Region.Environment.Interfaces;
33namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders 33namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// A virtual class designed to have methods overloaded, 36 /// A virtual class designed to have methods overloaded,
37 /// this class provides an interface for a generic image 37 /// this class provides an interface for a generic image
38 /// saving and loading mechanism, but does not specify the 38 /// saving and loading mechanism, but does not specify the
39 /// format. It should not be insubstantiated directly. 39 /// format. It should not be insubstantiated directly.
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
99 } 99 }
100 100
101 /// <summary> 101 /// <summary>
102 /// Protected method, generates a grayscale bitmap 102 /// Protected method, generates a grayscale bitmap
103 /// image from a specified terrain channel. 103 /// image from a specified terrain channel.
104 /// </summary> 104 /// </summary>
105 /// <param name="map">The terrain channel to export to bitmap</param> 105 /// <param name="map">The terrain channel to export to bitmap</param>
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
134 } 134 }
135 135
136 /// <summary> 136 /// <summary>
137 /// Protected method, generates a coloured bitmap 137 /// Protected method, generates a coloured bitmap
138 /// image from a specified terrain channel. 138 /// image from a specified terrain channel.
139 /// </summary> 139 /// </summary>
140 /// <param name="map">The terrain channel to export to bitmap</param> 140 /// <param name="map">The terrain channel to export to bitmap</param>
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
index 0c4e3de..7bf88f0 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
@@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
43 double sum = 0.0; 43 double sum = 0.0;
44 double step2 = 0.0; 44 double step2 = 0.0;
45 45
46 // compute delta map 46 // compute delta map
47 for (x = 0; x < map.Width; x++) 47 for (x = 0; x < map.Width; x++)
48 { 48 {
49 for (y = 0; y < map.Height; y++) 49 for (y = 0; y < map.Height; y++)
50 { 50 {
51 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); 51 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
52 52
53 if (z > 0) // add in non-zero amount 53 if (z > 0) // add in non-zero amount
54 { 54 {
55 sum += map[x, y] * z; 55 sum += map[x, y] * z;
56 step2 += z; 56 step2 += z;
@@ -60,14 +60,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
60 60
61 double avg = sum / step2; 61 double avg = sum / step2;
62 62
63 // blend in map 63 // blend in map
64 for (x = 0; x < map.Width; x++) 64 for (x = 0; x < map.Width; x++)
65 { 65 {
66 for (y = 0; y < map.Height; y++) 66 for (y = 0; y < map.Height; y++)
67 { 67 {
68 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration; 68 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration;
69 69
70 if (z > 0) // add in non-zero amount 70 if (z > 0) // add in non-zero amount
71 { 71 {
72 if (z > 1.0) 72 if (z > 1.0)
73 z = 1.0; 73 z = 1.0;
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs
index f2a1800..6df8408 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs
@@ -32,8 +32,8 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// Speed-Optimised Hybrid Erosion Brush 34 /// Speed-Optimised Hybrid Erosion Brush
35 /// 35 ///
36 /// As per Jacob Olsen's Paper 36 /// As per Jacob Olsen's Paper
37 /// http://www.oddlabs.com/download/terrain_generation.pdf 37 /// http://www.oddlabs.com/download/terrain_generation.pdf
38 /// </summary> 38 /// </summary>
39 public class OlsenSphere : ITerrainPaintableEffect 39 public class OlsenSphere : ITerrainPaintableEffect
@@ -164,7 +164,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
164 { 164 {
165 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); 165 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
166 166
167 if (z > 0) // add in non-zero amount 167 if (z > 0) // add in non-zero amount
168 { 168 {
169 const int NEIGHBOUR_ME = 4; 169 const int NEIGHBOUR_ME = 4;
170 const int NEIGHBOUR_MAX = 9; 170 const int NEIGHBOUR_MAX = 9;
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs
index 49946fd..fc0a579 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs
@@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
43 double area = strength; 43 double area = strength;
44 double step = strength / 4.0; 44 double step = strength / 4.0;
45 45
46 // compute delta map 46 // compute delta map
47 for (x = 0; x < map.Width; x++) 47 for (x = 0; x < map.Width; x++)
48 { 48 {
49 for (y = 0; y < map.Height; y++) 49 for (y = 0; y < map.Height; y++)
50 { 50 {
51 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); 51 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
52 52
53 if (z > 0) // add in non-zero amount 53 if (z > 0) // add in non-zero amount
54 { 54 {
55 double average = 0.0; 55 double average = 0.0;
56 int avgsteps = 0; 56 int avgsteps = 0;
@@ -69,14 +69,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
69 } 69 }
70 } 70 }
71 } 71 }
72 // blend in map 72 // blend in map
73 for (x = 0; x < map.Width; x++) 73 for (x = 0; x < map.Width; x++)
74 { 74 {
75 for (y = 0; y < map.Height; y++) 75 for (y = 0; y < map.Height; y++)
76 { 76 {
77 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); 77 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
78 78
79 if (z > 0) // add in non-zero amount 79 if (z > 0) // add in non-zero amount
80 { 80 {
81 double da = z; 81 double da = z;
82 double a = (map[x, y] - tweak[x, y]) * da; 82 double a = (map[x, y] - tweak[x, y]) * da;
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs
index 753d171..b3aa732 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
160 { 160 {
161 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); 161 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
162 162
163 if (z > 0) // add in non-zero amount 163 if (z > 0) // add in non-zero amount
164 { 164 {
165 const int NEIGHBOUR_ME = 4; 165 const int NEIGHBOUR_ME = 4;
166 const int NEIGHBOUR_MAX = 9; 166 const int NEIGHBOUR_MAX = 9;