* You can now rez objects out of inventory at the correct offset from prim you rez it on. Including multi prim groups and prim that have different X/Y/Z scales.

This commit is contained in:
Teravus Ovares
2008-05-01 06:31:12 +00:00
parent f4e22b1356
commit 1c697ef0d2
6 changed files with 69 additions and 15 deletions

View File

@@ -1235,10 +1235,12 @@ namespace OpenSim.Region.Environment.Scenes
bRayEndIsIntersection = (byte)0;
}
LLVector3 pos
= GetNewRezLocation(
LLVector3 scale = new LLVector3(0.5f, 0.5f, 0.5f);
LLVector3 pos = GetNewRezLocation(
RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1),
BypassRayCast, bRayEndIsIntersection);
BypassRayCast, bRayEndIsIntersection,true,scale);
if (!PermissionsMngr.CanRezObject(remoteClient.AgentId, pos) && !attachment)
{
@@ -1266,9 +1268,16 @@ namespace OpenSim.Region.Environment.Scenes
// if attachment we set it's asset id so object updates can reflect that
// if not, we set it's position in world.
if (!attachment)
{
pos = GetNewRezLocation(
RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1),
BypassRayCast, bRayEndIsIntersection, true, group.GroupScale());
group.AbsolutePosition = pos;
}
else
{
group.SetFromAssetID(itemID);
}
SceneObjectPart rootPart = group.GetChildPart(group.UUID);