aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authordarok2007-11-03 19:33:00 +0000
committerdarok2007-11-03 19:33:00 +0000
commitfbf3c6a768274cfdb1e91e73758f9ee893094153 (patch)
tree6b6bd68b1061fa3ca4df20a044b55a50e0d354e2 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parentFirst part of Scene refactoring: (diff)
downloadopensim-SC_OLD-fbf3c6a768274cfdb1e91e73758f9ee893094153.zip
opensim-SC_OLD-fbf3c6a768274cfdb1e91e73758f9ee893094153.tar.gz
opensim-SC_OLD-fbf3c6a768274cfdb1e91e73758f9ee893094153.tar.bz2
opensim-SC_OLD-fbf3c6a768274cfdb1e91e73758f9ee893094153.tar.xz
Modifications for prim movement. For now only in Mod. BulletX, but i think it can be easy to add to ODE. Enjoy kick the prims and be careful with the falling ones ;D
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 39f4e5c..b00d465 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -55,6 +55,9 @@ namespace OpenSim.Region.Environment.Scenes
55 55
56 public bool HasChanged = false; 56 public bool HasChanged = false;
57 57
58 private LLVector3 lastPhysGroupPos;
59 private LLQuaternion lastPhysGroupRot;
60
58 #region Properties 61 #region Properties
59 62
60 /// <summary> 63 /// <summary>
@@ -490,6 +493,25 @@ namespace OpenSim.Region.Environment.Scenes
490 /// </summary> 493 /// </summary>
491 public override void Update() 494 public override void Update()
492 { 495 {
496 if (lastPhysGroupPos.GetDistanceTo(AbsolutePosition) > 0.02)
497 {
498 foreach (SceneObjectPart part in m_parts.Values)
499 {
500 if (part.UpdateFlag == 0) part.UpdateFlag = 1;
501 }
502 lastPhysGroupPos = AbsolutePosition;
503 }
504 if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
505 || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
506 || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1)
507 || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1))
508 {
509 foreach (SceneObjectPart part in m_parts.Values)
510 {
511 if (part.UpdateFlag == 0) part.UpdateFlag = 1;
512 }
513 lastPhysGroupRot = GroupRotation;
514 }
493 foreach (SceneObjectPart part in m_parts.Values) 515 foreach (SceneObjectPart part in m_parts.Values)
494 { 516 {
495 part.SendScheduledUpdates(); 517 part.SendScheduledUpdates();