diff options
author | Robert Adams | 2013-01-15 12:57:12 -0800 |
---|---|---|
committer | Robert Adams | 2013-01-15 21:08:46 -0800 |
commit | 61ff79587bea373278771f9529b582db2e05afdd (patch) | |
tree | 17834659de7e0c72ff84db44f62a7f3b6996b5e7 /OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | |
parent | BulletSim: reduce maximum force a script can apply (like in llApplyImpulse) (diff) | |
download | opensim-SC_OLD-61ff79587bea373278771f9529b582db2e05afdd.zip opensim-SC_OLD-61ff79587bea373278771f9529b582db2e05afdd.tar.gz opensim-SC_OLD-61ff79587bea373278771f9529b582db2e05afdd.tar.bz2 opensim-SC_OLD-61ff79587bea373278771f9529b582db2e05afdd.tar.xz |
BulletSim: add debugging messages to know when assets for physical
objects have been fetched.
Update TODO list with more work.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs index addab29..4f0d345 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | |||
@@ -513,6 +513,7 @@ public sealed class BSShapeCollection : IDisposable | |||
513 | return ret; | 513 | return ret; |
514 | } | 514 | } |
515 | 515 | ||
516 | // return 'true' if the shape was changed | ||
516 | public bool CreateGeomMeshOrHull(BSPhysObject prim, ShapeDestructionCallback shapeCallback) | 517 | public bool CreateGeomMeshOrHull(BSPhysObject prim, ShapeDestructionCallback shapeCallback) |
517 | { | 518 | { |
518 | 519 | ||
@@ -872,8 +873,7 @@ public sealed class BSShapeCollection : IDisposable | |||
872 | { | 873 | { |
873 | prim.LastAssetBuildFailed = true; | 874 | prim.LastAssetBuildFailed = true; |
874 | BSPhysObject xprim = prim; | 875 | BSPhysObject xprim = prim; |
875 | DetailLog("{0},BSShapeCollection.VerifyMeshCreated,fetchAsset,lID={1},lastFailed={2}", | 876 | DetailLog("{0},BSShapeCollection.VerifyMeshCreated,fetchAsset,lastFailed={1}", prim.LocalID, prim.LastAssetBuildFailed); |
876 | LogHeader, prim.LocalID, prim.LastAssetBuildFailed); | ||
877 | Util.FireAndForget(delegate | 877 | Util.FireAndForget(delegate |
878 | { | 878 | { |
879 | RequestAssetDelegate assetProvider = PhysicsScene.RequestAssetMethod; | 879 | RequestAssetDelegate assetProvider = PhysicsScene.RequestAssetMethod; |
@@ -882,19 +882,34 @@ public sealed class BSShapeCollection : IDisposable | |||
882 | BSPhysObject yprim = xprim; // probably not necessary, but, just in case. | 882 | BSPhysObject yprim = xprim; // probably not necessary, but, just in case. |
883 | assetProvider(yprim.BaseShape.SculptTexture, delegate(AssetBase asset) | 883 | assetProvider(yprim.BaseShape.SculptTexture, delegate(AssetBase asset) |
884 | { | 884 | { |
885 | if (!yprim.BaseShape.SculptEntry) | 885 | bool assetFound = false; // DEBUG DEBUG |
886 | return; | 886 | string mismatchIDs = String.Empty; // DEBUG DEBUG |
887 | if (yprim.BaseShape.SculptTexture.ToString() != asset.ID) | 887 | if (yprim.BaseShape.SculptEntry) |
888 | return; | 888 | { |
889 | 889 | if (yprim.BaseShape.SculptTexture.ToString() == asset.ID) | |
890 | yprim.BaseShape.SculptData = asset.Data; | 890 | { |
891 | // This will cause the prim to see that the filler shape is not the right | 891 | yprim.BaseShape.SculptData = asset.Data; |
892 | // one and try again to build the object. | 892 | // This will cause the prim to see that the filler shape is not the right |
893 | // No race condition with the normal shape setting since the rebuild is at taint time. | 893 | // one and try again to build the object. |
894 | yprim.ForceBodyShapeRebuild(false); | 894 | // No race condition with the normal shape setting since the rebuild is at taint time. |
895 | yprim.ForceBodyShapeRebuild(false /* inTaintTime */); | ||
896 | assetFound = true; | ||
897 | } | ||
898 | else | ||
899 | { | ||
900 | mismatchIDs = yprim.BaseShape.SculptTexture.ToString() + "/" + asset.ID; | ||
901 | } | ||
902 | } | ||
903 | DetailLog("{0},BSShapeCollection,fetchAssetCallback,found={1},isSculpt={2},ids={3}", | ||
904 | yprim.LocalID, assetFound, yprim.BaseShape.SculptEntry, mismatchIDs ); | ||
895 | 905 | ||
896 | }); | 906 | }); |
897 | } | 907 | } |
908 | else | ||
909 | { | ||
910 | PhysicsScene.Logger.ErrorFormat("{0} Physical object requires asset but no asset provider. Name={1}", | ||
911 | LogHeader, PhysicsScene.Name); | ||
912 | } | ||
898 | }); | 913 | }); |
899 | } | 914 | } |
900 | else | 915 | else |
@@ -907,8 +922,7 @@ public sealed class BSShapeCollection : IDisposable | |||
907 | } | 922 | } |
908 | 923 | ||
909 | // While we figure out the real problem, stick in a simple box for the object. | 924 | // While we figure out the real problem, stick in a simple box for the object. |
910 | BulletShape fillinShape = | 925 | BulletShape fillinShape = BuildPhysicalNativeShape(prim, BSPhysicsShapeType.SHAPE_BOX, FixedShapeKey.KEY_BOX); |
911 | BuildPhysicalNativeShape(prim, BSPhysicsShapeType.SHAPE_BOX, FixedShapeKey.KEY_BOX); | ||
912 | 926 | ||
913 | return fillinShape; | 927 | return fillinShape; |
914 | } | 928 | } |