diff options
author | teravus | 2013-01-26 07:23:16 -0500 |
---|---|---|
committer | teravus | 2013-01-26 07:23:16 -0500 |
commit | 60eb0f36b3e8146eec26aa83cff7d89782026d9d (patch) | |
tree | 726fd9aa4d47733f2596bfd032ce215f565117b3 /OpenSim/Region | |
parent | * Handle a NRE with Baked Textures that may result in a failed appearance. ... (diff) | |
parent | Make llGiveMoney async again. The return value is now the constant 1 to make (diff) | |
download | opensim-SC-60eb0f36b3e8146eec26aa83cff7d89782026d9d.zip opensim-SC-60eb0f36b3e8146eec26aa83cff7d89782026d9d.tar.gz opensim-SC-60eb0f36b3e8146eec26aa83cff7d89782026d9d.tar.bz2 opensim-SC-60eb0f36b3e8146eec26aa83cff7d89782026d9d.tar.xz |
Merge remote-tracking branch 'remotes/origin/avination' into teravuswork
Diffstat (limited to 'OpenSim/Region')
6 files changed, 72 insertions, 49 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 0c8a2b1..cb09047 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -402,14 +402,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
402 | { | 402 | { |
403 | // Record that this agent is in transit so that we can prevent simultaneous requests and do later detection | 403 | // Record that this agent is in transit so that we can prevent simultaneous requests and do later detection |
404 | // of whether the destination region completes the teleport. | 404 | // of whether the destination region completes the teleport. |
405 | if (!m_entityTransferStateMachine.SetInTransit(sp.UUID)) | 405 | m_entityTransferStateMachine.SetInTransit(sp.UUID); |
406 | { | 406 | // if (!m_entityTransferStateMachine.SetInTransit(sp.UUID)) |
407 | m_log.DebugFormat( | 407 | // { |
408 | "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2} ({3}) {4}/{5} - agent is already in transit.", | 408 | // m_log.DebugFormat( |
409 | sp.Name, sp.UUID, reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); | 409 | // "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2} ({3}) {4}/{5} - agent is already in transit.", |
410 | 410 | // sp.Name, sp.UUID, reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); | |
411 | return; | 411 | // |
412 | } | 412 | // return; |
413 | // } | ||
413 | 414 | ||
414 | if (reg == null || finalDestination == null) | 415 | if (reg == null || finalDestination == null) |
415 | { | 416 | { |
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 708b99d..0276267 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -533,6 +533,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
533 | ResponseBody = e.Message; | 533 | ResponseBody = e.Message; |
534 | } | 534 | } |
535 | 535 | ||
536 | if (ResponseBody == null) | ||
537 | ResponseBody = String.Empty; | ||
538 | |||
536 | _finished = true; | 539 | _finished = true; |
537 | return; | 540 | return; |
538 | } | 541 | } |
@@ -546,6 +549,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
546 | response.Close(); | 549 | response.Close(); |
547 | } | 550 | } |
548 | 551 | ||
552 | if (ResponseBody == null) | ||
553 | ResponseBody = String.Empty; | ||
554 | |||
549 | _finished = true; | 555 | _finished = true; |
550 | } | 556 | } |
551 | 557 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9d07537..e3bc8c7 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2065,11 +2065,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2065 | EventManager.TriggerPrimsLoaded(this); | 2065 | EventManager.TriggerPrimsLoaded(this); |
2066 | } | 2066 | } |
2067 | 2067 | ||
2068 | public bool SuportsRayCastFiltered() | 2068 | public bool SupportsRayCastFiltered() |
2069 | { | 2069 | { |
2070 | if (PhysicsScene == null) | 2070 | if (PhysicsScene == null) |
2071 | return false; | 2071 | return false; |
2072 | return PhysicsScene.SuportsRaycastWorldFiltered(); | 2072 | return PhysicsScene.SupportsRaycastWorldFiltered(); |
2073 | } | 2073 | } |
2074 | 2074 | ||
2075 | public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter) | 2075 | public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter) |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index d24ab2a..57e2d20 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -350,7 +350,7 @@ namespace OpenSim.Region.Physics.Manager | |||
350 | return null; | 350 | return null; |
351 | } | 351 | } |
352 | 352 | ||
353 | public virtual bool SuportsRaycastWorldFiltered() | 353 | public virtual bool SupportsRaycastWorldFiltered() |
354 | { | 354 | { |
355 | return false; | 355 | return false; |
356 | } | 356 | } |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs index 5113210..510cbe9 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | |||
@@ -2643,7 +2643,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2643 | } | 2643 | } |
2644 | } | 2644 | } |
2645 | 2645 | ||
2646 | public override bool SuportsRaycastWorldFiltered() | 2646 | public override bool SupportsRaycastWorldFiltered() |
2647 | { | 2647 | { |
2648 | return true; | 2648 | return true; |
2649 | } | 2649 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fcb68b2..53c6e5c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3019,38 +3019,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3019 | 3019 | ||
3020 | public LSL_Integer llGiveMoney(string destination, int amount) | 3020 | public LSL_Integer llGiveMoney(string destination, int amount) |
3021 | { | 3021 | { |
3022 | m_host.AddScriptLPS(1); | 3022 | Util.FireAndForget(x => |
3023 | |||
3024 | if (m_item.PermsGranter == UUID.Zero) | ||
3025 | return 0; | ||
3026 | |||
3027 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0) | ||
3028 | { | 3023 | { |
3029 | LSLError("No permissions to give money"); | 3024 | m_host.AddScriptLPS(1); |
3030 | return 0; | ||
3031 | } | ||
3032 | 3025 | ||
3033 | UUID toID = new UUID(); | 3026 | if (m_item.PermsGranter == UUID.Zero) |
3027 | return; | ||
3034 | 3028 | ||
3035 | if (!UUID.TryParse(destination, out toID)) | 3029 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0) |
3036 | { | 3030 | { |
3037 | LSLError("Bad key in llGiveMoney"); | 3031 | LSLError("No permissions to give money"); |
3038 | return 0; | 3032 | return; |
3039 | } | 3033 | } |
3040 | 3034 | ||
3041 | IMoneyModule money = World.RequestModuleInterface<IMoneyModule>(); | 3035 | UUID toID = new UUID(); |
3042 | 3036 | ||
3043 | if (money == null) | 3037 | if (!UUID.TryParse(destination, out toID)) |
3044 | { | 3038 | { |
3045 | NotImplemented("llGiveMoney"); | 3039 | LSLError("Bad key in llGiveMoney"); |
3046 | return 0; | 3040 | return; |
3047 | } | 3041 | } |
3048 | 3042 | ||
3049 | bool result = money.ObjectGiveMoney( | 3043 | IMoneyModule money = World.RequestModuleInterface<IMoneyModule>(); |
3050 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); | ||
3051 | 3044 | ||
3052 | if (result) | 3045 | if (money == null) |
3053 | return 1; | 3046 | { |
3047 | NotImplemented("llGiveMoney"); | ||
3048 | return; | ||
3049 | } | ||
3050 | |||
3051 | money.ObjectGiveMoney( | ||
3052 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); | ||
3053 | }); | ||
3054 | 3054 | ||
3055 | return 0; | 3055 | return 0; |
3056 | } | 3056 | } |
@@ -7322,7 +7322,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7322 | { | 7322 | { |
7323 | m_host.AddScriptLPS(1); | 7323 | m_host.AddScriptLPS(1); |
7324 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7324 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
7325 | if (xmlrpcMod.IsEnabled()) | 7325 | if (xmlrpcMod != null && xmlrpcMod.IsEnabled()) |
7326 | { | 7326 | { |
7327 | UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero); | 7327 | UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero); |
7328 | IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); | 7328 | IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); |
@@ -7354,6 +7354,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7354 | m_host.AddScriptLPS(1); | 7354 | m_host.AddScriptLPS(1); |
7355 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7355 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
7356 | ScriptSleep(3000); | 7356 | ScriptSleep(3000); |
7357 | if (xmlrpcMod == null) | ||
7358 | return ""; | ||
7357 | return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); | 7359 | return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); |
7358 | } | 7360 | } |
7359 | 7361 | ||
@@ -7361,7 +7363,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7361 | { | 7363 | { |
7362 | m_host.AddScriptLPS(1); | 7364 | m_host.AddScriptLPS(1); |
7363 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7365 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
7364 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); | 7366 | if (xmlrpcMod != null) |
7367 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); | ||
7365 | ScriptSleep(3000); | 7368 | ScriptSleep(3000); |
7366 | } | 7369 | } |
7367 | 7370 | ||
@@ -7369,7 +7372,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7369 | { | 7372 | { |
7370 | m_host.AddScriptLPS(1); | 7373 | m_host.AddScriptLPS(1); |
7371 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7374 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
7372 | xmlrpcMod.CloseXMLRPCChannel((UUID)channel); | 7375 | if (xmlrpcMod != null) |
7376 | xmlrpcMod.CloseXMLRPCChannel((UUID)channel); | ||
7373 | ScriptSleep(1000); | 7377 | ScriptSleep(1000); |
7374 | } | 7378 | } |
7375 | 7379 | ||
@@ -12207,7 +12211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12207 | bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL); | 12211 | bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL); |
12208 | 12212 | ||
12209 | 12213 | ||
12210 | if (World.SuportsRayCastFiltered()) | 12214 | if (World.SupportsRayCastFiltered()) |
12211 | { | 12215 | { |
12212 | if (dist == 0) | 12216 | if (dist == 0) |
12213 | return list; | 12217 | return list; |
@@ -12270,13 +12274,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12270 | } | 12274 | } |
12271 | else | 12275 | else |
12272 | { | 12276 | { |
12273 | if (checkTerrain) | ||
12274 | { | ||
12275 | ContactResult? groundContact = GroundIntersection(rayStart, rayEnd); | ||
12276 | if (groundContact != null) | ||
12277 | results.Add((ContactResult)groundContact); | ||
12278 | } | ||
12279 | |||
12280 | if (checkAgents) | 12277 | if (checkAgents) |
12281 | { | 12278 | { |
12282 | ContactResult[] agentHits = AvatarIntersection(rayStart, rayEnd); | 12279 | ContactResult[] agentHits = AvatarIntersection(rayStart, rayEnd); |
@@ -12292,6 +12289,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12292 | } | 12289 | } |
12293 | } | 12290 | } |
12294 | 12291 | ||
12292 | // Double check this | ||
12293 | if (checkTerrain) | ||
12294 | { | ||
12295 | bool skipGroundCheck = false; | ||
12296 | |||
12297 | foreach (ContactResult c in results) | ||
12298 | { | ||
12299 | if (c.ConsumerID == 0) // Physics gave us a ground collision | ||
12300 | skipGroundCheck = true; | ||
12301 | } | ||
12302 | |||
12303 | if (!skipGroundCheck) | ||
12304 | { | ||
12305 | ContactResult? groundContact = GroundIntersection(rayStart, rayEnd); | ||
12306 | if (groundContact != null) | ||
12307 | results.Add((ContactResult)groundContact); | ||
12308 | } | ||
12309 | } | ||
12310 | |||
12295 | results.Sort(delegate(ContactResult a, ContactResult b) | 12311 | results.Sort(delegate(ContactResult a, ContactResult b) |
12296 | { | 12312 | { |
12297 | return a.Depth.CompareTo(b.Depth); | 12313 | return a.Depth.CompareTo(b.Depth); |
@@ -12585,7 +12601,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12585 | } | 12601 | } |
12586 | 12602 | ||
12587 | bool result = money.ObjectGiveMoney( | 12603 | bool result = money.ObjectGiveMoney( |
12588 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); | 12604 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn); |
12589 | 12605 | ||
12590 | if (result) | 12606 | if (result) |
12591 | { | 12607 | { |