From f81c491725cbb9730ed017c1e4c96b204ae35473 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 18 Mar 2008 11:32:44 +0000 Subject: [PATCH] Patch from DrSchofld (IBM). In his own words structs (such as LLUUID) are considered values by mono. comparing them against null makes no sense and the mono compiler will flag that as evaluating to always false --- except if "cleverly" disguised. the attached patch fixes such an occurrence in OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs. [yes, i'm on a crusade against comparing structs against null, go ask jradford from libsl ;-)] --- .../ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index f6614b04cb..8fea3a3b1c 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs @@ -257,12 +257,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin if (ang_obj > ts.arc) keep = false; } - if (keep && (!ts.keyID.Equals(null)) && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) + if (keep && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) { keep = false; } - if (keep&& (ts.name.Length > 0)) + if (keep && (ts.name.Length > 0)) { string avatarname=null; string objectname=null;