aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/KeyframeMotion.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs31
7 files changed, 36 insertions, 24 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
index 5bc8e51..1949a90 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
@@ -35,7 +35,7 @@ using OpenSim.Region.Framework.Scenes;
35 35
36namespace OpenSim.Region.Framework.Interfaces 36namespace OpenSim.Region.Framework.Interfaces
37{ 37{
38 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, bool isFlying, string version); 38 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version);
39 39
40 public interface IEntityTransferModule 40 public interface IEntityTransferModule
41 { 41 {
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Interfaces
76 76
77 void Cross(SceneObjectGroup sog, Vector3 position, bool silent); 77 void Cross(SceneObjectGroup sog, Vector3 position, bool silent);
78 78
79 ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, bool isFlying, string version); 79 ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version);
80 80
81 } 81 }
82 82
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
index e4e6f2c..233e559 100644
--- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
+++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
@@ -272,8 +272,6 @@ namespace OpenSim.Region.Framework.Scenes
272 newmotion.m_basePosition = m_basePosition; 272 newmotion.m_basePosition = m_basePosition;
273 newmotion.m_baseRotation = m_baseRotation; 273 newmotion.m_baseRotation = m_baseRotation;
274 274
275 newmotion.m_currentFrame = m_currentFrame;
276
277 if (m_selected) 275 if (m_selected)
278 newmotion.m_serializedPosition = m_serializedPosition; 276 newmotion.m_serializedPosition = m_serializedPosition;
279 else 277 else
@@ -284,6 +282,8 @@ namespace OpenSim.Region.Framework.Scenes
284 newmotion.m_serializedPosition = m_serializedPosition; 282 newmotion.m_serializedPosition = m_serializedPosition;
285 } 283 }
286 284
285 newmotion.m_currentFrame = m_currentFrame;
286
287 newmotion.m_iterations = m_iterations; 287 newmotion.m_iterations = m_iterations;
288 newmotion.m_running = m_running; 288 newmotion.m_running = m_running;
289 289
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3af1060..66cce60 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2931,9 +2931,11 @@ namespace OpenSim.Region.Framework.Scenes
2931 { 2931 {
2932 EventManager.TriggerOnClientLogin(client); 2932 EventManager.TriggerOnClientLogin(client);
2933 // Send initial parcel data 2933 // Send initial parcel data
2934/* this is done on TriggerOnNewClient by landmanegement respective event handler
2934 Vector3 pos = sp.AbsolutePosition; 2935 Vector3 pos = sp.AbsolutePosition;
2935 ILandObject land = LandChannel.GetLandObject(pos.X, pos.Y); 2936 ILandObject land = LandChannel.GetLandObject(pos.X, pos.Y);
2936 land.SendLandUpdateToClient(client); 2937 land.SendLandUpdateToClient(client);
2938*/
2937 } 2939 }
2938 2940
2939 return sp; 2941 return sp;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 38dbaa9..18e74c1 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -581,7 +581,7 @@ namespace OpenSim.Region.Framework.Scenes
581 av.IsInTransit = true; 581 av.IsInTransit = true;
582 582
583 CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync; 583 CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync;
584 d.BeginInvoke(av, val, x, y, destination, av.Flying, version, CrossAgentToNewRegionCompleted, d); 584 d.BeginInvoke(av, val, destination, av.Flying, version, CrossAgentToNewRegionCompleted, d);
585 } 585 }
586 else 586 else
587 m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar alreasy in transit {0} to {1}", av.Name, val); 587 m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar alreasy in transit {0} to {1}", av.Name, val);
@@ -2159,6 +2159,7 @@ namespace OpenSim.Region.Framework.Scenes
2159 2159
2160 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); 2160 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
2161 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; 2161 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
2162
2162 2163
2163 if (userExposed) 2164 if (userExposed)
2164 dupe.m_rootPart.TrimPermissions(); 2165 dupe.m_rootPart.TrimPermissions();
@@ -2209,6 +2210,9 @@ namespace OpenSim.Region.Framework.Scenes
2209 if (userExposed) 2210 if (userExposed)
2210 newPart.ApplyPhysics((uint)newPart.Flags,newPart.VolumeDetectActive,true); 2211 newPart.ApplyPhysics((uint)newPart.Flags,newPart.VolumeDetectActive,true);
2211// } 2212// }
2213 // copy keyframemotion
2214 if (part.KeyframeMotion != null)
2215 newPart.KeyframeMotion = part.KeyframeMotion.Copy(dupe);
2212 } 2216 }
2213 2217
2214 if (userExposed) 2218 if (userExposed)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 8e419f9..4af508e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2110,8 +2110,8 @@ namespace OpenSim.Region.Framework.Scenes
2110 Array.Copy(Shape.ExtraParams, extraP, extraP.Length); 2110 Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
2111 dupe.Shape.ExtraParams = extraP; 2111 dupe.Shape.ExtraParams = extraP;
2112 2112
2113 if (KeyframeMotion != null) 2113 // safeguard actual copy is done in sog.copy
2114 dupe.KeyframeMotion = KeyframeMotion.Copy(null); 2114 dupe.KeyframeMotion = null;
2115 2115
2116 if (userExposed) 2116 if (userExposed)
2117 { 2117 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 0176921..adb3d38 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1266,7 +1266,8 @@ namespace OpenSim.Region.Framework.Scenes
1266 1266
1267 Vector3 look = Velocity; 1267 Vector3 look = Velocity;
1268 1268
1269 if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) 1269 // if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
1270 if ((Math.Abs(look.X) < 0.1) && (Math.Abs(look.Y) < 0.1) && (Math.Abs(look.Z) < 0.1))
1270 { 1271 {
1271 look = new Vector3(0.99f, 0.042f, 0); 1272 look = new Vector3(0.99f, 0.042f, 0);
1272 } 1273 }
@@ -1316,13 +1317,15 @@ namespace OpenSim.Region.Framework.Scenes
1316 // Create child agents in neighbouring regions 1317 // Create child agents in neighbouring regions
1317 if (openChildAgents && !IsChildAgent) 1318 if (openChildAgents && !IsChildAgent)
1318 { 1319 {
1320
1319 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); 1321 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
1320 if (m_agentTransfer != null) 1322 if (m_agentTransfer != null)
1321 Util.FireAndForget(delegate { m_agentTransfer.EnableChildAgents(this); }); 1323 m_agentTransfer.EnableChildAgents(this);
1322 1324
1323 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); 1325 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
1324 if (friendsModule != null) 1326 if (friendsModule != null)
1325 friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); 1327 friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
1328
1326 } 1329 }
1327 1330
1328// m_log.DebugFormat( 1331// m_log.DebugFormat(
@@ -3438,7 +3441,7 @@ namespace OpenSim.Region.Framework.Scenes
3438 /// <param name="e"></param> 3441 /// <param name="e"></param>
3439 public void PhysicsCollisionUpdate(EventArgs e) 3442 public void PhysicsCollisionUpdate(EventArgs e)
3440 { 3443 {
3441 if (IsChildAgent) 3444 if (IsChildAgent || Animator == null)
3442 return; 3445 return;
3443 3446
3444 //if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f)) 3447 //if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f))
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index 20919a1..756b1f4 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -438,23 +438,26 @@ namespace OpenSim.Region.Framework.Scenes
438 } 438 }
439 439
440 // Extra statistics that aren't currently sent to clients 440 // Extra statistics that aren't currently sent to clients
441 lock (m_lastReportedExtraSimStats) 441 if (m_scene.PhysicsScene != null)
442 { 442 {
443 m_lastReportedExtraSimStats[LastReportedObjectUpdateStatName] = m_objectUpdates / m_statsUpdateFactor; 443 lock (m_lastReportedExtraSimStats)
444
445 Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats();
446
447 if (physicsStats != null)
448 { 444 {
449 foreach (KeyValuePair<string, float> tuple in physicsStats) 445 m_lastReportedExtraSimStats[LastReportedObjectUpdateStatName] = m_objectUpdates / m_statsUpdateFactor;
446
447 Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats();
448
449 if (physicsStats != null)
450 { 450 {
451 // FIXME: An extremely dirty hack to divide MS stats per frame rather than per second 451 foreach (KeyValuePair<string, float> tuple in physicsStats)
452 // Need to change things so that stats source can indicate whether they are per second or 452 {
453 // per frame. 453 // FIXME: An extremely dirty hack to divide MS stats per frame rather than per second
454 if (tuple.Key.EndsWith("MS")) 454 // Need to change things so that stats source can indicate whether they are per second or
455 m_lastReportedExtraSimStats[tuple.Key] = tuple.Value * perframe; 455 // per frame.
456 else 456 if (tuple.Key.EndsWith("MS"))
457 m_lastReportedExtraSimStats[tuple.Key] = tuple.Value / m_statsUpdateFactor; 457 m_lastReportedExtraSimStats[tuple.Key] = tuple.Value * perframe;
458 else
459 m_lastReportedExtraSimStats[tuple.Key] = tuple.Value / m_statsUpdateFactor;
460 }
458 } 461 }
459 } 462 }
460 } 463 }