* 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
|
@ -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,
|
||||
LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
|
||||
uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
|
||||
bool RezSelected, bool RemoveItem, LLUUID fromTaskID)
|
||||
{
|
||||
// Work out position details
|
||||
byte bRayEndIsIntersection = (byte)0;
|
||||
|
||||
if (RayEndIsIntersection)
|
||||
|
@ -910,12 +928,12 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
bRayEndIsIntersection = (byte)0;
|
||||
}
|
||||
|
||||
LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), BypassRayCast, bRayEndIsIntersection);
|
||||
RezObject(remoteClient, itemID, pos);
|
||||
}
|
||||
LLVector3 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);
|
||||
if (userInfo != null)
|
||||
{
|
||||
|
@ -928,28 +946,19 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
if (rezAsset != null)
|
||||
{
|
||||
AddRezObject(Helpers.FieldToUTF8String(rezAsset.Data), pos);
|
||||
//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)
|
||||
{
|
||||
string xmlData = Helpers.FieldToUTF8String(rezAsset.Data);
|
||||
SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
|
||||
group.ResetIDs();
|
||||
AddEntity(group);
|
||||
group.AbsolutePosition = pos;
|
||||
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();
|
||||
group.ApplyPhysics(m_physicalPrim);
|
||||
group.StartScripts();
|
||||
|
@ -974,4 +983,14 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
rootPart.ScheduleFullUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,
|
||||
uint ItemFlags, uint NextOwnerMask)
|
||||
{
|
||||
System.Console.WriteLine("RezSingleAttachment: unimplemented yet");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue