* re-applied AddNewPrim refactoring... third time now...

afrisby
lbsa71 2007-12-30 16:00:55 +00:00
parent 2ff760457e
commit 14a191b285
1 changed files with 33 additions and 35 deletions

View File

@ -1009,12 +1009,6 @@ namespace OpenSim.Region.Environment.Scenes
byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID,
byte RayEndIsIntersection)
{
// What we're *supposed* to do is raytrace from the camera position given by the client to the nearest collision
// in the direction the client supplies (the ground level that we clicked)
// This function is pretty crappy right now.. so we're not affecting where the newly rezzed objects go
// Test it if you like. The console will write where it guesses a collision took place. if it thinks one did.
// It's wrong many times though.
LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection);
@ -1022,11 +1016,16 @@ 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);
}
}
public virtual void AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape)
{
SceneObjectGroup sceneOb =
new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);
AddEntity(sceneOb);
@ -1053,7 +1052,6 @@ namespace OpenSim.Region.Environment.Scenes
rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
}
}
}
public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position,
Tree treeType, bool newTree)