aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authordr scofield (aka dirk husemann)2009-10-02 11:10:52 +0200
committerdr scofield (aka dirk husemann)2009-10-02 11:31:30 +0200
commit2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7 (patch)
tree74913862b829b7e56994f2c33ca5fe35638baad1 /OpenSim/Region/ScriptEngine
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7.zip
opensim-SC-2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7.tar.gz
opensim-SC-2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7.tar.bz2
opensim-SC-2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7.tar.xz
- cleaning up LandData/ILandObject capitalization issues
- adding LandDataSerializer to OAR mechanics
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs45
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs10
2 files changed, 29 insertions, 26 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 0bd6546..cb91677 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3899,7 +3899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3899 { 3899 {
3900 // agent must be over the owners land 3900 // agent must be over the owners land
3901 if (m_host.OwnerID == World.LandChannel.GetLandObject( 3901 if (m_host.OwnerID == World.LandChannel.GetLandObject(
3902 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 3902 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
3903 { 3903 {
3904 presence.ControllingClient.SendTeleportLocationStart(); 3904 presence.ControllingClient.SendTeleportLocationStart();
3905 World.TeleportClientHome(agentId, presence.ControllingClient); 3905 World.TeleportClientHome(agentId, presence.ControllingClient);
@@ -4091,7 +4091,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4091 return; 4091 return;
4092 4092
4093 // Need provisions for Group Owned here 4093 // Need provisions for Group Owned here
4094 if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) 4094 if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
4095 targetlandObj.LandData.IsGroupOwned || m_host.OwnerID == targetID)
4095 { 4096 {
4096 pushAllowed = true; 4097 pushAllowed = true;
4097 } 4098 }
@@ -4107,10 +4108,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4107 else 4108 else
4108 { 4109 {
4109 // Parcel push restriction 4110 // Parcel push restriction
4110 if ((targetlandObj.landData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject) 4111 if ((targetlandObj.LandData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject)
4111 { 4112 {
4112 // Need provisions for Group Owned here 4113 // Need provisions for Group Owned here
4113 if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) 4114 if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
4115 targetlandObj.LandData.IsGroupOwned ||
4116 m_host.OwnerID == targetID)
4114 { 4117 {
4115 pushAllowed = true; 4118 pushAllowed = true;
4116 } 4119 }
@@ -5442,7 +5445,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5442 { 5445 {
5443 // agent must be over the owners land 5446 // agent must be over the owners land
5444 if (m_host.OwnerID == World.LandChannel.GetLandObject( 5447 if (m_host.OwnerID == World.LandChannel.GetLandObject(
5445 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 5448 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
5446 World.TeleportClientHome(agentId, presence.ControllingClient); 5449 World.TeleportClientHome(agentId, presence.ControllingClient);
5447 } 5450 }
5448 } 5451 }
@@ -5532,7 +5535,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5532 { 5535 {
5533 if (m_host.OwnerID 5536 if (m_host.OwnerID
5534 == World.LandChannel.GetLandObject( 5537 == World.LandChannel.GetLandObject(
5535 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 5538 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
5536 return 1; 5539 return 1;
5537 } 5540 }
5538 else // object is not an avatar 5541 else // object is not an avatar
@@ -5541,7 +5544,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5541 if (obj != null) 5544 if (obj != null)
5542 if (m_host.OwnerID 5545 if (m_host.OwnerID
5543 == World.LandChannel.GetLandObject( 5546 == World.LandChannel.GetLandObject(
5544 obj.AbsolutePosition.X, obj.AbsolutePosition.Y).landData.OwnerID) 5547 obj.AbsolutePosition.X, obj.AbsolutePosition.Y).LandData.OwnerID)
5545 return 1; 5548 return 1;
5546 } 5549 }
5547 } 5550 }
@@ -5552,7 +5555,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5552 public LSL_String llGetLandOwnerAt(LSL_Vector pos) 5555 public LSL_String llGetLandOwnerAt(LSL_Vector pos)
5553 { 5556 {
5554 m_host.AddScriptLPS(1); 5557 m_host.AddScriptLPS(1);
5555 return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.OwnerID.ToString(); 5558 return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.OwnerID.ToString();
5556 } 5559 }
5557 5560
5558 /// <summary> 5561 /// <summary>
@@ -5621,9 +5624,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5621 ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); 5624 ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y);
5622 if (parcel != null) 5625 if (parcel != null)
5623 { 5626 {
5624 if (m_host.ObjectOwner == parcel.landData.OwnerID || 5627 if (m_host.ObjectOwner == parcel.LandData.OwnerID ||
5625 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.GroupID 5628 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.LandData.GroupID
5626 && parcel.landData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID)) 5629 && parcel.LandData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID))
5627 { 5630 {
5628 av.StandUp(); 5631 av.StandUp();
5629 } 5632 }
@@ -6126,7 +6129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6126 { 6129 {
6127 m_host.AddScriptLPS(1); 6130 m_host.AddScriptLPS(1);
6128 UUID key; 6131 UUID key;
6129 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 6132 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
6130 if (land.OwnerID == m_host.OwnerID) 6133 if (land.OwnerID == m_host.OwnerID)
6131 { 6134 {
6132 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 6135 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
@@ -7144,7 +7147,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7144 7147
7145 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 7148 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
7146 7149
7147 if (land.landData.OwnerID != m_host.ObjectOwner) 7150 if (land.LandData.OwnerID != m_host.ObjectOwner)
7148 return; 7151 return;
7149 7152
7150 land.SetMusicUrl(url); 7153 land.SetMusicUrl(url);
@@ -8403,7 +8406,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8403 bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? 8406 bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)?
8404 byte loop = 0; 8407 byte loop = 0;
8405 8408
8406 LandData landData = landObject.landData; 8409 LandData landData = landObject.LandData;
8407 string url = landData.MediaURL; 8410 string url = landData.MediaURL;
8408 string texture = landData.MediaID.ToString(); 8411 string texture = landData.MediaID.ToString();
8409 bool autoAlign = landData.MediaAutoScale != 0; 8412 bool autoAlign = landData.MediaAutoScale != 0;
@@ -8832,7 +8835,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8832 { 8835 {
8833 m_host.AddScriptLPS(1); 8836 m_host.AddScriptLPS(1);
8834 UUID key; 8837 UUID key;
8835 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 8838 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
8836 if (land.OwnerID == m_host.OwnerID) 8839 if (land.OwnerID == m_host.OwnerID)
8837 { 8840 {
8838 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 8841 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
@@ -8851,7 +8854,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8851 { 8854 {
8852 m_host.AddScriptLPS(1); 8855 m_host.AddScriptLPS(1);
8853 UUID key; 8856 UUID key;
8854 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 8857 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
8855 if (land.OwnerID == m_host.OwnerID) 8858 if (land.OwnerID == m_host.OwnerID)
8856 { 8859 {
8857 if (UUID.TryParse(avatar, out key)) 8860 if (UUID.TryParse(avatar, out key))
@@ -8873,7 +8876,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8873 { 8876 {
8874 m_host.AddScriptLPS(1); 8877 m_host.AddScriptLPS(1);
8875 UUID key; 8878 UUID key;
8876 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 8879 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
8877 if (land.OwnerID == m_host.OwnerID) 8880 if (land.OwnerID == m_host.OwnerID)
8878 { 8881 {
8879 if (UUID.TryParse(avatar, out key)) 8882 if (UUID.TryParse(avatar, out key))
@@ -9018,7 +9021,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9018 public LSL_Integer llGetParcelFlags(LSL_Vector pos) 9021 public LSL_Integer llGetParcelFlags(LSL_Vector pos)
9019 { 9022 {
9020 m_host.AddScriptLPS(1); 9023 m_host.AddScriptLPS(1);
9021 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags; 9024 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags;
9022 } 9025 }
9023 9026
9024 public LSL_Integer llGetRegionFlags() 9027 public LSL_Integer llGetRegionFlags()
@@ -9139,7 +9142,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9139 public void llResetLandBanList() 9142 public void llResetLandBanList()
9140 { 9143 {
9141 m_host.AddScriptLPS(1); 9144 m_host.AddScriptLPS(1);
9142 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 9145 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
9143 if (land.OwnerID == m_host.OwnerID) 9146 if (land.OwnerID == m_host.OwnerID)
9144 { 9147 {
9145 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 9148 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
@@ -9156,7 +9159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9156 public void llResetLandPassList() 9159 public void llResetLandPassList()
9157 { 9160 {
9158 m_host.AddScriptLPS(1); 9161 m_host.AddScriptLPS(1);
9159 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 9162 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
9160 if (land.OwnerID == m_host.OwnerID) 9163 if (land.OwnerID == m_host.OwnerID)
9161 { 9164 {
9162 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 9165 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
@@ -9240,7 +9243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9240 LSL_List ret = new LSL_List(); 9243 LSL_List ret = new LSL_List();
9241 if (land != null) 9244 if (land != null)
9242 { 9245 {
9243 foreach (KeyValuePair<UUID, int> detectedParams in land.getLandObjectOwners()) 9246 foreach (KeyValuePair<UUID, int> detectedParams in land.GetLandObjectOwners())
9244 { 9247 {
9245 ret.Add(detectedParams.Key.ToString()); 9248 ret.Add(detectedParams.Key.ToString());
9246 ret.Add(detectedParams.Value); 9249 ret.Add(detectedParams.Value);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 0b95abc..59525b6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -593,7 +593,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
593 // agent must be over owners land to avoid abuse 593 // agent must be over owners land to avoid abuse
594 if (m_host.OwnerID 594 if (m_host.OwnerID
595 == World.LandChannel.GetLandObject( 595 == World.LandChannel.GetLandObject(
596 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 596 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
597 { 597 {
598 598
599 // Check for hostname , attempt to make a hglink 599 // Check for hostname , attempt to make a hglink
@@ -647,7 +647,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
647 // agent must be over owners land to avoid abuse 647 // agent must be over owners land to avoid abuse
648 if (m_host.OwnerID 648 if (m_host.OwnerID
649 == World.LandChannel.GetLandObject( 649 == World.LandChannel.GetLandObject(
650 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 650 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
651 { 651 {
652 presence.ControllingClient.SendTeleportLocationStart(); 652 presence.ControllingClient.SendTeleportLocationStart();
653 World.RequestTeleportLocation(presence.ControllingClient, regionHandle, 653 World.RequestTeleportLocation(presence.ControllingClient, regionHandle,
@@ -1164,7 +1164,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1164 ILandObject land 1164 ILandObject land
1165 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 1165 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
1166 1166
1167 if (land.landData.OwnerID != m_host.ObjectOwner) 1167 if (land.LandData.OwnerID != m_host.ObjectOwner)
1168 return; 1168 return;
1169 1169
1170 land.SetMediaUrl(url); 1170 land.SetMediaUrl(url);
@@ -1182,7 +1182,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1182 ILandObject land 1182 ILandObject land
1183 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 1183 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
1184 1184
1185 if (land.landData.OwnerID != m_host.ObjectOwner) 1185 if (land.LandData.OwnerID != m_host.ObjectOwner)
1186 { 1186 {
1187 OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function"); 1187 OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function");
1188 return; 1188 return;
@@ -1192,7 +1192,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1192 IVoiceModule voiceModule = World.RequestModuleInterface<IVoiceModule>(); 1192 IVoiceModule voiceModule = World.RequestModuleInterface<IVoiceModule>();
1193 1193
1194 if (voiceModule != null) 1194 if (voiceModule != null)
1195 voiceModule.setLandSIPAddress(SIPAddress,land.landData.GlobalID); 1195 voiceModule.setLandSIPAddress(SIPAddress,land.LandData.GlobalID);
1196 else 1196 else
1197 OSSLError("osSetParcelSIPAddress: No voice module enabled for this land"); 1197 OSSLError("osSetParcelSIPAddress: No voice module enabled for this land");
1198 1198