From 0de34e9a183d596dc051fa708517dcb99a35abae Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 5 Mar 2009 18:36:37 +0000 Subject: * remove now unused serialization code --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 355 +---------------------- 1 file changed, 2 insertions(+), 353 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index db0a2d2..6eb6ea4 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -66,8 +66,7 @@ namespace OpenSim.Region.Framework.Scenes public ScriptControlled eventControls; } - [Serializable] - public class ScenePresence : EntityBase, ISerializable + public class ScenePresence : EntityBase { // ~ScenePresence() // { @@ -2823,20 +2822,14 @@ namespace OpenSim.Region.Framework.Scenes DefaultTexture = textu.ToBytes(); } - [Serializable] public class NewForce { public float X; public float Y; public float Z; - - public NewForce() - { - } } - [Serializable] - public class ScenePartUpdate : ISerializable + public class ScenePartUpdate { public UUID FullID; public uint LastFullUpdateTime; @@ -2848,37 +2841,6 @@ namespace OpenSim.Region.Framework.Scenes LastFullUpdateTime = 0; LastTerseUpdateTime = 0; } - - protected ScenePartUpdate(SerializationInfo info, StreamingContext context) - { - //m_log.Debug("ScenePartUpdate Deserialize BGN"); - - if (info == null) - { - throw new ArgumentNullException("info"); - } - - FullID = new UUID((Guid)info.GetValue("FullID", typeof(Guid))); - LastFullUpdateTime = (uint)info.GetValue("LastFullUpdateTime", typeof(uint)); - LastTerseUpdateTime = (uint)info.GetValue("LastTerseUpdateTime", typeof(uint)); - - //m_log.Debug("ScenePartUpdate Deserialize END"); - } - - [SecurityPermission(SecurityAction.LinkDemand, - Flags = SecurityPermissionFlag.SerializationFormatter)] - public virtual void GetObjectData( - SerializationInfo info, StreamingContext context) - { - if (info == null) - { - throw new ArgumentNullException("info"); - } - - info.AddValue("FullID", FullID.Guid); - info.AddValue("LastFullUpdateTime", LastFullUpdateTime); - info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime); - } } public override void SetText(string text, Vector3 color, double alpha) @@ -2992,13 +2954,6 @@ namespace OpenSim.Region.Framework.Scenes public ScenePresence() { -/* JB - if (Animations == null) - { - Animations = new AvatarAnimations(); - Animations.LoadAnims(); - } -*/ if (DefaultTexture == null) { Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); @@ -3116,310 +3071,6 @@ namespace OpenSim.Region.Framework.Scenes */ } - protected ScenePresence(SerializationInfo info, StreamingContext context) - : base (info, context) - { - //m_log.Debug("ScenePresence Deserialize BGN"); - - if (info == null) - { - throw new ArgumentNullException("info"); - } -/* JB - if (Animations == null) - { - Animations = new AvatarAnimations(); - Animations.LoadAnims(); - } -*/ - if (DefaultTexture == null) - { - Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); - DefaultTexture = textu.ToBytes(); - } - - m_animations = (AnimationSet)info.GetValue("m_animations", typeof(AnimationSet)); - m_updateflag = (bool)info.GetValue("m_updateflag", typeof(bool)); - m_movementflag = (byte)info.GetValue("m_movementflag", typeof(byte)); - m_forcesList = (List)info.GetValue("m_forcesList", typeof(List)); - m_updateCount = (short)info.GetValue("m_updateCount", typeof(short)); - m_requestedSitTargetID = (uint)info.GetValue("m_requestedSitTargetID", typeof(uint)); - - m_requestedSitOffset - = new Vector3( - (float)info.GetValue("m_requestedSitOffset.X", typeof(float)), - (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)), - (float)info.GetValue("m_requestedSitOffset.Z", typeof(float))); - - m_sitAvatarHeight = (float)info.GetValue("m_sitAvatarHeight", typeof(float)); - m_godlevel = (float)info.GetValue("m_godlevel", typeof(float)); - m_setAlwaysRun = (bool)info.GetValue("m_setAlwaysRun", typeof(bool)); - - m_bodyRot - = new Quaternion( - (float)info.GetValue("m_bodyRot.X", typeof(float)), - (float)info.GetValue("m_bodyRot.Y", typeof(float)), - (float)info.GetValue("m_bodyRot.Z", typeof(float)), - (float)info.GetValue("m_bodyRot.W", typeof(float))); - - IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool)); - m_newForce = (bool)info.GetValue("m_newForce", typeof(bool)); - //m_newAvatar = (bool)info.GetValue("m_newAvatar", typeof(bool)); - m_newCoarseLocations = (bool)info.GetValue("m_newCoarseLocations", typeof(bool)); - m_avHeight = (float)info.GetValue("m_avHeight", typeof(float)); - crossingFromRegion = (ulong)info.GetValue("crossingFromRegion", typeof(ulong)); - - List Dir_Vectors_work = (List)info.GetValue("Dir_Vectors", typeof(List)); - List Dir_Vectors_work2 = new List(); - - foreach (float[] f3 in Dir_Vectors_work) - { - Dir_Vectors_work2.Add(new Vector3(f3[0], f3[1], f3[2])); - } - - Dir_Vectors = Dir_Vectors_work2.ToArray(); - - lastPhysPos - = new Vector3( - (float)info.GetValue("lastPhysPos.X", typeof(float)), - (float)info.GetValue("lastPhysPos.Y", typeof(float)), - (float)info.GetValue("lastPhysPos.Z", typeof(float))); - - // Possibly we should store lastPhysRot. But there may well be not much point since rotation changes - // wouldn't carry us across borders anyway - - m_CameraCenter - = new Vector3( - (float)info.GetValue("m_CameraCenter.X", typeof(float)), - (float)info.GetValue("m_CameraCenter.Y", typeof(float)), - (float)info.GetValue("m_CameraCenter.Z", typeof(float))); - - m_CameraAtAxis - = new Vector3( - (float)info.GetValue("m_CameraAtAxis.X", typeof(float)), - (float)info.GetValue("m_CameraAtAxis.Y", typeof(float)), - (float)info.GetValue("m_CameraAtAxis.Z", typeof(float))); - - m_CameraLeftAxis - = new Vector3( - (float)info.GetValue("m_CameraLeftAxis.X", typeof(float)), - (float)info.GetValue("m_CameraLeftAxis.Y", typeof(float)), - (float)info.GetValue("m_CameraLeftAxis.Z", typeof(float))); - - m_CameraUpAxis - = new Vector3( - (float)info.GetValue("m_CameraUpAxis.X", typeof(float)), - (float)info.GetValue("m_CameraUpAxis.Y", typeof(float)), - (float)info.GetValue("m_CameraUpAxis.Z", typeof(float))); - - m_DrawDistance = (float)info.GetValue("m_DrawDistance", typeof(float)); - m_appearance = (AvatarAppearance)info.GetValue("m_appearance", typeof(AvatarAppearance)); - - m_knownChildRegions = (Dictionary)info.GetValue("m_knownChildRegions", typeof(Dictionary)); - - posLastSignificantMove - = new Vector3( - (float)info.GetValue("posLastSignificantMove.X", typeof(float)), - (float)info.GetValue("posLastSignificantMove.Y", typeof(float)), - (float)info.GetValue("posLastSignificantMove.Z", typeof(float))); - - // m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue)); - - /* - Dictionary updateTimes_work - = (Dictionary)info.GetValue("m_updateTimes", typeof(Dictionary)); - - foreach (Guid id in updateTimes_work.Keys) - { - m_updateTimes.Add(new UUID(id), updateTimes_work[id]); - } - */ - m_regionHandle = (ulong)info.GetValue("m_regionHandle", typeof(ulong)); - m_firstname = (string)info.GetValue("m_firstname", typeof(string)); - m_lastname = (string)info.GetValue("m_lastname", typeof(string)); - m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool)); - m_parentPosition = new Vector3((float)info.GetValue("m_parentPosition.X", typeof(float)), - (float)info.GetValue("m_parentPosition.Y", typeof(float)), - (float)info.GetValue("m_parentPosition.Z", typeof(float))); - - m_isChildAgent = (bool)info.GetValue("m_isChildAgent", typeof(bool)); - m_parentID = (uint)info.GetValue("m_parentID", typeof(uint)); - -// for OpenSim_v0.5 - currentParcelUUID = new UUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid))); - - lastKnownAllowedPosition - = new Vector3( - (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)), - (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)), - (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float))); - - sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool)); - - m_LastChildAgentUpdatePosition - = new Vector3( - (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)), - (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)), - (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float))); - - m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int)); - m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint)); - - m_headrotation - = new Quaternion( - (float)info.GetValue("m_headrotation.X", typeof(float)), - (float)info.GetValue("m_headrotation.Y", typeof(float)), - (float)info.GetValue("m_headrotation.Z", typeof(float)), - (float)info.GetValue("m_headrotation.W", typeof(float))); - - m_state = (byte)info.GetValue("m_state", typeof(byte)); - - //m_log.Debug("ScenePresence Deserialize END"); - } - - [SecurityPermission(SecurityAction.LinkDemand, - Flags = SecurityPermissionFlag.SerializationFormatter)] - public override void GetObjectData( - SerializationInfo info, StreamingContext context) - { - if (info == null) - { - throw new ArgumentNullException("info"); - } - - base.GetObjectData(info, context); - - info.AddValue("m_animations", m_animations); - info.AddValue("m_updateflag", m_updateflag); - info.AddValue("m_movementflag", m_movementflag); - info.AddValue("m_forcesList", m_forcesList); - info.AddValue("m_updateCount", m_updateCount); - info.AddValue("m_requestedSitTargetID", m_requestedSitTargetID); - - // Vector3 - info.AddValue("m_requestedSitOffset.X", m_requestedSitOffset.X); - info.AddValue("m_requestedSitOffset.Y", m_requestedSitOffset.Y); - info.AddValue("m_requestedSitOffset.Z", m_requestedSitOffset.Z); - - info.AddValue("m_sitAvatarHeight", m_sitAvatarHeight); - info.AddValue("m_godlevel", m_godlevel); - info.AddValue("m_setAlwaysRun", m_setAlwaysRun); - - // Quaternion - info.AddValue("m_bodyRot.X", m_bodyRot.X); - info.AddValue("m_bodyRot.Y", m_bodyRot.Y); - info.AddValue("m_bodyRot.Z", m_bodyRot.Z); - info.AddValue("m_bodyRot.W", m_bodyRot.W); - - info.AddValue("IsRestrictedToRegion", IsRestrictedToRegion); - info.AddValue("m_newForce", m_newForce); - //info.AddValue("m_newAvatar", m_newAvatar); - info.AddValue("m_newCoarseLocations", m_newCoarseLocations); - info.AddValue("m_gotAPrimitivesInScene", false); - info.AddValue("m_avHeight", m_avHeight); - - // info.AddValue("m_regionInfo", m_regionInfo); - - info.AddValue("crossingFromRegion", crossingFromRegion); - - List Dir_Vectors_work = new List(); - - foreach (Vector3 v3 in Dir_Vectors) - { - Dir_Vectors_work.Add(new float[] { v3.X, v3.Y, v3.Z }); - } - - info.AddValue("Dir_Vectors", Dir_Vectors_work); - - // Vector3 - info.AddValue("lastPhysPos.X", lastPhysPos.X); - info.AddValue("lastPhysPos.Y", lastPhysPos.Y); - info.AddValue("lastPhysPos.Z", lastPhysPos.Z); - - // Possibly we should retrieve lastPhysRot. But there may well be not much point since rotation changes - // wouldn't carry us across borders anyway - - // Vector3 - info.AddValue("m_CameraCenter.X", m_CameraCenter.X); - info.AddValue("m_CameraCenter.Y", m_CameraCenter.Y); - info.AddValue("m_CameraCenter.Z", m_CameraCenter.Z); - - // Vector3 - info.AddValue("m_CameraAtAxis.X", m_CameraAtAxis.X); - info.AddValue("m_CameraAtAxis.Y", m_CameraAtAxis.Y); - info.AddValue("m_CameraAtAxis.Z", m_CameraAtAxis.Z); - - // Vector3 - info.AddValue("m_CameraLeftAxis.X", m_CameraLeftAxis.X); - info.AddValue("m_CameraLeftAxis.Y", m_CameraLeftAxis.Y); - info.AddValue("m_CameraLeftAxis.Z", m_CameraLeftAxis.Z); - - // Vector3 - info.AddValue("m_CameraUpAxis.X", m_CameraUpAxis.X); - info.AddValue("m_CameraUpAxis.Y", m_CameraUpAxis.Y); - info.AddValue("m_CameraUpAxis.Z", m_CameraUpAxis.Z); - - info.AddValue("m_DrawDistance", m_DrawDistance); - info.AddValue("m_appearance", m_appearance); - info.AddValue("m_knownChildRegions", m_knownChildRegions); - - // Vector3 - info.AddValue("posLastSignificantMove.X", posLastSignificantMove.X); - info.AddValue("posLastSignificantMove.Y", posLastSignificantMove.Y); - info.AddValue("posLastSignificantMove.Z", posLastSignificantMove.Z); - - //info.AddValue("m_partsUpdateQueue", m_partsUpdateQueue); - - /* - Dictionary updateTimes_work = new Dictionary(); - - foreach (UUID id in m_updateTimes.Keys) - { - updateTimes_work.Add(id.UUID, m_updateTimes[id]); - } - - info.AddValue("m_updateTimes", updateTimes_work); - */ - - info.AddValue("m_regionHandle", m_regionHandle); - info.AddValue("m_firstname", m_firstname); - info.AddValue("m_lastname", m_lastname); - info.AddValue("m_allowMovement", m_allowMovement); - //info.AddValue("m_physicsActor", m_physicsActor); - info.AddValue("m_parentPosition.X", m_parentPosition.X); - info.AddValue("m_parentPosition.Y", m_parentPosition.Y); - info.AddValue("m_parentPosition.Z", m_parentPosition.Z); - info.AddValue("m_isChildAgent", m_isChildAgent); - info.AddValue("m_parentID", m_parentID); - -// for OpenSim_v0.5 - info.AddValue("currentParcelUUID", currentParcelUUID.Guid); - - info.AddValue("lastKnownAllowedPosition.X", lastKnownAllowedPosition.X); - info.AddValue("lastKnownAllowedPosition.Y", lastKnownAllowedPosition.Y); - info.AddValue("lastKnownAllowedPosition.Z", lastKnownAllowedPosition.Z); - - info.AddValue("sentMessageAboutRestrictedParcelFlyingDown", sentMessageAboutRestrictedParcelFlyingDown); - - info.AddValue("m_LastChildAgentUpdatePosition.X", m_LastChildAgentUpdatePosition.X); - info.AddValue("m_LastChildAgentUpdatePosition.Y", m_LastChildAgentUpdatePosition.Y); - info.AddValue("m_LastChildAgentUpdatePosition.Z", m_LastChildAgentUpdatePosition.Z); - - info.AddValue("m_perfMonMS", m_perfMonMS); - info.AddValue("m_AgentControlFlags", m_AgentControlFlags); - - info.AddValue("m_headrotation.W", m_headrotation.W); - info.AddValue("m_headrotation.X", m_headrotation.X); - info.AddValue("m_headrotation.Y", m_headrotation.Y); - info.AddValue("m_headrotation.Z", m_headrotation.Z); - - info.AddValue("m_state", m_state); - - List knownPrimUUID_work = new List(); - - info.AddValue("m_knownPrimUUID", knownPrimUUID_work); - } - internal void PushForce(PhysicsVector impulse) { if (PhysicsActor != null) @@ -3514,7 +3165,6 @@ namespace OpenSim.Region.Framework.Scenes internal void SendControlToScripts(uint flags) { - ScriptControlled allflags = ScriptControlled.CONTROL_ZERO; if (MouseDown) @@ -3671,7 +3321,6 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart att = m_scene.GetSceneObjectPart(asset); - // If this is null, then the asset has not yet appeared in world // so we revisit this when it does // -- cgit v1.1