public void Objects_OnObjectProperties11(Simulator simulator, Primitive prim, Primitive.ObjectProperties props) { //Primitive prim = GetPrimitive(props.ObjectID, simulator); if (prim == null) { prim = GetPrimitive(props.ObjectID, simulator); } DeclareProperties(prim, props, simulator); if (prim != null) { prim.RegionHandle = simulator.Handle; SimObject updateMe = GetSimObject(prim, simulator); if (updateMe == null) { return; } if (prim.ParentID == 0 && !SimRegion.OutOfRegion(prim.Position)) { updateMe.ResetPrim(prim, client, simulator); } if (MaintainObjectProperties) { //updateMe.Properties = null; updateMe.Properties = (props); } //Debug("UpdateProperties: {0}", updateMe.DebugInfo()); describePrimToAI(prim, simulator); } }
private void OfferPrimToSimObject(Primitive prim, SimObject obj0, Simulator simulator) { if (simulator != null && prim.Properties == null) { EnsureSelected(prim, simulator); } obj0.ConfirmedObject = true; obj0.ResetPrim(prim, client, simulator); }
private void Objects_OnPrimitiveUpdateReal(Simulator simulator, Primitive av, ObjectMovementUpdate update, ulong RegionHandle, ushort TimeDilation) { if (!IsMaster(simulator)) { return; } if (av == null) { return; } if (av.ID == UUID.Zero) { return; // too early } SimObject AV = null; Object Obj; //lock (uuidTypeObject) if (UUIDTypeObjectTryGetValue(av.ID, out Obj)) { AV = Obj as SimObject; } else { if (av.ID == client.Self.AgentID) { AV = GetSimObject(av, simulator); } } if (AV != null) { Primitive prev = AV.Prim; if (prev == null) { AV.SetFirstPrim(av); } if (av.ParentID == 0 && !SimRegion.OutOfRegion(av.Position)) { AV.ResetPrim(av, client, simulator); } if (prev != null) { // parent changed? if (prev.ParentID != av.ParentID) { AV.Parent = null; } } if (av.ParentID == 0 && !SimRegion.OutOfRegion(update.Position)) { if (update.Avatar) { SimRegion.GetRegion(simulator).UpdateTraveled(av.ID, av.Position, av.Rotation); //return; } } if (!MaintainObjectUpdates) { return; } EventQueue.Enqueue(() => Objects_OnObjectUpdated1(simulator, av, updatFromSimObject(AV), RegionHandle, TimeDilation)); } }