* Fixes a 'take object from mega region' and rez it in a regular region.. and have it appear 5 regions over bug by limiting the stored position in the asset to Constants.RegionSize. The stored position in the asset gets overwritten anyway by the rezzing routine, but at least this way, there's no chance of the objects border crossing before the rezzing routine finishes.
parent
2494d701fa
commit
9a06056c9a
|
@ -1620,8 +1620,24 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
UUID assetID = UUID.Zero;
|
||||
|
||||
Vector3 inventoryStoredPosition = new Vector3
|
||||
(((objectGroup.AbsolutePosition.X > (int)Constants.RegionSize)
|
||||
? 250
|
||||
: objectGroup.AbsolutePosition.X)
|
||||
,
|
||||
(objectGroup.AbsolutePosition.X > (int)Constants.RegionSize)
|
||||
? 250
|
||||
: objectGroup.AbsolutePosition.X,
|
||||
objectGroup.AbsolutePosition.Z);
|
||||
|
||||
Vector3 originalPosition = objectGroup.AbsolutePosition;
|
||||
|
||||
objectGroup.AbsolutePosition = inventoryStoredPosition;
|
||||
|
||||
string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(objectGroup);
|
||||
|
||||
objectGroup.AbsolutePosition = originalPosition;
|
||||
|
||||
// Get the user info of the item destination
|
||||
//
|
||||
UUID userID = UUID.Zero;
|
||||
|
@ -1683,6 +1699,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
// Deleting someone else's item
|
||||
//
|
||||
|
||||
|
||||
if (remoteClient == null ||
|
||||
objectGroup.OwnerID != remoteClient.AgentId)
|
||||
{
|
||||
|
@ -1857,8 +1875,24 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
itemID = UUID.Zero;
|
||||
if (grp != null)
|
||||
{
|
||||
Vector3 inventoryStoredPosition = new Vector3
|
||||
(((grp.AbsolutePosition.X > (int)Constants.RegionSize)
|
||||
? 250
|
||||
: grp.AbsolutePosition.X)
|
||||
,
|
||||
(grp.AbsolutePosition.X > (int)Constants.RegionSize)
|
||||
? 250
|
||||
: grp.AbsolutePosition.X,
|
||||
grp.AbsolutePosition.Z);
|
||||
|
||||
Vector3 originalPosition = grp.AbsolutePosition;
|
||||
|
||||
grp.AbsolutePosition = inventoryStoredPosition;
|
||||
|
||||
string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp);
|
||||
|
||||
|
||||
grp.AbsolutePosition = originalPosition;
|
||||
|
||||
AssetBase asset = CreateAsset(
|
||||
grp.GetPartName(grp.LocalId),
|
||||
grp.GetPartDescription(grp.LocalId),
|
||||
|
|
|
@ -4256,7 +4256,24 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
break;
|
||||
|
||||
case 2: // Sell a copy
|
||||
|
||||
|
||||
Vector3 inventoryStoredPosition = new Vector3
|
||||
(((group.AbsolutePosition.X > (int)Constants.RegionSize)
|
||||
? 250
|
||||
: group.AbsolutePosition.X)
|
||||
,
|
||||
(group.AbsolutePosition.X > (int)Constants.RegionSize)
|
||||
? 250
|
||||
: group.AbsolutePosition.X,
|
||||
group.AbsolutePosition.Z);
|
||||
|
||||
Vector3 originalPosition = group.AbsolutePosition;
|
||||
|
||||
group.AbsolutePosition = inventoryStoredPosition;
|
||||
|
||||
string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group);
|
||||
group.AbsolutePosition = originalPosition;
|
||||
|
||||
uint perms=group.GetEffectivePermissions();
|
||||
|
||||
|
|
Loading…
Reference in New Issue