aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-03-31 04:20:20 +0100
committerMelanie2010-03-31 04:20:20 +0100
commitec637e2b8c089efc16bbb9faae0a1e3cf939db41 (patch)
tree6b0f9c1749983761fd0e8809294fc18b6aa14770 /OpenSim/Region
parentminor: commented out code removal (diff)
downloadopensim-SC-ec637e2b8c089efc16bbb9faae0a1e3cf939db41.zip
opensim-SC-ec637e2b8c089efc16bbb9faae0a1e3cf939db41.tar.gz
opensim-SC-ec637e2b8c089efc16bbb9faae0a1e3cf939db41.tar.bz2
opensim-SC-ec637e2b8c089efc16bbb9faae0a1e3cf939db41.tar.xz
Committing the LightShare code, which was developed by TomMeta of Meta7.
This allows scripts to set WindLight parameters for clients connecting to a region. Currently, this is only supported by the Meta7 viewer.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs7
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs11
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp2
9 files changed, 57 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 9ba99d6..25f6ef0 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -845,17 +845,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
845 } 845 }
846 } 846 }
847 847
848 public void SendGenericMessage(string method, List<string> message) 848 public void SendGenericMessage(string method, List<byte[]> message)
849 { 849 {
850 GenericMessagePacket gmp = new GenericMessagePacket(); 850 GenericMessagePacket gmp = new GenericMessagePacket();
851 gmp.MethodData.Method = Util.StringToBytes256(method); 851 gmp.MethodData.Method = Util.StringToBytes256(method);
852 gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count]; 852 gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count];
853 int i = 0; 853 int i = 0;
854 foreach (string val in message) 854 foreach (byte[] val in message)
855 { 855 {
856 gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock(); 856 gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock();
857 gmp.ParamList[i++].Parameter = Util.StringToBytes256(val); 857 gmp.ParamList[i++].Parameter = val;
858 } 858 }
859
859 OutPacket(gmp, ThrottleOutPacketType.Task); 860 OutPacket(gmp, ThrottleOutPacketType.Task);
860 } 861 }
861 862
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index d052f38..8d27f9c 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -460,7 +460,7 @@ namespace OpenSim.Region.Examples.SimpleModule
460 460
461 } 461 }
462 462
463 public void SendGenericMessage(string method, List<string> message) 463 public void SendGenericMessage(string method, List<byte[]> message)
464 { 464 {
465 465
466 } 466 }
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs
index 78bd622..3e8e196 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs
@@ -103,6 +103,8 @@ namespace OpenSim.Region.Framework.Interfaces
103 103
104 void StoreRegionSettings(RegionSettings rs); 104 void StoreRegionSettings(RegionSettings rs);
105 RegionSettings LoadRegionSettings(UUID regionUUID); 105 RegionSettings LoadRegionSettings(UUID regionUUID);
106 RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID);
107 void StoreRegionWindlightSettings(RegionLightShareData wl);
106 108
107 void Shutdown(); 109 void Shutdown();
108 } 110 }
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;
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 1885946..f5b148f 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -964,7 +964,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
964 // TODO 964 // TODO
965 } 965 }
966 966
967 public void SendGenericMessage(string method, List<string> message) 967 public void SendGenericMessage(string method, List<byte[]> message)
968 { 968 {
969 969
970 } 970 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 77958eb..338c04b 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -550,7 +550,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
550 550
551 } 551 }
552 552
553 public void SendGenericMessage(string method, List<string> message) 553 public void SendGenericMessage(string method, List<byte[]> message)
554 { 554 {
555 555
556 } 556 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp
index 98bbc68..23138ef 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp
@@ -17,6 +17,8 @@
17 <excludeFiles /> 17 <excludeFiles />
18 </DeploymentInformation> 18 </DeploymentInformation>
19 <Contents> 19 <Contents>
20 <File name="./CM_Constants.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
21 <File name="./CM_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
20 <File name="./Executor.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 22 <File name="./Executor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
21 <File name="./LSL_Constants.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 23 <File name="./LSL_Constants.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
22 <File name="./LSL_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 24 <File name="./LSL_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" />