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/World/Terrain/TerrainModule.cs | |
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/World/Terrain/TerrainModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs | 13 |
1 files changed, 7 insertions, 6 deletions
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 | } |