diff options
author | Teravus Ovares | 2007-11-18 13:37:02 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-11-18 13:37:02 +0000 |
commit | 46ccfa1741abbf445b49e79045e649798d1c0b63 (patch) | |
tree | 44a5495e2026a57299b819acc0dea790d66c7a33 | |
parent | Made the background (ie empty space) colour of the exported map image blue. (diff) | |
download | opensim-SC-46ccfa1741abbf445b49e79045e649798d1c0b63.zip opensim-SC-46ccfa1741abbf445b49e79045e649798d1c0b63.tar.gz opensim-SC-46ccfa1741abbf445b49e79045e649798d1c0b63.tar.bz2 opensim-SC-46ccfa1741abbf445b49e79045e649798d1c0b63.tar.xz |
* Found several cases where prim set physical were not subscribing to physics events.
5 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index c811966..b06fa2f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -449,7 +449,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
449 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 449 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
450 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 450 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
451 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); | 451 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); |
452 | |||
453 | rootPart.doPhysicsPropertyUpdate(UsePhysics); | ||
454 | |||
452 | } | 455 | } |
456 | rootPart.ScheduleFullUpdate(); | ||
453 | } | 457 | } |
454 | } | 458 | } |
455 | } \ No newline at end of file | 459 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 0470335..0b9d218 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -647,6 +647,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
647 | // if not phantom, add to physics | 647 | // if not phantom, add to physics |
648 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim); | 648 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim); |
649 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) | 649 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) |
650 | { | ||
651 | |||
650 | rootPart.PhysActor = | 652 | rootPart.PhysActor = |
651 | phyScene.AddPrimShape( | 653 | phyScene.AddPrimShape( |
652 | rootPart.Name, | 654 | rootPart.Name, |
@@ -654,6 +656,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
654 | new PhysicsVector(pos.X, pos.Y, pos.Z), | 656 | new PhysicsVector(pos.X, pos.Y, pos.Z), |
655 | new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), | 657 | new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), |
656 | new Quaternion(), UsePhysics); | 658 | new Quaternion(), UsePhysics); |
659 | // subscribe to physics events. | ||
660 | rootPart.doPhysicsPropertyUpdate(UsePhysics); | ||
661 | |||
662 | } | ||
657 | } | 663 | } |
658 | } | 664 | } |
659 | 665 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 38e1609..628bd72 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -480,6 +480,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
480 | new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, | 480 | new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, |
481 | dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z), | 481 | dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z), |
482 | dupe.RootPart.PhysActor.IsPhysical); | 482 | dupe.RootPart.PhysActor.IsPhysical); |
483 | dupe.RootPart.doPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical); | ||
484 | |||
483 | } | 485 | } |
484 | // Now we've made a copy that replaces this one, we need to | 486 | // Now we've made a copy that replaces this one, we need to |
485 | // switch the owner to the person who did the copying | 487 | // switch the owner to the person who did the copying |
@@ -859,6 +861,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
859 | new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X, | 861 | new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X, |
860 | linkPart.RotationOffset.Y, linkPart.RotationOffset.Z), | 862 | linkPart.RotationOffset.Y, linkPart.RotationOffset.Z), |
861 | m_rootPart.PhysActor.IsPhysical); | 863 | m_rootPart.PhysActor.IsPhysical); |
864 | m_rootPart.doPhysicsPropertyUpdate(m_rootPart.PhysActor.IsPhysical); | ||
865 | |||
862 | } | 866 | } |
863 | 867 | ||
864 | SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart); | 868 | SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart); |
@@ -1165,6 +1169,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1165 | new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, | 1169 | new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, |
1166 | m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z), | 1170 | m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z), |
1167 | m_rootPart.PhysActor.IsPhysical); | 1171 | m_rootPart.PhysActor.IsPhysical); |
1172 | bool UsePhysics = ((m_rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0); | ||
1173 | m_rootPart.doPhysicsPropertyUpdate(UsePhysics); | ||
1174 | |||
1168 | } | 1175 | } |
1169 | } | 1176 | } |
1170 | 1177 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 0da90d5..18fe785 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -892,10 +892,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
892 | new PhysicsVector(Scale.X, Scale.Y, Scale.Z), | 892 | new PhysicsVector(Scale.X, Scale.Y, Scale.Z), |
893 | new Quaternion(RotationOffset.W, RotationOffset.X, | 893 | new Quaternion(RotationOffset.W, RotationOffset.X, |
894 | RotationOffset.Y, RotationOffset.Z), UsePhysics); | 894 | RotationOffset.Y, RotationOffset.Z), UsePhysics); |
895 | doPhysicsPropertyUpdate(UsePhysics); | ||
895 | } | 896 | } |
896 | else | 897 | else |
897 | { | 898 | { |
898 | PhysActor.IsPhysical = UsePhysics; | 899 | PhysActor.IsPhysical = UsePhysics; |
900 | doPhysicsPropertyUpdate(UsePhysics); | ||
899 | } | 901 | } |
900 | } | 902 | } |
901 | 903 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs index c2bb019..3b5fc57 100644 --- a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | |||
@@ -46,6 +46,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
46 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 46 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
47 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim); | 47 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim); |
48 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) | 48 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) |
49 | { | ||
49 | rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape( | 50 | rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape( |
50 | rootPart.Name, | 51 | rootPart.Name, |
51 | rootPart.Shape, | 52 | rootPart.Shape, |
@@ -54,6 +55,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
54 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 55 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
55 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 56 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
56 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); | 57 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); |
58 | rootPart.doPhysicsPropertyUpdate(UsePhysics); | ||
59 | |||
60 | } | ||
57 | primCount++; | 61 | primCount++; |
58 | } | 62 | } |
59 | } | 63 | } |
@@ -112,6 +116,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
112 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 116 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
113 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim); | 117 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim); |
114 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) | 118 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) |
119 | { | ||
115 | rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape( | 120 | rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape( |
116 | rootPart.Name, | 121 | rootPart.Name, |
117 | rootPart.Shape, | 122 | rootPart.Shape, |
@@ -120,6 +125,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
120 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 125 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
121 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 126 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
122 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); | 127 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); |
128 | rootPart.doPhysicsPropertyUpdate(UsePhysics); | ||
129 | } | ||
123 | } | 130 | } |
124 | 131 | ||
125 | public void SavePrimsToXml2(string fileName) | 132 | public void SavePrimsToXml2(string fileName) |