From 7ce45235e61b1ee48a2b5208e5fdfb39a76ad96c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 5 Apr 2019 11:19:38 +0100 Subject: [PATCH] make sure viewer knows where to place a sitting avatar, this will need deep revision with culling --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 13 +++++++++++++ bin/OpenSimDefaults.ini | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 200036c527..a52fa76e14 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -4210,8 +4210,17 @@ namespace OpenSim.Region.Framework.Scenes { m_lastSize = Appearance.AvatarSize; int count = 0; + SceneObjectPart sitroot = null; + if (ParentID != 0 && ParentPart != null) // we need to send the sitting root prim + { + sitroot = ParentPart.ParentGroup.RootPart; + } foreach (ScenePresence p in presences) { + if (sitroot != null) // we need to send the sitting root prim + { + p.ControllingClient.SendEntityFullUpdateImmediate(ParentPart.ParentGroup.RootPart); + } p.ControllingClient.SendEntityFullUpdateImmediate(this); if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod) // either just kill the object @@ -4225,6 +4234,10 @@ namespace OpenSim.Region.Framework.Scenes public void SendInitialAvatarDataToAgent(ScenePresence p) { + if(ParentID != 0 && ParentPart != null) // we need to send the sitting root prim + { + p.ControllingClient.SendEntityFullUpdateImmediate(ParentPart.ParentGroup.RootPart); + } p.ControllingClient.SendEntityFullUpdateImmediate(this); if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod) // either just kill the object diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 9518aaf0a4..8696fe883a 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -164,7 +164,7 @@ ; limit the maximum view range ( no effect still (does limit MaxRegionsViewDistance) ) ;MaxDrawDistance = 512 - ; Other regions visibilty depends on avatar position and view range + ; Other regions visibility depends on avatar position and view range ; the view range considered is limited the maximum and minimum distances: ;MaxRegionsViewDistance = 255 ;MinRegionsViewDistance = 96