* Objects which have their name or description changed while within inventory will now retain those details when rezzed to a scene
parent
c774cd1169
commit
da9eeffc9e
OpenSim/Region/Environment/Scenes
|
@ -894,11 +894,29 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Rez an object into a scene
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="itemID"></param>
|
||||||
|
/// <param name="RayEnd"></param>
|
||||||
|
/// <param name="RayStart"></param>
|
||||||
|
/// <param name="RayTargetID"></param>
|
||||||
|
/// <param name="BypassRayCast"></param>
|
||||||
|
/// <param name="RayEndIsIntersection"></param>
|
||||||
|
/// <param name="EveryoneMask"></param>
|
||||||
|
/// <param name="GroupMask"></param>
|
||||||
|
/// <param name="NextOwnerMask"></param>
|
||||||
|
/// <param name="ItemFlags"></param>
|
||||||
|
/// <param name="RezSelected"></param>
|
||||||
|
/// <param name="RemoveItem"></param>
|
||||||
|
/// <param name="fromTaskID"></param>
|
||||||
public virtual void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart,
|
public virtual void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart,
|
||||||
LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
|
LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
|
||||||
uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
|
uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
|
||||||
bool RezSelected, bool RemoveItem, LLUUID fromTaskID)
|
bool RezSelected, bool RemoveItem, LLUUID fromTaskID)
|
||||||
{
|
{
|
||||||
|
// Work out position details
|
||||||
byte bRayEndIsIntersection = (byte)0;
|
byte bRayEndIsIntersection = (byte)0;
|
||||||
|
|
||||||
if (RayEndIsIntersection)
|
if (RayEndIsIntersection)
|
||||||
|
@ -910,12 +928,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
bRayEndIsIntersection = (byte)0;
|
bRayEndIsIntersection = (byte)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), BypassRayCast, bRayEndIsIntersection);
|
LLVector3 pos
|
||||||
RezObject(remoteClient, itemID, pos);
|
= GetNewRezLocation(
|
||||||
}
|
RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1),
|
||||||
|
BypassRayCast, bRayEndIsIntersection);
|
||||||
|
|
||||||
public virtual void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos)
|
// Rez object
|
||||||
{
|
|
||||||
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
|
@ -928,28 +946,19 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
if (rezAsset != null)
|
if (rezAsset != null)
|
||||||
{
|
{
|
||||||
AddRezObject(Helpers.FieldToUTF8String(rezAsset.Data), pos);
|
string xmlData = Helpers.FieldToUTF8String(rezAsset.Data);
|
||||||
//userInfo.DeleteItem(remoteClient.AgentId, item);
|
|
||||||
//remoteClient.SendRemoveInventoryItem(itemID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,
|
|
||||||
uint ItemFlags, uint NextOwnerMask)
|
|
||||||
{
|
|
||||||
System.Console.WriteLine("RezSingleAttachment: unimplemented yet");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddRezObject(string xmlData, LLVector3 pos)
|
|
||||||
{
|
|
||||||
SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
|
SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
|
||||||
group.ResetIDs();
|
group.ResetIDs();
|
||||||
AddEntity(group);
|
AddEntity(group);
|
||||||
group.AbsolutePosition = pos;
|
group.AbsolutePosition = pos;
|
||||||
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
||||||
|
|
||||||
|
// Since renaming the item in the inventory does not affect the name stored
|
||||||
|
// in the serialization, transfer the correct name from the inventory to the
|
||||||
|
// object itself before we rez.
|
||||||
|
rootPart.Name = item.inventoryName;
|
||||||
|
rootPart.Description = item.inventoryDescription;
|
||||||
|
|
||||||
rootPart.TrimPermissions();
|
rootPart.TrimPermissions();
|
||||||
group.ApplyPhysics(m_physicalPrim);
|
group.ApplyPhysics(m_physicalPrim);
|
||||||
group.StartScripts();
|
group.StartScripts();
|
||||||
|
@ -975,3 +984,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,
|
||||||
|
uint ItemFlags, uint NextOwnerMask)
|
||||||
|
{
|
||||||
|
System.Console.WriteLine("RezSingleAttachment: unimplemented yet");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue