diff options
author | Sean McNamara | 2011-05-02 02:23:18 -0400 |
---|---|---|
committer | Sean McNamara | 2011-05-02 02:23:18 -0400 |
commit | fffd42f5cbbb9e59b6fde3247aeb0d80d990319f (patch) | |
tree | 034b3e8da351954bc1124d91ec1f28e29e6a68c6 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | First pass at fixing justincc's feedback v2 ( http://opensimulator.org/mantis... (diff) | |
parent | Fixed confusing OSDMap that comes as the response of QueryAccess in the case ... (diff) | |
download | opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.zip opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.tar.gz opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.tar.bz2 opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.tar.xz |
Merge git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 01de824..7c5e246 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1229,7 +1229,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1229 | 1229 | ||
1230 | // Increment the frame counter | 1230 | // Increment the frame counter |
1231 | ++Frame; | 1231 | ++Frame; |
1232 | |||
1233 | try | 1232 | try |
1234 | { | 1233 | { |
1235 | // Check if any objects have reached their targets | 1234 | // Check if any objects have reached their targets |
@@ -2316,7 +2315,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2316 | /// <returns></returns> | 2315 | /// <returns></returns> |
2317 | public bool IncomingCreateObject(ISceneObject sog) | 2316 | public bool IncomingCreateObject(ISceneObject sog) |
2318 | { | 2317 | { |
2319 | //m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); | 2318 | //m_log.DebugFormat(" >>> IncomingCreateObject(sog) <<< {0} deleted? {1} isAttach? {2}", ((SceneObjectGroup)sog).AbsolutePosition, |
2319 | // ((SceneObjectGroup)sog).IsDeleted, ((SceneObjectGroup)sog).RootPart.IsAttachment); | ||
2320 | |||
2320 | SceneObjectGroup newObject; | 2321 | SceneObjectGroup newObject; |
2321 | try | 2322 | try |
2322 | { | 2323 | { |
@@ -2334,9 +2335,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
2334 | return false; | 2335 | return false; |
2335 | } | 2336 | } |
2336 | 2337 | ||
2337 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); | 2338 | // For attachments, we need to wait until the agent is root |
2338 | 2339 | // before we restart the scripts, or else some functions won't work. | |
2339 | newObject.ResumeScripts(); | 2340 | if (!newObject.IsAttachment) |
2341 | { | ||
2342 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); | ||
2343 | newObject.ResumeScripts(); | ||
2344 | } | ||
2345 | else | ||
2346 | { | ||
2347 | ScenePresence sp; | ||
2348 | if (TryGetScenePresence(newObject.OwnerID, out sp)) | ||
2349 | { | ||
2350 | // If the scene presence is here and already a root | ||
2351 | // agent, we came from a ;egacy region. Start the scripts | ||
2352 | // here as they used to start. | ||
2353 | // TODO: Remove in 0.7.3 | ||
2354 | if (!sp.IsChildAgent) | ||
2355 | { | ||
2356 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); | ||
2357 | newObject.ResumeScripts(); | ||
2358 | } | ||
2359 | } | ||
2360 | } | ||
2340 | 2361 | ||
2341 | // Do this as late as possible so that listeners have full access to the incoming object | 2362 | // Do this as late as possible so that listeners have full access to the incoming object |
2342 | EventManager.TriggerOnIncomingSceneObject(newObject); | 2363 | EventManager.TriggerOnIncomingSceneObject(newObject); |
@@ -2453,17 +2474,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2453 | ScenePresence sp = GetScenePresence(sog.OwnerID); | 2474 | ScenePresence sp = GetScenePresence(sog.OwnerID); |
2454 | 2475 | ||
2455 | if (sp != null) | 2476 | if (sp != null) |
2456 | { | 2477 | return sp.GetStateSource(); |
2457 | AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(sp.UUID); | ||
2458 | 2478 | ||
2459 | if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default)) | ||
2460 | { | ||
2461 | // This will get your attention | ||
2462 | //m_log.Error("[XXX] Triggering CHANGED_TELEPORT"); | ||
2463 | |||
2464 | return 5; // StateSource.Teleporting | ||
2465 | } | ||
2466 | } | ||
2467 | return 2; // StateSource.PrimCrossing | 2479 | return 2; // StateSource.PrimCrossing |
2468 | } | 2480 | } |
2469 | 2481 | ||