* This is the fabled LibOMV update with all of the libOMV types from JHurliman

* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point.  Regular people should let the dust settle.
* This has been tested to work with most basic functions. However..   make sure you back up 'everything' before using this.  It's that big!  
* Essentially we're back at square 1 in the testing phase..  so lets identify things that broke.
This commit is contained in:
Teravus Ovares
2008-09-06 07:52:41 +00:00
parent cbec2bf22b
commit 7d89e12293
388 changed files with 6811 additions and 7138 deletions

View File

@@ -27,7 +27,7 @@
using System;
using System.Collections.Generic;
using libsecondlife;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes;
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
return m_landManagementModule.GetLandObject(x_float, y_float);
}
ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene);
ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
obj.landData.Name = "NO LAND";
return obj;
}
@@ -100,12 +100,12 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
return m_landManagementModule.GetLandObject(x, y);
}
ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene);
ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
obj.landData.Name = "NO LAND";
return obj;
}
public List<ILandObject> ParcelsNearPoint(LLVector3 position)
public List<ILandObject> ParcelsNearPoint(Vector3 position)
{
if (m_landManagementModule != null)
{
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
m_landManagementModule.UpdateLandObject(localID, data);
}
}
public void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient)
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
{
if (m_landManagementModule != null)
{
@@ -168,4 +168,4 @@ namespace OpenSim.Region.Environment.Modules.World.Land
#endregion
}
}
}

View File

