public void SendTerseUpdateToClient(IClientAPI remoteClient) { if (ParentGroup == null || ParentGroup.IsDeleted) return; if (IsAttachment && ParentGroup.RootPart != this) return; // Causes this thread to dig into the Client Thread Data. // Remember your locking here! remoteClient.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); }
/// <summary> /// Sends a full update to the client /// </summary> /// <param name="remoteClient"></param> /// <param name="lPos"></param> /// <param name="clientFlags"></param> public void SendFullUpdateToClient(IClientAPI remoteClient, Vector3 lPos, uint clientFlags) { // Suppress full updates during attachment editing // if (ParentGroup.IsSelected && IsAttachment) return; if (ParentGroup.IsDeleted) return; clientFlags &= ~(uint) PrimFlags.CreateSelected; if (remoteClient.AgentId == _ownerID) { if ((Flags & PrimFlags.CreateSelected) != 0) { clientFlags |= (uint) PrimFlags.CreateSelected; Flags &= ~PrimFlags.CreateSelected; } } //bool isattachment = IsAttachment; //if (LocalId != ParentGroup.RootPart.LocalId) //isattachment = ParentGroup.RootPart.IsAttachment; remoteClient.SendPrimUpdate(this, PrimUpdateFlags.FullUpdate); }
public void SendTerseUpdateToClient(IClientAPI remoteClient) { if (ParentGroup.IsDeleted) return; if (ParentGroup.IsAttachment && ((ParentGroup.RootPart != this) || ((ParentGroup.AttachedAvatar != remoteClient.AgentId) && (ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38)))) return; // Causes this thread to dig into the Client Thread Data. // Remember your locking here! remoteClient.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); }
/// <summary> /// Sends a location update to the client connected to this scenePresence /// </summary> /// <param name="remoteClient"></param> public void SendTerseUpdateToClient(IClientAPI remoteClient) { // If the client is inactive, it's getting its updates from another // server. if (remoteClient.IsActive) { m_perfMonMS = Util.EnvironmentTickCount(); Vector3 pos = m_pos; pos.Z += m_appearance.HipOffset; //m_log.DebugFormat("[SCENEPRESENCE]: TerseUpdate: Pos={0} Rot={1} Vel={2}", m_pos, m_bodyRot, m_velocity); remoteClient.SendPrimUpdate( this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); m_scene.StatsReporter.AddAgentUpdates(1); } }
public void SendTerseUpdateToClient(IClientAPI remoteClient) { if (ParentGroup == null || ParentGroup.IsDeleted) return; Vector3 lPos = OffsetPosition; if (IsAttachment) { if (ParentGroup.RootPart != this) return; lPos = ParentGroup.RootPart.AttachedPos; } else { if (ParentGroup.RootPart == this) lPos = AbsolutePosition; } // Causes this thread to dig into the Client Thread Data. // Remember your locking here! remoteClient.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); }