Merge branch 'avination' into careminster

avinationmerge
Melanie 2013-01-16 15:50:34 +00:00
commit 9910c5f8e1
3 changed files with 39 additions and 6 deletions

View File

@ -157,6 +157,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
availableMethods["admin_acl_remove"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListRemove);
availableMethods["admin_acl_list"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListList);
// Misc
availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch);
// Either enable full remote functionality or just selected features
string enabledMethods = m_config.GetString("enabled_methods", "all");
@ -1948,6 +1951,32 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = true;
}
private void XmlRpcRefreshSearch(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)
{
m_log.Info("[RADMIN]: Received Refresh Search Request");
Hashtable responseData = (Hashtable)response.Value;
Hashtable requestData = (Hashtable)request.Params[0];
CheckRegionParams(requestData, responseData);
Scene scene = null;
GetSceneFromRegionParams(requestData, responseData, out scene);
ISearchModule searchModule = scene.RequestModuleInterface<ISearchModule>();
if (searchModule != null)
{
searchModule.Refresh();
responseData["success"] = true;
}
else
{
responseData["success"] = false;
}
m_log.Info("[RADMIN]: Refresh Search Request complete");
}
/// <summary>
/// Parse a float with the given parameter name from a request data hash table.
/// </summary>

View File

@ -31,6 +31,6 @@ namespace OpenSim.Framework
{
public interface ISearchModule
{
void Refresh();
}
}

View File

@ -2282,7 +2282,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return end;
}
protected LSL_Vector GetSetPosTarget(SceneObjectPart part, LSL_Vector targetPos, LSL_Vector fromPos)
protected LSL_Vector GetSetPosTarget(SceneObjectPart part, LSL_Vector targetPos, LSL_Vector fromPos, bool adjust)
{
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return fromPos;
@ -2298,9 +2298,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if ((targetPos.z < ground) && disable_underground_movement && m_host.ParentGroup.AttachmentPoint == 0)
targetPos.z = ground;
}
LSL_Vector real_vec = SetPosAdjust(fromPos, targetPos);
if (adjust)
return SetPosAdjust(fromPos, targetPos);
return real_vec;
return targetPos;
}
/// <summary>
@ -2315,7 +2316,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
LSL_Vector currentPos = GetPartLocalPos(part);
LSL_Vector toPos = GetSetPosTarget(part, targetPos, currentPos);
LSL_Vector toPos = GetSetPosTarget(part, targetPos, currentPos, adjust);
if (part.ParentGroup.RootPart == part)
@ -7940,7 +7941,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return null;
v=rules.GetVector3Item(idx++);
currentPosition = GetSetPosTarget(part, v, currentPosition);
if (part.IsRoot && !part.ParentGroup.IsAttachment)
currentPosition = GetSetPosTarget(part, v, currentPosition, true);
else
currentPosition = GetSetPosTarget(part, v, currentPosition, false);
positionChanged = true;
break;