diff options
author | Melanie Thielker | 2008-11-11 01:47:40 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-11 01:47:40 +0000 |
commit | 302d65569f721e19ee4400e3a73aa0530dd8e7e7 (patch) | |
tree | 6d367cfb122802f8230c75dd71de5100882aceb5 /OpenSim/Region/Environment/Modules | |
parent | Fix llList2Integer to have the same semantics as an (integer) cast. Handle (diff) | |
download | opensim-SC_OLD-302d65569f721e19ee4400e3a73aa0530dd8e7e7.zip opensim-SC_OLD-302d65569f721e19ee4400e3a73aa0530dd8e7e7.tar.gz opensim-SC_OLD-302d65569f721e19ee4400e3a73aa0530dd8e7e7.tar.bz2 opensim-SC_OLD-302d65569f721e19ee4400e3a73aa0530dd8e7e7.tar.xz |
Allow gods to terraform without limits. Respect the Allow Others To
Terraform flag in land.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/ITerrainModule.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainModule.cs index bc5dc72..91bc31f 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainModule.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | using System.IO; | 29 | using System.IO; |
30 | using OpenMetaverse; | 30 | using OpenMetaverse; |
31 | using OpenSim.Framework; | ||
31 | 32 | ||
32 | namespace OpenSim.Region.Environment.Modules.World.Terrain | 33 | namespace OpenSim.Region.Environment.Modules.World.Terrain |
33 | { | 34 | { |
@@ -35,7 +36,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
35 | { | 36 | { |
36 | void LoadFromFile(string filename); | 37 | void LoadFromFile(string filename); |
37 | void SaveToFile(string filename); | 38 | void SaveToFile(string filename); |
38 | void ModifyTerrain(Vector3 pos, byte size, byte action, UUID agentId); | 39 | void ModifyTerrain(UUID user, Vector3 pos, byte size, byte action, UUID agentId); |
39 | 40 | ||
40 | /// <summary> | 41 | /// <summary> |
41 | /// Load a terrain from a stream. | 42 | /// Load a terrain from a stream. |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs index c49b0b9..3170724 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs | |||
@@ -279,9 +279,9 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
279 | /// <param name="size">The size of the brush (0=small, 1=medium, 2=large)</param> | 279 | /// <param name="size">The size of the brush (0=small, 1=medium, 2=large)</param> |
280 | /// <param name="action">0=LAND_LEVEL, 1=LAND_RAISE, 2=LAND_LOWER, 3=LAND_SMOOTH, 4=LAND_NOISE, 5=LAND_REVERT</param> | 280 | /// <param name="action">0=LAND_LEVEL, 1=LAND_RAISE, 2=LAND_LOWER, 3=LAND_SMOOTH, 4=LAND_NOISE, 5=LAND_REVERT</param> |
281 | /// <param name="agentId">UUID of script-owner</param> | 281 | /// <param name="agentId">UUID of script-owner</param> |
282 | public void ModifyTerrain(Vector3 pos, byte size, byte action, UUID agentId) | 282 | public void ModifyTerrain(UUID user, Vector3 pos, byte size, byte action, UUID agentId) |
283 | { | 283 | { |
284 | client_OnModifyTerrain((float)pos.Z, (float)0.25, size, action, pos.Y, pos.X, pos.Y, pos.X, agentId); | 284 | client_OnModifyTerrain(user, (float)pos.Z, (float)0.25, size, action, pos.Y, pos.X, pos.Y, pos.X, agentId); |
285 | } | 285 | } |
286 | 286 | ||
287 | /// <summary> | 287 | /// <summary> |
@@ -613,9 +613,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
613 | ); | 613 | ); |
614 | } | 614 | } |
615 | 615 | ||
616 | private void client_OnModifyTerrain(float height, float seconds, byte size, byte action, | 616 | private void client_OnModifyTerrain(UUID user, float height, float seconds, byte size, byte action, |
617 | float north, float west, float south, float east, UUID agentId) | 617 | float north, float west, float south, float east, UUID agentId) |
618 | { | 618 | { |
619 | bool god = m_scene.ExternalChecks.ExternalChecksCanBeGodLike(user); | ||
619 | bool allowed = false; | 620 | bool allowed = false; |
620 | if (north == south && east == west) | 621 | if (north == south && east == west) |
621 | { | 622 | { |
@@ -653,7 +654,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
653 | m_painteffects[(StandardTerrainEffects) action].PaintEffect( | 654 | m_painteffects[(StandardTerrainEffects) action].PaintEffect( |
654 | m_channel, allowMask, west, south, height, size, seconds); | 655 | m_channel, allowMask, west, south, height, size, seconds); |
655 | 656 | ||
656 | CheckForTerrainUpdates(true); //revert changes outside estate limits | 657 | CheckForTerrainUpdates(!god); //revert changes outside estate limits |
657 | } | 658 | } |
658 | } | 659 | } |
659 | else | 660 | else |
@@ -693,7 +694,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
693 | m_floodeffects[(StandardTerrainEffects) action].FloodEffect( | 694 | m_floodeffects[(StandardTerrainEffects) action].FloodEffect( |
694 | m_channel, fillArea, size); | 695 | m_channel, fillArea, size); |
695 | 696 | ||
696 | CheckForTerrainUpdates(true); //revert changes outside estate limits | 697 | CheckForTerrainUpdates(!god); //revert changes outside estate limits |
697 | } | 698 | } |
698 | } | 699 | } |
699 | else | 700 | else |
@@ -708,7 +709,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
708 | // Not a good permissions check (see client_OnModifyTerrain above), need to check the entire area. | 709 | // Not a good permissions check (see client_OnModifyTerrain above), need to check the entire area. |
709 | // for now check a point in the centre of the region | 710 | // for now check a point in the centre of the region |
710 | 711 | ||
711 | if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new Vector3(127, 127, 0))) | 712 | if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remoteClient.AgentId, true)) |
712 | { | 713 | { |
713 | InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter | 714 | InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter |
714 | } | 715 | } |