diff options
author | Justin Clark-Casey (justincc) | 2010-04-01 23:59:00 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-04-01 23:59:00 +0100 |
commit | e0eba26f7bd2258ec026a42e278420fa0938cea7 (patch) | |
tree | 39ae2410374c07ff62a52af3551888746ed36c3c /OpenSim/Region/Framework/Scenes | |
parent | oops, add file missing from last commit (diff) | |
parent | First attempt at fixing mantis #4641. It's better but there are now some issu... (diff) | |
download | opensim-SC-e0eba26f7bd2258ec026a42e278420fa0938cea7.zip opensim-SC-e0eba26f7bd2258ec026a42e278420fa0938cea7.tar.gz opensim-SC-e0eba26f7bd2258ec026a42e278420fa0938cea7.tar.bz2 opensim-SC-e0eba26f7bd2258ec026a42e278420fa0938cea7.tar.xz |
Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 24 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | 11 |
3 files changed, 46 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index dc9ae19..ef125cd 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -206,7 +206,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
206 | public event OnMakeChildAgentDelegate OnMakeChildAgent; | 206 | public event OnMakeChildAgentDelegate OnMakeChildAgent; |
207 | 207 | ||
208 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); | 208 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); |
209 | public delegate void OnSaveNewWindlightProfileDelegate(); | ||
210 | public delegate void OnSendNewWindlightProfileTargetedDelegate(RegionLightShareData wl, UUID user); | ||
209 | public event OnMakeRootAgentDelegate OnMakeRootAgent; | 211 | public event OnMakeRootAgentDelegate OnMakeRootAgent; |
212 | public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted; | ||
213 | public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; | ||
210 | 214 | ||
211 | /// <summary> | 215 | /// <summary> |
212 | /// Triggered when an object or attachment enters a scene | 216 | /// Triggered when an object or attachment enters a scene |
@@ -1216,6 +1220,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
1216 | } | 1220 | } |
1217 | } | 1221 | } |
1218 | 1222 | ||
1223 | public void TriggerOnSendNewWindlightProfileTargeted(RegionLightShareData wl, UUID user) | ||
1224 | { | ||
1225 | OnSendNewWindlightProfileTargetedDelegate handlerSendNewWindlightProfileTargeted = OnSendNewWindlightProfileTargeted; | ||
1226 | if (handlerSendNewWindlightProfileTargeted != null) | ||
1227 | { | ||
1228 | handlerSendNewWindlightProfileTargeted(wl, user); | ||
1229 | } | ||
1230 | } | ||
1231 | |||
1232 | public void TriggerOnSaveNewWindlightProfile() | ||
1233 | { | ||
1234 | OnSaveNewWindlightProfileDelegate handlerSaveNewWindlightProfile = OnSaveNewWindlightProfile; | ||
1235 | if (handlerSaveNewWindlightProfile != null) | ||
1236 | { | ||
1237 | handlerSaveNewWindlightProfile(); | ||
1238 | } | ||
1239 | } | ||
1240 | |||
1219 | public void TriggerOnMakeRootAgent(ScenePresence presence) | 1241 | public void TriggerOnMakeRootAgent(ScenePresence presence) |
1220 | { | 1242 | { |
1221 | OnMakeRootAgentDelegate handlerMakeRootAgent = OnMakeRootAgent; | 1243 | OnMakeRootAgentDelegate handlerMakeRootAgent = OnMakeRootAgent; |
@@ -1992,4 +2014,4 @@ namespace OpenSim.Region.Framework.Scenes | |||
1992 | } | 2014 | } |
1993 | } | 2015 | } |
1994 | } | 2016 | } |
1995 | } \ No newline at end of file | 2017 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0085df3..fc915a3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1715,6 +1715,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1715 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1715 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1716 | } | 1716 | } |
1717 | 1717 | ||
1718 | public void StoreWindlightProfile(RegionLightShareData wl) | ||
1719 | { | ||
1720 | m_regInfo.WindlightSettings = wl; | ||
1721 | m_storageManager.DataStore.StoreRegionWindlightSettings(wl); | ||
1722 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1723 | } | ||
1724 | |||
1725 | public void LoadWindlightProfile() | ||
1726 | { | ||
1727 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(RegionInfo.RegionID); | ||
1728 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1729 | } | ||
1730 | |||
1718 | /// <summary> | 1731 | /// <summary> |
1719 | /// Loads the World heightmap | 1732 | /// Loads the World heightmap |
1720 | /// </summary> | 1733 | /// </summary> |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs index c77220c..8b2d387 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | |||
@@ -101,7 +101,16 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
101 | { | 101 | { |
102 | throw new NotImplementedException(); | 102 | throw new NotImplementedException(); |
103 | } | 103 | } |
104 | 104 | public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) | |
105 | { | ||
106 | //This connector doesn't support the windlight module yet | ||
107 | //Return default LL windlight settings | ||
108 | return new RegionLightShareData(); | ||
109 | } | ||
110 | public void StoreRegionWindlightSettings(RegionLightShareData wl) | ||
111 | { | ||
112 | //This connector doesn't support the windlight module yet | ||
113 | } | ||
105 | public RegionSettings LoadRegionSettings(UUID regionUUID) | 114 | public RegionSettings LoadRegionSettings(UUID regionUUID) |
106 | { | 115 | { |
107 | return null; | 116 | return null; |