a few small changes
parent
731dcbad5b
commit
f43e077150
|
@ -30,7 +30,7 @@ using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Interfaces
|
namespace OpenSim.Region.Environment.Interfaces
|
||||||
{
|
{
|
||||||
public interface IAvatarFactory : IRegionModule
|
public interface IAvatarFactory
|
||||||
{
|
{
|
||||||
bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance);
|
bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance);
|
||||||
void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance);
|
void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance);
|
||||||
|
|
|
@ -62,6 +62,13 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
lock (m_syncInit)
|
lock (m_syncInit)
|
||||||
{
|
{
|
||||||
|
if (!m_scenes.Contains(scene))
|
||||||
|
{
|
||||||
|
m_scenes.Add(scene);
|
||||||
|
scene.EventManager.OnNewClient += NewClient;
|
||||||
|
scene.RegisterModuleInterface<ISimChat>(this);
|
||||||
|
}
|
||||||
|
|
||||||
// wrap this in a try block so that defaults will work if
|
// wrap this in a try block so that defaults will work if
|
||||||
// the config file doesn't specify otherwise.
|
// the config file doesn't specify otherwise.
|
||||||
try
|
try
|
||||||
|
@ -82,13 +89,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_scenes.Contains(scene))
|
|
||||||
{
|
|
||||||
m_scenes.Add(scene);
|
|
||||||
scene.EventManager.OnNewClient += NewClient;
|
|
||||||
scene.RegisterModuleInterface<ISimChat>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
// setup IRC Relay
|
// setup IRC Relay
|
||||||
if (m_irc == null) { m_irc = new IRCChatModule(config); }
|
if (m_irc == null) { m_irc = new IRCChatModule(config); }
|
||||||
if (m_irc_connector == null)
|
if (m_irc_connector == null)
|
||||||
|
|
|
@ -986,6 +986,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (terrain != null)
|
if (terrain != null)
|
||||||
{
|
{
|
||||||
byte[] data = terrain.WriteJpegImage("defaultstripe.png");
|
byte[] data = terrain.WriteJpegImage("defaultstripe.png");
|
||||||
|
if (data != null)
|
||||||
|
{
|
||||||
m_regInfo.EstateSettings.terrainImageID = LLUUID.Random();
|
m_regInfo.EstateSettings.terrainImageID = LLUUID.Random();
|
||||||
AssetBase asset = new AssetBase();
|
AssetBase asset = new AssetBase();
|
||||||
asset.FullID = m_regInfo.EstateSettings.terrainImageID;
|
asset.FullID = m_regInfo.EstateSettings.terrainImageID;
|
||||||
|
@ -996,6 +998,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
asset.Temporary = temporary;
|
asset.Temporary = temporary;
|
||||||
AssetCache.AddAsset(asset);
|
AssetCache.AddAsset(asset);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
private short flyState = 0;
|
private short flyState = 0;
|
||||||
private LLQuaternion bodyDirection = LLQuaternion.Identity;
|
private LLQuaternion bodyDirection = LLQuaternion.Identity;
|
||||||
private short count = 0;
|
private short count = 0;
|
||||||
|
private short frame = 0;
|
||||||
|
|
||||||
#pragma warning disable 67
|
#pragma warning disable 67
|
||||||
|
|
||||||
|
@ -450,6 +451,10 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
frame++;
|
||||||
|
if (frame > 20)
|
||||||
|
{
|
||||||
|
frame = 0;
|
||||||
if (OnAgentUpdate != null)
|
if (OnAgentUpdate != null)
|
||||||
{
|
{
|
||||||
AgentUpdatePacket pack = new AgentUpdatePacket();
|
AgentUpdatePacket pack = new AgentUpdatePacket();
|
||||||
|
@ -475,7 +480,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
flyState = 0;
|
flyState = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count >= 200)
|
if (count >= 10)
|
||||||
{
|
{
|
||||||
if (OnChatFromViewer != null)
|
if (OnChatFromViewer != null)
|
||||||
{
|
{
|
||||||
|
@ -494,6 +499,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool AddMoney(int debit)
|
public bool AddMoney(int debit)
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
|
|
||||||
AddCpuCounter(regionInfo, pos);
|
AddCpuCounter(regionInfo, pos);
|
||||||
// AddComplexObjects(regionInfo, pos);
|
// AddComplexObjects(regionInfo, pos);
|
||||||
// AddAvatars();
|
AddAvatars();
|
||||||
AddFileSystemObjects();
|
AddFileSystemObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ using OpenSim.Framework.Data.MapperFactory;
|
||||||
|
|
||||||
namespace OpenSim.Region.Modules.AvatarFactory
|
namespace OpenSim.Region.Modules.AvatarFactory
|
||||||
{
|
{
|
||||||
public class AvatarFactoryModule : IAvatarFactory
|
public class AvatarFactoryModule : IAvatarFactory, IRegionModule
|
||||||
{
|
{
|
||||||
private Scene m_scene = null;
|
private Scene m_scene = null;
|
||||||
private readonly Dictionary<LLUUID, AvatarAppearance> m_avatarsAppearance = new Dictionary<LLUUID, AvatarAppearance>();
|
private readonly Dictionary<LLUUID, AvatarAppearance> m_avatarsAppearance = new Dictionary<LLUUID, AvatarAppearance>();
|
||||||
|
@ -100,7 +100,7 @@ namespace OpenSim.Region.Modules.AvatarFactory
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Thread.Sleep(5000);
|
Thread.Sleep(5000); //why is this here?
|
||||||
|
|
||||||
//this is the first thread to request this appearance
|
//this is the first thread to request this appearance
|
||||||
//so let it check the db and if not found then create a default appearance
|
//so let it check the db and if not found then create a default appearance
|
||||||
|
|
Loading…
Reference in New Issue