From f64d94f8caccd49523c54c48a1c6700b7fb0d212 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 28 Dec 2007 14:24:14 +0000 Subject: * Rezzing items from Inventory on top of other prim rezzes them 0.5 meters above the 'hit' prim instead of buried in the ground somewhere. * Various Refactorings --- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 17 ++++++++++++++++- OpenSim/Region/Environment/Scenes/Scene.cs | 7 +++++-- 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 4c6e1c8..35112e7 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -699,8 +699,23 @@ namespace OpenSim.Region.Environment.Scenes group.DeleteParts(); } - public virtual void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos) + 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) { + byte bRayEndIsIntersection = (byte)0; + + if (RayEndIsIntersection) + { + bRayEndIsIntersection = (byte)1; + } + else + { + bRayEndIsIntersection = (byte)0; + } + + LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), BypassRayCast, bRayEndIsIntersection); CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); if (userInfo != null) { diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 3919a46..89b68de 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -931,6 +931,7 @@ namespace OpenSim.Region.Environment.Scenes if (RayEndIsIntersection == (byte)1) { pos = RayEnd; + pos.Z += 0.25F; return pos; } if (RayTargetID != LLUUID.Zero) @@ -986,13 +987,14 @@ namespace OpenSim.Region.Environment.Scenes - + pos.Z += 0.25F; return pos; } else { // fall back to our stupid functionality pos = RayEnd; + pos.Z += 0.25F; return pos; } } @@ -1000,6 +1002,7 @@ namespace OpenSim.Region.Environment.Scenes { // fall back to our stupid functionality pos = RayEnd; + pos.Z += 0.25F; return pos; } @@ -1018,7 +1021,7 @@ namespace OpenSim.Region.Environment.Scenes if (PermissionsMngr.CanRezObject(ownerID, pos)) { // rez ON the ground, not IN the ground - pos.Z += 0.25F; + AddNewPrim(ownerID, pos, rot, shape); -- cgit v1.1