misspell all across the board

master
UbitUmarov 2020-06-18 12:01:53 +01:00
parent 104f7f0eb2
commit 44c90bf294
14 changed files with 90 additions and 89 deletions

View File

@ -35,6 +35,7 @@ using System.Threading;
using log4net; using log4net;
using MySql.Data.MySqlClient; using MySql.Data.MySqlClient;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
@ -824,7 +825,7 @@ namespace OpenSim.Data.MySQL
"UserLookAtX, UserLookAtY, UserLookAtZ, " + "UserLookAtX, UserLookAtY, UserLookAtZ, " +
"AuthbuyerID, OtherCleanTime, Dwell, MediaType, MediaDescription, " + "AuthbuyerID, OtherCleanTime, Dwell, MediaType, MediaDescription, " +
"MediaSize, MediaLoop, ObscureMusic, ObscureMedia, " + "MediaSize, MediaLoop, ObscureMusic, ObscureMedia, " +
"SeeAVs, AnyAVSounds, GroupAVSounds, enviroment) values (" + "SeeAVs, AnyAVSounds, GroupAVSounds, environment) values (" +
"?UUID, ?RegionUUID, " + "?UUID, ?RegionUUID, " +
"?LocalLandID, ?Bitmap, ?Name, ?Description, " + "?LocalLandID, ?Bitmap, ?Name, ?Description, " +
"?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " + "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " +
@ -836,7 +837,7 @@ namespace OpenSim.Data.MySQL
"?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " +
"?AuthbuyerID, ?OtherCleanTime, ?Dwell, ?MediaType, ?MediaDescription, "+ "?AuthbuyerID, ?OtherCleanTime, ?Dwell, ?MediaType, ?MediaDescription, "+
"CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia, " + "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia, " +
"?SeeAVs, ?AnyAVSounds, ?GroupAVSounds, ?enviroment)"; "?SeeAVs, ?AnyAVSounds, ?GroupAVSounds, ?environment)";
FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID); FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID);
@ -1407,6 +1408,8 @@ namespace OpenSim.Data.MySQL
if (!(row["cacheID"] is DBNull)) if (!(row["cacheID"] is DBNull))
newSettings.CacheID = DBGuid.FromDB(row["cacheID"]); newSettings.CacheID = DBGuid.FromDB(row["cacheID"]);
return newSettings; return newSettings;
} }
@ -1490,33 +1493,33 @@ namespace OpenSim.Data.MySQL
if (!(row["GroupAVSounds"] is System.DBNull)) if (!(row["GroupAVSounds"] is System.DBNull))
newData.GroupAVSounds = Convert.ToInt32(row["GroupAVSounds"]) != 0 ? true : false; newData.GroupAVSounds = Convert.ToInt32(row["GroupAVSounds"]) != 0 ? true : false;
if (row["enviroment"] is DBNull) if (row["environment"] is DBNull)
{ {
newData.Enviroment = null; newData.Environment = null;
newData.EnviromentVersion = -1; newData.EnvironmentVersion = -1;
} }
else else
{ {
string env = (string)row["enviroment"]; string env = (string)row["environment"];
if(string.IsNullOrEmpty(env)) if(string.IsNullOrEmpty(env))
{ {
newData.Enviroment = null; newData.Environment = null;
newData.EnviromentVersion = -1; newData.EnvironmentVersion = -1;
} }
else else
{ {
try try
{ {
OSD oenv = OSDParser.Deserialize(env); OSD oenv = OSDParser.Deserialize(env);
ViewerEnviroment VEnv = new ViewerEnviroment(); ViewerEnvironment VEnv = new ViewerEnvironment();
VEnv.FromOSD(oenv); VEnv.FromOSD(oenv);
newData.Enviroment = VEnv; newData.Environment = VEnv;
newData.EnviromentVersion = VEnv.version; newData.EnvironmentVersion = VEnv.version;
} }
catch catch
{ {
newData.Enviroment = null; newData.Environment = null;
newData.EnviromentVersion = -1; newData.EnvironmentVersion = -1;
} }
} }
} }
@ -1866,19 +1869,19 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("SeeAVs", land.SeeAVs ? 1 : 0); cmd.Parameters.AddWithValue("SeeAVs", land.SeeAVs ? 1 : 0);
cmd.Parameters.AddWithValue("AnyAVSounds", land.AnyAVSounds ? 1 : 0); cmd.Parameters.AddWithValue("AnyAVSounds", land.AnyAVSounds ? 1 : 0);
cmd.Parameters.AddWithValue("GroupAVSounds", land.GroupAVSounds ? 1 : 0); cmd.Parameters.AddWithValue("GroupAVSounds", land.GroupAVSounds ? 1 : 0);
if (land.Enviroment == null) if (land.Environment == null)
cmd.Parameters.AddWithValue("enviroment", ""); cmd.Parameters.AddWithValue("environment", "");
else else
{ {
try try
{ {
OSD oenv = land.Enviroment.ToOSD(); OSD oenv = land.Environment.ToOSD();
string env = OSDParser.SerializeLLSDNotationFull(oenv); string env = OSDParser.SerializeLLSDNotationFull(oenv);
cmd.Parameters.AddWithValue("enviroment", env); cmd.Parameters.AddWithValue("environment", env);
} }
catch catch
{ {
cmd.Parameters.AddWithValue("enviroment", ""); cmd.Parameters.AddWithValue("environment", "");
} }
} }
} }