@@ -1,4 +1,4 @@
/*
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -29,7 +29,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using libsecondlife;
using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Region.Environment.Interfaces;
@@ -38,7 +38,6 @@ using OpenSim.Framework;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Communications.Capabilities;
using OpenSim.Region.Physics.Manager;
using Axiom.Math;
using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
namespace OpenSim.Region.Environment.Modules.World.Land
@@ -165,10 +164,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land
lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1;
landIDList.Initialize();
ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene);
ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);
fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
else
fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
@@ -176,7 +175,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
AddLandObject(fullSimParcel);
}
public List<ILandObject> ParcelsNearPoint(LLVector3 position)
public List<ILandObject> ParcelsNearPoint(Vector3 position)
{
List<ILandObject> parcelsNear = new List<ILandObject>();
for (int x = -4; x <= 4; x += 4)
@@ -205,8 +204,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
"You are not allowed on this parcel because you are banned. Please go away. <3 OpenSim Developers");
avatar.PhysicsActor.Position =
new PhysicsVector(avatar.lastKnownAllowedPosition.x, avatar.lastKnownAllowedPosition.y,
avatar.lastKnownAllowedPosition.z);
new PhysicsVector(avatar.lastKnownAllowedPosition.X, avatar.lastKnownAllowedPosition.Y,
avatar.lastKnownAllowedPosition.Z);
avatar.PhysicsActor.Velocity = new PhysicsVector(0, 0, 0);
}
else
@@ -216,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
}
public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, LLUUID regionID)
public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, UUID regionID)
{
if (m_scene.RegionInfo.RegionID == regionID)
{
@@ -353,7 +352,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID,
public void handleParcelAccessRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID,
int landLocalID, IClientAPI remote_client)
{
if (landList.ContainsKey(landLocalID))
@@ -362,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
}
public void handleParcelAccessUpdateRequest(LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID,
public void handleParcelAccessUpdateRequest(UUID agentID, UUID sessionID, uint flags, int landLocalID,
List<ParcelManager.ParcelAccessEntry> entries,
IClientAPI remote_client)
{
@@ -385,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
/// <returns></returns>
public ILandObject CreateBaseLand()
{
return new LandObject(LLUUID.Zero, false, m_scene);
return new LandObject(UUID.Zero, false, m_scene);
}
/// <summary>
@@ -529,7 +528,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public void AddPrimToLandPrimCounts(SceneObjectGroup obj)
{
LLVector3 position = obj.AbsolutePosition;
Vector3 position = obj.AbsolutePosition;
ILandObject landUnderPrim = GetLandObject(position.X, position.Y);
if (landUnderPrim != null)
{
@@ -548,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public void FinalizeLandPrimCountUpdate()
{
//Get Simwide prim count for owner
Dictionary<LLUUID, List<LandObject>> landOwnersAndParcels = new Dictionary<LLUUID, List<LandObject>>();
Dictionary<UUID, List<LandObject>> landOwnersAndParcels = new Dictionary<UUID, List<LandObject>>();
foreach (LandObject p in landList.Values)
{
if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID))
@@ -563,7 +562,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
}
foreach (LLUUID owner in landOwnersAndParcels.Keys)
foreach (UUID owner in landOwnersAndParcels.Keys)
{
int simArea = 0;
int simPrims = 0;
@@ -617,9 +616,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
/// <param name="start_y">South Point</param>
/// <param name="end_x">East Point</param>
/// <param name="end_y">North Point</param>
/// <param name="attempting_user_id">LLUUID of user who is trying to subdivide</param>
/// <param name="attempting_user_id">UUID of user who is trying to subdivide</param>
/// <returns>Returns true if successful</returns>
private void subdivide(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id)
private void subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
{
//First, lets loop through the points and make sure they are all in the same peice of land
//Get the land object at start
@@ -658,7 +657,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
//Lets create a new land object with bitmap activated at that point (keeping the old land objects info)
ILandObject newLand = startLandObject.Copy();
newLand.landData.Name = "Subdivision of " + newLand.landData.Name;
newLand.landData.GlobalID = LLUUID.Random();
newLand.landData.GlobalID = UUID.Random();
newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y));
@@ -683,9 +682,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
/// <param name="start_y">y value in first piece of land</param>
/// <param name="end_x">x value in second peice of land</param>
/// <param name="end_y">y value in second peice of land</param>
/// <param name="attempting_user_id">LLUUID of the avatar trying to join the land objects</param>
/// <param name="attempting_user_id">UUID of the avatar trying to join the land objects</param>
/// <returns>Returns true if successful</returns>
private void join(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id)
private void join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
{
end_x -= 4;
end_y -= 4;
@@ -770,13 +769,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER);
}
else if (currentParcelBlock.landData.SalePrice > 0 &&
(currentParcelBlock.landData.AuthBuyerID == LLUUID.Zero ||
(currentParcelBlock.landData.AuthBuyerID == UUID.Zero ||
currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId))
{
//Sale Flag
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE);
}
else if (currentParcelBlock.landData.OwnerID == LLUUID.Zero)
else if (currentParcelBlock.landData.OwnerID == UUID.Zero)
{
//Public Flag
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC);
@@ -914,7 +913,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id]))
{
if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
else
landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
@@ -930,7 +929,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id]))
{
if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
else
landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
@@ -979,13 +978,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
if (lob != null)
{
LLUUID AuthorizedID = lob.landData.AuthBuyerID;
UUID AuthorizedID = lob.landData.AuthBuyerID;
int saleprice = lob.landData.SalePrice;
LLUUID pOwnerID = lob.landData.OwnerID;
UUID pOwnerID = lob.landData.OwnerID;
bool landforsale = ((lob.landData.Flags &
(uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0);
if ((AuthorizedID == LLUUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale)
if ((AuthorizedID == UUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale)
{
lock (e)
{
@@ -1027,7 +1026,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
AddLandObject(new_land);
}
public void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient)
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
{
ILandObject selectedParcel = null;
lock (landList)
@@ -1065,7 +1064,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
#region CAPS handler
private void OnRegisterCaps(LLUUID agentID, Caps caps)
private void OnRegisterCaps(UUID agentID, Caps caps)
{
string capsBase = "/CAPS/" + caps.CapsObjectPath;
caps.RegisterHandler("RemoteParcelRequest",
@@ -1080,7 +1079,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
// we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the
// "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to.
// So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x
// and y coordinate (each 8 bit), encoded in a LLUUID (128 bit).
// and y coordinate (each 8 bit), encoded in a UUID (128 bit).
//
// Request format:
// <llsd>
@@ -1095,16 +1094,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land
// <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
// </map>
// </llsd>
private string RemoteParcelRequest(string request, string path, string param, LLUUID agentID, Caps caps)
private string RemoteParcelRequest(string request, string path, string param, UUID agentID, Caps caps)
{
LLUUID parcelID = LLUUID.Zero;
UUID parcelID = UUID.Zero;
try
{
Hashtable hash = new Hashtable();
hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request));
hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
if (hash.ContainsKey("region_id") && hash.ContainsKey("location"))
{
LLUUID regionID = (LLUUID)hash["region_id"];
UUID regionID = (UUID)hash["region_id"];
ArrayList list = (ArrayList)hash["location"];
uint x = (uint)(double)list[0];
uint y = (uint)(double)list[1];
@@ -1148,9 +1147,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
#endregion
private void handleParcelInfo(IClientAPI remoteClient, LLUUID parcelID)
private void handleParcelInfo(IClientAPI remoteClient, UUID parcelID)
{
if (parcelID == LLUUID.Zero)
if (parcelID == UUID.Zero)
return;
// assume we've got the parcelID we just computed in RemoteParcelRequest

View File

@@ -28,7 +28,7 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using libsecondlife;
using OpenMetaverse;
using log4net;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
@@ -67,14 +67,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land
set { m_landData = value; }
}
public LLUUID regionUUID
public UUID regionUUID
{
get { return m_scene.RegionInfo.RegionID; }
}
#region Constructors
public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene)
public LandObject(UUID owner_id, bool is_group_owned, Scene scene)
{
m_scene = scene;
landData.OwnerID = owner_id;
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
}
public void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area)
public void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area)
{
LandData newData = landData.Copy();
newData.OwnerID = avatarID;
@@ -226,14 +226,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land
newData.ClaimDate = Util.UnixTimeSinceEpoch();
newData.ClaimPrice = claimprice;
newData.SalePrice = 0;
newData.AuthBuyerID = LLUUID.Zero;
newData.AuthBuyerID = UUID.Zero;
newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects);
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData);
sendLandUpdateToAvatarsOverMe();
}
public bool isEitherBannedOrRestricted(LLUUID avatar)
public bool isEitherBannedOrRestricted(UUID avatar)
{
if (isBannedFromLand(avatar))
{
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
return false;
}
public bool isBannedFromLand(LLUUID avatar)
public bool isBannedFromLand(UUID avatar)
{
if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0)
{
@@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
return false;
}
public bool isRestrictedFromLand(LLUUID avatar)
public bool isRestrictedFromLand(UUID avatar)
{
if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0)
{
@@ -322,9 +322,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
#region AccessList Functions
public List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag)
public List<UUID> createAccessListArrayByFlag(ParcelManager.AccessList flag)
{
List<LLUUID> list = new List<LLUUID>();
List<UUID> list = new List<UUID>();
foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList)
{
if (entry.Flags == flag)
@@ -334,25 +334,25 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
if (list.Count == 0)
{
list.Add(LLUUID.Zero);
list.Add(UUID.Zero);
}
return list;
}
public void sendAccessList(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID,
public void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID,
IClientAPI remote_client)
{
if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both)
{
List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access);
List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access);
remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID);
}
if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both)
{
List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban);
List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban);
remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID);
}
}
@@ -361,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
LandData newData = landData.Copy();
if (entries.Count == 1 && entries[0].AgentID == LLUUID.Zero)
if (entries.Count == 1 && entries[0].AgentID == UUID.Zero)
{
entries.Clear();
}
@@ -450,7 +450,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
if (ty > 255)
ty = 255;
landData.AABBMin =
new LLVector3((float) (min_x * 4), (float) (min_y * 4),
new Vector3((float) (min_x * 4), (float) (min_y * 4),
(float) m_scene.Heightmap[tx, ty]);
tx = max_x * 4;
@@ -460,7 +460,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
if (ty > 255)
ty = 255;
landData.AABBMax =
new LLVector3((float) (max_x * 4), (float) (max_y * 4),
new Vector3((float) (max_x * 4), (float) (max_y * 4),
(float) m_scene.Heightmap[tx, ty]);
landData.Area = tempArea;
}
@@ -694,7 +694,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this))
{
Dictionary<LLUUID, int> primCount = new Dictionary<LLUUID, int>();
Dictionary<UUID, int> primCount = new Dictionary<UUID, int>();
lock (primsOverMe)
{
@@ -734,9 +734,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
}
public Dictionary<LLUUID, int> getLandObjectOwners()
public Dictionary<UUID, int> getLandObjectOwners()
{
Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>();
Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>();
lock (primsOverMe)
{
try
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
m_scene.returnObjects(objs, obj.OwnerID);
}
public void returnLandObjects(uint type, LLUUID[] owners, IClientAPI remote_client)
public void returnLandObjects(uint type, UUID[] owners, IClientAPI remote_client)
{
List<SceneObjectGroup> objlist = new List<SceneObjectGroup>();
for (int i = 0; i < owners.Length; i++)
@@ -814,7 +814,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public void addPrimToCount(SceneObjectGroup obj)
{
LLUUID prim_owner = obj.OwnerID;
UUID prim_owner = obj.OwnerID;
int prim_count = obj.PrimCount;
if (obj.IsSelected)
@@ -843,7 +843,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
if (primsOverMe.Contains(obj))
{
LLUUID prim_owner = obj.OwnerID;
UUID prim_owner = obj.OwnerID;
int prim_count = obj.PrimCount;
if (prim_owner == landData.OwnerID)