diff options
Diffstat (limited to '')
8 files changed, 411 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs index 225cc9a..7312799 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs | |||
@@ -104,6 +104,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
104 | void StoreRegionSettings(RegionSettings rs); | 104 | void StoreRegionSettings(RegionSettings rs); |
105 | RegionSettings LoadRegionSettings(UUID regionUUID); | 105 | RegionSettings LoadRegionSettings(UUID regionUUID); |
106 | RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID); | 106 | RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID); |
107 | void StoreRegionWindlightSettings(RegionMeta7WindlightData wl); | ||
107 | 108 | ||
108 | void Shutdown(); | 109 | void Shutdown(); |
109 | } | 110 | } |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 753344d..a86e263 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -193,7 +193,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
193 | public event OnMakeChildAgentDelegate OnMakeChildAgent; | 193 | public event OnMakeChildAgentDelegate OnMakeChildAgent; |
194 | 194 | ||
195 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); | 195 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); |
196 | public delegate void OnSaveNewWindlightProfileDelegate(); | ||
196 | public event OnMakeRootAgentDelegate OnMakeRootAgent; | 197 | public event OnMakeRootAgentDelegate OnMakeRootAgent; |
198 | public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; | ||
197 | 199 | ||
198 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); | 200 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); |
199 | 201 | ||
@@ -411,6 +413,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
411 | private IncomingInstantMessage handlerUnhandledInstantMessage = null; //OnUnhandledInstantMessage; | 413 | private IncomingInstantMessage handlerUnhandledInstantMessage = null; //OnUnhandledInstantMessage; |
412 | private ClientClosed handlerClientClosed = null; //OnClientClosed; | 414 | private ClientClosed handlerClientClosed = null; //OnClientClosed; |
413 | private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent; | 415 | private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent; |
416 | private OnSaveNewWindlightProfileDelegate handlerSaveNewWindlightProfile = null; //OnSaveNewWindlightProfile; | ||
414 | private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent; | 417 | private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent; |
415 | private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick; | 418 | private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick; |
416 | private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; | 419 | private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; |
@@ -772,6 +775,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
772 | } | 775 | } |
773 | } | 776 | } |
774 | 777 | ||
778 | public void TriggerOnSaveNewWindlightProfile() | ||
779 | { | ||
780 | handlerSaveNewWindlightProfile = OnSaveNewWindlightProfile; | ||
781 | if (handlerSaveNewWindlightProfile != null) | ||
782 | { | ||
783 | handlerSaveNewWindlightProfile(); | ||
784 | } | ||
785 | } | ||
786 | |||
775 | public void TriggerOnMakeRootAgent(ScenePresence presence) | 787 | public void TriggerOnMakeRootAgent(ScenePresence presence) |
776 | { | 788 | { |
777 | handlerMakeRootAgent = OnMakeRootAgent; | 789 | handlerMakeRootAgent = OnMakeRootAgent; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 8d91d65..475d775 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1505,6 +1505,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1505 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1505 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1506 | } | 1506 | } |
1507 | 1507 | ||
1508 | public void StoreWindlightProfile(RegionMeta7WindlightData wl) | ||
1509 | { | ||
1510 | m_regInfo.WindlightSettings = wl; | ||
1511 | m_storageManager.DataStore.StoreRegionWindlightSettings(wl); | ||
1512 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1513 | } | ||
1514 | |||
1508 | /// <summary> | 1515 | /// <summary> |
1509 | /// Loads the World heightmap | 1516 | /// Loads the World heightmap |
1510 | /// </summary> | 1517 | /// </summary> |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs index e8cda60..5abbb82 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | |||
@@ -107,6 +107,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
107 | //Return default LL windlight settings | 107 | //Return default LL windlight settings |
108 | return new RegionMeta7WindlightData(); | 108 | return new RegionMeta7WindlightData(); |
109 | } | 109 | } |
110 | public void StoreRegionWindlightSettings(RegionMeta7WindlightData wl) | ||
111 | { | ||
112 | //This connector doesn't support the windlight module yet | ||
113 | } | ||
110 | public RegionSettings LoadRegionSettings(UUID regionUUID) | 114 | public RegionSettings LoadRegionSettings(UUID regionUUID) |
111 | { | 115 | { |
112 | return null; | 116 | return null; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 7f739b1..33c67d5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -42,6 +42,7 @@ using OpenSim.Region.CoreModules.Avatar.NPC; | |||
42 | using OpenSim.Region.Framework.Interfaces; | 42 | using OpenSim.Region.Framework.Interfaces; |
43 | using OpenSim.Region.Framework.Scenes; | 43 | using OpenSim.Region.Framework.Scenes; |
44 | using OpenSim.Region.Framework.Scenes.Hypergrid; | 44 | using OpenSim.Region.Framework.Scenes.Hypergrid; |
45 | using OpenSim.Region.CoreModules.World.Meta7Windlight; | ||
45 | using OpenSim.Region.ScriptEngine.Shared; | 46 | using OpenSim.Region.ScriptEngine.Shared; |
46 | using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; | 47 | using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; |
47 | using OpenSim.Region.ScriptEngine.Shared.ScriptBase; | 48 | using OpenSim.Region.ScriptEngine.Shared.ScriptBase; |
@@ -1974,5 +1975,337 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1974 | return ret; | 1975 | return ret; |
1975 | } | 1976 | } |
1976 | 1977 | ||
1978 | /// <summary> | ||
1979 | /// Get the current Windlight scene | ||
1980 | /// </summary> | ||
1981 | /// <returns>List of windlight parameters</returns> | ||
1982 | public LSL_List osGetWindlightScene(LSL_List rules) | ||
1983 | { | ||
1984 | CheckThreatLevel(ThreatLevel.Low, "osGetWindlightScene"); | ||
1985 | m_host.AddScriptLPS(1); | ||
1986 | RegionMeta7WindlightData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; | ||
1987 | |||
1988 | LSL_List values = new LSL_List(); | ||
1989 | int idx = 0; | ||
1990 | while (idx < rules.Length) | ||
1991 | { | ||
1992 | uint rule = (uint)rules.GetLSLIntegerItem(idx); | ||
1993 | LSL_List toadd = new LSL_List(); | ||
1994 | |||
1995 | switch (rule) | ||
1996 | { | ||
1997 | case (int)ScriptBaseClass.WL_AMBIENT: | ||
1998 | toadd.Add(new LSL_Rotation(wl.ambient.X, wl.ambient.Y, wl.ambient.Z, wl.ambient.W)); | ||
1999 | break; | ||
2000 | case (int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION: | ||
2001 | toadd.Add(new LSL_Vector(wl.bigWaveDirection.X, wl.bigWaveDirection.Y, 0.0f)); | ||
2002 | break; | ||
2003 | case (int)ScriptBaseClass.WL_BLUE_DENSITY: | ||
2004 | toadd.Add(new LSL_Rotation(wl.blueDensity.X, wl.blueDensity.Y, wl.blueDensity.Z, wl.blueDensity.W)); | ||
2005 | break; | ||
2006 | case (int)ScriptBaseClass.WL_BLUR_MULTIPLIER: | ||
2007 | toadd.Add(new LSL_Float(wl.blurMultiplier)); | ||
2008 | break; | ||
2009 | case (int)ScriptBaseClass.WL_CLOUD_COLOR: | ||
2010 | toadd.Add(new LSL_Rotation(wl.cloudColor.X, wl.cloudColor.Y, wl.cloudColor.Z, wl.cloudColor.W)); | ||
2011 | break; | ||
2012 | case (int)ScriptBaseClass.WL_CLOUD_COVERAGE: | ||
2013 | toadd.Add(new LSL_Float(wl.cloudCoverage)); | ||
2014 | break; | ||
2015 | case (int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY: | ||
2016 | toadd.Add(new LSL_Vector(wl.cloudDetailXYDensity.X, wl.cloudDetailXYDensity.Y, wl.cloudDetailXYDensity.Z)); | ||
2017 | break; | ||
2018 | case (int)ScriptBaseClass.WL_CLOUD_SCALE: | ||
2019 | toadd.Add(new LSL_Float(wl.cloudScale)); | ||
2020 | break; | ||
2021 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X: | ||
2022 | toadd.Add(new LSL_Float(wl.cloudScrollX)); | ||
2023 | break; | ||
2024 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK: | ||
2025 | toadd.Add(new LSL_Integer(wl.cloudScrollXLock ? 1 : 0)); | ||
2026 | break; | ||
2027 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y: | ||
2028 | toadd.Add(new LSL_Float(wl.cloudScrollY)); | ||
2029 | break; | ||
2030 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK: | ||
2031 | toadd.Add(new LSL_Integer(wl.cloudScrollYLock ? 1 : 0)); | ||
2032 | break; | ||
2033 | case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: | ||
2034 | toadd.Add(new LSL_Vector(wl.cloudXYDensity.X, wl.cloudXYDensity.Y, wl.cloudXYDensity.Z)); | ||
2035 | break; | ||
2036 | case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: | ||
2037 | toadd.Add(new LSL_Float(wl.densityMultiplier)); | ||
2038 | break; | ||
2039 | case (int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER: | ||
2040 | toadd.Add(new LSL_Float(wl.distanceMultiplier)); | ||
2041 | break; | ||
2042 | case (int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS: | ||
2043 | toadd.Add(new LSL_Integer(wl.drawClassicClouds ? 1 : 0)); | ||
2044 | break; | ||
2045 | case (int)ScriptBaseClass.WL_EAST_ANGLE: | ||
2046 | toadd.Add(new LSL_Float(wl.eastAngle)); | ||
2047 | break; | ||
2048 | case (int)ScriptBaseClass.WL_FRESNEL_OFFSET: | ||
2049 | toadd.Add(new LSL_Float(wl.fresnelOffset)); | ||
2050 | break; | ||
2051 | case (int)ScriptBaseClass.WL_FRESNEL_SCALE: | ||
2052 | toadd.Add(new LSL_Float(wl.fresnelScale)); | ||
2053 | break; | ||
2054 | case (int)ScriptBaseClass.WL_HAZE_DENSITY: | ||
2055 | toadd.Add(new LSL_Float(wl.hazeDensity)); | ||
2056 | break; | ||
2057 | case (int)ScriptBaseClass.WL_HAZE_HORIZON: | ||
2058 | toadd.Add(new LSL_Float(wl.hazeHorizon)); | ||
2059 | break; | ||
2060 | case (int)ScriptBaseClass.WL_HORIZON: | ||
2061 | toadd.Add(new LSL_Rotation(wl.horizon.X, wl.horizon.Y, wl.horizon.Z, wl.horizon.W)); | ||
2062 | break; | ||
2063 | case (int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION: | ||
2064 | toadd.Add(new LSL_Vector(wl.littleWaveDirection.X, wl.littleWaveDirection.Y, 0.0f)); | ||
2065 | break; | ||
2066 | case (int)ScriptBaseClass.WL_MAX_ALTITUDE: | ||
2067 | toadd.Add(new LSL_Integer(wl.maxAltitude)); | ||
2068 | break; | ||
2069 | case (int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE: | ||
2070 | toadd.Add(new LSL_Key(wl.normalMapTexture.ToString())); | ||
2071 | break; | ||
2072 | case (int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE: | ||
2073 | toadd.Add(new LSL_Vector(wl.reflectionWaveletScale.X, wl.reflectionWaveletScale.Y, wl.reflectionWaveletScale.Z)); | ||
2074 | break; | ||
2075 | case (int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE: | ||
2076 | toadd.Add(new LSL_Float(wl.refractScaleAbove)); | ||
2077 | break; | ||
2078 | case (int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW: | ||
2079 | toadd.Add(new LSL_Float(wl.refractScaleBelow)); | ||
2080 | break; | ||
2081 | case (int)ScriptBaseClass.WL_SCENE_GAMMA: | ||
2082 | toadd.Add(new LSL_Float(wl.sceneGamma)); | ||
2083 | break; | ||
2084 | case (int)ScriptBaseClass.WL_STAR_BRIGHTNESS: | ||
2085 | toadd.Add(new LSL_Float(wl.starBrightness)); | ||
2086 | break; | ||
2087 | case (int)ScriptBaseClass.WL_SUN_GLOW_FOCUS: | ||
2088 | toadd.Add(new LSL_Float(wl.sunGlowFocus)); | ||
2089 | break; | ||
2090 | case (int)ScriptBaseClass.WL_SUN_GLOW_SIZE: | ||
2091 | toadd.Add(new LSL_Float(wl.sunGlowSize)); | ||
2092 | break; | ||
2093 | case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: | ||
2094 | toadd.Add(new LSL_Rotation(wl.sunMoonColor.X, wl.sunMoonColor.Y, wl.sunMoonColor.Z, wl.sunMoonColor.W)); | ||
2095 | break; | ||
2096 | case (int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER: | ||
2097 | toadd.Add(new LSL_Float(wl.underwaterFogModifier)); | ||
2098 | break; | ||
2099 | case (int)ScriptBaseClass.WL_WATER_COLOR: | ||
2100 | toadd.Add(new LSL_Vector(wl.waterColor.X, wl.waterColor.Y, wl.waterColor.Z)); | ||
2101 | break; | ||
2102 | case (int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT: | ||
2103 | toadd.Add(new LSL_Float(wl.waterFogDensityExponent)); | ||
2104 | break; | ||
2105 | } | ||
2106 | |||
2107 | if (toadd.Length > 0) | ||
2108 | { | ||
2109 | values.Add(rule); | ||
2110 | values.Add(toadd.Data[0]); | ||
2111 | } | ||
2112 | idx++; | ||
2113 | } | ||
2114 | |||
2115 | |||
2116 | return values; | ||
2117 | |||
2118 | } | ||
2119 | |||
2120 | /// <summary> | ||
2121 | /// Set the current Windlight scene | ||
2122 | /// </summary> | ||
2123 | /// <param name="rules"></param> | ||
2124 | /// <returns>success: true or false</returns> | ||
2125 | public int osSetWindlightScene(LSL_List rules) | ||
2126 | { | ||
2127 | CheckThreatLevel(ThreatLevel.High, "osSetWindlightScene"); | ||
2128 | int success = 0; | ||
2129 | m_host.AddScriptLPS(1); | ||
2130 | if (Meta7WindlightModule.EnableWindlight) | ||
2131 | { | ||
2132 | RegionMeta7WindlightData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; | ||
2133 | |||
2134 | LSL_List values = new LSL_List(); | ||
2135 | int idx = 0; | ||
2136 | success = 1; | ||
2137 | while (idx < rules.Length) | ||
2138 | { | ||
2139 | uint rule = (uint)rules.GetLSLIntegerItem(idx); | ||
2140 | LSL_Types.Quaternion iQ; | ||
2141 | LSL_Types.Vector3 iV; | ||
2142 | switch (rule) | ||
2143 | { | ||
2144 | case (int)ScriptBaseClass.WL_AMBIENT: | ||
2145 | idx++; | ||
2146 | iQ = rules.GetQuaternionItem(idx); | ||
2147 | wl.ambient = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | ||
2148 | break; | ||
2149 | case (int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION: | ||
2150 | idx++; | ||
2151 | iV = rules.GetVector3Item(idx); | ||
2152 | wl.bigWaveDirection = new Vector2((float)iV.x, (float)iV.y); | ||
2153 | break; | ||
2154 | case (int)ScriptBaseClass.WL_BLUE_DENSITY: | ||
2155 | idx++; | ||
2156 | iQ = rules.GetQuaternionItem(idx); | ||
2157 | wl.blueDensity = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | ||
2158 | break; | ||
2159 | case (int)ScriptBaseClass.WL_BLUR_MULTIPLIER: | ||
2160 | idx++; | ||
2161 | wl.blurMultiplier = (float)rules.GetLSLFloatItem(idx); | ||
2162 | break; | ||
2163 | case (int)ScriptBaseClass.WL_CLOUD_COLOR: | ||
2164 | idx++; | ||
2165 | iQ = rules.GetQuaternionItem(idx); | ||
2166 | wl.cloudColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | ||
2167 | break; | ||
2168 | case (int)ScriptBaseClass.WL_CLOUD_COVERAGE: | ||
2169 | idx++; | ||
2170 | wl.cloudCoverage = (float)rules.GetLSLFloatItem(idx); | ||
2171 | break; | ||
2172 | case (int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY: | ||
2173 | idx++; | ||
2174 | iV = rules.GetVector3Item(idx); | ||
2175 | wl.cloudDetailXYDensity = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); | ||
2176 | break; | ||
2177 | case (int)ScriptBaseClass.WL_CLOUD_SCALE: | ||
2178 | idx++; | ||
2179 | wl.cloudScale = (float)rules.GetLSLFloatItem(idx); | ||
2180 | break; | ||
2181 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X: | ||
2182 | idx++; | ||
2183 | wl.cloudScrollX = (float)rules.GetLSLFloatItem(idx); | ||
2184 | break; | ||
2185 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK: | ||
2186 | idx++; | ||
2187 | wl.cloudScrollXLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; | ||
2188 | break; | ||
2189 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y: | ||
2190 | idx++; | ||
2191 | wl.cloudScrollY = (float)rules.GetLSLFloatItem(idx); | ||
2192 | break; | ||
2193 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK: | ||
2194 | idx++; | ||
2195 | wl.cloudScrollYLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; | ||
2196 | break; | ||
2197 | case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: | ||
2198 | idx++; | ||
2199 | iV = rules.GetVector3Item(idx); | ||
2200 | wl.cloudDetailXYDensity = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); | ||
2201 | break; | ||
2202 | case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: | ||
2203 | idx++; | ||
2204 | wl.densityMultiplier = (float)rules.GetLSLFloatItem(idx); | ||
2205 | break; | ||
2206 | case (int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER: | ||
2207 | idx++; | ||
2208 | wl.distanceMultiplier = (float)rules.GetLSLFloatItem(idx); | ||
2209 | break; | ||
2210 | case (int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS: | ||
2211 | idx++; | ||
2212 | wl.drawClassicClouds = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; | ||
2213 | break; | ||
2214 | case (int)ScriptBaseClass.WL_EAST_ANGLE: | ||
2215 | idx++; | ||
2216 | wl.eastAngle = (float)rules.GetLSLFloatItem(idx); | ||
2217 | break; | ||
2218 | case (int)ScriptBaseClass.WL_FRESNEL_OFFSET: | ||
2219 | idx++; | ||
2220 | wl.fresnelOffset = (float)rules.GetLSLFloatItem(idx); | ||
2221 | break; | ||
2222 | case (int)ScriptBaseClass.WL_FRESNEL_SCALE: | ||
2223 | idx++; | ||
2224 | wl.fresnelScale = (float)rules.GetLSLFloatItem(idx); | ||
2225 | break; | ||
2226 | case (int)ScriptBaseClass.WL_HAZE_DENSITY: | ||
2227 | idx++; | ||
2228 | wl.hazeDensity = (float)rules.GetLSLFloatItem(idx); | ||
2229 | break; | ||
2230 | case (int)ScriptBaseClass.WL_HAZE_HORIZON: | ||
2231 | idx++; | ||
2232 | wl.hazeHorizon= (float)rules.GetLSLFloatItem(idx); | ||
2233 | break; | ||
2234 | case (int)ScriptBaseClass.WL_HORIZON: | ||
2235 | idx++; | ||
2236 | iQ = rules.GetQuaternionItem(idx); | ||
2237 | wl.horizon = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | ||
2238 | break; | ||
2239 | case (int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION: | ||
2240 | idx++; | ||
2241 | iV = rules.GetVector3Item(idx); | ||
2242 | wl.littleWaveDirection = new Vector2((float)iV.x, (float)iV.y); | ||
2243 | break; | ||
2244 | case (int)ScriptBaseClass.WL_MAX_ALTITUDE: | ||
2245 | idx++; | ||
2246 | wl.maxAltitude = (ushort)rules.GetLSLIntegerItem(idx).value; | ||
2247 | break; | ||
2248 | case (int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE: | ||
2249 | idx++; | ||
2250 | wl.normalMapTexture = new UUID(rules.GetLSLStringItem(idx).m_string); | ||
2251 | break; | ||
2252 | case (int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE: | ||
2253 | idx++; | ||
2254 | iV = rules.GetVector3Item(idx); | ||
2255 | wl.reflectionWaveletScale= new Vector3((float)iV.x, (float)iV.y, (float)iV.z); | ||
2256 | break; | ||
2257 | case (int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE: | ||
2258 | idx++; | ||
2259 | wl.refractScaleAbove = (float)rules.GetLSLFloatItem(idx); | ||
2260 | break; | ||
2261 | case (int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW: | ||
2262 | idx++; | ||
2263 | wl.refractScaleBelow = (float)rules.GetLSLFloatItem(idx); | ||
2264 | break; | ||
2265 | case (int)ScriptBaseClass.WL_SCENE_GAMMA: | ||
2266 | idx++; | ||
2267 | wl.sceneGamma = (float)rules.GetLSLFloatItem(idx); | ||
2268 | break; | ||
2269 | case (int)ScriptBaseClass.WL_STAR_BRIGHTNESS: | ||
2270 | idx++; | ||
2271 | wl.starBrightness= (float)rules.GetLSLFloatItem(idx); | ||
2272 | break; | ||
2273 | case (int)ScriptBaseClass.WL_SUN_GLOW_FOCUS: | ||
2274 | idx++; | ||
2275 | wl.sunGlowFocus= (float)rules.GetLSLFloatItem(idx); | ||
2276 | break; | ||
2277 | case (int)ScriptBaseClass.WL_SUN_GLOW_SIZE: | ||
2278 | idx++; | ||
2279 | wl.sunGlowSize= (float)rules.GetLSLFloatItem(idx); | ||
2280 | break; | ||
2281 | case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: | ||
2282 | idx++; | ||
2283 | iQ = rules.GetQuaternionItem(idx); | ||
2284 | wl.sunMoonColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | ||
2285 | break; | ||
2286 | case (int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER: | ||
2287 | idx++; | ||
2288 | wl.underwaterFogModifier = (float)rules.GetLSLFloatItem(idx); | ||
2289 | break; | ||
2290 | case (int)ScriptBaseClass.WL_WATER_COLOR: | ||
2291 | idx++; | ||
2292 | iV = rules.GetVector3Item(idx); | ||
2293 | wl.waterColor = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); | ||
2294 | break; | ||
2295 | case (int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT: | ||
2296 | idx++; | ||
2297 | wl.waterFogDensityExponent = (float)rules.GetLSLFloatItem(idx); | ||
2298 | break; | ||
2299 | default: | ||
2300 | success = 0; | ||
2301 | break; | ||
2302 | } | ||
2303 | idx++; | ||
2304 | } | ||
2305 | m_host.ParentGroup.Scene.StoreWindlightProfile(wl); | ||
2306 | |||
2307 | } | ||
2308 | return success; | ||
2309 | } | ||
1977 | } | 2310 | } |
1978 | } | 2311 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 0b0dc00..dd2869b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
80 | // Avatar Info Commands | 80 | // Avatar Info Commands |
81 | string osGetAgentIP(string agent); | 81 | string osGetAgentIP(string agent); |
82 | LSL_List osGetAgents(); | 82 | LSL_List osGetAgents(); |
83 | 83 | ||
84 | // Teleport commands | 84 | // Teleport commands |
85 | void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | 85 | void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); |
86 | void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | 86 | void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); |
@@ -163,5 +163,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
163 | key osGetMapTexture(); | 163 | key osGetMapTexture(); |
164 | key osGetRegionMapTexture(string regionName); | 164 | key osGetRegionMapTexture(string regionName); |
165 | LSL_List osGetRegionStats(); | 165 | LSL_List osGetRegionStats(); |
166 | |||
167 | // Windlight Functions | ||
168 | LSL_List osGetWindlightScene(LSL_List rules); | ||
169 | int osSetWindlightScene(LSL_List rules); | ||
170 | |||
166 | } | 171 | } |
167 | } | 172 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index acff8fb..4956c28 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -539,5 +539,43 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
539 | public const int STATS_ACTIVE_SCRIPTS = 19; | 539 | public const int STATS_ACTIVE_SCRIPTS = 19; |
540 | public const int STATS_SCRIPT_LPS = 20; | 540 | public const int STATS_SCRIPT_LPS = 20; |
541 | 541 | ||
542 | // Constants for osWindlight* | ||
543 | public const int WL_WATER_COLOR = 0; | ||
544 | public const int WL_WATER_FOG_DENSITY_EXPONENT = 1; | ||
545 | public const int WL_UNDERWATER_FOG_MODIFIER = 2; | ||
546 | public const int WL_REFLECTION_WAVELET_SCALE = 3; | ||
547 | public const int WL_FRESNEL_SCALE = 4; | ||
548 | public const int WL_FRESNEL_OFFSET = 5; | ||
549 | public const int WL_REFRACT_SCALE_ABOVE = 6; | ||
550 | public const int WL_REFRACT_SCALE_BELOW = 7; | ||
551 | public const int WL_BLUR_MULTIPLIER = 8; | ||
552 | public const int WL_BIG_WAVE_DIRECTION = 9; | ||
553 | public const int WL_LITTLE_WAVE_DIRECTION = 10; | ||
554 | public const int WL_NORMAL_MAP_TEXTURE = 11; | ||
555 | public const int WL_HORIZON = 12; | ||
556 | public const int WL_HAZE_HORIZON = 13; | ||
557 | public const int WL_BLUE_DENSITY = 14; | ||
558 | public const int WL_HAZE_DENSITY = 15; | ||
559 | public const int WL_DENSITY_MULTIPLIER = 16; | ||
560 | public const int WL_DISTANCE_MULTIPLIER = 17; | ||
561 | public const int WL_MAX_ALTITUDE = 18; | ||
562 | public const int WL_SUN_MOON_COLOR = 19; | ||
563 | public const int WL_AMBIENT = 20; | ||
564 | public const int WL_EAST_ANGLE = 21; | ||
565 | public const int WL_SUN_GLOW_FOCUS = 22; | ||
566 | public const int WL_SUN_GLOW_SIZE = 23; | ||
567 | public const int WL_SCENE_GAMMA = 24; | ||
568 | public const int WL_STAR_BRIGHTNESS = 25; | ||
569 | public const int WL_CLOUD_COLOR = 26; | ||
570 | public const int WL_CLOUD_XY_DENSITY = 27; | ||
571 | public const int WL_CLOUD_COVERAGE = 28; | ||
572 | public const int WL_CLOUD_SCALE = 29; | ||
573 | public const int WL_CLOUD_DETAIL_XY_DENSITY = 30; | ||
574 | public const int WL_CLOUD_SCROLL_X = 31; | ||
575 | public const int WL_CLOUD_SCROLL_Y = 32; | ||
576 | public const int WL_CLOUD_SCROLL_Y_LOCK = 33; | ||
577 | public const int WL_CLOUD_SCROLL_X_LOCK = 34; | ||
578 | public const int WL_DRAW_CLASSIC_CLOUDS = 35; | ||
579 | |||
542 | } | 580 | } |
543 | } | 581 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 519463e..1480b8b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -637,5 +637,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
637 | { | 637 | { |
638 | return m_OSSL_Functions.osGetRegionStats(); | 638 | return m_OSSL_Functions.osGetRegionStats(); |
639 | } | 639 | } |
640 | |||
641 | public LSL_List osGetWindlightScene(LSL_List rules) | ||
642 | { | ||
643 | return m_OSSL_Functions.osGetWindlightScene(rules); | ||
644 | } | ||
645 | |||
646 | public int osSetWindlightScene(LSL_List rules) | ||
647 | { | ||
648 | return m_OSSL_Functions.osSetWindlightScene(rules); | ||
649 | } | ||
640 | } | 650 | } |
641 | } | 651 | } |