View File

@ -540,13 +540,13 @@ ALTER TABLE `prims` ADD COLUMN `pseudocrc` int DEFAULT '0';
ALTER TABLE `regionsettings` ADD COLUMN `cacheID` char(36) DEFAULT NULL; ALTER TABLE `regionsettings` ADD COLUMN `cacheID` char(36) DEFAULT NULL;
COMMIT; COMMIT;
:VERSION 62 #----- increase size of enviroment settings :VERSION 62 #----- increase size of environment settings
BEGIN; BEGIN;
ALTER TABLE `regionenvironment` MODIFY `llsd_settings` MEDIUMTEXT; ALTER TABLE `regionenvironment` MODIFY `llsd_settings` MEDIUMTEXT;
COMMIT; COMMIT;
:VERSION 63 #----- parcel enviroment store :VERSION 63 #----- parcel environment store
BEGIN; BEGIN;
ALTER TABLE `land` ADD COLUMN `enviroment` MEDIUMTEXT default NULL; ALTER TABLE `land` ADD COLUMN `environment` MEDIUMTEXT default NULL;
COMMIT; COMMIT;

View File

@ -99,6 +99,6 @@ namespace OpenSim.Region.Framework.Interfaces
void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id); void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id);
void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id); void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id);
void sendClientInitialLandInfo(IClientAPI remoteClient, bool overlay); void sendClientInitialLandInfo(IClientAPI remoteClient, bool overlay);
void ClearAllEnviroments(); void ClearAllEnvironments();
} }
} }

View File

@ -173,7 +173,7 @@ namespace OpenSim.Framework
void SetParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); void SetParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
void SetSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); void SetSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
void StoreEnviroment(ViewerEnviroment VEnv); void StoreEnvironment(ViewerEnvironment VEnv);
/// <summary> /// <summary>
/// Set the media url for this land parcel /// Set the media url for this land parcel

View File

@ -732,10 +732,10 @@ namespace OpenSim.Framework
} }
} }
public int EnviromentVersion = -1; public int EnvironmentVersion = -1;
[XmlIgnore] //this needs to be added by hand [XmlIgnore] //this needs to be added by hand
public ViewerEnviroment Enviroment { get; set;} public ViewerEnvironment Environment { get; set;}
public LandData() public LandData()
{ {
@ -744,8 +744,8 @@ namespace OpenSim.Framework
AnyAVSounds = true; AnyAVSounds = true;
GroupAVSounds = true; GroupAVSounds = true;
LastDwellTimeMS = Util.GetTimeStampMS(); LastDwellTimeMS = Util.GetTimeStampMS();
EnviromentVersion = -1; EnvironmentVersion = -1;
Enviroment = null; Environment = null;
} }
/// <summary> /// <summary>
@ -811,15 +811,15 @@ namespace OpenSim.Framework
landData._parcelAccessList.Add(newEntry); landData._parcelAccessList.Add(newEntry);
} }
if (Enviroment == null) if (Environment == null)
{ {
landData.Enviroment = null; landData.Environment = null;
landData.EnviromentVersion = -1; landData.EnvironmentVersion = -1;
} }
else else
{ {
landData.Enviroment = Enviroment.Clone(); landData.Environment = Environment.Clone();
landData.EnviromentVersion = EnviromentVersion; landData.EnvironmentVersion = EnvironmentVersion;
} }
return landData; return landData;

