From 7d968213fdae2548675833bc42e4863f8967e3cc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 17 Aug 2016 23:33:11 +0100 Subject: [PATCH] fix region Allow damage and parcel safe flags handling --- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index b00f2b0de3..69a34550a9 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -374,9 +374,10 @@ namespace OpenSim.Region.CoreModules.World.Land public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) { - remote_client.SceneAgent.Invulnerable = - !m_scene.RegionInfo.RegionSettings.AllowDamage || - (m_landData.Flags & (uint)ParcelFlags.AllowDamage) == 0; + if(m_scene.RegionInfo.RegionSettings.AllowDamage) + remote_client.SceneAgent.Invulnerable = false; + else + remote_client.SceneAgent.Invulnerable = (m_landData.Flags & (uint)ParcelFlags.AllowDamage) == 0; if (remote_client.SceneAgent.PresenceType == PresenceType.Npc) return; @@ -779,11 +780,10 @@ namespace OpenSim.Region.CoreModules.World.Land { if (over.LandData.LocalID == LandData.LocalID) { - if (((over.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0) && - m_scene.RegionInfo.RegionSettings.AllowDamage) + if(m_scene.RegionInfo.RegionSettings.AllowDamage) avatar.Invulnerable = false; else - avatar.Invulnerable = true; + avatar.Invulnerable = (over.LandData.Flags & (uint)ParcelFlags.AllowDamage) == 0; SendLandUpdateToClient(snap_selection, avatar.ControllingClient); avatar.currentParcelUUID = LandData.GlobalID;