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