tell scripts about positions changes after they are actually changed
parent
5269511339
commit
cf132430ae
|
@ -687,22 +687,30 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restuff the new GroupPosition into each SOP of the linkset.
|
|
||||||
// This has the affect of resetting and tainting the physics actors.
|
|
||||||
SceneObjectPart[] parts = m_parts.GetArray();
|
|
||||||
bool triggerScriptEvent = m_rootPart.GroupPosition != val;
|
bool triggerScriptEvent = m_rootPart.GroupPosition != val;
|
||||||
if (m_dupeInProgress)
|
if (m_dupeInProgress || IsDeleted)
|
||||||
triggerScriptEvent = false;
|
triggerScriptEvent = false;
|
||||||
|
|
||||||
m_rootPart.GroupPosition = val;
|
m_rootPart.GroupPosition = val;
|
||||||
if (triggerScriptEvent)
|
|
||||||
m_rootPart.TriggerScriptChangedEvent(Changed.POSITION);
|
// Restuff the new GroupPosition into each child SOP of the linkset.
|
||||||
|
// this is needed because physics may not have linksets but just loose SOPs in world
|
||||||
|
|
||||||
|
SceneObjectPart[] parts = m_parts.GetArray();
|
||||||
|
|
||||||
foreach (SceneObjectPart part in parts)
|
foreach (SceneObjectPart part in parts)
|
||||||
{
|
{
|
||||||
if (part == m_rootPart)
|
if (part != m_rootPart)
|
||||||
continue;
|
part.GroupPosition = val;
|
||||||
part.GroupPosition = val;
|
}
|
||||||
if (triggerScriptEvent)
|
|
||||||
|
// now that position is changed tell it to scripts
|
||||||
|
if (triggerScriptEvent)
|
||||||
|
{
|
||||||
|
foreach (SceneObjectPart part in parts)
|
||||||
|
{
|
||||||
part.TriggerScriptChangedEvent(Changed.POSITION);
|
part.TriggerScriptChangedEvent(Changed.POSITION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue