aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs29
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISearchModule.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs14
3 files changed, 39 insertions, 6 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 3d80eb6..9f3844b 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -157,6 +157,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
157 availableMethods["admin_acl_remove"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListRemove); 157 availableMethods["admin_acl_remove"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListRemove);
158 availableMethods["admin_acl_list"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListList); 158 availableMethods["admin_acl_list"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListList);
159 159
160 // Misc
161 availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch);
162
160 // Either enable full remote functionality or just selected features 163 // Either enable full remote functionality or just selected features
161 string enabledMethods = m_config.GetString("enabled_methods", "all"); 164 string enabledMethods = m_config.GetString("enabled_methods", "all");
162 165
@@ -1948,6 +1951,32 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1948 responseData["success"] = true; 1951 responseData["success"] = true;
1949 } 1952 }
1950 1953
1954 private void XmlRpcRefreshSearch(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)
1955 {
1956 m_log.Info("[RADMIN]: Received Refresh Search Request");
1957
1958 Hashtable responseData = (Hashtable)response.Value;
1959 Hashtable requestData = (Hashtable)request.Params[0];
1960
1961 CheckRegionParams(requestData, responseData);
1962
1963 Scene scene = null;
1964 GetSceneFromRegionParams(requestData, responseData, out scene);
1965
1966 ISearchModule searchModule = scene.RequestModuleInterface<ISearchModule>();
1967 if (searchModule != null)
1968 {
1969 searchModule.Refresh();
1970 responseData["success"] = true;
1971 }
1972 else
1973 {
1974 responseData["success"] = false;
1975 }
1976
1977 m_log.Info("[RADMIN]: Refresh Search Request complete");
1978 }
1979
1951 /// <summary> 1980 /// <summary>
1952 /// Parse a float with the given parameter name from a request data hash table. 1981 /// Parse a float with the given parameter name from a request data hash table.
1953 /// </summary> 1982 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/ISearchModule.cs b/OpenSim/Region/Framework/Interfaces/ISearchModule.cs
index 64bf72c..d56d188 100644
--- a/OpenSim/Region/Framework/Interfaces/ISearchModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISearchModule.cs
@@ -31,6 +31,6 @@ namespace OpenSim.Framework
31{ 31{
32 public interface ISearchModule 32 public interface ISearchModule
33 { 33 {
34 34 void Refresh();
35 } 35 }
36} 36}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e83bbbb..da2a90f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2282,7 +2282,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2282 return end; 2282 return end;
2283 } 2283 }
2284 2284
2285 protected LSL_Vector GetSetPosTarget(SceneObjectPart part, LSL_Vector targetPos, LSL_Vector fromPos) 2285 protected LSL_Vector GetSetPosTarget(SceneObjectPart part, LSL_Vector targetPos, LSL_Vector fromPos, bool adjust)
2286 { 2286 {
2287 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) 2287 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
2288 return fromPos; 2288 return fromPos;
@@ -2298,9 +2298,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2298 if ((targetPos.z < ground) && disable_underground_movement && m_host.ParentGroup.AttachmentPoint == 0) 2298 if ((targetPos.z < ground) && disable_underground_movement && m_host.ParentGroup.AttachmentPoint == 0)
2299 targetPos.z = ground; 2299 targetPos.z = ground;
2300 } 2300 }
2301 LSL_Vector real_vec = SetPosAdjust(fromPos, targetPos); 2301 if (adjust)
2302 return SetPosAdjust(fromPos, targetPos);
2302 2303
2303 return real_vec; 2304 return targetPos;
2304 } 2305 }
2305 2306
2306 /// <summary> 2307 /// <summary>
@@ -2315,7 +2316,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2315 return; 2316 return;
2316 2317
2317 LSL_Vector currentPos = GetPartLocalPos(part); 2318 LSL_Vector currentPos = GetPartLocalPos(part);
2318 LSL_Vector toPos = GetSetPosTarget(part, targetPos, currentPos); 2319 LSL_Vector toPos = GetSetPosTarget(part, targetPos, currentPos, adjust);
2319 2320
2320 2321
2321 if (part.ParentGroup.RootPart == part) 2322 if (part.ParentGroup.RootPart == part)
@@ -7940,7 +7941,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7940 return null; 7941 return null;
7941 7942
7942 v=rules.GetVector3Item(idx++); 7943 v=rules.GetVector3Item(idx++);
7943 currentPosition = GetSetPosTarget(part, v, currentPosition); 7944 if (part.IsRoot && !part.ParentGroup.IsAttachment)
7945 currentPosition = GetSetPosTarget(part, v, currentPosition, true);
7946 else
7947 currentPosition = GetSetPosTarget(part, v, currentPosition, false);
7944 positionChanged = true; 7948 positionChanged = true;
7945 7949
7946 break; 7950 break;