From 64bd9a335444379ebe1cad8e34d5b5953a76f671 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 25 Jul 2009 15:49:10 +0000 Subject: * Updates libOMV to version 0.7.0 * Uses mantis #3811 as a base (thanks jhuliman) with changes. * E-mail regarding interface changes sent to the opensim-dev list * Archive: https://lists.berlios.de/pipermail/opensim-dev/2009-July/007219.html --- .../RemoteController/RemoteAdminPlugin.cs | 12 +++---- OpenSim/Data/MSSQL/MSSQLRegionData.cs | 4 +-- OpenSim/Data/MySQL/MySQLRegionData.cs | 4 +-- OpenSim/Data/SQLite/SQLiteRegionData.cs | 4 +-- OpenSim/Framework/LandData.cs | 18 +++++------ OpenSim/Framework/LandUpdateArgs.cs | 2 +- OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs | 23 ++++++-------- .../Region/ClientStack/LindenUDP/LLClientView.cs | 37 +++++++++++++++------- .../ClientStack/LindenUDP/LLPacketHandler.cs | 2 +- .../Agent/TextureSender/J2KDecoderModule.cs | 3 +- .../CoreModules/Avatar/Combat/CombatModule.cs | 2 +- .../CoreModules/World/Land/LandManagementModule.cs | 6 ++-- .../Region/CoreModules/World/Land/LandObject.cs | 10 +++--- .../World/Permissions/PermissionsModule.cs | 8 ++--- OpenSim/Region/DataSnapshot/LandSnapshot.cs | 14 ++++---- OpenSim/Region/Framework/Scenes/Scene.cs | 4 +-- OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 1 + .../Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 4 +-- .../Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 4 +-- .../Minimodule/Interfaces/IInventoryItem.cs | 3 +- .../Scripting/Minimodule/InventoryItem.cs | 3 +- .../Shared/Api/Implementation/LSL_Api.cs | 6 ++-- OpenSim/Tools/pCampBot/PhysicsBot.cs | 22 +++++++------ 23 files changed, 107 insertions(+), 89 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index cd23efb..67ba016 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -659,8 +659,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController foreach (ILandObject parcel in parcels) { - parcel.landData.Flags |= (uint) Parcel.ParcelFlags.AllowVoiceChat; - parcel.landData.Flags |= (uint) Parcel.ParcelFlags.UseEstateVoiceChan; + parcel.landData.Flags |= (uint) ParcelFlags.AllowVoiceChat; + parcel.landData.Flags |= (uint) ParcelFlags.UseEstateVoiceChan; ((Scene)newscene).LandChannel.UpdateLandObject(parcel.landData.LocalID, parcel.landData); } } @@ -911,13 +911,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController { if (enableVoice) { - parcel.landData.Flags |= (uint)Parcel.ParcelFlags.AllowVoiceChat; - parcel.landData.Flags |= (uint)Parcel.ParcelFlags.UseEstateVoiceChan; + parcel.landData.Flags |= (uint)ParcelFlags.AllowVoiceChat; + parcel.landData.Flags |= (uint)ParcelFlags.UseEstateVoiceChan; } else { - parcel.landData.Flags &= ~(uint)Parcel.ParcelFlags.AllowVoiceChat; - parcel.landData.Flags &= ~(uint)Parcel.ParcelFlags.UseEstateVoiceChan; + parcel.landData.Flags &= ~(uint)ParcelFlags.AllowVoiceChat; + parcel.landData.Flags &= ~(uint)ParcelFlags.UseEstateVoiceChan; } scene.LandChannel.UpdateLandObject(parcel.landData.LocalID, parcel.landData); } diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs index 5a0eda8..0fe8de7 100644 --- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs +++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs @@ -875,13 +875,13 @@ VALUES newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); newData.Area = Convert.ToInt32(row["Area"]); newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented - newData.Category = (Parcel.ParcelCategory)Convert.ToInt32(row["Category"]); + newData.Category = (ParcelCategory)Convert.ToInt32(row["Category"]); //Enum libsecondlife.Parcel.ParcelCategory newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); newData.GroupID = new UUID((Guid)row["GroupUUID"]); newData.SalePrice = Convert.ToInt32(row["SalePrice"]); - newData.Status = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]); + newData.Status = (ParcelStatus)Convert.ToInt32(row["LandStatus"]); //Enum. libsecondlife.Parcel.ParcelStatus newData.Flags = Convert.ToUInt32(row["LandFlags"]); newData.LandingType = Convert.ToByte(row["LandingType"]); diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index fafba16..09564de 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -1073,13 +1073,13 @@ namespace OpenSim.Data.MySQL newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); newData.Area = Convert.ToInt32(row["Area"]); newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unimplemented - newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); + newData.Category = (ParcelCategory) Convert.ToInt32(row["Category"]); //Enum libsecondlife.Parcel.ParcelCategory newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); newData.GroupID = new UUID((String) row["GroupUUID"]); newData.SalePrice = Convert.ToInt32(row["SalePrice"]); - newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); + newData.Status = (ParcelStatus) Convert.ToInt32(row["LandStatus"]); //Enum. libsecondlife.Parcel.ParcelStatus newData.Flags = Convert.ToUInt32(row["LandFlags"]); newData.LandingType = Convert.ToByte(row["LandingType"]); diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 16a05af..2f9f59d 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs @@ -1314,13 +1314,13 @@ namespace OpenSim.Data.SQLite newData.IsGroupOwned = (Boolean) row["IsGroupOwned"]; newData.Area = Convert.ToInt32(row["Area"]); newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented - newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); + newData.Category = (ParcelCategory) Convert.ToInt32(row["Category"]); //Enum OpenMetaverse.Parcel.ParcelCategory newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); newData.GroupID = new UUID((String) row["GroupUUID"]); newData.SalePrice = Convert.ToInt32(row["SalePrice"]); - newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); + newData.Status = (ParcelStatus) Convert.ToInt32(row["LandStatus"]); //Enum. OpenMetaverse.Parcel.ParcelStatus newData.Flags = Convert.ToUInt32(row["LandFlags"]); newData.LandingType = (Byte) row["LandingType"]; diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index f793213..d6afb95 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs @@ -38,7 +38,7 @@ namespace OpenSim.Framework private int _area = 0; private uint _auctionID = 0; //Unemplemented. If set to 0, not being auctioned private UUID _authBuyerID = UUID.Zero; //Unemplemented. Authorized Buyer's UUID - private Parcel.ParcelCategory _category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category + private ParcelCategory _category = ParcelCategory.None; //Unemplemented. Parcel's chosen category private int _claimDate = 0; private int _claimPrice = 0; //Unemplemented private UUID _globalID = UUID.Zero; @@ -49,15 +49,15 @@ namespace OpenSim.Framework private string _description = String.Empty; - private uint _flags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark | - (uint) Parcel.ParcelFlags.AllowAPrimitiveEntry | - (uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform | - (uint) Parcel.ParcelFlags.CreateObjects | (uint) Parcel.ParcelFlags.AllowOtherScripts | - (uint) Parcel.ParcelFlags.SoundLocal; + private uint _flags = (uint) ParcelFlags.AllowFly | (uint) ParcelFlags.AllowLandmark | + (uint) ParcelFlags.AllowAPrimitiveEntry | + (uint) ParcelFlags.AllowDeedToGroup | (uint) ParcelFlags.AllowTerraform | + (uint) ParcelFlags.CreateObjects | (uint) ParcelFlags.AllowOtherScripts | + (uint) ParcelFlags.SoundLocal; private byte _landingType = 0; private string _name = "Your Parcel"; - private Parcel.ParcelStatus _status = Parcel.ParcelStatus.Leased; + private ParcelStatus _status = ParcelStatus.Leased; private int _localID = 0; private byte _mediaAutoScale = 0; private UUID _mediaID = UUID.Zero; @@ -125,7 +125,7 @@ namespace OpenSim.Framework } } - public Parcel.ParcelCategory Category { + public ParcelCategory Category { get { return _category; } @@ -233,7 +233,7 @@ namespace OpenSim.Framework } } - public Parcel.ParcelStatus Status { + public ParcelStatus Status { get { return _status; } diff --git a/OpenSim/Framework/LandUpdateArgs.cs b/OpenSim/Framework/LandUpdateArgs.cs index 7b065a3..9760a1d 100644 --- a/OpenSim/Framework/LandUpdateArgs.cs +++ b/OpenSim/Framework/LandUpdateArgs.cs @@ -33,7 +33,7 @@ namespace OpenSim.Framework public class LandUpdateArgs : EventArgs { public UUID AuthBuyerID; - public Parcel.ParcelCategory Category; + public ParcelCategory Category; public string Desc; public UUID GroupID; public byte LandingType; diff --git a/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs b/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs index 5091793..a80c1f0 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs @@ -36,14 +36,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// class KillPacket : Packet { - private Header header; - public override int Length { get { return 0; } } - public override void FromBytes(Header header, byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer) + public override void FromBytes(Header header, byte[] bytes, ref int i, ref int packetEnd) { } @@ -51,26 +49,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP { } - public override Header Header { get { return header; } set { header = value; }} - public override byte[] ToBytes() { return new byte[0]; } - public KillPacket() + public override byte[][] ToBytesMultiple() { - Header = new LowHeader(); - Header.ID = 65531; - Header.Reliable = true; + return new byte[][] { new byte[0] }; } - public override PacketType Type + public KillPacket() { - get - { - return PacketType.UseCircuitCode; - } + Type = PacketType.UseCircuitCode; + Header = new Header(); + Header.Frequency = OpenMetaverse.PacketFrequency.Low; + Header.ID = 65531; + Header.Reliable = true; } } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index c0c074b..9d839ab 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -45,6 +45,7 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; using Timer=System.Timers.Timer; +using AssetLandmark = OpenSim.Framework.AssetLandmark; using Nini.Config; namespace OpenSim.Region.ClientStack.LindenUDP @@ -1266,7 +1267,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) { RegionHandshakePacket handshake = (RegionHandshakePacket)PacketPool.Instance.GetPacket(PacketType.RegionHandshake); - + handshake.RegionInfo = new RegionHandshakePacket.RegionInfoBlock(); handshake.RegionInfo.BillableFactor = args.billableFactor; handshake.RegionInfo.IsEstateManager = args.isEstateManager; handshake.RegionInfo.TerrainHeightRange00 = args.terrainHeightRange0; @@ -1292,14 +1293,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP handshake.RegionInfo.TerrainDetail2 = args.terrainDetail2; handshake.RegionInfo.TerrainDetail3 = args.terrainDetail3; handshake.RegionInfo.CacheID = UUID.Random(); //I guess this is for the client to remember an old setting? - + handshake.RegionInfo2 = new RegionHandshakePacket.RegionInfo2Block(); handshake.RegionInfo2.RegionID = regionInfo.RegionID; + + handshake.RegionInfo3 = new RegionHandshakePacket.RegionInfo3Block(); + handshake.RegionInfo3.CPUClassID = 9; + handshake.RegionInfo3.CPURatio = 1; -// handshake.RegionInfo3.ColoName = Utils.EmptyBytes; -// handshake.RegionInfo3.CPUClassID = 0; -// handshake.RegionInfo3.CPURatio = 0; -// handshake.RegionInfo3.ProductName = Utils.StringToBytes("OpenSim"); -// handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; + handshake.RegionInfo3.ColoName = Utils.EmptyBytes; + handshake.RegionInfo3.ProductName = Utils.EmptyBytes; + handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; OutPacket(handshake, ThrottleOutPacketType.Task); } @@ -3551,8 +3554,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP rinfoblk.UseEstateSun = args.useEstateSun; rinfoblk.WaterHeight = args.waterHeight; rinfoblk.SimName = Utils.StringToBytes(args.simName); - + + rinfopack.RegionInfo2 = new RegionInfoPacket.RegionInfo2Block(); + rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue; + rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue; + rinfopack.RegionInfo2.MaxAgents32 = uint.MaxValue; + rinfopack.RegionInfo2.ProductName = Utils.EmptyBytes; + rinfopack.RegionInfo2.ProductSKU = Utils.EmptyBytes; + + rinfopack.HasVariableBlocks = true; rinfopack.RegionInfo = rinfoblk; + rinfopack.AgentData = new RegionInfoPacket.AgentDataBlock(); + rinfopack.AgentData.AgentID = AgentId; + rinfopack.AgentData.SessionID = SessionId; + OutPacket(rinfopack, ThrottleOutPacketType.Task); } @@ -7536,7 +7551,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP LandUpdateArgs args = new LandUpdateArgs(); args.AuthBuyerID = parcelPropertiesPacket.ParcelData.AuthBuyerID; - args.Category = (Parcel.ParcelCategory)parcelPropertiesPacket.ParcelData.Category; + args.Category = (ParcelCategory)parcelPropertiesPacket.ParcelData.Category; args.Desc = Utils.BytesToString(parcelPropertiesPacket.ParcelData.Desc); args.GroupID = parcelPropertiesPacket.ParcelData.GroupID; args.LandingType = parcelPropertiesPacket.ParcelData.LandingType; @@ -10030,8 +10045,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Bit 0: Mature, bit 7: on sale, other bits: no idea reply.Data.Flags = (byte)( - ((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + - ((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); + ((land.Flags & (uint)ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + + ((land.Flags & (uint)ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); Vector3 pos = land.UserLocation; if (pos.Equals(Vector3.Zero)) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index 4b1a6b7..fad9218 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs @@ -827,7 +827,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP sendbuffer.Length, SocketFlags.None, m_Client.CircuitCode); } } - catch (NullReferenceException) + catch (NullReferenceException n) { m_log.Debug("[PACKET] Detected reuse of a returned packet"); m_PacketQueue.Cancel(item.Sequence); diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index c0ca126..0d3cc23 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs @@ -33,6 +33,7 @@ using System.Text; using log4net; using Nini.Config; using OpenMetaverse; +using OpenMetaverse.Assets; using OpenMetaverse.Imaging; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -391,7 +392,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender if (i == (Layers.Length - 1)) strEnd = ""; - stringResult.AppendFormat("{0}|{1}|{2}{3}", Layers[i].Start, Layers[i].End, Layers[i].Size, strEnd); + stringResult.AppendFormat("{0}|{1}|{2}{3}", Layers[i].Start, Layers[i].End, Layers[i].End - Layers[i].Start, strEnd); } fsSWCache.Write(stringResult.ToString()); fsSWCache.Close(); diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 171add8..87f137e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) { ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); - if ((obj.landData.Flags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) + if ((obj.landData.Flags & (uint)ParcelFlags.AllowDamage) != 0) { avatar.Invulnerable = false; } diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 4c108f5..e385ae0 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -301,12 +301,12 @@ namespace OpenSim.Region.CoreModules.World.Land { if (checkBan.isBannedFromLand(avatar.AgentId)) { - checkBan.sendLandProperties((int)ParcelStatus.CollisionBanned, false, (int)ParcelResult.Single, avatar); + checkBan.sendLandProperties((int)ParcelPropertiesStatus.CollisionBanned, false, (int)ParcelResult.Single, avatar); return; //Only send one } if (checkBan.isRestrictedFromLand(avatar.AgentId)) { - checkBan.sendLandProperties((int)ParcelStatus.CollisionNotOnAccessList, false, (int)ParcelResult.Single, avatar); + checkBan.sendLandProperties((int)ParcelPropertiesStatus.CollisionNotOnAccessList, false, (int)ParcelResult.Single, avatar); return; //Only send one } } @@ -1116,7 +1116,7 @@ namespace OpenSim.Region.CoreModules.World.Land UUID pOwnerID = lob.landData.OwnerID; bool landforsale = ((lob.landData.Flags & - (uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0); + (uint)(ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects)) != 0); if ((AuthorizedID == UUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) { // TODO I don't think we have to lock it here, no? diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index b800bb3..715b48d 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.World.Land // In a perfect world, this would have worked. // -// if ((landData.Flags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0) +// if ((landData.Flags & (uint)ParcelFlags.AllowLandmark) != 0) // regionFlags |= (uint)RegionFlags.AllowLandmark; // if (landData.OwnerID == remote_client.AgentId) // regionFlags |= (uint)RegionFlags.AllowSetHome; @@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.World.Land newData.ClaimPrice = claimprice; newData.SalePrice = 0; newData.AuthBuyerID = UUID.Zero; - newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); + newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects); m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); sendLandUpdateToAvatarsOverMe(); @@ -259,7 +259,7 @@ namespace OpenSim.Region.CoreModules.World.Land public bool isBannedFromLand(UUID avatar) { - if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0) + if ((landData.Flags & (uint) ParcelFlags.UseBanList) > 0) { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); entry.AgentID = avatar; @@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules.World.Land public bool isRestrictedFromLand(UUID avatar) { - if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) + if ((landData.Flags & (uint) ParcelFlags.UseAccessList) > 0) { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); entry.AgentID = avatar; @@ -318,7 +318,7 @@ namespace OpenSim.Region.CoreModules.World.Land { if (over.landData.LocalID == landData.LocalID) { - if (((over.landData.Flags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage) + if (((over.landData.Flags & (uint)ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage) avatars[i].Invulnerable = false; else avatars[i].Invulnerable = true; diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 99035b6..5c0d3db 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -1186,7 +1186,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions return false; } - if ((land.landData.Flags & ((int)Parcel.ParcelFlags.AllowAPrimitiveEntry)) != 0) + if ((land.landData.Flags & ((int)ParcelFlags.AllowAPrimitiveEntry)) != 0) { return true; } @@ -1230,8 +1230,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); if (land == null) return false; - if ((land.landData.Flags & ((int)Parcel.ParcelFlags.CreateObjects)) == - (int)Parcel.ParcelFlags.CreateObjects) + if ((land.landData.Flags & ((int)ParcelFlags.CreateObjects)) == + (int)ParcelFlags.CreateObjects) permission = true; if (IsAdministrator(owner)) @@ -1357,7 +1357,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions return false; // Others allowed to terraform? - if ((parcel.landData.Flags & ((int)Parcel.ParcelFlags.AllowTerraform)) != 0) + if ((parcel.landData.Flags & ((int)ParcelFlags.AllowTerraform)) != 0) return true; // Land owner can terraform too diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs index fd6490e..005659f 100644 --- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs @@ -87,7 +87,7 @@ namespace OpenSim.Region.DataSnapshot.Providers //Index sim land foreach (KeyValuePair curLand in m_scene.LandManager.landList) { - //if ((curLand.Value.landData.landFlags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory) + //if ((curLand.Value.landData.landFlags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory) //{ m_landIndexed.Add(curLand.Key, curLand.Value.Copy()); //} @@ -138,7 +138,7 @@ namespace OpenSim.Region.DataSnapshot.Providers LandData parcel = land.landData; if (m_parent.ExposureLevel.Equals("all") || (m_parent.ExposureLevel.Equals("minimum") && - (parcel.Flags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory)) + (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)) { //TODO: make better method of marshalling data from LandData to XmlNode @@ -315,7 +315,7 @@ namespace OpenSim.Region.DataSnapshot.Providers private string GetScriptsPermissions(LandData parcel) { - if ((parcel.Flags & (uint)Parcel.ParcelFlags.AllowOtherScripts) == (uint)Parcel.ParcelFlags.AllowOtherScripts) + if ((parcel.Flags & (uint)ParcelFlags.AllowOtherScripts) == (uint)ParcelFlags.AllowOtherScripts) return "true"; else return "false"; @@ -324,7 +324,7 @@ namespace OpenSim.Region.DataSnapshot.Providers private string GetPublicPermissions(LandData parcel) { - if ((parcel.Flags & (uint)Parcel.ParcelFlags.UseAccessList) == (uint)Parcel.ParcelFlags.UseAccessList) + if ((parcel.Flags & (uint)ParcelFlags.UseAccessList) == (uint)ParcelFlags.UseAccessList) return "false"; else return "true"; @@ -333,7 +333,7 @@ namespace OpenSim.Region.DataSnapshot.Providers private string GetBuildPermissions(LandData parcel) { - if ((parcel.Flags & (uint)Parcel.ParcelFlags.CreateObjects) == (uint)Parcel.ParcelFlags.CreateObjects) + if ((parcel.Flags & (uint)ParcelFlags.CreateObjects) == (uint)ParcelFlags.CreateObjects) return "true"; else return "false"; @@ -342,7 +342,7 @@ namespace OpenSim.Region.DataSnapshot.Providers private string CheckForSale(LandData parcel) { - if ((parcel.Flags & (uint)Parcel.ParcelFlags.ForSale) == (uint)Parcel.ParcelFlags.ForSale) + if ((parcel.Flags & (uint)ParcelFlags.ForSale) == (uint)ParcelFlags.ForSale) return "true"; else return "false"; @@ -350,7 +350,7 @@ namespace OpenSim.Region.DataSnapshot.Providers private string GetShowInSearch(LandData parcel) { - if ((parcel.Flags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory) + if ((parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory) return "true"; else return "false"; diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0b466f7..b48cf62 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3097,11 +3097,11 @@ namespace OpenSim.Region.Framework.Scenes { if (parcel != null) { - if ((parcel.landData.Flags & (uint)Parcel.ParcelFlags.AllowOtherScripts) != 0) + if ((parcel.landData.Flags & (uint)ParcelFlags.AllowOtherScripts) != 0) { return true; } - else if ((parcel.landData.Flags & (uint)Parcel.ParcelFlags.AllowGroupScripts) != 0) + else if ((parcel.landData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0) { if (part.OwnerID == parcel.landData.OwnerID || (parcel.landData.IsGroupOwned && part.GroupID == parcel.landData.GroupID) diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index a2d8c65..f449e18 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -32,6 +32,7 @@ using System.Text.RegularExpressions; using System.Threading; using log4net; using OpenMetaverse; +using OpenMetaverse.Assets; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes.Serialization; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index de12b0a..5fa7efd 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs @@ -443,7 +443,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice // } // else - if ((land.Flags & (uint)Parcel.ParcelFlags.AllowVoiceChat) == 0) + if ((land.Flags & (uint)ParcelFlags.AllowVoiceChat) == 0) { m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel", scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName); @@ -777,7 +777,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice // Create parcel voice channel. If no parcel exists, then the voice channel ID is the same // as the directory ID. Otherwise, it reflects the parcel's ID. - if (land.LocalID != 1 && (land.Flags & (uint)Parcel.ParcelFlags.UseEstateVoiceChan) == 0) + if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0) { landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name); landUUID = land.GlobalID.ToString(); diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index 47309d0..5465678 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs @@ -651,7 +651,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice channel_uri = String.Empty; } - if ((land.Flags & (uint)Parcel.ParcelFlags.AllowVoiceChat) == 0) + if ((land.Flags & (uint)ParcelFlags.AllowVoiceChat) == 0) { m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel", scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName); @@ -722,7 +722,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice // Create parcel voice channel. If no parcel exists, then the voice channel ID is the same // as the directory ID. Otherwise, it reflects the parcel's ID. - if (land.LocalID != 1 && (land.Flags & (uint)Parcel.ParcelFlags.UseEstateVoiceChan) == 0) + if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0) { landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name); landUUID = land.GlobalID.ToString(); diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs index 208ddb0..5fac189 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs @@ -27,6 +27,7 @@ using System; using OpenMetaverse; +using OpenMetaverse.Assets; namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { @@ -38,6 +39,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { int Type { get; } UUID AssetID { get; } - T RetreiveAsset() where T : OpenMetaverse.Asset, new(); + T RetreiveAsset() where T : Asset, new(); } } diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs index b9c0065..40693ab 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs @@ -32,6 +32,7 @@ using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; //using OpenSim.Services.AssetService; using OpenMetaverse; +using OpenMetaverse.Assets; namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { @@ -80,7 +81,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule public int Type { get { return m_privateItem.Type; } } public UUID AssetID { get { return m_privateItem.AssetID; } } - public T RetreiveAsset() where T : OpenMetaverse.Asset, new() + public T RetreiveAsset() where T : OpenMetaverse.Assets.Asset, new() { AssetBase a = m_rootSceene.AssetService.Get(AssetID.ToString()); T result = new T(); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 62c3fc2..2c3002a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -51,6 +51,8 @@ using OpenSim.Region.ScriptEngine.Shared.ScriptBase; using OpenSim.Region.ScriptEngine.Interfaces; using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; +using AssetLandmark = OpenSim.Framework.AssetLandmark; + using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; @@ -4058,7 +4060,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api else { // Parcel push restriction - if ((targetlandObj.landData.Flags & (uint)Parcel.ParcelFlags.RestrictPushObject) == (uint)Parcel.ParcelFlags.RestrictPushObject) + if ((targetlandObj.landData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject) { // Need provisions for Group Owned here if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) @@ -4066,7 +4068,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api pushAllowed = true; } - //Parcel.ParcelFlags.RestrictPushObject + //ParcelFlags.RestrictPushObject //pushAllowed = true; } else diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 36a5ef6..426ef29 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs @@ -32,6 +32,7 @@ using System.IO; using System.Threading; using System.Timers; using OpenMetaverse; +using OpenMetaverse.Assets; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Console; @@ -142,7 +143,7 @@ namespace pCampBot client.Settings.SEND_AGENT_THROTTLE = true; client.Settings.SEND_PINGS = true; client.Settings.STORE_LAND_PATCHES = false; - client.Settings.USE_TEXTURE_CACHE = false; + client.Settings.USE_ASSET_CACHE = false; client.Settings.MULTIPLE_SIMS = true; client.Throttle.Asset = 100000; client.Throttle.Land = 100000; @@ -154,8 +155,7 @@ namespace pCampBot client.Network.OnSimConnected += new NetworkManager.SimConnectedCallback(this.Network_OnConnected); client.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(this.Network_OnDisconnected); client.Objects.OnNewPrim += Objects_NewPrim; - client.Assets.OnImageReceived += Asset_TextureCallback; - client.Assets.OnAssetReceived += Asset_ReceivedCallback; + //client.Assets.OnAssetReceived += Asset_ReceivedCallback; if (client.Network.Login(firstname, lastname, password, "pCampBot", "Your name")) { if (OnConnected != null) @@ -202,8 +202,8 @@ namespace pCampBot UUID wearable = client.Appearance.GetWearableAsset(wtype); if (wearable != UUID.Zero) { - client.Assets.RequestAsset(wearable, AssetType.Clothing, false); - client.Assets.RequestAsset(wearable, AssetType.Bodypart, false); + client.Assets.RequestAsset(wearable, AssetType.Clothing, false, Asset_ReceivedCallback); + client.Assets.RequestAsset(wearable, AssetType.Bodypart, false, Asset_ReceivedCallback); } } } @@ -377,7 +377,7 @@ namespace pCampBot { if (prim.Textures.DefaultTexture.TextureID != UUID.Zero) { - client.Assets.RequestImage(prim.Textures.DefaultTexture.TextureID, ImageType.Normal); + client.Assets.RequestImage(prim.Textures.DefaultTexture.TextureID, ImageType.Normal, Asset_TextureCallback_Texture); } for (int i = 0; i < prim.Textures.FaceTextures.Length; i++) { @@ -385,7 +385,7 @@ namespace pCampBot { if (prim.Textures.FaceTextures[i].TextureID != UUID.Zero) { - client.Assets.RequestImage(prim.Textures.FaceTextures[i].TextureID, ImageType.Normal); + client.Assets.RequestImage(prim.Textures.FaceTextures[i].TextureID, ImageType.Normal, Asset_TextureCallback_Texture); } } @@ -393,16 +393,18 @@ namespace pCampBot } if (prim.Sculpt.SculptTexture != UUID.Zero) { - client.Assets.RequestImage(prim.Sculpt.SculptTexture, ImageType.Normal); + client.Assets.RequestImage(prim.Sculpt.SculptTexture, ImageType.Normal, Asset_TextureCallback_Texture); } } } - public void Asset_TextureCallback(ImageDownload image, AssetTexture asset) + + + public void Asset_TextureCallback_Texture(TextureRequestState state, AssetTexture assetTexture) { //TODO: Implement texture saving and applying } - + public void Asset_ReceivedCallback(AssetDownload transfer,Asset asset) { if (wear == "save") -- cgit v1.1