mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
allow the use of Sky or water from a asset, not just full daycycle. This may need more work
This commit is contained in:
@@ -594,16 +594,16 @@ namespace OpenSim.Region.CoreModules.World.LightShare
|
||||
try
|
||||
{
|
||||
OSD req = OSDParser.Deserialize(httpRequest.InputStream);
|
||||
if(req is OpenMetaverse.StructuredData.OSDMap)
|
||||
if(req is OSDMap)
|
||||
{
|
||||
OSDMap map = req as OpenMetaverse.StructuredData.OSDMap;
|
||||
OSDMap map = req as OSDMap;
|
||||
if(map.TryGetValue("environment", out OSD env))
|
||||
{
|
||||
if (VEnv == null)
|
||||
// need a proper clone
|
||||
VEnv = m_DefaultEnv.Clone();
|
||||
|
||||
OSDMap evmap = (OSDMap)env;
|
||||
OSDMap evmap = env as OSDMap;
|
||||
if(evmap.TryGetValue("day_asset", out OSD tmp) && !evmap.ContainsKey("day_cycle"))
|
||||
{
|
||||
string id = tmp.AsString();
|
||||
@@ -616,7 +616,11 @@ namespace OpenSim.Region.CoreModules.World.LightShare
|
||||
try
|
||||
{
|
||||
OSD oenv = OSDParser.Deserialize(asset.Data);
|
||||
VEnv.CycleFromOSD(oenv);
|
||||
evmap.TryGetValue("day_name", out tmp);
|
||||
if(tmp is OSDString)
|
||||
VEnv.FromAssetOSD(tmp.AsString(), oenv);
|
||||
else
|
||||
VEnv.FromAssetOSD(null, oenv);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -624,7 +628,9 @@ namespace OpenSim.Region.CoreModules.World.LightShare
|
||||
return;
|
||||
}
|
||||
}
|
||||
VEnv.FromOSD(env);
|
||||
else
|
||||
VEnv.FromOSD(env);
|
||||
|
||||
if(lchannel == null)
|
||||
{
|
||||
StoreOnRegion(VEnv);
|
||||
|
||||
Reference in New Issue
Block a user