Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

user_profiles
BlueWall 2013-02-01 21:58:32 -05:00
commit 57cf89f4a9
9 changed files with 75 additions and 34 deletions

View File

@ -75,7 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
public void Close() { }
public void PostInitialise() { }
///<summary>
///
///</summary>
@ -133,7 +132,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
///</summary>
public void AddRegion(Scene scene)
{
if (! m_enabled)
if (!m_enabled)
return;
// Every shared region module has to maintain an indepedent list of
@ -206,6 +205,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
using (Image mapTile = tileGenerator.CreateMapTile())
{
// XXX: The MapImageModule will return a null if the user has chosen not to create map tiles and there
// is no static map tile.
if (mapTile == null)
return;
using (MemoryStream stream = new MemoryStream())
{
mapTile.Save(stream, ImageFormat.Jpeg);

View File

@ -113,7 +113,6 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
//t = System.Environment.TickCount - t;
//m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t);
if (drawPrimVolume)
{
DrawObjectVolume(m_scene, mapbmp);
@ -121,7 +120,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
}
else
{
mapbmp = fetchTexture(m_scene.RegionInfo.RegionSettings.TerrainImageID);
mapbmp = FetchTexture(m_scene.RegionInfo.RegionSettings.TerrainImageID);
}
return mapbmp;
}
@ -232,11 +231,19 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
// }
// }
private Bitmap fetchTexture(UUID id)
private Bitmap FetchTexture(UUID id)
{
AssetBase asset = m_scene.AssetService.Get(id.ToString());
m_log.DebugFormat("[MAPTILE]: Fetched static texture {0}, found: {1}", id, asset != null);
if (asset == null) return null;
if (asset != null)
{
m_log.DebugFormat("[MAPTILE]: Static map image texture {0} found for {1}", id, m_scene.Name);
}
else
{
m_log.WarnFormat("[MAPTILE]: Static map image texture {0} not found for {1}", id, m_scene.Name);
return null;
}
ManagedImage managedImage;
Image image;

View File

@ -2342,7 +2342,7 @@ namespace OpenSim.Region.Framework.Scenes
ParentPart = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
ParentID = m_requestedSitTargetID;
m_AngularVelocity = Vector3.Zero;
Velocity = Vector3.Zero;
RemoveFromPhysicalScene();
@ -2358,7 +2358,8 @@ namespace OpenSim.Region.Framework.Scenes
public void HandleAgentSitOnGround()
{
// m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.
// m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick..
m_AngularVelocity = Vector3.Zero;
Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
SitGround = true;
RemoveFromPhysicalScene();

View File

@ -219,30 +219,31 @@ public sealed class BSLinksetCompound : BSLinkset
{
// Gather the child info. It might not be there if the linkset is in transition.
BSLinksetCompoundInfo lsi = updated.LinksetInfo as BSLinksetCompoundInfo;
// The linksetInfo will need to be rebuilt either here or when the linkset is rebuilt
if (LinksetRoot.PhysShape.HasPhysicalShape && lsi != null)
if (lsi != null)
{
if (PhysicsScene.PE.IsCompound(LinksetRoot.PhysShape))
// Since the child moved or rotationed, it needs a new relative position within the linkset
BSLinksetCompoundInfo newLsi = new BSLinksetCompoundInfo(lsi.Index, LinksetRoot, updated, LinksetRoot.PositionDisplacement);
updated.LinksetInfo = newLsi;
// Find the physical instance of the child
if (LinksetRoot.PhysShape.HasPhysicalShape && PhysicsScene.PE.IsCompound(LinksetRoot.PhysShape))
{
// It is possible that the linkset is still under construction and the child is not yet
// inserted into the compound shape. A rebuild of the linkset in a pre-step action will
// build the whole thing with the new position or rotation.
// The index must be checked because Bullet references the child array but does no validity
// checking of the child index passed.
int numLinksetChildren = PhysicsScene.PE.GetNumberOfCompoundChildren(LinksetRoot.PhysShape);
if (lsi.Index < numLinksetChildren)
{
// It is possible that the linkset is still under construction and the child is not yet
// inserted into the compound shape. A rebuild of the linkset in a pre-step action will
// build the whole thing with the new position or rotation.
// This must be checked for because Bullet references the child array but does no validity
// checking of the child index passed.
BulletShape linksetChildShape = PhysicsScene.PE.GetChildShapeFromCompoundShapeIndex(LinksetRoot.PhysShape, lsi.Index);
if (linksetChildShape.HasPhysicalShape)
{
// Compute the offset from the center-of-gravity
BSLinksetCompoundInfo newLsi = new BSLinksetCompoundInfo(lsi.Index, LinksetRoot, updated, LinksetRoot.PositionDisplacement);
// Found the child shape within the compound shape
PhysicsScene.PE.UpdateChildTransform(LinksetRoot.PhysShape, lsi.Index,
newLsi.OffsetFromCenterOfMass,
newLsi.OffsetRot,
true /* shouldRecalculateLocalAabb */);
updated.LinksetInfo = newLsi;
updatedChild = true;
DetailLog("{0},BSLinksetCompound.UpdateProperties,changeChildPosRot,whichUpdated={1},newLsi={2}",
updated.LocalID, whichUpdated, newLsi);
@ -262,19 +263,20 @@ public sealed class BSLinksetCompound : BSLinkset
}
else // DEBUG DEBUG
{ // DEBUG DEBUG
DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild,notCompound", updated.LocalID);
DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild,noBodyOrNotCompound", updated.LocalID);
} // DEBUG DEBUG
}
else // DEBUG DEBUG
{ // DEBUG DEBUG
DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild,rootPhysShape={1},lsi={2}",
updated.LocalID, LinksetRoot.PhysShape, lsi == null ? "NULL" : lsi.ToString());
DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild,noLinkSetInfo,rootPhysShape={1}",
updated.LocalID, LinksetRoot.PhysShape);
} // DEBUG DEBUG
if (!updatedChild)
{
// If couldn't do the individual child, the linkset needs a rebuild to incorporate the new child info.
// Note that there are several ways through this code that will not update the child that can
// occur if the linkset is being rebuilt. In this case, scheduling a rebuild is a NOOP since
// Note: there are several ways through this code that will not update the child if
// the linkset is being rebuilt. In this case, scheduling a rebuild is a NOOP since
// there will already be a rebuild scheduled.
DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild.schedulingRebuild,whichUpdated={1}",
updated.LocalID, whichUpdated);
@ -300,7 +302,8 @@ public sealed class BSLinksetCompound : BSLinkset
{
// Because it is a convenient time, recompute child world position and rotation based on
// its position in the linkset.
RecomputeChildWorldPosition(child, true);
RecomputeChildWorldPosition(child, true /* inTaintTime */);
child.LinksetInfo = null;
}
// Cannot schedule a refresh/rebuild here because this routine is called when
@ -315,6 +318,14 @@ public sealed class BSLinksetCompound : BSLinkset
// prim. The child prim's location must be recomputed based on the location of the root shape.
private void RecomputeChildWorldPosition(BSPhysObject child, bool inTaintTime)
{
// For the moment (20130201), disable this computation (converting the child physical addr back to
// a region address) until we have a good handle on center-of-mass offsets and what the physics
// engine moving a child actually means.
// The simulator keeps track of where children should be as the linkset moves. Setting
// the pos/rot here does not effect that knowledge as there is no good way for the
// physics engine to send the simulator an update for a child.
/*
BSLinksetCompoundInfo lci = child.LinksetInfo as BSLinksetCompoundInfo;
if (lci != null)
{
@ -343,6 +354,7 @@ public sealed class BSLinksetCompound : BSLinkset
// LogHeader, child.LocalID);
DetailLog("{0},BSLinksetCompound.recomputeChildWorldPosition,noRelativePositonInfo", child.LocalID);
}
*/
}
// ================================================================
@ -376,6 +388,7 @@ public sealed class BSLinksetCompound : BSLinkset
// Cause the child's body to be rebuilt and thus restored to normal operation
RecomputeChildWorldPosition(child, false);
child.LinksetInfo = null;
child.ForceBodyShapeRebuild(false);
if (!HasAnyChildren)
@ -397,7 +410,7 @@ public sealed class BSLinksetCompound : BSLinkset
// Constraint linksets are rebuilt every time.
// Note that this works for rebuilding just the root after a linkset is taken apart.
// Called at taint time!!
private bool disableCOM = true; // disable until we get this debugged
private bool disableCOM = true; // DEBUG DEBUG: disable until we get this debugged
private void RecomputeLinksetCompound()
{
try

View File

@ -127,6 +127,7 @@ Physical and phantom will drop through the terrain
LINKSETS
======================================================
Child prims do not report collisions
Editing a child of a linkset causes the child to go phantom
Move a child prim once when it is physical and can never move it again without it going phantom
Offset the center of the linkset to be the geometric center of all the prims

View File

@ -43,7 +43,7 @@ namespace OpenSim.Region.Physics.Manager
public delegate void JointDeactivated(PhysicsJoint joint);
public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation"
public enum RayFilterFlags:ushort
public enum RayFilterFlags : ushort
{
// the flags
water = 0x01,
@ -60,7 +60,7 @@ namespace OpenSim.Region.Physics.Manager
ClosestHit = 0x8000,
// some combinations
LSLPhanton = phantom | volumedtc,
LSLPhantom = phantom | volumedtc,
PrimsNonPhantom = nonphysical | physical,
PrimsNonPhantomAgents = nonphysical | physical | agent,

View File

@ -11381,7 +11381,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (checkNonPhysical)
rayfilter |= RayFilterFlags.nonphysical;
if (detectPhantom)
rayfilter |= RayFilterFlags.LSLPhanton;
rayfilter |= RayFilterFlags.LSLPhantom;
Vector3 direction = dir * ( 1/dist);

View File

@ -269,9 +269,10 @@
; DefaultScriptEngine = "XEngine"
;# {GenerateMaptiles} {} {Generate map tiles?} {true false} true
;; Map tile options. You can choose to generate no map tiles at all,
;; generate normal maptiles, or nominate an uploaded texture to
;; be the map tile
;; Map tile options. You can choose to generate normal maptiles or nominate an uploaded texture to
;; be the map tile using the MaptileStaticUUID parameter in this section or for individual regions in
;; the regions config file(s). If you do not want to upload map tiles at all, then you will need
;; to disable the MapImageServiceModule entirely.
; GenerateMaptiles = true
;# {MaptileRefresh} {GenerateMaptiles} {Maptile refresh period?} {} 0

View File

@ -1,6 +1,20 @@
; This file contains defaults for various settings in OpenSimulator. These can be overriden
; by changing the same setting in OpenSim.ini (once OpenSim.ini.example has been copied to OpenSim.ini).
[XMLRPC]
;# {XmlRpcRouterModule} {} {Module used to route incoming llRemoteData calls} {XmlRpcRouterModule XmlRpcGridRouterModule} XmlRpcRouterModule
;; If enabled and set to XmlRpcRouterModule, this will post an event,
;; "xmlrpc_uri(string)" to the script concurrently with the first
;; remote_data event. This will contain the fully qualified URI an
;; external site needs to use to send XMLRPC requests to that script
;;
;; If enabled and set to XmlRpcGridRouterModule, newly created channels
;; will be registered with an external service via a configured uri
XmlRpcRouterModule = "XmlRpcRouterModule"
;# {XmlRpcPort} {} {Port for incoming llRemoteData xmlrpc calls} {} 20800
XmlRpcPort = 20800
[Startup]
; Console prompt