set object select on demand, not when it is created

This commit is contained in:
UbitUmarov
2020-06-05 01:57:17 +01:00
parent b440a9534d
commit 775420c46a
12 changed files with 32 additions and 19 deletions

View File

@@ -2597,8 +2597,8 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="vel">The velocity of the rezzed object.</param>
/// <param name="param"></param>
/// <returns>The SceneObjectGroup(s) rezzed, or null if rez was unsuccessful</returns>
public virtual List<SceneObjectGroup> RezObject(
SceneObjectPart sourcePart, TaskInventoryItem item, Vector3 pos, Quaternion? rot, Vector3 vel, int param, bool atRoot)
public virtual List<SceneObjectGroup> RezObject(SceneObjectPart sourcePart, TaskInventoryItem item,
Vector3 pos, Quaternion? rot, Vector3 vel, int param, bool atRoot, bool rezSelected = false)
{
if (null == item)
return null;
@@ -2710,6 +2710,12 @@ namespace OpenSim.Region.Framework.Scenes
AddNewSceneObject(group, true, curpos, crot, vel);
}
if(rezSelected)
{
group.IsSelected = true;
group.RootPart.CreateSelected = true;
}
// We can only call this after adding the scene object, since the scene object references the scene
// to find out if scripts should be activated at all.
group.InvalidateEffectivePerms();