aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs32
1 files changed, 19 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 6f1b458..cdec135 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1064,14 +1064,6 @@ namespace OpenSim.Region.Framework.Scenes
1064 } 1064 }
1065 } 1065 }
1066 1066
1067 /// <summary>
1068 /// Clear all pending updates of parts to clients
1069 /// </summary>
1070 private void ClearUpdateSchedule()
1071 {
1072 m_updateFlag = 0;
1073 }
1074
1075 private void SendObjectPropertiesToClient(UUID AgentID) 1067 private void SendObjectPropertiesToClient(UUID AgentID)
1076 { 1068 {
1077 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); 1069 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
@@ -2185,6 +2177,11 @@ namespace OpenSim.Region.Framework.Scenes
2185 ParentGroup.HasGroupChanged = true; 2177 ParentGroup.HasGroupChanged = true;
2186 ScheduleFullUpdate(); 2178 ScheduleFullUpdate();
2187 } 2179 }
2180
2181 public void RotLookAt(Quaternion target, float strength, float damping)
2182 {
2183 m_parentGroup.rotLookAt(target, strength, damping);
2184 }
2188 2185
2189 /// <summary> 2186 /// <summary>
2190 /// Schedules this prim for a full update 2187 /// Schedules this prim for a full update
@@ -2389,8 +2386,8 @@ namespace OpenSim.Region.Framework.Scenes
2389 { 2386 {
2390 const float ROTATION_TOLERANCE = 0.01f; 2387 const float ROTATION_TOLERANCE = 0.01f;
2391 const float VELOCITY_TOLERANCE = 0.001f; 2388 const float VELOCITY_TOLERANCE = 0.001f;
2392 const float POSITION_TOLERANCE = 0.05f; 2389 const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary
2393 const int TIME_MS_TOLERANCE = 3000; 2390 const int TIME_MS_TOLERANCE = 200; //llSetPos has a 200ms delay. This should NOT be 3 seconds.
2394 2391
2395 if (m_updateFlag == 1) 2392 if (m_updateFlag == 1)
2396 { 2393 {
@@ -2404,7 +2401,7 @@ namespace OpenSim.Region.Framework.Scenes
2404 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) 2401 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
2405 { 2402 {
2406 AddTerseUpdateToAllAvatars(); 2403 AddTerseUpdateToAllAvatars();
2407 ClearUpdateSchedule(); 2404
2408 2405
2409 // This causes the Scene to 'poll' physical objects every couple of frames 2406 // This causes the Scene to 'poll' physical objects every couple of frames
2410 // bad, so it's been replaced by an event driven method. 2407 // bad, so it's been replaced by an event driven method.
@@ -2422,16 +2419,18 @@ namespace OpenSim.Region.Framework.Scenes
2422 m_lastAngularVelocity = AngularVelocity; 2419 m_lastAngularVelocity = AngularVelocity;
2423 m_lastTerseSent = Environment.TickCount; 2420 m_lastTerseSent = Environment.TickCount;
2424 } 2421 }
2422 //Moved this outside of the if clause so updates don't get blocked.. *sigh*
2423 m_updateFlag = 0; //Why were we calling a function to do this? Inefficient! *screams*
2425 } 2424 }
2426 else 2425 else
2427 { 2426 {
2428 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes 2427 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes
2429 { 2428 {
2430 AddFullUpdateToAllAvatars(); 2429 AddFullUpdateToAllAvatars();
2431 ClearUpdateSchedule(); 2430 m_updateFlag = 0; //Same here
2432 } 2431 }
2433 } 2432 }
2434 ClearUpdateSchedule(); 2433 m_updateFlag = 0;
2435 } 2434 }
2436 2435
2437 /// <summary> 2436 /// <summary>
@@ -2684,6 +2683,13 @@ namespace OpenSim.Region.Framework.Scenes
2684 SetText(text); 2683 SetText(text);
2685 } 2684 }
2686 2685
2686 public void StopLookAt()
2687 {
2688 m_parentGroup.stopLookAt();
2689
2690 m_parentGroup.ScheduleGroupForTerseUpdate();
2691 }
2692
2687 public void StopMoveToTarget() 2693 public void StopMoveToTarget()
2688 { 2694 {
2689 m_parentGroup.stopMoveToTarget(); 2695 m_parentGroup.stopMoveToTarget();