From 78aea6239d88822d3bd9c1c5b883df9fb2529de7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 4 Oct 2010 04:25:44 +0100 Subject: Revert "Add linden prim renderer and update libOMV" This reverts commit 766ce9a14146dc9814d488364f5c931d0fa96a17. --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 4 ++-- .../CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 6ed4867..9eaa758 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -252,7 +252,7 @@ namespace Flotsam.RegionModules.AssetCache } else { - m_MemoryCache.AddOrUpdate(key, asset, Double.MaxValue); + m_MemoryCache.AddOrUpdate(key, asset, DateTime.MaxValue); } } } @@ -863,4 +863,4 @@ namespace Flotsam.RegionModules.AssetCache #endregion } -} +} \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index e7cfda1..7c12b8c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs @@ -53,9 +53,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts public void Cache(UUID userID, UserAccount account) { // Cache even null accounts - m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS); + m_UUIDCache.AddOrUpdate(userID, account, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); if (account != null) - m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS); + m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); } -- cgit v1.1 From b1c8d0588829dfa76f89460eeb8406d9c4fc479f Mon Sep 17 00:00:00 2001 From: Master ScienceSim Date: Wed, 20 Oct 2010 16:17:54 -0700 Subject: Major refactoring of appearance handling. AvatarService -- add two new methods, GetAppearance and SetAppearance to get around the lossy encoding in AvatarData. Preseve the old functions to avoid changing the behavior for ROBUST services. AvatarAppearance -- major refactor, moved the various encoding methods used by AgentCircuitData, ClientAgentUpdate and ScenePresence into one location. Changed initialization. AvatarAttachments -- added a class specifically to handle attachments in preparation for additional functionality that will be needed for viewer 2. AvatarFactory -- removed a number of unused or methods duplicated in other locations. Moved in all appearance event handling from ScenePresence. Required a change to IClientAPI that propogated throughout all the IClientAPI implementations. --- .../Avatar/Attachments/AttachmentsModule.cs | 16 +- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 237 +++++++++++++-------- .../Avatar/LocalAvatarServiceConnector.cs | 11 + 3 files changed, 169 insertions(+), 95 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 2a0c0b1..ad6b1de 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -124,13 +124,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments // Save avatar attachment information ScenePresence presence; - if (m_scene.AvatarFactory != null && m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) + if (m_scene.AvatarService != null && m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) { m_log.Info( "[ATTACHMENTS MODULE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId + ", AttachmentPoint: " + AttachmentPt); - m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); + m_scene.AvatarService.SetAppearance(remoteClient.AgentId, presence.Appearance); } } } @@ -382,8 +382,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments item = m_scene.InventoryService.GetItem(item); presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /* att.UUID */); - if (m_scene.AvatarFactory != null) - m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); + if (m_scene.AvatarService != null) + m_scene.AvatarService.SetAppearance(remoteClient.AgentId, presence.Appearance); } } @@ -405,10 +405,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments presence.Appearance.DetachAttachment(itemID); // Save avatar attachment information - if (m_scene.AvatarFactory != null) + if (m_scene.AvatarService != null) { m_log.Debug("[ATTACHMENTS MODULE]: Detaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID); - m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); + m_scene.AvatarService.SetAppearance(remoteClient.AgentId, presence.Appearance); } } @@ -435,9 +435,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments presence.Appearance.DetachAttachment(itemID); - if (m_scene.AvatarFactory != null) + if (m_scene.AvatarService != null) { - m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); + m_scene.AvatarService.SetAppearance(remoteClient.AgentId, presence.Appearance); } part.ParentGroup.DetachToGround(); diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 22c8937..9f7ff7f 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -38,48 +38,20 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { - public class AvatarFactoryModule : IAvatarFactory, IRegionModule + public class AvatarFactoryModule : IRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; private Scene m_scene = null; - private static readonly AvatarAppearance def = new AvatarAppearance(); - public bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance) - { - AvatarData avatar = m_scene.AvatarService.GetAvatar(avatarId); - //if ((profile != null) && (profile.RootFolder != null)) - if (avatar != null) - { - appearance = avatar.ToAvatarAppearance(avatarId); - return true; - } - - m_log.ErrorFormat("[APPEARANCE]: Appearance not found for {0}, creating default", avatarId); - appearance = CreateDefault(avatarId); - return false; - } - - private AvatarAppearance CreateDefault(UUID avatarId) - { - AvatarAppearance appearance = null; - AvatarWearable[] wearables; - byte[] visualParams; - GetDefaultAvatarAppearance(out wearables, out visualParams); - appearance = new AvatarAppearance(avatarId, wearables, visualParams); - - return appearance; - } + private bool m_startAnimationSet = false; public void Initialise(Scene scene, IConfigSource source) { - scene.RegisterModuleInterface(this); scene.EventManager.OnNewClient += NewClient; if (m_scene == null) - { m_scene = scene; - } - } public void PostInitialise() @@ -102,6 +74,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory public void NewClient(IClientAPI client) { + client.OnRequestWearables += SendWearables; + client.OnSetAppearance += SetAppearance; client.OnAvatarNowWearing += AvatarIsWearing; } @@ -110,42 +84,115 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // client.OnAvatarNowWearing -= AvatarIsWearing; } - public void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance) + /// + /// Set appearance data (textureentry and slider settings) received from the client + /// + /// + /// + public void SetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams) { - IInventoryService invService = m_scene.InventoryService; + ScenePresence sp = m_scene.GetScenePresence(client.AgentId); + if (sp == null) + { + m_log.WarnFormat("[AVFACTORY] SetAppearance unable to find presence for {0}",client.AgentId); + return; + } + +// DEBUG ON + m_log.WarnFormat("[AVFACTORY] SetAppearance for {0}",client.AgentId); +// DEBUG OFF - if (invService.GetRootFolder(userID) != null) +/* + if (m_physicsActor != null) { - for (int i = 0; i < 13; i++) + if (!IsChildAgent) { - if (appearance.Wearables[i].ItemID == UUID.Zero) - { - appearance.Wearables[i].AssetID = UUID.Zero; - } - else - { - InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID); - baseItem = invService.GetItem(baseItem); + // This may seem like it's redundant, remove the avatar from the physics scene + // just to add it back again, but it saves us from having to update + // 3 variables 10 times a second. + bool flyingTemp = m_physicsActor.Flying; + RemoveFromPhysicalScene(); + //m_scene.PhysicsScene.RemoveAvatar(m_physicsActor); - if (baseItem != null) - { - appearance.Wearables[i].AssetID = baseItem.AssetID; - } - else + //PhysicsActor = null; + + AddToPhysicalScene(flyingTemp); + } + } +*/ + #region Bake Cache Check + + bool changed = false; + + // Process the texture entry + if (textureEntry != null) + { + for (int i = 0; i < BAKE_INDICES.Length; i++) + { + int j = BAKE_INDICES[i]; + Primitive.TextureEntryFace face = textureEntry.FaceTextures[j]; + + if (face != null && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE) + { + if (m_scene.AssetService.Get(face.TextureID.ToString()) == null) { - m_log.ErrorFormat( - "[APPEARANCE]: Can't find inventory item {0} for {1}, setting to default", - appearance.Wearables[i].ItemID, (WearableType)i); - - appearance.Wearables[i].AssetID = def.Wearables[i].AssetID; + m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}",face.TextureID,j,this.Name); + client.SendRebakeAvatarTextures(face.TextureID); } } } + changed = sp.Appearance.SetTextureEntries(textureEntry); + + } + + #endregion Bake Cache Check + + changed = sp.Appearance.SetVisualParams(visualParams) || changed; + + // If nothing changed (this happens frequently) just return + if (changed) + { +// DEBUG ON + m_log.Warn("[AVFACTORY] Appearance changed"); +// DEBUG OFF + sp.Appearance.SetAppearance(textureEntry, visualParams); + if (sp.Appearance.AvatarHeight > 0) + sp.SetHeight(sp.Appearance.AvatarHeight); + + m_scene.AvatarService.SetAppearance(client.AgentId, sp.Appearance); } +// DEBUG ON else + m_log.Warn("[AVFACTORY] Appearance did not change"); +// DEBUG OFF + + sp.SendAppearanceToAllOtherAgents(); + if (!m_startAnimationSet) + { + sp.Animator.UpdateMovementAnimations(); + m_startAnimationSet = true; + } + + client.SendAvatarDataImmediate(sp); + client.SendAppearance(sp.Appearance.Owner,sp.Appearance.VisualParams,sp.Appearance.Texture.GetBytes()); + } + + /// + /// Tell the client for this scene presence what items it should be wearing now + /// + public void SendWearables(IClientAPI client) + { + ScenePresence sp = m_scene.GetScenePresence(client.AgentId); + if (sp == null) { - m_log.WarnFormat("[APPEARANCE]: user {0} has no inventory, appearance isn't going to work", userID); + m_log.WarnFormat("[AVFACTORY] SendWearables unable to find presence for {0}",client.AgentId); + return; } + +// DEBUG ON + m_log.WarnFormat("[AVFACTORY]: Received request for wearables of {0}", client.AgentId); +// DEBUG OFF + client.SendWearables(sp.Appearance.Wearables,sp.Appearance.Serial++); } /// @@ -153,65 +200,81 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory /// /// /// - public void AvatarIsWearing(Object sender, AvatarWearingArgs e) + public void AvatarIsWearing(IClientAPI client, AvatarWearingArgs e) { - m_log.DebugFormat("[APPEARANCE]: AvatarIsWearing"); - - IClientAPI clientView = (IClientAPI)sender; - ScenePresence sp = m_scene.GetScenePresence(clientView.AgentId); - - if (sp == null) + ScenePresence sp = m_scene.GetScenePresence(client.AgentId); + if (sp == null) { - m_log.Error("[APPEARANCE]: Avatar is child agent, ignoring AvatarIsWearing event"); + m_log.WarnFormat("[AVFACTORY] AvatarIsWearing unable to find presence for {0}",client.AgentId); return; } + +// DEBUG ON + m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}",client.AgentId); +// DEBUG OFF + + AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance); - AvatarAppearance avatAppearance = sp.Appearance; - //if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) + //if (!TryGetAvatarAppearance(client.AgentId, out avatAppearance)) //{ - // m_log.Warn("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence"); + // m_log.Warn("[AVFACTORY]: We didn't seem to find the appearance, falling back to ScenePresence"); // avatAppearance = sp.Appearance; //} - //m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name); + //m_log.DebugFormat("[AVFACTORY]: Received wearables for {0}", client.Name); foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) { - if (wear.Type < 13) + if (wear.Type < AvatarWearable.MAX_WEARABLES) { - avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; + AvatarWearable newWearable = new AvatarWearable(wear.ItemID,UUID.Zero); + avatAppearance.SetWearable(wear.Type, newWearable); } } SetAppearanceAssets(sp.UUID, ref avatAppearance); - AvatarData adata = new AvatarData(avatAppearance); - m_scene.AvatarService.SetAvatar(clientView.AgentId, adata); + m_scene.AvatarService.SetAppearance(client.AgentId, avatAppearance); sp.Appearance = avatAppearance; } - public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) + private void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance) { - visualParams = GetDefaultVisualParams(); - wearables = AvatarWearable.DefaultWearables; - } + IInventoryService invService = m_scene.InventoryService; - public void UpdateDatabase(UUID user, AvatarAppearance appearance) - { - //m_log.DebugFormat("[APPEARANCE]: UpdateDatabase"); - AvatarData adata = new AvatarData(appearance); - m_scene.AvatarService.SetAvatar(user, adata); - } + if (invService.GetRootFolder(userID) != null) + { + for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) + { + if (appearance.Wearables[i].ItemID == UUID.Zero) + { + appearance.Wearables[i].AssetID = UUID.Zero; + } + else + { + InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID); + baseItem = invService.GetItem(baseItem); - private static byte[] GetDefaultVisualParams() - { - byte[] visualParams; - visualParams = new byte[218]; - for (int i = 0; i < 218; i++) + if (baseItem != null) + { + appearance.Wearables[i].AssetID = baseItem.AssetID; + } + else + { + m_log.ErrorFormat( + "[AVFACTORY]: Can't find inventory item {0} for {1}, setting to default", + appearance.Wearables[i].ItemID, (WearableType)i); + + appearance.Wearables[i].ItemID = UUID.Zero; + appearance.Wearables[i].AssetID = UUID.Zero; + } + } + } + } + else { - visualParams[i] = 100; + m_log.WarnFormat("[AVFACTORY]: user {0} has no inventory, appearance isn't going to work", userID); } - return visualParams; } } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs index 47f19a3..9ee19f8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Reflection; using log4net; using Nini.Config; +using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Server.Base; @@ -137,6 +138,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar #region IAvatarService + public AvatarAppearance GetAppearance(UUID userID) + { + return m_AvatarService.GetAppearance(userID); + } + + public bool SetAppearance(UUID userID, AvatarAppearance appearance) + { + return m_AvatarService.SetAppearance(userID,appearance); + } + public AvatarData GetAvatar(UUID userID) { return m_AvatarService.GetAvatar(userID); -- cgit v1.1 From 6e58c3d563b50c5797d1cfffbaec3fe82f18c2ea Mon Sep 17 00:00:00 2001 From: Master ScienceSim Date: Mon, 25 Oct 2010 14:11:47 -0700 Subject: Half of the compatibility is working. Login into a new region with old data works. Teleport out of a new region with old data works. Teleport into a new region with old data does not trigger the necessary rebake. --- OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 9f7ff7f..b74cdc9 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { if (m_scene.AssetService.Get(face.TextureID.ToString()) == null) { - m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}",face.TextureID,j,this.Name); + m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}",face.TextureID,j,client.Name); client.SendRebakeAvatarTextures(face.TextureID); } } -- cgit v1.1 From 9132e251aa0d0d7395dc4868fd57799dd679cdb7 Mon Sep 17 00:00:00 2001 From: Master ScienceSim Date: Tue, 26 Oct 2010 12:53:15 -0700 Subject: Made the check for texture assets asynchronous. This is one part of a bigger clean up that needs to happen around locks on appearance. --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index b74cdc9..5444f80 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -84,6 +84,15 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // client.OnAvatarNowWearing -= AvatarIsWearing; } + public void CheckBakedTextureAssets(IClientAPI client, UUID textureID, int idx) + { + if (m_scene.AssetService.Get(textureID.ToString()) == null) + { + m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}",textureID,idx,client.Name); + client.SendRebakeAvatarTextures(textureID); + } + } + /// /// Set appearance data (textureentry and slider settings) received from the client /// @@ -133,13 +142,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory Primitive.TextureEntryFace face = textureEntry.FaceTextures[j]; if (face != null && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE) - { - if (m_scene.AssetService.Get(face.TextureID.ToString()) == null) - { - m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}",face.TextureID,j,client.Name); - client.SendRebakeAvatarTextures(face.TextureID); - } - } + Util.FireAndForget(delegate(object o) { CheckBakedTextureAssets(client,face.TextureID,j); }); } changed = sp.Appearance.SetTextureEntries(textureEntry); -- cgit v1.1 From a331fd4e24012a246bea9ac11689afe933e7968e Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 27 Oct 2010 00:01:03 -0400 Subject: Formatting cleanup. --- .../Region/CoreModules/Avatar/Chat/ChatModule.cs | 2 +- .../Archiver/InventoryArchiveReadRequest.cs | 8 +-- .../Archiver/InventoryArchiveWriteRequest.cs | 4 +- .../Archiver/ArchiveWriteRequestPreparation.cs | 6 +-- OpenSim/Region/CoreModules/World/Sun/SunModule.cs | 57 +++++++--------------- 5 files changed, 27 insertions(+), 50 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index d76ff47..4359c01 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs @@ -238,7 +238,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat } (scene as Scene).EventManager.TriggerOnChatToClients( - fromID, receiverIDs, message, c.Type, fromPos, fromName, sourceType, ChatAudibleLevel.Fully); + fromID, receiverIDs, message, c.Type, fromPos, fromName, sourceType, ChatAudibleLevel.Fully); } static private Vector3 CenterOfRegion = new Vector3(128, 128, 30); diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 5500557..046b05f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -143,7 +143,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (filePath == ArchiveConstants.CONTROL_FILE_PATH) { LoadControlFile(filePath, data); - } + } else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) { if (LoadAsset(filePath, data)) @@ -479,11 +479,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// /// protected void LoadControlFile(string path, byte[] data) - { + { XDocument doc = XDocument.Parse(Encoding.ASCII.GetString(data)); XElement archiveElement = doc.Element("archive"); int majorVersion = int.Parse(archiveElement.Attribute("major_version").Value); - int minorVersion = int.Parse(archiveElement.Attribute("minor_version").Value); + int minorVersion = int.Parse(archiveElement.Attribute("minor_version").Value); string version = string.Format("{0}.{1}", majorVersion, minorVersion); if (majorVersion > MAX_MAJOR_VERSION) @@ -492,7 +492,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver string.Format( "The IAR you are trying to load has major version number of {0} but this version of OpenSim can only load IARs with major version number {1} and below", majorVersion, MAX_MAJOR_VERSION)); - } + } m_log.InfoFormat("[INVENTORY ARCHIVER]: Loading IAR with version {0}", version); } diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 249a8b4..9080e1c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver public void Execute() { try - { + { InventoryFolderBase inventoryFolder = null; InventoryItemBase inventoryItem = null; InventoryFolderBase rootFolder = m_scene.InventoryService.GetRootFolder(m_userInfo.PrincipalID); @@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver // Write out control file. This has to be done first so that subsequent loaders will see this file first // XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile()); - m_log.InfoFormat("[INVENTORY ARCHIVER]: Added control file to archive."); + m_log.InfoFormat("[INVENTORY ARCHIVER]: Added control file to archive."); if (inventoryFolder != null) { diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 1687d06..3182079 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -199,13 +199,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver { majorVersion = 1; minorVersion = 0; - } + } */ m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); // if (majorVersion == 1) // { -// m_log.WarnFormat("[ARCHIVER]: Please be aware that version 1.0 OARs are not compatible with OpenSim 0.7.0.2 and earlier. Please use the --version=0 option if you want to produce a compatible OAR"); +// m_log.WarnFormat("[ARCHIVER]: Please be aware that version 1.0 OARs are not compatible with OpenSim 0.7.0.2 and earlier. Please use the --version=0 option if you want to produce a compatible OAR"); // } @@ -232,6 +232,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver sw.Close(); return s; - } + } } } diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs index a6dc2ec..cea7c78 100644 --- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs +++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs @@ -44,10 +44,8 @@ namespace OpenSim.Region.CoreModules /// it is not based on ~06:00 == Sun Rise. Rather it is based on 00:00 being sun-rise. /// - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - // // Global Constants used to determine where in the sky the sun is // @@ -108,26 +106,25 @@ namespace OpenSim.Region.CoreModules private Scene m_scene = null; // Calculated Once in the lifetime of a region - private long TicksToEpoch; // Elapsed time for 1/1/1970 - private uint SecondsPerSunCycle; // Length of a virtual day in RW seconds - private uint SecondsPerYear; // Length of a virtual year in RW seconds - private double SunSpeed; // Rate of passage in radians/second - private double SeasonSpeed; // Rate of change for seasonal effects - // private double HoursToRadians; // Rate of change for seasonal effects - private long TicksUTCOffset = 0; // seconds offset from UTC + private long TicksToEpoch; // Elapsed time for 1/1/1970 + private uint SecondsPerSunCycle; // Length of a virtual day in RW seconds + private uint SecondsPerYear; // Length of a virtual year in RW seconds + private double SunSpeed; // Rate of passage in radians/second + private double SeasonSpeed; // Rate of change for seasonal effects + // private double HoursToRadians; // Rate of change for seasonal effects + private long TicksUTCOffset = 0; // seconds offset from UTC // Calculated every update - private float OrbitalPosition; // Orbital placement at a point in time - private double HorizonShift; // Axis offset to skew day and night - private double TotalDistanceTravelled; // Distance since beginning of time (in radians) - private double SeasonalOffset; // Seaonal variation of tilt - private float Magnitude; // Normal tilt - // private double VWTimeRatio; // VW time as a ratio of real time + private float OrbitalPosition; // Orbital placement at a point in time + private double HorizonShift; // Axis offset to skew day and night + private double TotalDistanceTravelled; // Distance since beginning of time (in radians) + private double SeasonalOffset; // Seaonal variation of tilt + private float Magnitude; // Normal tilt + // private double VWTimeRatio; // VW time as a ratio of real time // Working values private Vector3 Position = Vector3.Zero; private Vector3 Velocity = Vector3.Zero; - private Quaternion Tilt = new Quaternion(1.0f, 0.0f, 0.0f, 0.0f); - + private Quaternion Tilt = new Quaternion(1.0f, 0.0f, 0.0f, 0.0f); // Used to fix the sun in the sky so it doesn't move based on current time private bool m_SunFixed = false; @@ -135,8 +132,6 @@ namespace OpenSim.Region.CoreModules private const int TICKS_PER_SECOND = 10000000; - - // Current time in elapsed seconds since Jan 1st 1970 private ulong CurrentTime { @@ -149,8 +144,6 @@ namespace OpenSim.Region.CoreModules // Time in seconds since UTC to use to calculate sun position. ulong PosTime = 0; - - /// /// Calculate the sun's orbital position and its velocity. /// @@ -202,7 +195,6 @@ namespace OpenSim.Region.CoreModules PosTime += (ulong)(((CurDayPercentage - 0.5) / .5) * NightSeconds); } } - } TotalDistanceTravelled = SunSpeed * PosTime; // distance measured in radians @@ -251,7 +243,6 @@ namespace OpenSim.Region.CoreModules Velocity.X = 0; Velocity.Y = 0; Velocity.Z = 0; - } else { @@ -271,9 +262,7 @@ namespace OpenSim.Region.CoreModules private float GetCurrentTimeAsLindenSunHour() { if (m_SunFixed) - { return m_SunFixedHour + 6; - } return GetCurrentSunHour() + 6.0f; } @@ -297,8 +286,6 @@ namespace OpenSim.Region.CoreModules m_scene.AddCommand(this, String.Format("sun {0}", kvp.Key), String.Format("{0} - {1}", kvp.Key, kvp.Value), "", HandleSunConsoleCommand); } - - TimeZone local = TimeZone.CurrentTimeZone; TicksUTCOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks; m_log.Debug("[SUN]: localtime offset is " + TicksUTCOffset); @@ -325,13 +312,11 @@ namespace OpenSim.Region.CoreModules // must hard code to ~.5 to match sun position in LL based viewers m_HorizonShift = config.Configs["Sun"].GetDouble("day_night_offset", d_day_night); - // Scales the sun hours 0...12 vs 12...24, essentially makes daylight hours longer/shorter vs nighttime hours m_DayTimeSunHourScale = config.Configs["Sun"].GetDouble("day_time_sun_hour_scale", d_DayTimeSunHourScale); // Update frequency in frames m_UpdateInterval = config.Configs["Sun"].GetInt("update_interval", d_frame_mod); - } catch (Exception e) { @@ -391,10 +376,8 @@ namespace OpenSim.Region.CoreModules } scene.RegisterModuleInterface(this); - } - public void PostInitialise() { } @@ -402,7 +385,7 @@ namespace OpenSim.Region.CoreModules public void Close() { ready = false; - + // Remove our hooks m_scene.EventManager.OnFrame -= SunUpdate; m_scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; @@ -419,6 +402,7 @@ namespace OpenSim.Region.CoreModules { get { return false; } } + #endregion #region EventManager Events @@ -446,9 +430,7 @@ namespace OpenSim.Region.CoreModules public void SunUpdate() { if (((m_frame++ % m_UpdateInterval) != 0) || !ready || m_SunFixed || !receivedEstateToolsSunUpdate) - { return; - } GenSunPos(); // Generate shared values once @@ -467,7 +449,7 @@ namespace OpenSim.Region.CoreModules } /// - /// + /// /// /// /// Is the sun's position fixed? @@ -484,7 +466,6 @@ namespace OpenSim.Region.CoreModules while (FixedSunHour < 0) FixedSunHour += 24; - m_SunFixedHour = FixedSunHour; m_SunFixed = FixedSun; @@ -499,14 +480,12 @@ namespace OpenSim.Region.CoreModules // When sun settings are updated, we should update all clients with new settings. SunUpdateToAllClients(); - m_log.DebugFormat("[SUN]: PosTime : {0}", PosTime.ToString()); } } #endregion - private void SunUpdateToAllClients() { m_scene.ForEachScenePresence(delegate(ScenePresence sp) @@ -553,7 +532,6 @@ namespace OpenSim.Region.CoreModules { float ticksleftover = CurrentTime % SecondsPerSunCycle; - return (24.0f * (ticksleftover / SecondsPerSunCycle)); } @@ -666,7 +644,6 @@ namespace OpenSim.Region.CoreModules // When sun settings are updated, we should update all clients with new settings. SunUpdateToAllClients(); - } return Output; -- cgit v1.1 From 0f28fa400d1f853cc3c3ebd2707b08ed06d2f127 Mon Sep 17 00:00:00 2001 From: Master ScienceSim Date: Thu, 28 Oct 2010 09:00:39 -0700 Subject: Added background thread to handle delayed send and save of appearance to accommodate batching of the many updates that happen on login and teleport. Fixed handling of the serial property in appearance. --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 219 +++++++++++++++------ 1 file changed, 164 insertions(+), 55 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 5444f80..903e94b 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -32,6 +32,10 @@ using Nini.Config; using OpenMetaverse; using OpenSim.Framework; +using System.Threading; +using System.Timers; +using System.Collections.Generic; + using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; @@ -44,7 +48,15 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory private static readonly byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; private Scene m_scene = null; - private bool m_startAnimationSet = false; + private static readonly int m_savetime = 5; // seconds to wait before saving changed appearance + private static readonly int m_sendtime = 2; // seconds to wait before sending changed appearance + + private static readonly int m_checkTime = 500; // milliseconds to wait between checks for appearance updates + private System.Timers.Timer m_updateTimer = new System.Timers.Timer(); + private Dictionary m_savequeue = new Dictionary(); + private Dictionary m_sendqueue = new Dictionary(); + + #region RegionModule Members public void Initialise(Scene scene, IConfigSource source) { @@ -56,6 +68,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory public void PostInitialise() { + m_updateTimer.Enabled = false; + m_updateTimer.AutoReset = true; + m_updateTimer.Interval = m_checkTime; // 500 milliseconds wait to start async ops + m_updateTimer.Elapsed += new ElapsedEventHandler(HandleAppearanceUpdateTimer); } public void Close() @@ -84,15 +100,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // client.OnAvatarNowWearing -= AvatarIsWearing; } - public void CheckBakedTextureAssets(IClientAPI client, UUID textureID, int idx) - { - if (m_scene.AssetService.Get(textureID.ToString()) == null) - { - m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}",textureID,idx,client.Name); - client.SendRebakeAvatarTextures(textureID); - } - } - + #endregion + /// /// Set appearance data (textureentry and slider settings) received from the client /// @@ -100,6 +109,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory /// public void SetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams) { +// DEBUG ON + m_log.WarnFormat("[AVFACTORY] SetAppearance for {0}",client.AgentId); +// DEBUG OFF + ScenePresence sp = m_scene.GetScenePresence(client.AgentId); if (sp == null) { @@ -107,79 +120,175 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory return; } -// DEBUG ON - m_log.WarnFormat("[AVFACTORY] SetAppearance for {0}",client.AgentId); -// DEBUG OFF - -/* - if (m_physicsActor != null) - { - if (!IsChildAgent) - { - // This may seem like it's redundant, remove the avatar from the physics scene - // just to add it back again, but it saves us from having to update - // 3 variables 10 times a second. - bool flyingTemp = m_physicsActor.Flying; - RemoveFromPhysicalScene(); - //m_scene.PhysicsScene.RemoveAvatar(m_physicsActor); - - //PhysicsActor = null; - - AddToPhysicalScene(flyingTemp); - } - } -*/ - #region Bake Cache Check - bool changed = false; // Process the texture entry if (textureEntry != null) { + changed = sp.Appearance.SetTextureEntries(textureEntry); + for (int i = 0; i < BAKE_INDICES.Length; i++) { - int j = BAKE_INDICES[i]; - Primitive.TextureEntryFace face = textureEntry.FaceTextures[j]; - + int idx = BAKE_INDICES[i]; + Primitive.TextureEntryFace face = sp.Appearance.Texture.FaceTextures[idx]; if (face != null && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE) - Util.FireAndForget(delegate(object o) { CheckBakedTextureAssets(client,face.TextureID,j); }); + Util.FireAndForget(delegate(object o) { CheckBakedTextureAssets(client,face.TextureID,idx); }); } - changed = sp.Appearance.SetTextureEntries(textureEntry); - } - #endregion Bake Cache Check - - changed = sp.Appearance.SetVisualParams(visualParams) || changed; - - // If nothing changed (this happens frequently) just return + // Process the visual params, this may change height as well + if (visualParams != null) + { + if (sp.Appearance.SetVisualParams(visualParams)) + { + changed = true; + if (sp.Appearance.AvatarHeight > 0) + sp.SetHeight(sp.Appearance.AvatarHeight); + } + } + + // If something changed in the appearance then queue an appearance save if (changed) + QueueAppearanceSave(client.AgentId); + + // And always queue up an appearance update to send out + QueueAppearanceSend(client.AgentId); + + // Send the appearance back to the avatar + AvatarAppearance avp = sp.Appearance; + sp.ControllingClient.SendAvatarDataImmediate(sp); + sp.ControllingClient.SendAppearance(avp.Owner,avp.VisualParams,avp.Texture.GetBytes()); + } + + /// + /// Checks for the existance of a baked texture asset and + /// requests the viewer rebake if the asset is not found + /// + /// + /// + /// + private void CheckBakedTextureAssets(IClientAPI client, UUID textureID, int idx) + { + if (m_scene.AssetService.Get(textureID.ToString()) == null) + { + m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}", + textureID,idx,client.Name); + client.SendRebakeAvatarTextures(textureID); + } + } + + #region UpdateAppearanceTimer + + public void QueueAppearanceSend(UUID agentid) + { +// DEBUG ON + m_log.WarnFormat("[AVFACTORY] Queue appearance send for {0}",agentid); +// DEBUG OFF + + // 100 nanoseconds (ticks) we should wait + long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); + lock (m_sendqueue) { + m_sendqueue[agentid] = timestamp; + m_updateTimer.Start(); + } + } + + public void QueueAppearanceSave(UUID agentid) + { // DEBUG ON - m_log.Warn("[AVFACTORY] Appearance changed"); + m_log.WarnFormat("[AVFACTORY] Queue appearance save for {0}",agentid); // DEBUG OFF - sp.Appearance.SetAppearance(textureEntry, visualParams); - if (sp.Appearance.AvatarHeight > 0) - sp.SetHeight(sp.Appearance.AvatarHeight); - m_scene.AvatarService.SetAppearance(client.AgentId, sp.Appearance); + // 100 nanoseconds (ticks) we should wait + long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); + lock (m_savequeue) + { + m_savequeue[agentid] = timestamp; + m_updateTimer.Start(); + } + } + + private void HandleAppearanceSend(UUID agentid) + { + ScenePresence sp = m_scene.GetScenePresence(agentid); + if (sp == null) + { + m_log.WarnFormat("[AVFACTORY] Agent {0} no longer in the scene",agentid); + return; } + // DEBUG ON - else - m_log.Warn("[AVFACTORY] Appearance did not change"); -// DEBUG OFF + m_log.WarnFormat("[AVFACTORY] Handle appearance send for {0}\n{1}",agentid,sp.Appearance.ToString()); +// DEBUG OFF + // Send the appearance to everyone in the scene sp.SendAppearanceToAllOtherAgents(); + + // Send the appearance back to the avatar + AvatarAppearance avp = sp.Appearance; + sp.ControllingClient.SendAvatarDataImmediate(sp); + sp.ControllingClient.SendAppearance(avp.Owner,avp.VisualParams,avp.Texture.GetBytes()); + +/* +// this needs to be fixed, the flag should be on scene presence not the region module + // Start the animations if necessary if (!m_startAnimationSet) { sp.Animator.UpdateMovementAnimations(); m_startAnimationSet = true; } +*/ + } - client.SendAvatarDataImmediate(sp); - client.SendAppearance(sp.Appearance.Owner,sp.Appearance.VisualParams,sp.Appearance.Texture.GetBytes()); + private void HandleAppearanceSave(UUID agentid) + { + ScenePresence sp = m_scene.GetScenePresence(agentid); + if (sp == null) + { + m_log.WarnFormat("[AVFACTORY] Agent {0} no longer in the scene",agentid); + return; + } + + m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); } + private void HandleAppearanceUpdateTimer(object sender, EventArgs ea) + { + long now = DateTime.Now.Ticks; + + lock (m_sendqueue) + { + Dictionary sends = new Dictionary(m_sendqueue); + foreach (KeyValuePair kvp in sends) + { + if (kvp.Value < now) + { + Util.FireAndForget(delegate(object o) { HandleAppearanceSend(kvp.Key); }); + m_sendqueue.Remove(kvp.Key); + } + } + } + + lock (m_savequeue) + { + Dictionary saves = new Dictionary(m_savequeue); + foreach (KeyValuePair kvp in saves) + { + if (kvp.Value < now) + { + Util.FireAndForget(delegate(object o) { HandleAppearanceSave(kvp.Key); }); + m_savequeue.Remove(kvp.Key); + } + } + } + + if (m_savequeue.Count == 0 && m_sendqueue.Count == 0) + m_updateTimer.Stop(); + } + + #endregion + /// /// Tell the client for this scene presence what items it should be wearing now /// -- cgit v1.1 From 68666efd25f4d094949f31eae08ee17fd821b7e4 Mon Sep 17 00:00:00 2001 From: Master ScienceSim Date: Thu, 28 Oct 2010 12:00:04 -0700 Subject: Configuration of persistent baked textures and save/send delays. --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 903e94b..5f8b4f6 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -48,20 +48,30 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory private static readonly byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; private Scene m_scene = null; - private static readonly int m_savetime = 5; // seconds to wait before saving changed appearance - private static readonly int m_sendtime = 2; // seconds to wait before sending changed appearance + private int m_savetime = 5; // seconds to wait before saving changed appearance + private int m_sendtime = 2; // seconds to wait before sending changed appearance - private static readonly int m_checkTime = 500; // milliseconds to wait between checks for appearance updates + private int m_checkTime = 500; // milliseconds to wait between checks for appearance updates private System.Timers.Timer m_updateTimer = new System.Timers.Timer(); private Dictionary m_savequeue = new Dictionary(); private Dictionary m_sendqueue = new Dictionary(); #region RegionModule Members - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(Scene scene, IConfigSource config) { scene.EventManager.OnNewClient += NewClient; + if (config != null) + { + IConfig sconfig = config.Configs["Startup"]; + if (sconfig != null) + { + m_savetime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime))); + m_sendtime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime))); + } + } + if (m_scene == null) m_scene = scene; } -- cgit v1.1