From 0c0a29cf7392c042810d94ec9cb3f16375a9899d Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Tue, 21 Jul 2009 23:53:01 +0000 Subject: [PATCH] LIBOMV-585 Re-implements ObjectSelect trigger when we receive a primitive with the CreateSelected flag set. * Fixed NullReference exception in TestClient PrimInfoCommand which was being thrown when a primitive was sent with no light data. git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3011 52acb1d6-8a22-11de-b505-999d5b087335 --- OpenMetaverse/ObjectManager.cs | 6 ++++++ .../examples/TestClient/Commands/Prims/PrimInfoCommand.cs | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenMetaverse/ObjectManager.cs b/OpenMetaverse/ObjectManager.cs index 20c19acf..a924df7a 100644 --- a/OpenMetaverse/ObjectManager.cs +++ b/OpenMetaverse/ObjectManager.cs @@ -1725,6 +1725,12 @@ namespace OpenMetaverse continue; } + // Automatically request ObjectProperties for prim if it was rezzed selected. + if ((prim.Flags & PrimFlags.CreateSelected) != 0) + { + SelectObject(simulator, prim.LocalID); + } + prim.NameValues = nameValues; prim.LocalID = block.ID; prim.ID = block.FullID; diff --git a/Programs/examples/TestClient/Commands/Prims/PrimInfoCommand.cs b/Programs/examples/TestClient/Commands/Prims/PrimInfoCommand.cs index 016b1aae..7600e0c7 100644 --- a/Programs/examples/TestClient/Commands/Prims/PrimInfoCommand.cs +++ b/Programs/examples/TestClient/Commands/Prims/PrimInfoCommand.cs @@ -27,7 +27,8 @@ namespace OpenMetaverse.TestClient if (target != null) { - Logger.Log("Light: " + target.Light.ToString(), Helpers.LogLevel.Info, Client); + if(target.Light != null) + Logger.Log("Light: " + target.Light.ToString(), Helpers.LogLevel.Info, Client); if (target.ParticleSys.CRC != 0) Logger.Log("Particles: " + target.ParticleSys.ToString(), Helpers.LogLevel.Info, Client);