From 022366a0745a8030a5a3b83c1aac89cb69068917 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 21 Mar 2012 00:23:46 +0000 Subject: refactor: simplify EstateManagementModule.handleEstateDebugRegionRequest() --- .../World/Estate/EstateManagementModule.cs | 25 ++++++---------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 4c6f73e..2a7338f 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -660,28 +660,17 @@ namespace OpenSim.Region.CoreModules.World.Estate TriggerEstateMessage(senderID, senderName, message); } - private void handleEstateDebugRegionRequest(IClientAPI remote_client, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics) + private void handleEstateDebugRegionRequest( + IClientAPI remote_client, UUID invoice, UUID senderID, + bool disableScripts, bool disableCollisions, bool disablePhysics) { - if (physics) - Scene.RegionInfo.RegionSettings.DisablePhysics = true; - else - Scene.RegionInfo.RegionSettings.DisablePhysics = false; - - if (scripted) - Scene.RegionInfo.RegionSettings.DisableScripts = true; - else - Scene.RegionInfo.RegionSettings.DisableScripts = false; - - if (collisionEvents) - Scene.RegionInfo.RegionSettings.DisableCollisions = true; - else - Scene.RegionInfo.RegionSettings.DisableCollisions = false; - - + Scene.RegionInfo.RegionSettings.DisablePhysics = disablePhysics; + Scene.RegionInfo.RegionSettings.DisableScripts = disableScripts; + Scene.RegionInfo.RegionSettings.DisableCollisions = disableCollisions; Scene.RegionInfo.RegionSettings.Save(); TriggerRegionInfoChange(); - Scene.SetSceneCoreDebug(scripted, collisionEvents, physics); + Scene.SetSceneCoreDebug(scriptsOn, collisionsOn, physicsOn); } private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey) -- cgit v1.1