View File

@ -260,7 +260,7 @@ namespace OpenSim.Framework
sunlight_color = map["sunlight_color"]; sunlight_color = map["sunlight_color"];
ViewerEnviroment.convertFromAngles(this, map["sun_angle"], map["east_angle"]); ViewerEnvironment.convertFromAngles(this, map["sun_angle"], map["east_angle"]);
Name = name; Name = name;
} }
@ -271,7 +271,7 @@ namespace OpenSim.Framework
float sun_angle; float sun_angle;
float east_angle; float east_angle;
Vector4 lightnorm; Vector4 lightnorm;
ViewerEnviroment.convertToAngles(this, out sun_angle, out east_angle, out lightnorm); ViewerEnvironment.convertToAngles(this, out sun_angle, out east_angle, out lightnorm);
map["ambient"] = new Vector4(ambient.X, ambient.Y, ambient.Z, 1); map["ambient"] = new Vector4(ambient.X, ambient.Y, ambient.Z, 1);
map["blue_density"] = new Vector4(blue_density.X, blue_density.Y, blue_density.Z, 1); map["blue_density"] = new Vector4(blue_density.X, blue_density.Y, blue_density.Z, 1);
map["blue_horizon"] = new Vector4(blue_horizon.X, blue_horizon.Y, blue_horizon.Z, 1); map["blue_horizon"] = new Vector4(blue_horizon.X, blue_horizon.Y, blue_horizon.Z, 1);
@ -891,7 +891,7 @@ namespace OpenSim.Framework
} }
} }
public class ViewerEnviroment public class ViewerEnvironment
{ {
DayCycle Cycle = new DayCycle(); DayCycle Cycle = new DayCycle();
public int DayLength = 14400; public int DayLength = 14400;
@ -1210,11 +1210,11 @@ namespace OpenSim.Framework
return env; return env;
} }
public ViewerEnviroment Clone() public ViewerEnvironment Clone()
{ {
// im lazy need to proper clone later // im lazy need to proper clone later
OSD osd = ToOSD(); OSD osd = ToOSD();
ViewerEnviroment VEnv = new ViewerEnviroment(); ViewerEnvironment VEnv = new ViewerEnvironment();
VEnv.FromOSD(osd); VEnv.FromOSD(osd);
return VEnv; return VEnv;
} }

View File

@ -6566,7 +6566,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
bool allowenvovr = (regionFlags & (uint)RegionFlags.AllowEnviromentOverride) != 0; bool allowenvovr = (regionFlags & (uint)RegionFlags.AllowEnviromentOverride) != 0;
LLSDxmlEncode.AddArrayAndMap("ParcelEnvironmentBlock", sb); LLSDxmlEncode.AddArrayAndMap("ParcelEnvironmentBlock", sb);
LLSDxmlEncode.AddElem("ParcelEnvironmentVersion", allowenvovr ? -1: landData.EnviromentVersion, sb); LLSDxmlEncode.AddElem("ParcelEnvironmentVersion", allowenvovr ? -1: landData.EnvironmentVersion, sb);
LLSDxmlEncode.AddElem("RegionAllowEnvironmentOverride", allowenvovr, sb); LLSDxmlEncode.AddElem("RegionAllowEnvironmentOverride", allowenvovr, sb);
LLSDxmlEncode.AddEndMapAndArray(sb); LLSDxmlEncode.AddEndMapAndArray(sb);

View File

