From cdaed113872f0615a0d2864cc54064a4432054c6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 3 Sep 2015 18:39:08 +0100 Subject: at last we can login and see objects ( friends is dead and disable in scenepresence) --- OpenSim/Region/Application/OpenSimBase.cs | 5 -- .../Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs | 4 +- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 12 ++--- .../Linden/Caps/EventQueue/EventQueueHelper.cs | 2 +- .../Linden/Caps/WebFetchInvDescModule.cs | 3 +- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 20 ++++---- .../MapImage/MapImageServiceModule.cs | 2 +- .../CoreModules/World/WorldMap/WorldMapModule.cs | 6 ++- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 58 +++------------------- .../Region/Framework/Scenes/SimStatsReporter.cs | 2 +- 10 files changed, 29 insertions(+), 85 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 5cd9045..9108e5d 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -281,11 +281,6 @@ namespace OpenSim // inserted them manually. LoadPlugins(); - if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch! - { - Environment.Exit(1); - } - foreach (IApplicationPlugin plugin in m_plugins) plugin.PostInitialise(); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs index b735dfa..c241075 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs @@ -40,8 +40,8 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using Caps = OpenSim.Framework.Capabilities.Caps; -[assembly: Addin("LindenCaps", "0.1")] -[assembly: AddinDependency("OpenSim", "0.5")] +[assembly: Addin("LindenCaps", OpenSim.VersionInfo.VersionNumber)] +[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] namespace OpenSim.Region.ClientStack.Linden { diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 5d50eba..feb3322 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -231,18 +231,12 @@ namespace OpenSim.Region.ClientStack.Linden lock (queue) queue.Enqueue(ev); } - else if (DebugLevel > 0) + else { - ScenePresence sp = m_scene.GetScenePresence(avatarID); - - // This assumes that an NPC should never have a queue. - if (sp != null && sp.PresenceType != PresenceType.Npc) - { OSDMap evMap = (OSDMap)ev; m_log.WarnFormat( - "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} {1} when placing message {2} in region {3}", - sp.Name, sp.UUID, evMap["message"], m_scene.Name); - } + "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}", + avatarID, evMap["message"], m_scene.Name); } } catch (NullReferenceException e) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index 50e22f5..799ad0b 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs @@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack.Linden llsdSimInfo.Add("Handle", new OSDBinary(ulongToByteArray(handle))); llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes())); - llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port)); + llsdSimInfo.Add("Port", OSD.FromInteger(endPoint.Port)); llsdSimInfo.Add("RegionSizeX", OSD.FromUInteger((uint)regionSizeX)); llsdSimInfo.Add("RegionSizeY", OSD.FromUInteger((uint)regionSizeY)); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 6e2f7f3..2a252e1 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs @@ -118,8 +118,9 @@ namespace OpenSim.Region.ClientStack.Linden return; m_fetchInventoryDescendents2Url = config.GetString("Cap_FetchInventoryDescendents2", string.Empty); - m_webFetchInventoryDescendentsUrl = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty); +// m_webFetchInventoryDescendentsUrl = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty); +// if (m_fetchInventoryDescendents2Url != string.Empty || m_webFetchInventoryDescendentsUrl != string.Empty) if (m_fetchInventoryDescendents2Url != string.Empty || m_webFetchInventoryDescendentsUrl != string.Empty) { m_Enabled = true; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f76db1e..6df55a6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3864,6 +3864,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// public void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) { +/* if (entity.UUID == m_agentId && !updateFlags.HasFlag(PrimUpdateFlags.FullUpdate)) { ImprovedTerseObjectUpdatePacket packet @@ -3874,27 +3875,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; packet.ObjectData[0] = CreateImprovedTerseBlock(entity, false); OutPacket(packet, ThrottleOutPacketType.Unknown, true); + return; } - - else if (entity is SceneObjectPart) +*/ + if (entity is SceneObjectPart) { SceneObjectPart e = (SceneObjectPart)entity; SceneObjectGroup g = e.ParentGroup; if (g.HasPrivateAttachmentPoint && g.OwnerID != AgentId) - return; // Don't send updates for other people's HUDs + return; // Don't send updates for other people's HUDs } - else - { - //double priority = m_prioritizer.GetUpdatePriority(this, entity); - uint priority = m_prioritizer.GetUpdatePriority(this, entity); + //double priority = m_prioritizer.GetUpdatePriority(this, entity); + uint priority = m_prioritizer.GetUpdatePriority(this, entity); - lock (m_entityUpdates.SyncRoot) - m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation)); - } + lock (m_entityUpdates.SyncRoot) + m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation)); } - /// /// Requeue an EntityUpdate when it was not acknowledged by the client. /// We will update the priority and put it in the correct queue, merging update flags diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index db3f900..5365b49 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs @@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage if (config == null) return; - int refreshminutes = Convert.ToInt32(config.GetString("RefreshTime", "-1")); + int refreshminutes = Convert.ToInt32(config.GetString("RefreshTime", "60")); if (refreshminutes < 0) { m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Negative refresh time given in config. Module disabled."); diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index b6d96ac..adcad03 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -1426,7 +1426,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap using (Bitmap mapbmp = m_mapImageGenerator.CreateMapTile()) { GenerateMaptile(mapbmp); - m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp); + if(m_mapImageServiceModule != null) + m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp); } } @@ -1562,7 +1563,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap GenerateMaptile(mapbmp); // v2/3 (MapImageServiceModule) - m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp); + if(m_mapImageServiceModule !=null) + m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp); } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 022a90d..4c346b7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -873,13 +873,7 @@ namespace OpenSim.Region.Framework.Scenes { uint x, y; Util.RegionHandleToRegionLoc(handle, out x, out y); -<<<<<<< HEAD - - if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY)) -======= -no information to check this // if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY,)) ->>>>>>> avn/ubitvar { old.Add(handle); } @@ -1158,6 +1152,8 @@ no information to check this { IsLoggingIn = false; } + + IsChildAgent = false; } m_log.DebugFormat("[MakeRootAgent] out lock: {0}ms", Util.EnvironmentTickCountSubtract(ts)); @@ -1172,9 +1168,7 @@ no information to check this Grouptitle = gm.GetGroupTitle(m_uuid); - AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode); - uint teleportFlags = (aCircuit == null) ? 0 : aCircuit.teleportFlags; - if ((teleportFlags & (uint)TeleportFlags.ViaHGLogin) != 0) + if ((m_teleportFlags & TeleportFlags.ViaHGLogin) != 0) { // The avatar is arriving from another grid. This means that we may have changed the // avatar's name to or from the special Hypergrid format ("First.Last @grid.example.com"). @@ -2031,8 +2025,8 @@ no information to check this if (!IsChildAgent && openChildAgents) { IFriendsModule friendsModule = m_scene.RequestModuleInterface(); - if (friendsModule != null) - friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); +// if (friendsModule != null) +// friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); m_log.DebugFormat("[CompleteMovement] friendsModule: {0}ms", Util.EnvironmentTickCountSubtract(ts)); @@ -2329,9 +2323,7 @@ no information to check this try { - // Don't slide against ground when crouching if camera is panned around avatar - if (Flying || DCF != Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN) - agent_control_v3 += Dir_Vectors[i]; + agent_control_v3 += Dir_Vectors[i]; //m_log.DebugFormat("[Motion]: {0}, {1}",i, dirVectors[i]); } catch (IndexOutOfRangeException) @@ -2751,44 +2743,6 @@ no information to check this SceneManager.Instance.TryGetScene(target_region.RegionID, out targetScene); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - float terrainHeight = (float)targetScene.Heightmap[(int)(pos.X % regionSize.X), (int)(pos.Y % regionSize.Y)]; // dont try to land underground terrainHeight += Appearance.AvatarHeight / 2; diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index bdddd73..e0030ec 100755 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs @@ -502,7 +502,7 @@ namespace OpenSim.Region.Framework.Scenes sb[22].StatID = (uint)Stats.SimSleepMs; sb[22].StatValue = sleeptime; - for (int i = 0; i < m_statisticArraySize; i++) + for (int i = 0; i < 23; i++) { lastReportedSimStats[i] = sb[i].StatValue; } -- cgit v1.1