From: Kurt Taylor <krtaylor@us.ibm.com>

Attached is a patch for Mantis 25 - this fixes the problem of not having a
touch_start happen for all prims in a linked group.  So, with this, large
builds can now have a single script in the base prim and it will run when
any prim in the linked build is touched.   The problem was that the
objectgrab event was not being propagated to all the prims in the group.
ThreadPoolClientBranch
Sean Dague 2008-02-08 16:09:24 +00:00
parent 598c5a95d9
commit 7b4fb3b8bc
1 changed files with 12 additions and 1 deletions

View File

@ -148,7 +148,6 @@ namespace OpenSim.Region.Environment.Scenes
public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
{ {
EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient);
List<EntityBase> EntitieList = GetEntities(); List<EntityBase> EntitieList = GetEntities();
@ -158,9 +157,21 @@ namespace OpenSim.Region.Environment.Scenes
{ {
SceneObjectGroup obj = ent as SceneObjectGroup; SceneObjectGroup obj = ent as SceneObjectGroup;
// Is this prim part of the group
if (obj.HasChildPrim(localID)) if (obj.HasChildPrim(localID))
{ {
// Currently only grab/touch for the single prim
// the client handles rez correctly
obj.ObjectGrabHandler(localID, offsetPos, remoteClient); obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
// trigger event, one for each prim part in the group
// so that a touch to a non-root prim in a group will still
// trigger a touch_start for a script in the root prim
foreach (SceneObjectPart part in obj.Children.Values)
{
EventManager.TriggerObjectGrab(part.LocalID, part.OffsetPosition, remoteClient);
}
return; return;
} }
} }