@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (folder == null || folder.Owner != remoteClient.AgentId) if (folder == null || folder.Owner != remoteClient.AgentId)
return; return;
if (transactionID != UUID.Zero) if (transactionID != UUID.Zero && assetType != (byte)AssetType.Settings)
{ {
IAgentAssetTransactions agentTransactions = m_Scene.AgentTransactionsModule; IAgentAssetTransactions agentTransactions = m_Scene.AgentTransactionsModule;
if (agentTransactions != null) if (agentTransactions != null)
@ -228,13 +228,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
} }
if(assetType == (byte)AssetType.Settings) if(assetType == (byte)AssetType.Settings)
{ {
/* this is wrong subtype may need to be checked
if(data == null) if(data == null)
{ {
IEnvironmentModule envModule = m_Scene.RequestModuleInterface<IEnvironmentModule>(); IEnvironmentModule envModule = m_Scene.RequestModuleInterface<IEnvironmentModule>();
if(envModule == null) if(envModule == null)
return; return;
data = envModule.GetDefaultAssetData(name); data = envModule.GetDefaultAssetData(subType);
if(data == null) if(data == null)
{ {
m_log.ErrorFormat( m_log.ErrorFormat(
@ -242,7 +241,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
return; return;
} }
} }
*/
flags = subType; flags = subType;
} }
else if( assetType == (byte)AssetType.Clothing || else if( assetType == (byte)AssetType.Clothing ||
@ -1057,14 +1056,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (!attachment) if (!attachment)
{ {
// If it's rezzed in world, select it. Much easier to if(RezSelected)
// find small items.
//
foreach (SceneObjectPart part in group.Parts)
{ {
part.CreateSelected = true; group.IsSelected = true;
group.RootPart.CreateSelected = true;
} }
if (rootPart.Shape.PCode == (byte)PCode.Prim) if (rootPart.Shape.PCode == (byte)PCode.Prim)
group.ClearPartAttachmentData(); group.ClearPartAttachmentData();
} }

View File

@ -255,11 +255,11 @@ namespace OpenSim.Region.CoreModules.World.Land
} }
} }
public void ClearAllEnviroments() public void ClearAllEnvironments()
{ {
List<ILandObject> parcels = AllParcels(); List<ILandObject> parcels = AllParcels();
for(int i=0; i< parcels.Count; ++i) for(int i=0; i< parcels.Count; ++i)
parcels[i].StoreEnviroment(null); parcels[i].StoreEnvironment(null);
} }
#endregion #endregion
} }

View File

