mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
@@ -66,8 +66,8 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
m_scene = scene;
|
||||
m_scene.RegisterModuleInterface<ICapabilitiesModule>(this);
|
||||
MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps",
|
||||
"show capabilities",
|
||||
"Shows all registered capabilities", CapabilitiesCommand);
|
||||
"show caps",
|
||||
"Shows all registered capabilities", CapabilitiesCommand);
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
|
||||
@@ -911,6 +911,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent))
|
||||
{
|
||||
// region doesn't take it
|
||||
ReInstantiateScripts(agent);
|
||||
ResetFromTransit(agent.UUID);
|
||||
return agent;
|
||||
}
|
||||
@@ -1787,14 +1788,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
protected void ReInstantiateScripts(ScenePresence sp)
|
||||
{
|
||||
int i = 0;
|
||||
sp.Attachments.ForEach(delegate(SceneObjectGroup sog)
|
||||
if (sp.InTransitScriptStates.Count > 0)
|
||||
{
|
||||
sog.SetState(sp.InTransitScriptStates[i++], sp.Scene);
|
||||
sog.CreateScriptInstances(0, false, sp.Scene.DefaultScriptEngine, 0);
|
||||
sog.ResumeScripts();
|
||||
});
|
||||
sp.Attachments.ForEach(delegate(SceneObjectGroup sog)
|
||||
{
|
||||
if (i < sp.InTransitScriptStates.Count)
|
||||
{
|
||||
sog.SetState(sp.InTransitScriptStates[i++], sp.Scene);
|
||||
sog.CreateScriptInstances(0, false, sp.Scene.DefaultScriptEngine, 0);
|
||||
sog.ResumeScripts();
|
||||
}
|
||||
else
|
||||
m_log.ErrorFormat("[ENTITY TRANSFER MODULE]: InTransitScriptStates.Count={0} smaller than Attachments.Count={1}", sp.InTransitScriptStates.Count, sp.Attachments.Count);
|
||||
});
|
||||
|
||||
sp.InTransitScriptStates.Clear();
|
||||
sp.InTransitScriptStates.Clear();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user