Merge remote-tracking branch 'remotes/origin/avination' into teravuswork
commit
60eb0f36b3
|
@ -70,6 +70,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
|||
|
||||
private string m_name = "RemoteAdminPlugin";
|
||||
private string m_version = "0.0";
|
||||
private string m_openSimVersion;
|
||||
|
||||
public string Version
|
||||
{
|
||||
|
@ -89,6 +90,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
|||
|
||||
public void Initialise(OpenSimBase openSim)
|
||||
{
|
||||
m_openSimVersion = openSim.GetVersionText();
|
||||
|
||||
m_configSource = openSim.ConfigSource.Source;
|
||||
try
|
||||
{
|
||||
|
@ -159,6 +162,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
|||
|
||||
// Misc
|
||||
availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch);
|
||||
availableMethods["admin_get_opensim_version"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetOpenSimVersion);
|
||||
|
||||
// Either enable full remote functionality or just selected features
|
||||
string enabledMethods = m_config.GetString("enabled_methods", "all");
|
||||
|
@ -1977,6 +1981,18 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
|||
m_log.Info("[RADMIN]: Refresh Search Request complete");
|
||||
}
|
||||
|
||||
private void XmlRpcGetOpenSimVersion(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)
|
||||
{
|
||||
m_log.Info("[RADMIN]: Received Get OpenSim Version Request");
|
||||
|
||||
Hashtable responseData = (Hashtable)response.Value;
|
||||
|
||||
responseData["version"] = m_openSimVersion;
|
||||
responseData["success"] = true;
|
||||
|
||||
m_log.Info("[RADMIN]: Get OpenSim Version Request complete");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parse a float with the given parameter name from a request data hash table.
|
||||
/// </summary>
|
||||
|
|
|
@ -531,7 +531,7 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
}
|
||||
|
||||
protected string GetVersionText()
|
||||
public string GetVersionText()
|
||||
{
|
||||
return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion);
|
||||
}
|
||||
|
|
|
@ -402,14 +402,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
{
|
||||
// Record that this agent is in transit so that we can prevent simultaneous requests and do later detection
|
||||
// of whether the destination region completes the teleport.
|
||||
if (!m_entityTransferStateMachine.SetInTransit(sp.UUID))
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2} ({3}) {4}/{5} - agent is already in transit.",
|
||||
sp.Name, sp.UUID, reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position);
|
||||
|
||||
return;
|
||||
}
|
||||
m_entityTransferStateMachine.SetInTransit(sp.UUID);
|
||||
// if (!m_entityTransferStateMachine.SetInTransit(sp.UUID))
|
||||
// {
|
||||
// m_log.DebugFormat(
|
||||
// "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2} ({3}) {4}/{5} - agent is already in transit.",
|
||||
// sp.Name, sp.UUID, reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position);
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (reg == null || finalDestination == null)
|
||||
{
|
||||
|
|
|
@ -533,6 +533,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
|||
ResponseBody = e.Message;
|
||||
}
|
||||
|
||||
if (ResponseBody == null)
|
||||
ResponseBody = String.Empty;
|
||||
|
||||
_finished = true;
|
||||
return;
|
||||
}
|
||||
|
@ -546,6 +549,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
|||
response.Close();
|
||||
}
|
||||
|
||||
if (ResponseBody == null)
|
||||
ResponseBody = String.Empty;
|
||||
|
||||
_finished = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2065,11 +2065,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
EventManager.TriggerPrimsLoaded(this);
|
||||
}
|
||||
|
||||
public bool SuportsRayCastFiltered()
|
||||
public bool SupportsRayCastFiltered()
|
||||
{
|
||||
if (PhysicsScene == null)
|
||||
return false;
|
||||
return PhysicsScene.SuportsRaycastWorldFiltered();
|
||||
return PhysicsScene.SupportsRaycastWorldFiltered();
|
||||
}
|
||||
|
||||
public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter)
|
||||
|
|
|
@ -350,7 +350,7 @@ namespace OpenSim.Region.Physics.Manager
|
|||
return null;
|
||||
}
|
||||
|
||||
public virtual bool SuportsRaycastWorldFiltered()
|
||||
public virtual bool SupportsRaycastWorldFiltered()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2643,7 +2643,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
}
|
||||
|
||||
public override bool SuportsRaycastWorldFiltered()
|
||||
public override bool SupportsRaycastWorldFiltered()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -3018,16 +3018,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
|
||||
public LSL_Integer llGiveMoney(string destination, int amount)
|
||||
{
|
||||
Util.FireAndForget(x =>
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (m_item.PermsGranter == UUID.Zero)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0)
|
||||
{
|
||||
LSLError("No permissions to give money");
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
UUID toID = new UUID();
|
||||
|
@ -3035,7 +3037,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
if (!UUID.TryParse(destination, out toID))
|
||||
{
|
||||
LSLError("Bad key in llGiveMoney");
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
IMoneyModule money = World.RequestModuleInterface<IMoneyModule>();
|
||||
|
@ -3043,14 +3045,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
if (money == null)
|
||||
{
|
||||
NotImplemented("llGiveMoney");
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
bool result = money.ObjectGiveMoney(
|
||||
money.ObjectGiveMoney(
|
||||
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero);
|
||||
|
||||
if (result)
|
||||
return 1;
|
||||
});
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -7322,7 +7322,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
||||
if (xmlrpcMod.IsEnabled())
|
||||
if (xmlrpcMod != null && xmlrpcMod.IsEnabled())
|
||||
{
|
||||
UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero);
|
||||
IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>();
|
||||
|
@ -7354,6 +7354,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
m_host.AddScriptLPS(1);
|
||||
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
||||
ScriptSleep(3000);
|
||||
if (xmlrpcMod == null)
|
||||
return "";
|
||||
return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString();
|
||||
}
|
||||
|
||||
|
@ -7361,6 +7363,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
||||
if (xmlrpcMod != null)
|
||||
xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata);
|
||||
ScriptSleep(3000);
|
||||
}
|
||||
|
@ -7369,6 +7372,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
||||
if (xmlrpcMod != null)
|
||||
xmlrpcMod.CloseXMLRPCChannel((UUID)channel);
|
||||
ScriptSleep(1000);
|
||||
}
|
||||
|
@ -12207,7 +12211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL);
|
||||
|
||||
|
||||
if (World.SuportsRayCastFiltered())
|
||||
if (World.SupportsRayCastFiltered())
|
||||
{
|
||||
if (dist == 0)
|
||||
return list;
|
||||
|
@ -12270,13 +12274,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
else
|
||||
{
|
||||
if (checkTerrain)
|
||||
{
|
||||
ContactResult? groundContact = GroundIntersection(rayStart, rayEnd);
|
||||
if (groundContact != null)
|
||||
results.Add((ContactResult)groundContact);
|
||||
}
|
||||
|
||||
if (checkAgents)
|
||||
{
|
||||
ContactResult[] agentHits = AvatarIntersection(rayStart, rayEnd);
|
||||
|
@ -12292,6 +12289,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
}
|
||||
|
||||
// Double check this
|
||||
if (checkTerrain)
|
||||
{
|
||||
bool skipGroundCheck = false;
|
||||
|
||||
foreach (ContactResult c in results)
|
||||
{
|
||||
if (c.ConsumerID == 0) // Physics gave us a ground collision
|
||||
skipGroundCheck = true;
|
||||
}
|
||||
|
||||
if (!skipGroundCheck)
|
||||
{
|
||||
ContactResult? groundContact = GroundIntersection(rayStart, rayEnd);
|
||||
if (groundContact != null)
|
||||
results.Add((ContactResult)groundContact);
|
||||
}
|
||||
}
|
||||
|
||||
results.Sort(delegate(ContactResult a, ContactResult b)
|
||||
{
|
||||
return a.Depth.CompareTo(b.Depth);
|
||||
|
@ -12585,7 +12601,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
|
||||
bool result = money.ObjectGiveMoney(
|
||||
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero);
|
||||
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn);
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue