From 74efe1e393e748d5f9ace32044c705533be64d6a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 9 Aug 2014 15:08:21 +0100 Subject: explicitly force a reset to the event on creation #Please enter the commit message for your changes. Lines starting --- OpenSim/Capabilities/Caps.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Capabilities/Caps.cs b/OpenSim/Capabilities/Caps.cs index 30a323e..b35e6b4 100644 --- a/OpenSim/Capabilities/Caps.cs +++ b/OpenSim/Capabilities/Caps.cs @@ -139,6 +139,7 @@ namespace OpenSim.Framework.Capabilities m_agentID = agent; m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort, (httpServer == null) ? false : httpServer.UseSSL); m_regionName = regionName; + m_capsActive.Reset(); } /// @@ -263,7 +264,7 @@ namespace OpenSim.Framework.Capabilities public bool WaitForActivation() { // Wait for 30s. If that elapses, return false and run without caps - return m_capsActive.WaitOne(30000); + return m_capsActive.WaitOne(120000); } } } \ No newline at end of file -- cgit v1.1 From dc7b9c1cc328084bf8f730337ae5c44005f935b9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 9 Aug 2014 15:12:02 +0100 Subject: dont do for children what is for growups ( root agents) ( needs check) --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 86 +++++++++++------------- 1 file changed, 39 insertions(+), 47 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8fae032..5acd51e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1823,12 +1823,12 @@ namespace OpenSim.Region.Framework.Scenes Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI); m_callbackURI = null; } - // else - // { - // m_log.DebugFormat( - // "[SCENE PRESENCE]: No callback provided on CompleteMovement of {0} {1} to {2}", - // client.Name, client.AgentId, m_scene.RegionInfo.RegionName); - // } +// else +// { +// m_log.DebugFormat( +// "[SCENE PRESENCE]: No callback provided on CompleteMovement of {0} {1} to {2}", +// client.Name, client.AgentId, m_scene.RegionInfo.RegionName); +// } m_previusParcelHide = false; m_previusParcelUUID = UUID.Zero; @@ -1838,59 +1838,51 @@ namespace OpenSim.Region.Framework.Scenes // send initial land overlay and parcel ILandChannel landch = m_scene.LandChannel; if (landch != null) - { landch.sendClientInitialLandInfo(client); - if (!IsChildAgent) - { - newhide = m_currentParcelHide; - m_currentParcelHide = false; - } - } - - // send agentData to all clients including us (?) - // get appearance - // if in cache sent it to all clients - // send what we have to us, even if not in cache ( bad? ) - ValidateAndSendAppearanceAndAgentData(); - // attachments - if (isNPC || (TeleportFlags & TeleportFlags.ViaLogin) != 0) + if (!IsChildAgent) { - if (Scene.AttachmentsModule != null) + newhide = m_currentParcelHide; + m_currentParcelHide = false; + + ValidateAndSendAppearanceAndAgentData(); + + // attachments + if (isNPC || (TeleportFlags & TeleportFlags.ViaLogin) != 0) + { + if (Scene.AttachmentsModule != null) // Util.FireAndForget( // o => // { - Scene.AttachmentsModule.RezAttachments(this); -// }); - } - else - { - List attachments = GetAttachments(); - - if (attachments.Count > 0) + Scene.AttachmentsModule.RezAttachments(this); + // }); + } + else { - m_log.DebugFormat( - "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); + List attachments = GetAttachments(); - // Resume scripts this possible should also be moved down after sending the avatar to viewer ? - foreach (SceneObjectGroup sog in attachments) + if (attachments.Count > 0) { - sog.ScheduleGroupForFullUpdate(); - sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); - sog.ResumeScripts(); + m_log.DebugFormat( + "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); + + // Resume scripts this possible should also be moved down after sending the avatar to viewer ? + foreach (SceneObjectGroup sog in attachments) + { + sog.ScheduleGroupForFullUpdate(); + sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); + sog.ResumeScripts(); + } } } - } - // m_log.DebugFormat( - // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", - // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); - // Create child agents in neighbouring regions - if (openChildAgents && !IsChildAgent) - { - IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface(); - if (m_agentTransfer != null) - m_agentTransfer.EnableChildAgents(this); + // Create child agents in neighbouring regions + if (openChildAgents) + { + IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface(); + if (m_agentTransfer != null) + m_agentTransfer.EnableChildAgents(this); + } } // send the rest of the world -- cgit v1.1 From 2eb1c1c37765a42fd24467f26cf53e7443d5a75b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 9 Aug 2014 15:15:27 +0100 Subject: move from RegisterInventoryServiceHandlers to RegisterRegionServiceHandlers what belongs there ( readabilitly only ) --- .../Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 613bc24..3949f8b 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -248,7 +248,19 @@ namespace OpenSim.Region.ClientStack.Linden //m_capsHandlers["MapLayer"] = // new LLSDStreamhandler("POST", // capsBase + m_mapLayerPath, - // GetMapLayer); + // GetMapLayer); + + IRequestHandler getObjectPhysicsDataHandler + = new RestStreamHandler( + "POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData, "GetObjectPhysicsData", null); + m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler); + + IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost); + m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler); + IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected); + m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); + + IRequestHandler req = new RestStreamHandler( "POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory, "UpdateScript", null); @@ -283,14 +295,7 @@ namespace OpenSim.Region.ClientStack.Linden m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); - IRequestHandler getObjectPhysicsDataHandler - = new RestStreamHandler( - "POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData, "GetObjectPhysicsData", null); - m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler); - IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost); - m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler); - IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected); - m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); + IRequestHandler UpdateAgentInformationHandler = new RestStreamHandler( -- cgit v1.1 From 601c50dc1e2e590a227a7b641be68cbcde6c279d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 9 Aug 2014 16:19:07 +0100 Subject: return even zero costs ( prims on other regions ) --- OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 3949f8b..0141940 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -1448,7 +1448,7 @@ namespace OpenSim.Region.ClientStack.Linden } } - if (simul != 0) + // if (simul != 0) { OSDMap object_data = new OSDMap(); -- cgit v1.1 From c84a3c3630fe678d618667ee472a0852f2921f64 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 9 Aug 2014 16:22:46 +0100 Subject: also on other case --- .../Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 0141940..61b9045 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -1384,6 +1384,17 @@ namespace OpenSim.Region.ClientStack.Linden resp[uuid.ToString()] = object_data; } + else + { + OSDMap object_data = new OSDMap(); + object_data["linked_set_resource_cost"] = 0; + object_data["resource_cost"] = 0; + object_data["physics_cost"] = 0; + object_data["linked_set_physics_cost"] = 0; + + resp[uuid.ToString()] = object_data; + } + } } -- cgit v1.1 From ebc18a80bf87ca204c5d590bec0b2415f010ff83 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 10 Aug 2014 14:49:58 +0100 Subject: OutgoingPacketHandler can not be paced by hits on SendPacket() --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index a3fdae1..e317fc0 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1418,6 +1418,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP queue.Enqueue(buffer); return; } + else if (packet.Type == PacketType.CompleteAgentMovement) { // Send ack straight away to let the viewer know that we got it. @@ -2150,13 +2151,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP // If nothing was sent, sleep for the minimum amount of time before a // token bucket could get more tokens - //if (!m_packetSent) - // Thread.Sleep((int)TickCountResolution); + + if (!m_packetSent) +// Thread.Sleep((int)TickCountResolution); + Thread.Sleep(20); // be independent of TickCountResolution // // Instead, now wait for data present to be explicitly signalled. Evidence so far is that with // modern mono it reduces CPU base load since there is no more continuous polling. - if (!m_packetSent) - m_dataPresentEvent.WaitOne(100); + // this misses heavy load cases +// if (!m_packetSent) +// m_dataPresentEvent.WaitOne(100); Watchdog.UpdateThread(); } -- cgit v1.1 From c0378d54304b2b6bde4a3c24eb137f664716ae81 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 10 Aug 2014 16:36:20 +0100 Subject: actually let delay match throttles as original design --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index e317fc0..0bb53c4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -301,8 +301,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// This allows the outbound loop to only operate when there is data to send rather than continuously polling. /// Some data is sent immediately and not queued. That data would not trigger this event. + /// WRONG use. May be usefull in future revision /// - private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); +// private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); private Pool m_incomingPacketPool; @@ -990,8 +991,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP PacketPool.Instance.ReturnPacket(packet); - if (packetQueued) - m_dataPresentEvent.Set(); + /// WRONG use. May be usefull in future revision +// if (packetQueued) +// m_dataPresentEvent.Set(); } /// @@ -2153,14 +2155,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP // token bucket could get more tokens if (!m_packetSent) -// Thread.Sleep((int)TickCountResolution); - Thread.Sleep(20); // be independent of TickCountResolution - // - // Instead, now wait for data present to be explicitly signalled. Evidence so far is that with - // modern mono it reduces CPU base load since there is no more continuous polling. - // this misses heavy load cases -// if (!m_packetSent) -// m_dataPresentEvent.WaitOne(100); + Thread.Sleep((int)TickCountResolution); + + // .... wrong core code removed + Watchdog.UpdateThread(); } -- cgit v1.1 From 7fcd1068e742d88fbda94ae079e900424807d021 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 10 Aug 2014 20:09:02 +0100 Subject: TEST move parcelRegionCross to EntityTransferModule cross so it works on sitting avatars. (may be bad) comented out sending root avatars information to the child that was just a root it should have it all already. Dont turn a sitting avatar physical, that needs to be a stand at SOG --- .../Framework/EntityTransfer/EntityTransferModule.cs | 14 ++++++++++---- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 ++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index d6d86b9..af26998 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1529,7 +1529,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out x, out y, out version, out newpos); if (neighbourRegion == null) { - agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel"); + agent.ControllingClient.SendAlertMessage("Cannot region cross into void"); return false; } @@ -1680,7 +1680,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer neighbourRegion.RegionName, agent.Name); ReInstantiateScripts(agent); - agent.AddToPhysicalScene(isFlying); + if(agent.ParentID == 0 && agent.ParentUUID == UUID.Zero) + agent.AddToPhysicalScene(isFlying); return false; } @@ -1749,8 +1750,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer m_entityTransferStateMachine.ResetFromTransit(agent.UUID); // now we have a child agent in this region. Request all interesting data about other (root) agents - agent.SendOtherAgentsAvatarDataToMe(); - agent.SendOtherAgentsAppearanceToMe(); + + // why do that? we either where a root having all that or we are leaving the area + +// agent.SendOtherAgentsAvatarDataToMe(); +// agent.SendOtherAgentsAppearanceToMe(); + + agent.parcelRegionCross(false); // Backwards compatibility. Best effort if (version == "Unknown" || version == string.Empty) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5acd51e..d65c250 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3863,7 +3863,7 @@ namespace OpenSim.Region.Framework.Scenes protected bool CrossToNewRegion() { bool result = false; - parcelRegionCross(false); +// parcelRegionCross(false); try { result = m_scene.CrossAgentToNewRegion(this, Flying); @@ -3872,8 +3872,8 @@ namespace OpenSim.Region.Framework.Scenes { result = m_scene.CrossAgentToNewRegion(this, false); } - if(!result) - parcelRegionCross(true); + // if(!result) + // parcelRegionCross(true); return result; @@ -5531,7 +5531,7 @@ namespace OpenSim.Region.Framework.Scenes } } - private void parcelRegionCross(bool abort) + public void parcelRegionCross(bool abort) { if (!ParcelHideThisAvatar) return; -- cgit v1.1 From 67a91ee314b3c3bcf0d777057bba405cb33124e8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 10 Aug 2014 22:13:39 +0100 Subject: make sensors detect sitting avatars also by the distance to the root prim of the object as sl does (as sl avatar needs to be in the arc) --- .../Shared/Api/Implementation/Plugins/SensorRepeat.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 181399d..7bfe27b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs @@ -549,7 +549,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins return; toRegionPos = presence.AbsolutePosition; - dis = Math.Abs(Util.GetDistanceTo(toRegionPos, fromRegionPos)); + dis = Util.GetDistanceTo(toRegionPos, fromRegionPos); + if (presence.IsSatOnObject && presence.ParentPart != null && + presence.ParentPart.ParentGroup != null && + presence.ParentPart.ParentGroup.RootPart != null) + { + Vector3 rpos = presence.ParentPart.ParentGroup.RootPart.AbsolutePosition; + double dis2 = Util.GetDistanceTo(rpos, fromRegionPos); + if (dis > dis2) + dis = dis2; + } // Disabled for now since all osNpc* methods check for appropriate ownership permission. // Perhaps could be re-enabled as an NPC setting at some point since being able to make NPCs not -- cgit v1.1 From 0a9925ff4aff0dbe40b73ded834059373cc04620 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 11 Aug 2014 00:28:14 +0100 Subject: validatebaked still not ok --- .../CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index ccc6861..a9aa7c4 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -587,10 +587,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory } if (face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE) - { - defonly = false; // found a non-default texture reference continue; - } if (wearableCache[idx].TextureID != face.TextureID) { @@ -603,7 +600,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory wearableCache[idx].TextureAsset = null; if (cache != null) { - wearableCache[idx].TextureAsset = m_scene.AssetService.Get(face.TextureID.ToString()); + wearableCache[idx].TextureAsset = m_scene.AssetService.GetCached(face.TextureID.ToString()); if (wearableCache[idx].TextureAsset == null) { wearableCache[idx].CacheId = UUID.Zero; @@ -611,6 +608,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory } else hits++; + defonly = false; // found a non-default texture reference } } } @@ -630,7 +628,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory } // If we only found default textures, then the appearance is not cached - return (defonly ? false : true); + // return (defonly ? false : true); + return (hits >= AvatarAppearance.BAKE_INDICES.Length - 1); // skirt is optional } public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) { -- cgit v1.1 From 9217d5ca315f4d0bc5b7803e0ca676217cf09ab9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 11 Aug 2014 00:44:34 +0100 Subject: will get there.. --- .../Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index a9aa7c4..330ed56 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -556,11 +556,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory face = sp.Appearance.Texture.FaceTextures[idx]; // this should be removed - if (face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE) - { + if (face.TextureID != UUID.Zero && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE) defonly = false; // found a non-default texture reference - } - + else + hits++; continue; } else -- cgit v1.1 From 306875fc61d1a1974fa21a174ecd9f65a271f34c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 11 Aug 2014 00:49:11 +0100 Subject: ... one day.. --- OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 330ed56..d5f271d 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -557,9 +557,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // this should be removed if (face.TextureID != UUID.Zero && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE) + { defonly = false; // found a non-default texture reference - else hits++; + } continue; } else -- cgit v1.1 From e860dd33fa7a69e25bbab3f720710c9a7c50ed48 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 11 Aug 2014 00:54:30 +0100 Subject: remove confusing defonly control --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index d5f271d..2290c44 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -366,8 +366,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // called on textures update public bool UpdateBakedTextureCache(IScenePresence sp, WearableCacheItem[] cacheItems) { - bool defonly = true; // are we only using default textures - // uploaded baked textures will be in assets local cache IAssetService cache = m_scene.AssetService; @@ -409,8 +407,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory continue; } - defonly = false; // found a non-default texture reference - if(sp.Appearance.Texture.FaceTextures[idx].TextureID == wearableCache[idx].TextureID) { if(wearableCache[idx].CacheId != cacheItems[i].CacheId) @@ -479,14 +475,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory sp.Appearance.WearableCacheItems[j].TextureID); } - // If we only found default textures, then the appearance is not cached - return (defonly ? false : true); + return (hits == cacheItems.Length); } // called when we get a new root avatar public bool ValidateBakedTextureCache(IScenePresence sp) { - bool defonly = true; // are we only using default textures int hits = 0; lock (m_setAppearanceLock) @@ -557,10 +551,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // this should be removed if (face.TextureID != UUID.Zero && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE) - { - defonly = false; // found a non-default texture reference hits++; - } + continue; } else @@ -608,7 +600,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory } else hits++; - defonly = false; // found a non-default texture reference } } } @@ -616,7 +607,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory sp.Appearance.WearableCacheItems = wearableCache; } - m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1} {2} {3}", sp.Name, sp.UUID, hits, defonly.ToString()); + m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1} {2}", sp.Name, sp.UUID, hits); // debug for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) { @@ -627,10 +618,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory sp.Appearance.WearableCacheItems[j].TextureID); } - // If we only found default textures, then the appearance is not cached - // return (defonly ? false : true); return (hits >= AvatarAppearance.BAKE_INDICES.Length - 1); // skirt is optional } + public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) { int texturesRebaked = 0; -- cgit v1.1 From ba33d78af90ca0649ffb5150eadffc185bf224fe Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 11 Aug 2014 01:44:12 +0100 Subject: dont do ParcelCrossCheck() on child avatars --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d65c250..6cd951d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -5611,6 +5611,9 @@ namespace OpenSim.Region.Framework.Scenes if (IsInTransit) return; + if (IsChildAgent) + return; + if (check) { // check is relative to current parcel only -- cgit v1.1 From 2cc8e90bd2079798b4e4538fefeb23ea3f81488e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 11 Aug 2014 02:51:34 +0100 Subject: remove a land.SendLandUpdateToClient() since its now done for all cases in completmovement and not only that specific one --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6cd951d..62dea07 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -5158,8 +5158,8 @@ namespace OpenSim.Region.Framework.Scenes pos = land.LandData.UserLocation; } } - - land.SendLandUpdateToClient(ControllingClient); +// this is now done in completeMovement for all cases and not just this +// land.SendLandUpdateToClient(ControllingClient); } } -- cgit v1.1