diff options
Diffstat (limited to 'OpenSim')
5 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 2be647f..508fefb 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Framework | |||
65 | public delegate void ObjectAttach( | 65 | public delegate void ObjectAttach( |
66 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, bool silent); | 66 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, bool silent); |
67 | 67 | ||
68 | public delegate void ModifyTerrain( | 68 | public delegate void ModifyTerrain(UUID user, |
69 | float height, float seconds, byte size, byte action, float north, float west, float south, float east, | 69 | float height, float seconds, byte size, byte action, float north, float west, float south, float east, |
70 | UUID agentId); | 70 | UUID agentId); |
71 | 71 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a835e43..f9d73d5 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -4156,7 +4156,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4156 | if (handlerModifyTerrain != null) | 4156 | if (handlerModifyTerrain != null) |
4157 | { | 4157 | { |
4158 | modify.ModifyBlock.Height = -1; // Hack, i don't know why the value is wrong | 4158 | modify.ModifyBlock.Height = -1; // Hack, i don't know why the value is wrong |
4159 | handlerModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, | 4159 | handlerModifyTerrain(AgentId, modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, |
4160 | modify.ModifyBlock.BrushSize, | 4160 | modify.ModifyBlock.BrushSize, |
4161 | modify.ModifyBlock.Action, modify.ParcelData[i].North, | 4161 | modify.ModifyBlock.Action, modify.ParcelData[i].North, |
4162 | modify.ParcelData[i].West, modify.ParcelData[i].South, | 4162 | modify.ParcelData[i].West, modify.ParcelData[i].South, |
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 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d141ffe..09d3d79 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3470,7 +3470,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3470 | ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterface<ITerrainModule>(); | 3470 | ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterface<ITerrainModule>(); |
3471 | if (tm != null) | 3471 | if (tm != null) |
3472 | { | 3472 | { |
3473 | tm.ModifyTerrain(m_host.AbsolutePosition, (byte) brush, (byte) action, m_host.OwnerID); | 3473 | tm.ModifyTerrain(m_host.OwnerID, m_host.AbsolutePosition, (byte) brush, (byte) action, m_host.OwnerID); |
3474 | } | 3474 | } |
3475 | } | 3475 | } |
3476 | 3476 | ||