diff --git a/libsecondlife/Avatar.cs b/libsecondlife/Avatar.cs
index 6fb60f6e..b8e55ef1 100644
--- a/libsecondlife/Avatar.cs
+++ b/libsecondlife/Avatar.cs
@@ -228,8 +228,6 @@ namespace libsecondlife
/// Groups that this avatar is a member of
public List Groups = new List();
- /// Online status
- public bool Online = false;
/// Positive and negative ratings
public Statistics ProfileStatistics = new Statistics();
/// Avatar properties including about text, profile URL, image IDs and
diff --git a/libsecondlife/ObjectManager.cs b/libsecondlife/ObjectManager.cs
index 47511df3..98c0f1ce 100644
--- a/libsecondlife/ObjectManager.cs
+++ b/libsecondlife/ObjectManager.cs
@@ -1557,8 +1557,7 @@ namespace libsecondlife
SetAvatarSittingOn(simulator, avatar, block.ParentID, oldSeatID);
- // Set this avatar online and in a region
- avatar.Online = true;
+ // Set the current simulator for this avatar
avatar.CurrentSim = simulator;
// Textures
diff --git a/libsecondlife/ParticleSystem.cs b/libsecondlife/ParticleSystem.cs
index e23e4736..673cb898 100644
--- a/libsecondlife/ParticleSystem.cs
+++ b/libsecondlife/ParticleSystem.cs
@@ -114,7 +114,7 @@ namespace libsecondlife
public ParticleSystem(byte[] data, int pos)
{
// TODO: Not sure exactly how many bytes we need here, so partial
- // (but truncated) data will cause an exception to be thrown
+ // (truncated) data will cause an exception to be thrown
if (data.Length > 0)
{
BitPack pack = new BitPack(data, pos);
diff --git a/libsecondlife/Prims.cs b/libsecondlife/Prims.cs
index 95e6be19..685cd5f6 100644
--- a/libsecondlife/Prims.cs
+++ b/libsecondlife/Prims.cs
@@ -267,6 +267,8 @@ namespace libsecondlife
///
public LLColor Color;
///
+ public float Intensity;
+ ///
public float Radius;
///
public float Cutoff;
@@ -280,19 +282,24 @@ namespace libsecondlife
///
public LightData(byte[] data, int pos)
{
- if (data.Length >= 16)
+ if (data.Length - pos >= 16)
{
- Color = new LLColor(data, 0, false);
- Radius = Helpers.BytesToFloat(data, 4);
- Cutoff = Helpers.BytesToFloat(data, 8);
- Falloff = Helpers.BytesToFloat(data, 12);
+ Color = new LLColor(data, pos, false);
+ Radius = Helpers.BytesToFloat(data, pos + 4);
+ Cutoff = Helpers.BytesToFloat(data, pos + 8);
+ Falloff = Helpers.BytesToFloat(data, pos + 12);
+
+ // Alpha in color is actually intensity
+ Intensity = Color.A;
+ Color.A = 1f;
}
else
{
Color = LLColor.Black;
- Radius = 0.0f;
- Cutoff = 0.0f;
- Falloff = 0.0f;
+ Radius = 0f;
+ Cutoff = 0f;
+ Falloff = 0f;
+ Intensity = 0f;
}
}
@@ -304,13 +311,26 @@ namespace libsecondlife
{
byte[] data = new byte[16];
- Color.GetBytes().CopyTo(data, 0);
+ // Alpha channel in color is intensity
+ LLColor tmpColor = Color;
+ tmpColor.A = Intensity;
+ tmpColor.GetBytes().CopyTo(data, 0);
Helpers.FloatToBytes(Radius).CopyTo(data, 4);
Helpers.FloatToBytes(Cutoff).CopyTo(data, 8);
Helpers.FloatToBytes(Falloff).CopyTo(data, 12);
return data;
}
+
+ ///
+ ///
+ ///
+ ///
+ public override string ToString()
+ {
+ return String.Format("Color: {0} Intensity: {1} Radius: {2} Cutoff: {3} Falloff: {4}",
+ Color, Intensity, Radius, Cutoff, Falloff);
+ }
}
///
diff --git a/libsecondlife/examples/TestClient/Commands/Prims/PrimInfoCommand.cs b/libsecondlife/examples/TestClient/Commands/Prims/PrimInfoCommand.cs
index 888b919d..1620851d 100644
--- a/libsecondlife/examples/TestClient/Commands/Prims/PrimInfoCommand.cs
+++ b/libsecondlife/examples/TestClient/Commands/Prims/PrimInfoCommand.cs
@@ -21,14 +21,16 @@ namespace libsecondlife.TestClient
if (LLUUID.TryParse(args[0], out primID))
{
Primitive target = Client.Network.CurrentSim.Objects.Find(
- delegate(Primitive prim)
- {
- return prim.ID == primID;
- }
+ delegate(Primitive prim) { return prim.ID == primID; }
);
if (target != null)
{
+ Client.Log("Light: " + target.Light.ToString(), Helpers.LogLevel.Info);
+
+ if (target.ParticleSys.CRC != 0)
+ Client.Log("Particles: " + target.ParticleSys.ToString(), Helpers.LogLevel.Info);
+
Client.Log("TextureEntry:", Helpers.LogLevel.Info);
if (target.Textures != null)
{