diff options
author | Justin Clarke Casey | 2009-03-05 20:53:23 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-03-05 20:53:23 +0000 |
commit | 3d70dbd01df8c02dc75c66b470602e93665e91f6 (patch) | |
tree | 431b5bde21d9945f2732cae0f477f417a3028b2a /OpenSim/Region | |
parent | * simplify media and music url setting since we never get back a null land ob... (diff) | |
download | opensim-SC_OLD-3d70dbd01df8c02dc75c66b470602e93665e91f6.zip opensim-SC_OLD-3d70dbd01df8c02dc75c66b470602e93665e91f6.tar.gz opensim-SC_OLD-3d70dbd01df8c02dc75c66b470602e93665e91f6.tar.bz2 opensim-SC_OLD-3d70dbd01df8c02dc75c66b470602e93665e91f6.tar.xz |
* refactor: move media and music url setting from scene into LandObject
Diffstat (limited to '')
5 files changed, 38 insertions, 20 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 67cb845..e3e49ba 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -116,7 +116,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
116 | return newLand; | 116 | return newLand; |
117 | } | 117 | } |
118 | 118 | ||
119 | |||
120 | static overrideParcelMaxPrimCountDelegate overrideParcelMaxPrimCount; | 119 | static overrideParcelMaxPrimCountDelegate overrideParcelMaxPrimCount; |
121 | static overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount; | 120 | static overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount; |
122 | 121 | ||
@@ -926,5 +925,25 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
926 | #endregion | 925 | #endregion |
927 | 926 | ||
928 | #endregion | 927 | #endregion |
928 | |||
929 | /// <summary> | ||
930 | /// Set the media url for this land parcel | ||
931 | /// </summary> | ||
932 | /// <param name="url"></param> | ||
933 | public void SetMediaUrl(string url) | ||
934 | { | ||
935 | landData.MediaURL = url; | ||
936 | sendLandUpdateToAvatarsOverMe(); | ||
937 | } | ||
938 | |||
939 | /// <summary> | ||
940 | /// Set the music url for this land parcel | ||
941 | /// </summary> | ||
942 | /// <param name="url"></param> | ||
943 | public void SetMusicUrl(string url) | ||
944 | { | ||
945 | landData.MusicURL = url; | ||
946 | sendLandUpdateToAvatarsOverMe(); | ||
947 | } | ||
929 | } | 948 | } |
930 | } | 949 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/ILandObject.cs b/OpenSim/Region/Framework/Interfaces/ILandObject.cs index 52cc6cf..db3c9bf 100644 --- a/OpenSim/Region/Framework/Interfaces/ILandObject.cs +++ b/OpenSim/Region/Framework/Interfaces/ILandObject.cs | |||
@@ -63,7 +63,6 @@ namespace OpenSim.Region.Framework.Interfaces | |||
63 | void forceUpdateLandInfo(); | 63 | void forceUpdateLandInfo(); |
64 | void setLandBitmap(bool[,] bitmap); | 64 | void setLandBitmap(bool[,] bitmap); |
65 | 65 | ||
66 | |||
67 | bool[,] basicFullRegionLandBitmap(); | 66 | bool[,] basicFullRegionLandBitmap(); |
68 | bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y); | 67 | bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y); |
69 | bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value); | 68 | bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value); |
@@ -79,5 +78,17 @@ namespace OpenSim.Region.Framework.Interfaces | |||
79 | 78 | ||
80 | void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); | 79 | void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); |
81 | void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); | 80 | void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); |
81 | |||
82 | /// <summary> | ||
83 | /// Set the media url for this land parcel | ||
84 | /// </summary> | ||
85 | /// <param name="url"></param> | ||
86 | void SetMediaUrl(string url); | ||
87 | |||
88 | /// <summary> | ||
89 | /// Set the music url for this land parcel | ||
90 | /// </summary> | ||
91 | /// <param name="url"></param> | ||
92 | void SetMusicUrl(string url); | ||
82 | } | 93 | } |
83 | } | 94 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index faa3bd7..7776215 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3048,20 +3048,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3048 | return LandChannel.GetLandObject((int)x, (int)y).landData; | 3048 | return LandChannel.GetLandObject((int)x, (int)y).landData; |
3049 | } | 3049 | } |
3050 | 3050 | ||
3051 | public void SetLandMusicURL(float x, float y, string url) | ||
3052 | { | ||
3053 | ILandObject land = LandChannel.GetLandObject(x, y); | ||
3054 | land.landData.MusicURL = url; | ||
3055 | land.sendLandUpdateToAvatarsOverMe(); | ||
3056 | } | ||
3057 | |||
3058 | public void SetLandMediaURL(float x, float y, string url) | ||
3059 | { | ||
3060 | ILandObject land = LandChannel.GetLandObject(x, y); | ||
3061 | land.landData.MediaURL = url; | ||
3062 | land.sendLandUpdateToAvatarsOverMe(); | ||
3063 | } | ||
3064 | |||
3065 | public RegionInfo RequestClosestRegion(string name) | 3051 | public RegionInfo RequestClosestRegion(string name) |
3066 | { | 3052 | { |
3067 | return m_sceneGridService.RequestClosestRegion(name); | 3053 | return m_sceneGridService.RequestClosestRegion(name); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 32ebc37..5be967e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6824,7 +6824,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6824 | { | 6824 | { |
6825 | return; | 6825 | return; |
6826 | } | 6826 | } |
6827 | World.SetLandMusicURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url); | 6827 | |
6828 | World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).SetMusicUrl(url); | ||
6829 | |||
6828 | // ScriptSleep(2000); | 6830 | // ScriptSleep(2000); |
6829 | } | 6831 | } |
6830 | 6832 | ||
@@ -8204,11 +8206,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8204 | if (presence == null) | 8206 | if (presence == null) |
8205 | { | 8207 | { |
8206 | // we send to all | 8208 | // we send to all |
8207 | |||
8208 | landData.MediaID = new UUID(texture); | 8209 | landData.MediaID = new UUID(texture); |
8209 | landData.MediaAutoScale = autoAlign ? (byte)1 : (byte)0; | 8210 | landData.MediaAutoScale = autoAlign ? (byte)1 : (byte)0; |
8211 | |||
8210 | // do that one last, it will cause a ParcelPropertiesUpdate | 8212 | // do that one last, it will cause a ParcelPropertiesUpdate |
8211 | World.SetLandMediaURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url); | 8213 | landObject.SetMediaUrl(url); |
8212 | 8214 | ||
8213 | // now send to all (non-child) agents | 8215 | // now send to all (non-child) agents |
8214 | List<ScenePresence> agents = World.GetAvatars(); | 8216 | List<ScenePresence> agents = World.GetAvatars(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 642b1f9..17732e6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -789,7 +789,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
789 | return; | 789 | return; |
790 | } | 790 | } |
791 | 791 | ||
792 | World.SetLandMediaURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url); | 792 | World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).SetMediaUrl(url); |
793 | } | 793 | } |
794 | 794 | ||
795 | public string osGetScriptEngineName() | 795 | public string osGetScriptEngineName() |