aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs33
1 files changed, 29 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
index edf3fde..bff85af 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
@@ -236,7 +236,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
236 236
237 // Right type too, what about the other params , key and name ? 237 // Right type too, what about the other params , key and name ?
238 bool keep = true; 238 bool keep = true;
239 if (ts.arc != Math.PI) 239 if (ts.arc < Math.PI)
240 { 240 {
241 // not omni-directional. Can you see it ? 241 // not omni-directional. Can you see it ?
242 // vec forward_dir = llRot2Fwd(llGetRot()) 242 // vec forward_dir = llRot2Fwd(llGetRot())
@@ -261,15 +261,40 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
261 if (ang_obj > ts.arc) keep = false; 261 if (ang_obj > ts.arc) keep = false;
262 } 262 }
263 263
264 if (keep && (ts.name.Length > 0) && (ts.name != ent.Name)) 264
265 if (keep && (ts.keyID != null) && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID))
265 { 266 {
266 keep = false; 267 keep = false;
267 } 268 }
268 269
269 if (keep && (ts.keyID != null) && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) 270 if (keep&& (ts.name.Length > 0))
270 { 271 {
271 keep = false; 272 string avatarname=null;
273 string objectname=null;
274 string entname =ent.Name;
275
276 // try avatar username surname
277 UserProfileData profile = m_CmdManager.m_ScriptEngine.World.CommsManager.UserService.GetUserProfile(ent.UUID);
278 if (profile != null)
279 {
280 avatarname = profile.username + " " + profile.surname;
281 }
282 // try an scene object
283 SceneObjectPart SOP = m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart(ent.UUID);
284 if (SOP != null)
285 {
286 objectname = SOP.Name;
287 }
288
289
290 if ((ts.name != entname) && (ts.name != avatarname) && (ts.name != objectname))
291 {
292 keep = false;
293 }
294
295
272 } 296 }
297
273 if (keep == true) SensedObjects.Add(ent.UUID); 298 if (keep == true) SensedObjects.Add(ent.UUID);
274 } 299 }
275 } 300 }