@ -1982,18 +1982,18 @@ namespace OpenSim.Region.CoreModules.World.Land
m_scene.EventManager.TriggerLandObjectUpdated((uint)LandData.LocalID, this); m_scene.EventManager.TriggerLandObjectUpdated((uint)LandData.LocalID, this);
} }
public void StoreEnviroment(ViewerEnviroment VEnv) public void StoreEnvironment(ViewerEnvironment VEnv)
{ {
int lastVersion = LandData.EnviromentVersion; int lastVersion = LandData.EnvironmentVersion;
LandData.Enviroment = VEnv; LandData.Environment = VEnv;
if (VEnv == null) if (VEnv == null)
LandData.EnviromentVersion = -1; LandData.EnvironmentVersion = -1;
else else
{ {
++LandData.EnviromentVersion; ++LandData.EnvironmentVersion;
VEnv.version = LandData.EnviromentVersion; VEnv.version = LandData.EnvironmentVersion;
} }
if(lastVersion != LandData.EnviromentVersion) if(lastVersion != LandData.EnvironmentVersion)
{ {
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData); m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData);
SendLandUpdateToAvatarsOverMe(); SendLandUpdateToAvatarsOverMe();

View File

@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
private IAssetService m_assetService; private IAssetService m_assetService;
private ILandChannel m_landChannel; private ILandChannel m_landChannel;
private static ViewerEnviroment m_DefaultEnv = null; private static ViewerEnvironment m_DefaultEnv = null;
private static readonly string m_defaultDayAssetID = "5646d39e-d3d7-6aff-ed71-30fc87d64a91"; private static readonly string m_defaultDayAssetID = "5646d39e-d3d7-6aff-ed71-30fc87d64a91";
private int m_regionEnvVersion = -1; private int m_regionEnvVersion = -1;
@ -157,7 +157,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
try try
{ {
OSD oenv = OSDParser.Deserialize(envData); OSD oenv = OSDParser.Deserialize(envData);
m_DefaultEnv = new ViewerEnviroment(); m_DefaultEnv = new ViewerEnvironment();
m_DefaultEnv.CycleFromOSD(oenv); m_DefaultEnv.CycleFromOSD(oenv);
} }
catch ( Exception e) catch ( Exception e)
@ -168,7 +168,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
} }
} }
if (m_DefaultEnv == null) if (m_DefaultEnv == null)
m_DefaultEnv = new ViewerEnviroment(); m_DefaultEnv = new ViewerEnvironment();
string senv = scene.SimulationDataService.LoadRegionEnvironmentSettings(scene.RegionInfo.RegionID); string senv = scene.SimulationDataService.LoadRegionEnvironmentSettings(scene.RegionInfo.RegionID);
if(!string.IsNullOrEmpty(senv)) if(!string.IsNullOrEmpty(senv))
@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
try try
{ {
OSD oenv = OSDParser.Deserialize(senv); OSD oenv = OSDParser.Deserialize(senv);
ViewerEnviroment VEnv = new ViewerEnviroment(); ViewerEnvironment VEnv = new ViewerEnvironment();
if(oenv is OSDArray) if(oenv is OSDArray)
VEnv.FromWLOSD(oenv); VEnv.FromWLOSD(oenv);
else else
@ -215,7 +215,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
#endregion #endregion
#region IEnvironmentModule #region IEnvironmentModule
private void StoreOnRegion(ViewerEnviroment VEnv) private void StoreOnRegion(ViewerEnvironment VEnv)
{ {
try try
{ {
@ -282,7 +282,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
if (!Enabled) if (!Enabled)
return; return;
ViewerEnviroment VEnv = new ViewerEnviroment(); ViewerEnvironment VEnv = new ViewerEnvironment();
VEnv.FromLightShare(ls); VEnv.FromLightShare(ls);
StoreOnRegion(VEnv); StoreOnRegion(VEnv);
@ -297,7 +297,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
RegionLightShareData ls = null; RegionLightShareData ls = null;
try try
{ {
ViewerEnviroment VEnv = m_scene.RegionEnviroment; ViewerEnvironment VEnv = m_scene.RegionEnviroment;
if(VEnv == null) if(VEnv == null)
return new RegionLightShareData(); return new RegionLightShareData();
ls = VEnv.ToLightShare(); ls = VEnv.ToLightShare();
@ -396,7 +396,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
ILandObject land = m_scene.LandChannel.GetLandObject(parcel); ILandObject land = m_scene.LandChannel.GetLandObject(parcel);
if (land != null && land.LandData != null) if (land != null && land.LandData != null)
{ {
land.StoreEnviroment(null); land.StoreEnvironment(null);
WindlightRefresh(0, false); WindlightRefresh(0, false);
} }
} }
@ -422,14 +422,14 @@ namespace OpenSim.Region.CoreModules.World.LightShare
} }
} }
ViewerEnviroment VEnv; ViewerEnvironment VEnv;
if (parcel == -1) if (parcel == -1)
VEnv = GetRegionEnviroment(); VEnv = GetRegionEnviroment();
else else
{ {
ILandObject land = m_scene.LandChannel.GetLandObject(parcel); ILandObject land = m_scene.LandChannel.GetLandObject(parcel);
if (land != null && land.LandData != null && land.LandData.Enviroment != null) if (land != null && land.LandData != null && land.LandData.Environment != null)
VEnv = land.LandData.Enviroment; VEnv = land.LandData.Environment;
else else
VEnv = GetRegionEnviroment(); VEnv = GetRegionEnviroment();
} }
@ -496,7 +496,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
} }
} }
ViewerEnviroment VEnv = m_scene.RegionEnviroment; ViewerEnvironment VEnv = m_scene.RegionEnviroment;
ILandObject lchannel; ILandObject lchannel;
if (parcel == -1) if (parcel == -1)
{ {
@ -522,7 +522,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
message = "No permission to change parcel enviroment"; message = "No permission to change parcel enviroment";
goto Error; goto Error;
} }
VEnv = lchannel.LandData.Enviroment; VEnv = lchannel.LandData.Environment;
} }
try try
@ -567,7 +567,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
} }
else else
{ {
lchannel.StoreEnviroment(VEnv); lchannel.StoreEnvironment(VEnv);
m_log.InfoFormat("[{0}]: ExtEnviroment parcel {1} of region {2} settings from agentID {3} saved", m_log.InfoFormat("[{0}]: ExtEnviroment parcel {1} of region {2} settings from agentID {3} saved",
Name, parcel, caps.RegionName, agentID); Name, parcel, caps.RegionName, agentID);
} }
@ -578,7 +578,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
} }
else if (req is OSDArray) else if (req is OSDArray)
{ {
VEnv = new ViewerEnviroment(); VEnv = new ViewerEnvironment();
VEnv.FromWLOSD(req); VEnv.FromWLOSD(req);
StoreOnRegion(VEnv); StoreOnRegion(VEnv);
success = true; success = true;
@ -633,10 +633,10 @@ namespace OpenSim.Region.CoreModules.World.LightShare
return; return;
} }
ViewerEnviroment VEnv; ViewerEnvironment VEnv;
ILandObject land = m_scene.LandChannel.GetLandObject(sp.AbsolutePosition.X, sp.AbsolutePosition.Y); ILandObject land = m_scene.LandChannel.GetLandObject(sp.AbsolutePosition.X, sp.AbsolutePosition.Y);
if (land != null && land.LandData != null && land.LandData.Enviroment != null) if (land != null && land.LandData != null && land.LandData.Environment != null)
VEnv = land.LandData.Enviroment; VEnv = land.LandData.Environment;
else else
VEnv = GetRegionEnviroment(); VEnv = GetRegionEnviroment();
@ -681,14 +681,14 @@ namespace OpenSim.Region.CoreModules.World.LightShare
} }
ILandObject land = m_scene.LandChannel.GetLandObject(sp.AbsolutePosition.X, sp.AbsolutePosition.Y); ILandObject land = m_scene.LandChannel.GetLandObject(sp.AbsolutePosition.X, sp.AbsolutePosition.Y);
if (land != null && land.LandData != null && land.LandData.Enviroment != null) if (land != null && land.LandData != null && land.LandData.Environment != null)
{ {
fail_reason = "The parcel where you are has own enviroment set. You need a updated viewer to change enviroment"; fail_reason = "The parcel where you are has own enviroment set. You need a updated viewer to change enviroment";
goto Error; goto Error;
} }
try try
{ {
ViewerEnviroment VEnv = new ViewerEnviroment(); ViewerEnvironment VEnv = new ViewerEnvironment();
OSD env = OSDParser.Deserialize(request.InputStream); OSD env = OSDParser.Deserialize(request.InputStream);
VEnv.FromWLOSD(env); VEnv.FromWLOSD(env);
StoreOnRegion(VEnv); StoreOnRegion(VEnv);
@ -848,7 +848,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
if(m_scene.GetNumberOfClients() == 0) if(m_scene.GetNumberOfClients() == 0)
return; return;
ViewerEnviroment env = GetRegionEnviroment(); ViewerEnvironment env = GetRegionEnviroment();
float dayFrac = GetDayFractionTime(env); float dayFrac = GetDayFractionTime(env);
float wldayFrac = dayFrac; float wldayFrac = dayFrac;
@ -889,13 +889,13 @@ namespace OpenSim.Region.CoreModules.World.LightShare
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ViewerEnviroment GetRegionEnviroment() public ViewerEnvironment GetRegionEnviroment()
{ {
return m_scene.RegionEnviroment == null ? m_DefaultEnv : m_scene.RegionEnviroment; return m_scene.RegionEnviroment == null ? m_DefaultEnv : m_scene.RegionEnviroment;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float GetDayFractionTime(ViewerEnviroment env) public float GetDayFractionTime(ViewerEnvironment env)
{ {
double dayfrac = env.DayLength; double dayfrac = env.DayLength;
dayfrac = ((Util.UnixTimeSinceEpochSecs() + env.DayOffset) % dayfrac) / dayfrac; dayfrac = ((Util.UnixTimeSinceEpochSecs() + env.DayOffset) % dayfrac) / dayfrac;
@ -909,39 +909,39 @@ namespace OpenSim.Region.CoreModules.World.LightShare
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int GetDayLength(ViewerEnviroment env) public int GetDayLength(ViewerEnvironment env)
{ {
return env.DayLength; return env.DayLength;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int GetDayOffset(ViewerEnviroment env) public int GetDayOffset(ViewerEnvironment env)
{ {
return env.DayOffset; return env.DayOffset;
} }
public Vector3 GetSunDir(ViewerEnviroment env, float altitude) public Vector3 GetSunDir(ViewerEnvironment env, float altitude)
{ {
env.getPositions(altitude, GetDayFractionTime(env), out Vector3 sundir, out Vector3 moondir, env.getPositions(altitude, GetDayFractionTime(env), out Vector3 sundir, out Vector3 moondir,
out Quaternion sunrot, out Quaternion moonrot); out Quaternion sunrot, out Quaternion moonrot);
return sundir; return sundir;
} }
public Quaternion GetSunRot(ViewerEnviroment env, float altitude) public Quaternion GetSunRot(ViewerEnvironment env, float altitude)
{ {
env.getPositions(altitude, GetDayFractionTime(env), out Vector3 sundir, out Vector3 moondir, env.getPositions(altitude, GetDayFractionTime(env), out Vector3 sundir, out Vector3 moondir,
out Quaternion sunrot, out Quaternion moonrot); out Quaternion sunrot, out Quaternion moonrot);
return sunrot; return sunrot;
} }
public Vector3 GetMoonDir(ViewerEnviroment env, float altitude) public Vector3 GetMoonDir(ViewerEnvironment env, float altitude)
{ {
env.getPositions(altitude, GetDayFractionTime(env), out Vector3 sundir, out Vector3 moondir, env.getPositions(altitude, GetDayFractionTime(env), out Vector3 sundir, out Vector3 moondir,
out Quaternion sunrot, out Quaternion moonrot); out Quaternion sunrot, out Quaternion moonrot);
return moondir; return moondir;
} }
public Quaternion GetMoonRot(ViewerEnviroment env, float altitude) public Quaternion GetMoonRot(ViewerEnvironment env, float altitude)
{ {
env.getPositions(altitude, GetDayFractionTime(env), out Vector3 sundir, out Vector3 moondir, env.getPositions(altitude, GetDayFractionTime(env), out Vector3 sundir, out Vector3 moondir,
out Quaternion sunrot, out Quaternion moonrot); out Quaternion sunrot, out Quaternion moonrot);

View File

@ -5896,7 +5896,7 @@ Environment.Exit(1);
IEnvironmentModule envM = RequestModuleInterface<IEnvironmentModule>(); IEnvironmentModule envM = RequestModuleInterface<IEnvironmentModule>();
if(LandChannel != null && envM != null) if(LandChannel != null && envM != null)
{ {
LandChannel.ClearAllEnviroments(); LandChannel.ClearAllEnvironments();
envM.WindlightRefresh(1,false); envM.WindlightRefresh(1,false);
} }
} }

View File

@ -1549,8 +1549,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param> /// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param>
public void osSetEstateSunSettings(bool sunFixed, double sunHour) public void osSetEstateSunSettings(bool sunFixed, double sunHour)
{ {
/*
CheckThreatLevel(ThreatLevel.High, "osSetEstateSunSettings"); CheckThreatLevel(ThreatLevel.High, "osSetEstateSunSettings");
while (sunHour > 24.0) while (sunHour > 24.0)
sunHour -= 24.0; sunHour -= 24.0;
@ -1563,6 +1564,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
World.EstateDataService.StoreEstateSettings(World.RegionInfo.EstateSettings); World.EstateDataService.StoreEstateSettings(World.RegionInfo.EstateSettings);
World.EventManager.TriggerEstateToolsSunUpdate(World.RegionInfo.RegionHandle); World.EventManager.TriggerEstateToolsSunUpdate(World.RegionInfo.RegionHandle);
*/
} }
/// <summary> /// <summary>

View File

@ -120,6 +120,6 @@ namespace OpenSim.Tests.Common
public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {} public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {}
public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {} public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {}
public void sendClientInitialLandInfo(IClientAPI remoteClient, bool overlay) { } public void sendClientInitialLandInfo(IClientAPI remoteClient, bool overlay) { }
public void ClearAllEnviroments(){ } public void ClearAllEnvironments(){ }
} }
} }