Ejemplo n.º 1
0
        // Avatar is present in this parcel, possibly after entering it.
        private void SendAvatarLandUpdate(ScenePresence avatar, ILandObject parcel, bool force)
        {
            if (avatar.IsChildAgent) 
                return;

            bool newParcel = (avatar.currentParcelUUID != parcel.landData.GlobalID);
            if (newParcel || force)
            {
                parcel.sendLandUpdateToClient(avatar.ControllingClient);

                avatar.currentParcelUUID = parcel.landData.GlobalID;

                if ((parcel.landData.Flags & (uint)ParcelFlags.AllowDamage) != 0 && m_scene.RegionInfo.RegionSettings.AllowDamage)
                {
                    avatar.Invulnerable = false;
                }
                else
                {
                    avatar.Invulnerable = true;
                }
            }
        }