make clouds a bit diferent on regions running on same instance.. well should be diferent .. :)

0.9.0-post-fixes
UbitUmarov 2016-09-23 17:13:59 +01:00
parent f5189b2cdd
commit 22b531f2e4
1 changed files with 5 additions and 1 deletions

View File

@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.World
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private uint m_frame = 0; private uint m_frame = 0;
private int m_frameUpdateRate = 1000; private int m_frameUpdateRate = 1000;
private Random m_rndnums = new Random(Environment.TickCount); private Random m_rndnums;
private Scene m_scene = null; private Scene m_scene = null;
private bool m_ready = false; private bool m_ready = false;
private bool m_enabled = false; private bool m_enabled = false;
@ -76,6 +76,10 @@ namespace OpenSim.Region.CoreModules.World
m_scene = scene; m_scene = scene;
scene.RegisterModuleInterface<ICloudModule>(this); scene.RegisterModuleInterface<ICloudModule>(this);
int seed = Environment.TickCount;
seed += (int)(scene.RegionInfo.RegionLocX << 16);
seed += (int)(scene.RegionInfo.RegionLocY);
m_rndnums = new Random(seed);
GenerateCloudCover(); GenerateCloudCover();
m_dataVersion = (int)m_scene.AllocateLocalId(); m_dataVersion = (int)m_scene.AllocateLocalId();