aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorSignpostMarv2012-09-06 11:45:52 +0100
committerJustin Clark-Casey (justincc)2012-09-08 00:44:27 +0100
commite041f09750419f60c819ee7e7a99044fe43a811c (patch)
tree85653d0f58246db0da634c3a84152d94259ea906 /OpenSim/Region/ScriptEngine/Shared
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-e041f09750419f60c819ee7e7a99044fe43a811c.zip
opensim-SC_OLD-e041f09750419f60c819ee7e7a99044fe43a811c.tar.gz
opensim-SC_OLD-e041f09750419f60c819ee7e7a99044fe43a811c.tar.bz2
opensim-SC_OLD-e041f09750419f60c819ee7e7a99044fe43a811c.tar.xz
refactoring to allow Scene.GetLandData to accept Vector3 as an argument. Note that the prior work on LSL_Vector implicit operators means one does not need to explicitly cast a LSL_Vector to Vector3
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs18
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs2
2 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 83c9739..11826bd 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1959,8 +1959,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1959 // this could possibly be done in the above else-if block, but we're doing the check here to keep the code easier to read. 1959 // this could possibly be done in the above else-if block, but we're doing the check here to keep the code easier to read.
1960 1960
1961 Vector3 objectPos = m_host.ParentGroup.RootPart.AbsolutePosition; 1961 Vector3 objectPos = m_host.ParentGroup.RootPart.AbsolutePosition;
1962 LandData here = World.GetLandData((float)objectPos.X, (float)objectPos.Y); 1962 LandData here = World.GetLandData(objectPos);
1963 LandData there = World.GetLandData((float)pos.x, (float)pos.y); 1963 LandData there = World.GetLandData(pos);
1964 1964
1965 // we're only checking prim limits if it's moving to a different parcel under the assumption that if the object got onto the parcel without exceeding the prim limits. 1965 // we're only checking prim limits if it's moving to a different parcel under the assumption that if the object got onto the parcel without exceeding the prim limits.
1966 1966
@@ -9770,20 +9770,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9770 switch ((ParcelMediaCommandEnum) aList.Data[i]) 9770 switch ((ParcelMediaCommandEnum) aList.Data[i])
9771 { 9771 {
9772 case ParcelMediaCommandEnum.Url: 9772 case ParcelMediaCommandEnum.Url:
9773 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL)); 9773 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaURL));
9774 break; 9774 break;
9775 case ParcelMediaCommandEnum.Desc: 9775 case ParcelMediaCommandEnum.Desc:
9776 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).Description)); 9776 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).Description));
9777 break; 9777 break;
9778 case ParcelMediaCommandEnum.Texture: 9778 case ParcelMediaCommandEnum.Texture:
9779 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaID.ToString())); 9779 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaID.ToString()));
9780 break; 9780 break;
9781 case ParcelMediaCommandEnum.Type: 9781 case ParcelMediaCommandEnum.Type:
9782 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaType)); 9782 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaType));
9783 break; 9783 break;
9784 case ParcelMediaCommandEnum.Size: 9784 case ParcelMediaCommandEnum.Size:
9785 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaWidth)); 9785 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaWidth));
9786 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaHeight)); 9786 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaHeight));
9787 break; 9787 break;
9788 default: 9788 default:
9789 ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url; 9789 ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url;
@@ -10398,7 +10398,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10398 public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) 10398 public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param)
10399 { 10399 {
10400 m_host.AddScriptLPS(1); 10400 m_host.AddScriptLPS(1);
10401 LandData land = World.GetLandData((float)pos.x, (float)pos.y); 10401 LandData land = World.GetLandData(pos);
10402 if (land == null) 10402 if (land == null)
10403 { 10403 {
10404 return new LSL_List(0); 10404 return new LSL_List(0);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 2e1e5b6..8b73cd9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2941,7 +2941,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2941 ScenePresence presence = World.GetScenePresence(avatarId); 2941 ScenePresence presence = World.GetScenePresence(avatarId);
2942 if (presence != null) 2942 if (presence != null)
2943 { 2943 {
2944 LandData land = World.GetLandData((float)pos.X, (float)pos.Y); 2944 LandData land = World.GetLandData(pos);
2945 if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage) 2945 if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage)
2946 { 2946 {
2947 float health = presence.Health; 2947 float health = presence.Health;