diff --git a/libsecondlife-cs/ParticleSystem.cs b/libsecondlife-cs/ParticleSystem.cs index 83e84afa..3cb67f13 100644 --- a/libsecondlife-cs/ParticleSystem.cs +++ b/libsecondlife-cs/ParticleSystem.cs @@ -123,20 +123,6 @@ namespace libsecondlife return bytes; } - /// - /// - /// - /// - /// - public string GetXml(string name) - { - string xml = ""; - // FIXME: Finish ParticleSystem.GetXml() - xml += ""; - - return xml; - } - /// /// /// diff --git a/libsecondlife-cs/Prims.cs b/libsecondlife-cs/Prims.cs index e9201ec8..65f55b95 100644 --- a/libsecondlife-cs/Prims.cs +++ b/libsecondlife-cs/Prims.cs @@ -29,6 +29,43 @@ using System.Xml; namespace libsecondlife { + /// + /// Primary parameters for primitives such as Physics Enabled or Phantom + /// + [Flags] + public enum ObjectFlags + { + /// None of the primary flags are enabled + None = 0, + /// Whether physics are enabled for this object + Physics = 1 << 0, + /// + CreateSelected = 1 << 1, + /// + Script = 1 << 6, + /// Whether this object contains an active touch script + Touch = 1 << 7, + /// Whether this object can receive payments + Money = 1 << 9, + /// Whether this object is phantom (no collisions) + Phantom = 1 << 10, + /// Whether this object is temporary + Temp = 1 << 30 + } + + /// + /// Extra parameters for primitives, these flags are for features that have + /// been added after the original ObjectFlags that has all eight bits + /// reserved already + /// + public enum ExtraParamType : ushort + { + /// Whether this object has flexible parameters + Flexible = 0x10, + /// Whether this object has light parameters + Light = 0x20 + } + /// /// /// @@ -409,73 +446,6 @@ namespace libsecondlife return totalLength; } - /// - /// - /// - /// - public string GetXml() - { - string xml = ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += Position.GetXml("Position"); - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += Scale.GetXml("Scale"); - xml += ""; - xml += ""; - xml += ""; - xml += Rotation.GetXml("Rotation"); - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += Textures.GetXml("Textures"); - xml += TextureAnim.GetXml("TextureAnim"); - xml += Flexible.GetXml("Flexible"); - xml += Light.GetXml("Light"); - xml += ParticleSys.GetXml("ParticleSys"); - xml += ""; - - return xml; - } - - /// - /// - /// - /// - /// - /// - public static PrimObject FromXml(SecondLife client, XmlNode node) - { - PrimObject prim = new PrimObject(client); - - foreach (XmlNode childNode in node.ChildNodes) - { - ; - } - - return prim; - } - public override string ToString() { string output = ""; @@ -495,31 +465,6 @@ namespace libsecondlife } } - /// - /// - /// - [Flags] - public enum ObjectFlags - { - None = 0, - Physics = 1 << 0, - CreateSelected = 1 << 1, - Script = 1 << 6, - Touch = 1 << 7, - Money = 1 << 9, - Phantom = 1 << 10, - Temp = 1 << 30 - } - - /// - /// - /// - public enum ExtraParamType : ushort - { - Flexible = 0x10, - Light = 0x20 - } - /// /// /// @@ -589,34 +534,6 @@ namespace libsecondlife Wind = data[i++] / 10.0f; Force = new LLVector3(data, i); } - - /// - /// - /// - /// - /// - public string GetXml(string name) - { - string xml = "<" + name + ">"; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - - return xml; - } - - /// - /// - /// - /// - /// - public static PrimFlexibleData FromXml(XmlNode node) - { - return null; - } } /// @@ -676,33 +593,6 @@ namespace libsecondlife return data; } - /// - /// - /// - /// - /// - public string GetXml(string name) - { - string xml = "<" + name + ">"; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - - return xml; - } - - /// - /// - /// - /// - /// - public static PrimLightData FromXml(XmlNode node) - { - return null; - } - private void FromBytes(byte[] data, int pos) { int i = pos; diff --git a/libsecondlife-cs/Textures.cs b/libsecondlife-cs/Textures.cs index 6a363116..1a62f9ee 100644 --- a/libsecondlife-cs/Textures.cs +++ b/libsecondlife-cs/Textures.cs @@ -342,20 +342,6 @@ namespace libsecondlife return bytes; } - /// - /// - /// - /// - /// - public string GetXml(string name) - { - string xml = ""; - // FIXME: Write GetXml for TextureEntry - xml += ""; - - return xml; - } - private bool ReadFaceBitfield(byte[] data, ref int pos, ref uint faceBits, ref uint bitfieldSize) { faceBits = 0; @@ -820,26 +806,6 @@ namespace libsecondlife return bytes; } - /// - /// - /// - /// - /// - public string GetXml(string name) - { - string xml = ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - xml += ""; - - return xml; - } - private void FromBytes(byte[] data, int pos) { int i = pos; diff --git a/libsecondlife-cs/Types.cs b/libsecondlife-cs/Types.cs index 3f8f6f84..8b6de1b2 100644 --- a/libsecondlife-cs/Types.cs +++ b/libsecondlife-cs/Types.cs @@ -346,16 +346,6 @@ namespace libsecondlife return byteArray; } - /// - /// Convert to a single xml node - /// - /// The desired name of the xml node - /// A line of xml data containing the values for this data type - public string GetXml(string name) - { - return "<" + name + " x=\"" + X + "\" y=\"" + Y + "\" z=\"" + Z + "\" />"; - } - /// /// /// @@ -756,16 +746,6 @@ namespace libsecondlife return bytes; } - /// - /// Convert to a single xml node - /// - /// The desired name of the xml node - /// A line of xml data containing the values for this data type - public string GetXml(string name) - { - return "<" + name + " x=\"" + X + "\" y=\"" + Y + "\" z=\"" + Z + "\" w=\"" + W + "\" />"; - } - public override int GetHashCode() { float sum = X + Y + Z + W; diff --git a/libsecondlife-cs/examples/TestClient/Commands/FollowCommand.cs b/libsecondlife-cs/examples/TestClient/Commands/FollowCommand.cs index eae2a9fa..e7c3185e 100644 --- a/libsecondlife-cs/examples/TestClient/Commands/FollowCommand.cs +++ b/libsecondlife-cs/examples/TestClient/Commands/FollowCommand.cs @@ -17,17 +17,24 @@ namespace libsecondlife.TestClient public override string Execute(SecondLife Client, string[] args, LLUUID fromAgentID) { string target = String.Empty; - for (int ct = 0; ct < args.Length;ct++) + for (int ct = 0; ct < args.Length; ct++) target = target + args[ct] + " "; target = target.TrimEnd(); if (target.Length == 0) target = TestClient.Master; - - if (Follow(target)) - return "Following " + target; - else - return "Unable to follow " + target + ". Client may not be able to see that avatar."; + + if (target.Length > 0) + { + if (Follow(target)) + return "Following " + target; + else + return "Unable to follow " + target + ". Client may not be able to see that avatar."; + } + else + { + return "No target specified and no master is set. usage: follow [FirstName LastName])"; + } } const float DISTANCE_BUFFER = 3.0f; diff --git a/libsecondlife-cs/examples/TestClient/Commands/SitCommand.cs b/libsecondlife-cs/examples/TestClient/Commands/SitCommand.cs index 06a76a16..366baafc 100644 --- a/libsecondlife-cs/examples/TestClient/Commands/SitCommand.cs +++ b/libsecondlife-cs/examples/TestClient/Commands/SitCommand.cs @@ -22,7 +22,7 @@ namespace libsecondlife.TestClient sitPacket.AgentData.SessionID = Client.Network.SessionID; sitPacket.TargetObject.TargetID = target; - sitPacket.TargetObject.Offset = new LLVector3(); + sitPacket.TargetObject.Offset = LLVector3.Zero; Client.Network.SendPacket(sitPacket); diff --git a/libsecondlife-cs/examples/primexport/frmPrimExport.cs b/libsecondlife-cs/examples/primexport/frmPrimExport.cs index 9cba3372..4a1cc851 100644 --- a/libsecondlife-cs/examples/primexport/frmPrimExport.cs +++ b/libsecondlife-cs/examples/primexport/frmPrimExport.cs @@ -544,7 +544,8 @@ namespace primexport // This prim is part of a linkset, we need to adjust it's position and rotation if (Prims.ContainsKey(prim.ParentID)) { - stream.WriteLine(prim.GetXml()); + // FIXME: Rewrite this when the xml serialization stuff is complete + //stream.WriteLine(prim.GetXml()); } else if (Avatars.Contains(prim.ParentID) || Attachments.Contains(prim.ParentID)) {