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);
sog = CopyPrim (group, bird.Id);
rootPart = sog.RootPart;
rootPart.AddFlag(PrimFlags.Temporary);
rootPart.AddFlag(PrimFlags.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_scene.AddNewSceneObject (sog, false);
// Fire script on_rez
sog.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 1);
rootPart.ParentGroup.ResumeScripts();
rootPart.ScheduleFullUpdate();
sog.DetachFromBackup();
} else {
sog = existing.ParentGroup;
m_sogMap[bird.Id] = sog;