diff options
author | Charles Krinke | 2008-10-08 01:44:35 +0000 |
---|---|---|
committer | Charles Krinke | 2008-10-08 01:44:35 +0000 |
commit | e87195d1bdf572875d622540cf0e1326eda8d105 (patch) | |
tree | 2233b28c6ce19028e9e48ce7487f4fc89a1d6679 /OpenSim | |
parent | Fix friendly errors in DNE as well (diff) | |
download | opensim-SC-e87195d1bdf572875d622540cf0e1326eda8d105.zip opensim-SC-e87195d1bdf572875d622540cf0e1326eda8d105.tar.gz opensim-SC-e87195d1bdf572875d622540cf0e1326eda8d105.tar.bz2 opensim-SC-e87195d1bdf572875d622540cf0e1326eda8d105.tar.xz |
Mantis#1906. Thank you kindly, Idb for a patch that:
Removed cache accesses to obtain sensed object/avatar
name, it is already available.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 9b0bc5b..c4240d8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -237,24 +237,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
237 | 237 | ||
238 | if (keep && (ts.name.Length > 0)) | 238 | if (keep && (ts.name.Length > 0)) |
239 | { | 239 | { |
240 | string avatarname=null; | 240 | if (ts.name != ent.Name) |
241 | string objectname=null; | ||
242 | string entname =ent.Name; | ||
243 | |||
244 | // try avatar username surname | ||
245 | CachedUserInfo profile = m_CmdManager.m_ScriptEngine.World.CommsManager.UserProfileCacheService.GetUserDetails(ent.UUID); | ||
246 | if (profile != null && profile.UserProfile != null) | ||
247 | { | ||
248 | avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; | ||
249 | } | ||
250 | // try an scene object | ||
251 | SceneObjectPart SOP = m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart(ent.UUID); | ||
252 | if (SOP != null) | ||
253 | { | ||
254 | objectname = SOP.Name; | ||
255 | } | ||
256 | |||
257 | if ((ts.name != entname) && (ts.name != avatarname) && (ts.name != objectname)) | ||
258 | { | 241 | { |
259 | keep = false; | 242 | keep = false; |
260 | } | 243 | } |