fix region Allow damage and parcel safe flags handling
parent
f1495cb237
commit
7d968213fd
|
@ -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)
|
public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
remote_client.SceneAgent.Invulnerable =
|
if(m_scene.RegionInfo.RegionSettings.AllowDamage)
|
||||||
!m_scene.RegionInfo.RegionSettings.AllowDamage ||
|
remote_client.SceneAgent.Invulnerable = false;
|
||||||
(m_landData.Flags & (uint)ParcelFlags.AllowDamage) == 0;
|
else
|
||||||
|
remote_client.SceneAgent.Invulnerable = (m_landData.Flags & (uint)ParcelFlags.AllowDamage) == 0;
|
||||||
|
|
||||||
if (remote_client.SceneAgent.PresenceType == PresenceType.Npc)
|
if (remote_client.SceneAgent.PresenceType == PresenceType.Npc)
|
||||||
return;
|
return;
|
||||||
|
@ -779,11 +780,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
if (over.LandData.LocalID == LandData.LocalID)
|
if (over.LandData.LocalID == LandData.LocalID)
|
||||||
{
|
{
|
||||||
if (((over.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0) &&
|
if(m_scene.RegionInfo.RegionSettings.AllowDamage)
|
||||||
m_scene.RegionInfo.RegionSettings.AllowDamage)
|
|
||||||
avatar.Invulnerable = false;
|
avatar.Invulnerable = false;
|
||||||
else
|
else
|
||||||
avatar.Invulnerable = true;
|
avatar.Invulnerable = (over.LandData.Flags & (uint)ParcelFlags.AllowDamage) == 0;
|
||||||
|
|
||||||
SendLandUpdateToClient(snap_selection, avatar.ControllingClient);
|
SendLandUpdateToClient(snap_selection, avatar.ControllingClient);
|
||||||
avatar.currentParcelUUID = LandData.GlobalID;
|
avatar.currentParcelUUID = LandData.GlobalID;
|
||||||
|
|
Loading…
Reference in New Issue