aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs17
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs5
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs51
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt1
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
7 files changed, 57 insertions, 31 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
index a839086..26d22b8 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
@@ -75,7 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
75 public void Close() { } 75 public void Close() { }
76 public void PostInitialise() { } 76 public void PostInitialise() { }
77 77
78
79 ///<summary> 78 ///<summary>
80 /// 79 ///
81 ///</summary> 80 ///</summary>
@@ -133,7 +132,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
133 ///</summary> 132 ///</summary>
134 public void AddRegion(Scene scene) 133 public void AddRegion(Scene scene)
135 { 134 {
136 if (! m_enabled) 135 if (!m_enabled)
137 return; 136 return;
138 137
139 // Every shared region module has to maintain an indepedent list of 138 // Every shared region module has to maintain an indepedent list of
@@ -206,6 +205,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
206 205
207 using (Image mapTile = tileGenerator.CreateMapTile()) 206 using (Image mapTile = tileGenerator.CreateMapTile())
208 { 207 {
208 // XXX: The MapImageModule will return a null if the user has chosen not to create map tiles and there
209 // is no static map tile.
210 if (mapTile == null)
211 return;
212
209 using (MemoryStream stream = new MemoryStream()) 213 using (MemoryStream stream = new MemoryStream())
210 { 214 {
211 mapTile.Save(stream, ImageFormat.Jpeg); 215 mapTile.Save(stream, ImageFormat.Jpeg);
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index d412efc..e7065dc 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -113,7 +113,6 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
113 //t = System.Environment.TickCount - t; 113 //t = System.Environment.TickCount - t;
114 //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t); 114 //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t);
115 115
116
117 if (drawPrimVolume) 116 if (drawPrimVolume)
118 { 117 {
119 DrawObjectVolume(m_scene, mapbmp); 118 DrawObjectVolume(m_scene, mapbmp);
@@ -121,7 +120,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
121 } 120 }
122 else 121 else
123 { 122 {
124 mapbmp = fetchTexture(m_scene.RegionInfo.RegionSettings.TerrainImageID); 123 mapbmp = FetchTexture(m_scene.RegionInfo.RegionSettings.TerrainImageID);
125 } 124 }
126 return mapbmp; 125 return mapbmp;
127 } 126 }
@@ -232,11 +231,19 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
232// } 231// }
233// } 232// }
234 233
235 private Bitmap fetchTexture(UUID id) 234 private Bitmap FetchTexture(UUID id)
236 { 235 {
237 AssetBase asset = m_scene.AssetService.Get(id.ToString()); 236 AssetBase asset = m_scene.AssetService.Get(id.ToString());
238 m_log.DebugFormat("[MAPTILE]: Fetched static texture {0}, found: {1}", id, asset != null); 237
239 if (asset == null) return null; 238 if (asset != null)
239 {
240 m_log.DebugFormat("[MAPTILE]: Static map image texture {0} found for {1}", id, m_scene.Name);
241 }
242 else
243 {
244 m_log.WarnFormat("[MAPTILE]: Static map image texture {0} not found for {1}", id, m_scene.Name);
245 return null;
246 }
240 247
241 ManagedImage managedImage; 248 ManagedImage managedImage;
242 Image image; 249 Image image;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e0dfb34..6e41774 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2342,7 +2342,7 @@ namespace OpenSim.Region.Framework.Scenes
2342 2342
2343 ParentPart = m_scene.GetSceneObjectPart(m_requestedSitTargetID); 2343 ParentPart = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
2344 ParentID = m_requestedSitTargetID; 2344 ParentID = m_requestedSitTargetID;
2345 2345 m_AngularVelocity = Vector3.Zero;
2346 Velocity = Vector3.Zero; 2346 Velocity = Vector3.Zero;
2347 RemoveFromPhysicalScene(); 2347 RemoveFromPhysicalScene();
2348 2348
@@ -2358,7 +2358,8 @@ namespace OpenSim.Region.Framework.Scenes
2358 2358
2359 public void HandleAgentSitOnGround() 2359 public void HandleAgentSitOnGround()
2360 { 2360 {
2361// m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick. 2361// m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick..
2362 m_AngularVelocity = Vector3.Zero;
2362 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); 2363 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
2363 SitGround = true; 2364 SitGround = true;
2364 RemoveFromPhysicalScene(); 2365 RemoveFromPhysicalScene();
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index 6c6ca09..0c4db40 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
@@ -219,30 +219,31 @@ public sealed class BSLinksetCompound : BSLinkset
219 { 219 {
220 // Gather the child info. It might not be there if the linkset is in transition. 220 // Gather the child info. It might not be there if the linkset is in transition.
221 BSLinksetCompoundInfo lsi = updated.LinksetInfo as BSLinksetCompoundInfo; 221 BSLinksetCompoundInfo lsi = updated.LinksetInfo as BSLinksetCompoundInfo;
222 222 if (lsi != null)
223 // The linksetInfo will need to be rebuilt either here or when the linkset is rebuilt
224 if (LinksetRoot.PhysShape.HasPhysicalShape && lsi != null)
225 { 223 {
226 if (PhysicsScene.PE.IsCompound(LinksetRoot.PhysShape)) 224 // Since the child moved or rotationed, it needs a new relative position within the linkset
225 BSLinksetCompoundInfo newLsi = new BSLinksetCompoundInfo(lsi.Index, LinksetRoot, updated, LinksetRoot.PositionDisplacement);
226 updated.LinksetInfo = newLsi;
227
228 // Find the physical instance of the child
229 if (LinksetRoot.PhysShape.HasPhysicalShape && PhysicsScene.PE.IsCompound(LinksetRoot.PhysShape))
227 { 230 {
231 // It is possible that the linkset is still under construction and the child is not yet
232 // inserted into the compound shape. A rebuild of the linkset in a pre-step action will
233 // build the whole thing with the new position or rotation.
234 // The index must be checked because Bullet references the child array but does no validity
235 // checking of the child index passed.
228 int numLinksetChildren = PhysicsScene.PE.GetNumberOfCompoundChildren(LinksetRoot.PhysShape); 236 int numLinksetChildren = PhysicsScene.PE.GetNumberOfCompoundChildren(LinksetRoot.PhysShape);
229 if (lsi.Index < numLinksetChildren) 237 if (lsi.Index < numLinksetChildren)
230 { 238 {
231 // It is possible that the linkset is still under construction and the child is not yet
232 // inserted into the compound shape. A rebuild of the linkset in a pre-step action will
233 // build the whole thing with the new position or rotation.
234 // This must be checked for because Bullet references the child array but does no validity
235 // checking of the child index passed.
236 BulletShape linksetChildShape = PhysicsScene.PE.GetChildShapeFromCompoundShapeIndex(LinksetRoot.PhysShape, lsi.Index); 239 BulletShape linksetChildShape = PhysicsScene.PE.GetChildShapeFromCompoundShapeIndex(LinksetRoot.PhysShape, lsi.Index);
237 if (linksetChildShape.HasPhysicalShape) 240 if (linksetChildShape.HasPhysicalShape)
238 { 241 {
239 // Compute the offset from the center-of-gravity 242 // Found the child shape within the compound shape
240 BSLinksetCompoundInfo newLsi = new BSLinksetCompoundInfo(lsi.Index, LinksetRoot, updated, LinksetRoot.PositionDisplacement);
241 PhysicsScene.PE.UpdateChildTransform(LinksetRoot.PhysShape, lsi.Index, 243 PhysicsScene.PE.UpdateChildTransform(LinksetRoot.PhysShape, lsi.Index,
242 newLsi.OffsetFromCenterOfMass, 244 newLsi.OffsetFromCenterOfMass,
243 newLsi.OffsetRot, 245 newLsi.OffsetRot,
244 true /* shouldRecalculateLocalAabb */); 246 true /* shouldRecalculateLocalAabb */);
245 updated.LinksetInfo = newLsi;
246 updatedChild = true; 247 updatedChild = true;
247 DetailLog("{0},BSLinksetCompound.UpdateProperties,changeChildPosRot,whichUpdated={1},newLsi={2}", 248 DetailLog("{0},BSLinksetCompound.UpdateProperties,changeChildPosRot,whichUpdated={1},newLsi={2}",
248 updated.LocalID, whichUpdated, newLsi); 249 updated.LocalID, whichUpdated, newLsi);
@@ -262,19 +263,20 @@ public sealed class BSLinksetCompound : BSLinkset
262 } 263 }
263 else // DEBUG DEBUG 264 else // DEBUG DEBUG
264 { // DEBUG DEBUG 265 { // DEBUG DEBUG
265 DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild,notCompound", updated.LocalID); 266 DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild,noBodyOrNotCompound", updated.LocalID);
266 } // DEBUG DEBUG 267 } // DEBUG DEBUG
267 } 268 }
268 else // DEBUG DEBUG 269 else // DEBUG DEBUG
269 { // DEBUG DEBUG 270 { // DEBUG DEBUG
270 DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild,rootPhysShape={1},lsi={2}", 271 DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild,noLinkSetInfo,rootPhysShape={1}",
271 updated.LocalID, LinksetRoot.PhysShape, lsi == null ? "NULL" : lsi.ToString()); 272 updated.LocalID, LinksetRoot.PhysShape);
272 } // DEBUG DEBUG 273 } // DEBUG DEBUG
274
273 if (!updatedChild) 275 if (!updatedChild)
274 { 276 {
275 // If couldn't do the individual child, the linkset needs a rebuild to incorporate the new child info. 277 // If couldn't do the individual child, the linkset needs a rebuild to incorporate the new child info.
276 // Note that there are several ways through this code that will not update the child that can 278 // Note: there are several ways through this code that will not update the child if
277 // occur if the linkset is being rebuilt. In this case, scheduling a rebuild is a NOOP since 279 // the linkset is being rebuilt. In this case, scheduling a rebuild is a NOOP since
278 // there will already be a rebuild scheduled. 280 // there will already be a rebuild scheduled.
279 DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild.schedulingRebuild,whichUpdated={1}", 281 DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild.schedulingRebuild,whichUpdated={1}",
280 updated.LocalID, whichUpdated); 282 updated.LocalID, whichUpdated);
@@ -300,7 +302,8 @@ public sealed class BSLinksetCompound : BSLinkset
300 { 302 {
301 // Because it is a convenient time, recompute child world position and rotation based on 303 // Because it is a convenient time, recompute child world position and rotation based on
302 // its position in the linkset. 304 // its position in the linkset.
303 RecomputeChildWorldPosition(child, true); 305 RecomputeChildWorldPosition(child, true /* inTaintTime */);
306 child.LinksetInfo = null;
304 } 307 }
305 308
306 // Cannot schedule a refresh/rebuild here because this routine is called when 309 // Cannot schedule a refresh/rebuild here because this routine is called when
@@ -315,6 +318,14 @@ public sealed class BSLinksetCompound : BSLinkset
315 // prim. The child prim's location must be recomputed based on the location of the root shape. 318 // prim. The child prim's location must be recomputed based on the location of the root shape.
316 private void RecomputeChildWorldPosition(BSPhysObject child, bool inTaintTime) 319 private void RecomputeChildWorldPosition(BSPhysObject child, bool inTaintTime)
317 { 320 {
321 // For the moment (20130201), disable this computation (converting the child physical addr back to
322 // a region address) until we have a good handle on center-of-mass offsets and what the physics
323 // engine moving a child actually means.
324 // The simulator keeps track of where children should be as the linkset moves. Setting
325 // the pos/rot here does not effect that knowledge as there is no good way for the
326 // physics engine to send the simulator an update for a child.
327
328 /*
318 BSLinksetCompoundInfo lci = child.LinksetInfo as BSLinksetCompoundInfo; 329 BSLinksetCompoundInfo lci = child.LinksetInfo as BSLinksetCompoundInfo;
319 if (lci != null) 330 if (lci != null)
320 { 331 {
@@ -343,6 +354,7 @@ public sealed class BSLinksetCompound : BSLinkset
343 // LogHeader, child.LocalID); 354 // LogHeader, child.LocalID);
344 DetailLog("{0},BSLinksetCompound.recomputeChildWorldPosition,noRelativePositonInfo", child.LocalID); 355 DetailLog("{0},BSLinksetCompound.recomputeChildWorldPosition,noRelativePositonInfo", child.LocalID);
345 } 356 }
357 */
346 } 358 }
347 359
348 // ================================================================ 360 // ================================================================
@@ -376,6 +388,7 @@ public sealed class BSLinksetCompound : BSLinkset
376 388
377 // Cause the child's body to be rebuilt and thus restored to normal operation 389 // Cause the child's body to be rebuilt and thus restored to normal operation
378 RecomputeChildWorldPosition(child, false); 390 RecomputeChildWorldPosition(child, false);
391 child.LinksetInfo = null;
379 child.ForceBodyShapeRebuild(false); 392 child.ForceBodyShapeRebuild(false);
380 393
381 if (!HasAnyChildren) 394 if (!HasAnyChildren)
@@ -397,7 +410,7 @@ public sealed class BSLinksetCompound : BSLinkset
397 // Constraint linksets are rebuilt every time. 410 // Constraint linksets are rebuilt every time.
398 // Note that this works for rebuilding just the root after a linkset is taken apart. 411 // Note that this works for rebuilding just the root after a linkset is taken apart.
399 // Called at taint time!! 412 // Called at taint time!!
400 private bool disableCOM = true; // disable until we get this debugged 413 private bool disableCOM = true; // DEBUG DEBUG: disable until we get this debugged
401 private void RecomputeLinksetCompound() 414 private void RecomputeLinksetCompound()
402 { 415 {
403 try 416 try
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
index 7dfdec1..a3b3556 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
@@ -127,6 +127,7 @@ Physical and phantom will drop through the terrain
127 127
128LINKSETS 128LINKSETS
129====================================================== 129======================================================
130Child prims do not report collisions
130Editing a child of a linkset causes the child to go phantom 131Editing a child of a linkset causes the child to go phantom
131 Move a child prim once when it is physical and can never move it again without it going phantom 132 Move a child prim once when it is physical and can never move it again without it going phantom
132Offset the center of the linkset to be the geometric center of all the prims 133Offset the center of the linkset to be the geometric center of all the prims
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 96a9ff7..c4d7ef3 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Physics.Manager
43 public delegate void JointDeactivated(PhysicsJoint joint); 43 public delegate void JointDeactivated(PhysicsJoint joint);
44 public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" 44 public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation"
45 45
46 public enum RayFilterFlags:ushort 46 public enum RayFilterFlags : ushort
47 { 47 {
48 // the flags 48 // the flags
49 water = 0x01, 49 water = 0x01,
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Physics.Manager
60 ClosestHit = 0x8000, 60 ClosestHit = 0x8000,
61 61
62 // some combinations 62 // some combinations
63 LSLPhanton = phantom | volumedtc, 63 LSLPhantom = phantom | volumedtc,
64 PrimsNonPhantom = nonphysical | physical, 64 PrimsNonPhantom = nonphysical | physical,
65 PrimsNonPhantomAgents = nonphysical | physical | agent, 65 PrimsNonPhantomAgents = nonphysical | physical | agent,
66 66
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 81de9ab..0db6fe3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -11381,7 +11381,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11381 if (checkNonPhysical) 11381 if (checkNonPhysical)
11382 rayfilter |= RayFilterFlags.nonphysical; 11382 rayfilter |= RayFilterFlags.nonphysical;
11383 if (detectPhantom) 11383 if (detectPhantom)
11384 rayfilter |= RayFilterFlags.LSLPhanton; 11384 rayfilter |= RayFilterFlags.LSLPhantom;
11385 11385
11386 Vector3 direction = dir * ( 1/dist); 11386 Vector3 direction = dir * ( 1/dist);
11387 11387