ok add 2 much, so now the rest

This commit is contained in:
UbitUmarov
2022-04-17 22:26:41 +01:00
parent fdf79a3775
commit d9fb48cdcf
5 changed files with 144 additions and 41 deletions

View File

@@ -107,6 +107,7 @@ namespace OpenSim.Region.Framework.Interfaces
bool CrossAgentCreateFarChild(ScenePresence agent, GridRegion neighbourRegion, Vector3 pos, EntityTransferContext ctx);
bool HandleIncomingSceneObject(SceneObjectGroup so, Vector3 newPosition);
bool HandleIncomingAttachments(ScenePresence sp, List<SceneObjectGroup> attachments);
}
public interface IUserAgentVerificationModule

View File

@@ -3013,6 +3013,21 @@ namespace OpenSim.Region.Framework.Scenes
return true;
}
public bool IncomingAttechments(ScenePresence sp, List<SceneObjectGroup> attachments)
{
//m_log.DebugFormat(" >>> IncomingCreateObject(sog) <<< {0} deleted? {1} isAttach? {2}", ((SceneObjectGroup)sog).AbsolutePosition,
// ((SceneObjectGroup)sog).IsDeleted, ((SceneObjectGroup)sog).RootPart.IsAttachment);
if (!EntityTransferModule.HandleIncomingAttachments(sp, attachments) || sp.IsDeleted)
return false;
// Do this as late as possible so that listeners have full access to the incoming object
foreach(SceneObjectGroup newObject in attachments)
EventManager.TriggerOnIncomingSceneObject(newObject);
return true;
}
/// <summary>
/// Adds a Scene Object group to the Scene.
/// Verifies that the creator of the object is not banned from the simulator.

View File

@@ -81,7 +81,7 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name);
// }
public bool GotAttachmentsData = false;
public int EnvironmentVersion = -1;
private ViewerEnvironment m_environment = null;
public ViewerEnvironment Environment
@@ -3991,6 +3991,16 @@ namespace OpenSim.Region.Framework.Scenes
if (++NeedInitialData < 6) // needs fix if update rate changes on heartbeat
return;
/*
if(!GotAttachmentsData)
{
if(++NeedInitialData == 300) // 30s in current heartbeat
m_log.WarnFormat("[ScenePresence({0}] slow attachment assets transfer for {1}", Scene.Name, Name);
}
else if((m_teleportFlags & TeleportFlags.ViaHGLogin) != 0)
m_log.WarnFormat("[ScenePresence({0}] got hg attachment assets transfer for {1}, cntr = {2}", Scene.Name, Name, NeedInitialData);
*/
NeedInitialData = -1;
bool selfappearance = (flags & 4) != 0;