diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 17732e6..e96dd26 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -503,12 +503,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
503 | if (presence != null) | 503 | if (presence != null) |
504 | { | 504 | { |
505 | // agent must be over owners land to avoid abuse | 505 | // agent must be over owners land to avoid abuse |
506 | if (m_host.OwnerID == World.GetLandOwner(presence.AbsolutePosition.X, presence.AbsolutePosition.Y)) | 506 | if (m_host.OwnerID |
507 | == World.LandChannel.GetLandObject( | ||
508 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) | ||
507 | { | 509 | { |
508 | presence.ControllingClient.SendTeleportLocationStart(); | 510 | presence.ControllingClient.SendTeleportLocationStart(); |
509 | World.RequestTeleportLocation(presence.ControllingClient, regionName, | 511 | World.RequestTeleportLocation(presence.ControllingClient, regionName, |
510 | new Vector3((float)position.x, (float)position.y, (float)position.z), | 512 | new Vector3((float)position.x, (float)position.y, (float)position.z), |
511 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation); | 513 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation); |
514 | |||
512 | ScriptSleep(5000); | 515 | ScriptSleep(5000); |
513 | } | 516 | } |
514 | } | 517 | } |
@@ -532,7 +535,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
532 | if (presence != null) | 535 | if (presence != null) |
533 | { | 536 | { |
534 | // agent must be over owners land to avoid abuse | 537 | // agent must be over owners land to avoid abuse |
535 | if (m_host.OwnerID == World.GetLandOwner(presence.AbsolutePosition.X, presence.AbsolutePosition.Y)) | 538 | if (m_host.OwnerID |
539 | == World.LandChannel.GetLandObject( | ||
540 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) | ||
536 | { | 541 | { |
537 | presence.ControllingClient.SendTeleportLocationStart(); | 542 | presence.ControllingClient.SendTeleportLocationStart(); |
538 | World.RequestTeleportLocation(presence.ControllingClient, regionHandle, | 543 | World.RequestTeleportLocation(presence.ControllingClient, regionHandle, |
@@ -777,19 +782,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
777 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetParcelMediaURL"); | 782 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetParcelMediaURL"); |
778 | 783 | ||
779 | m_host.AddScriptLPS(1); | 784 | m_host.AddScriptLPS(1); |
780 | UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | 785 | |
786 | ILandObject land | ||
787 | = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | ||
781 | 788 | ||
782 | if (landowner == UUID.Zero) | 789 | if (land.landData.OwnerID != m_host.ObjectOwner) |
783 | { | ||
784 | return; | ||
785 | } | ||
786 | |||
787 | if (landowner != m_host.ObjectOwner) | ||
788 | { | ||
789 | return; | 790 | return; |
790 | } | ||
791 | 791 | ||
792 | World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).SetMediaUrl(url); | 792 | land.SetMediaUrl(url); |
793 | } | 793 | } |
794 | 794 | ||
795 | public string osGetScriptEngineName() | 795 | public string osGetScriptEngineName() |