mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
* Patch from XenReborn to make remove-region work properly without needing to do a change-region first. Careful though. I still suggest you do a change-region first.
* Patch from Melanie to implement touch_end. * Thanks XenReborn!. Thanks Melanie!
This commit is contained in:
@@ -146,6 +146,41 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
List<EntityBase> EntitieList = GetEntities();
|
||||
|
||||
foreach (EntityBase ent in EntitieList)
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
{
|
||||
SceneObjectGroup obj = ent as SceneObjectGroup;
|
||||
if (obj != null)
|
||||
{
|
||||
// Is this prim part of the group
|
||||
if (obj.HasChildPrim(localID))
|
||||
{
|
||||
// Currently only grab/touch for the single prim
|
||||
// the client handles rez correctly
|
||||
obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
|
||||
|
||||
SceneObjectPart part = obj.GetChildPart(localID);
|
||||
|
||||
// If the touched prim handles touches, deliver it
|
||||
// If not, deliver to root prim
|
||||
if ((part.ObjectFlags & (uint)LLObject.ObjectFlags.Touch) != 0)
|
||||
EventManager.TriggerObjectGrab(part.LocalId, part.OffsetPosition, remoteClient);
|
||||
else
|
||||
EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.OffsetPosition, remoteClient);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient)
|
||||
{
|
||||
|
||||
List<EntityBase> EntitieList = GetEntities();
|
||||
|
||||
foreach (EntityBase ent in EntitieList)
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
@@ -155,18 +190,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
// Is this prim part of the group
|
||||
if (obj.HasChildPrim(localID))
|
||||
{
|
||||
// Currently only grab/touch for the single prim
|
||||
// the client handles rez correctly
|
||||
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)
|
||||
SceneObjectPart part=obj.GetChildPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
EventManager.TriggerObjectGrab(part.LocalId, part.OffsetPosition, remoteClient);
|
||||
}
|
||||
// If the touched prim handles touches, deliver it
|
||||
// If not, deliver to root prim
|
||||
if ((part.ObjectFlags & (uint)LLObject.ObjectFlags.Touch) != 0)
|
||||
EventManager.TriggerObjectDeGrab(part.LocalId, remoteClient);
|
||||
else
|
||||
EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, remoteClient);
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user