Change the primflags to Temporary and Phantom

pull/1/merge
Jak Daniels 2016-03-25 20:58:23 +00:00
parent 3ce758d96a
commit cf4aeac0e5
1 changed files with 6 additions and 3 deletions

View File

@ -93,14 +93,17 @@ namespace Flocking
SceneObjectGroup group = findByName (m_birdPrim); SceneObjectGroup group = findByName (m_birdPrim);
sog = CopyPrim (group, bird.Id); sog = CopyPrim (group, bird.Id);
rootPart = sog.RootPart; rootPart = sog.RootPart;
rootPart.AddFlag(PrimFlags.Temporary);
rootPart.AddFlag(PrimFlags.Phantom);
//set prim to phantom //set prim to phantom
sog.UpdatePrimFlags(rootPart.LocalId, false, false, true, false); //sog.UpdatePrimFlags(rootPart.LocalId, false, false, true, false);
m_sogMap [bird.Id] = sog; m_sogMap [bird.Id] = sog;
m_scene.AddNewSceneObject (sog, false); m_scene.AddNewSceneObject (sog, false);
// Fire script on_rez // Fire script on_rez
sog.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 1); sog.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 1);
rootPart.ParentGroup.ResumeScripts(); rootPart.ParentGroup.ResumeScripts();
rootPart.ScheduleFullUpdate(); rootPart.ScheduleFullUpdate();
sog.DetachFromBackup();
} else { } else {
sog = existing.ParentGroup; sog = existing.ParentGroup;
m_sogMap[bird.Id] = sog; m_sogMap[bird.Id] = sog;