Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
commit
40c0f6a688
|
@ -3761,24 +3761,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
SceneObjectPart part = (SceneObjectPart)update.Entity;
|
SceneObjectPart part = (SceneObjectPart)update.Entity;
|
||||||
|
|
||||||
// Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client
|
|
||||||
// will never receive an update after a prim kill. Even then, keeping the kill record may be a good
|
|
||||||
// safety measure.
|
|
||||||
//
|
|
||||||
// If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update
|
|
||||||
// after a kill, it will keep displaying the deleted object until relog. OpenSim currently performs
|
|
||||||
// updates and kills on different threads with different scheduling strategies, hence this protection.
|
|
||||||
//
|
|
||||||
// This doesn't appear to apply to child prims - a client will happily ignore these updates
|
|
||||||
// after the root prim has been deleted.
|
|
||||||
lock (m_killRecord)
|
|
||||||
{
|
|
||||||
if (m_killRecord.Contains(part.LocalId))
|
|
||||||
continue;
|
|
||||||
if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId))
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (part.ParentGroup.IsDeleted)
|
if (part.ParentGroup.IsDeleted)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -3816,7 +3798,39 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// attachments until the avatar becomes root.
|
// attachments until the avatar becomes root.
|
||||||
if (sp.IsChildAgent)
|
if (sp.IsChildAgent)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// If the object is an attachment we don't want it to be in the kill
|
||||||
|
// record. Else attaching from inworld and subsequently dropping
|
||||||
|
// it will no longer work.
|
||||||
|
lock (m_killRecord)
|
||||||
|
{
|
||||||
|
m_killRecord.Remove(part.LocalId);
|
||||||
|
m_killRecord.Remove(part.ParentGroup.RootPart.LocalId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client
|
||||||
|
// will never receive an update after a prim kill. Even then, keeping the kill record may be a good
|
||||||
|
// safety measure.
|
||||||
|
//
|
||||||
|
// If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update
|
||||||
|
// after a kill, it will keep displaying the deleted object until relog. OpenSim currently performs
|
||||||
|
// updates and kills on different threads with different scheduling strategies, hence this protection.
|
||||||
|
//
|
||||||
|
// This doesn't appear to apply to child prims - a client will happily ignore these updates
|
||||||
|
// after the root prim has been deleted.
|
||||||
|
//
|
||||||
|
// We ignore this for attachments because attaching something from inworld breaks unless we do.
|
||||||
|
lock (m_killRecord)
|
||||||
|
{
|
||||||
|
if (m_killRecord.Contains(part.LocalId))
|
||||||
|
continue;
|
||||||
|
if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (part.ParentGroup.IsAttachment && m_disableFacelights)
|
if (part.ParentGroup.IsAttachment && m_disableFacelights)
|
||||||
{
|
{
|
||||||
if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand &&
|
if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand &&
|
||||||
|
|
|
@ -631,19 +631,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
// "[ATTACHMENTS MODULE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2}",
|
// "[ATTACHMENTS MODULE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2}",
|
||||||
// grp.Name, grp.LocalId, remoteClient.Name);
|
// grp.Name, grp.LocalId, remoteClient.Name);
|
||||||
|
|
||||||
Vector3 inventoryStoredPosition = new Vector3
|
// Vector3 inventoryStoredPosition = new Vector3
|
||||||
(((grp.AbsolutePosition.X > (int)Constants.RegionSize)
|
// (((grp.AbsolutePosition.X > (int)Constants.RegionSize)
|
||||||
? (float)Constants.RegionSize - 6
|
// ? (float)Constants.RegionSize - 6
|
||||||
: grp.AbsolutePosition.X)
|
// : grp.AbsolutePosition.X)
|
||||||
,
|
// ,
|
||||||
(grp.AbsolutePosition.Y > (int)Constants.RegionSize)
|
// (grp.AbsolutePosition.Y > (int)Constants.RegionSize)
|
||||||
? (float)Constants.RegionSize - 6
|
// ? (float)Constants.RegionSize - 6
|
||||||
: grp.AbsolutePosition.Y,
|
// : grp.AbsolutePosition.Y,
|
||||||
grp.AbsolutePosition.Z);
|
// grp.AbsolutePosition.Z);
|
||||||
|
//
|
||||||
Vector3 originalPosition = grp.AbsolutePosition;
|
// Vector3 originalPosition = grp.AbsolutePosition;
|
||||||
|
//
|
||||||
grp.AbsolutePosition = inventoryStoredPosition;
|
// grp.AbsolutePosition = inventoryStoredPosition;
|
||||||
|
|
||||||
// If we're being called from a script, then trying to serialize that same script's state will not complete
|
// If we're being called from a script, then trying to serialize that same script's state will not complete
|
||||||
// in any reasonable time period. Therefore, we'll avoid it. The worst that can happen is that if
|
// in any reasonable time period. Therefore, we'll avoid it. The worst that can happen is that if
|
||||||
|
@ -651,7 +651,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
// without state on relog. Arguably, this is what we want anyway.
|
// without state on relog. Arguably, this is what we want anyway.
|
||||||
string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp, false);
|
string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp, false);
|
||||||
|
|
||||||
grp.AbsolutePosition = originalPosition;
|
// grp.AbsolutePosition = originalPosition;
|
||||||
|
|
||||||
AssetBase asset = m_scene.CreateAsset(
|
AssetBase asset = m_scene.CreateAsset(
|
||||||
grp.GetPartName(grp.LocalId),
|
grp.GetPartName(grp.LocalId),
|
||||||
|
@ -679,21 +679,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
else // oopsies
|
else // oopsies
|
||||||
item.Folder = UUID.Zero;
|
item.Folder = UUID.Zero;
|
||||||
|
|
||||||
|
// Nix the special bits we used to use for slam and the folded perms
|
||||||
|
uint allowablePermissionsMask = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move);
|
||||||
|
|
||||||
if ((sp.UUID != grp.RootPart.OwnerID) && m_scene.Permissions.PropagatePermissions())
|
if ((sp.UUID != grp.RootPart.OwnerID) && m_scene.Permissions.PropagatePermissions())
|
||||||
{
|
{
|
||||||
item.BasePermissions = grp.RootPart.NextOwnerMask;
|
item.BasePermissions = grp.RootPart.BaseMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask;
|
||||||
item.CurrentPermissions = grp.RootPart.NextOwnerMask;
|
item.CurrentPermissions = grp.RootPart.BaseMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask;
|
||||||
item.NextPermissions = grp.RootPart.NextOwnerMask;
|
item.NextPermissions = grp.RootPart.NextOwnerMask & allowablePermissionsMask;
|
||||||
item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask;
|
item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask;
|
||||||
item.GroupPermissions = grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask;
|
item.GroupPermissions = grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
item.BasePermissions = grp.RootPart.BaseMask;
|
item.BasePermissions = grp.RootPart.BaseMask & allowablePermissionsMask;
|
||||||
item.CurrentPermissions = grp.RootPart.OwnerMask;
|
item.CurrentPermissions = grp.RootPart.OwnerMask & allowablePermissionsMask;
|
||||||
item.NextPermissions = grp.RootPart.NextOwnerMask;
|
item.NextPermissions = grp.RootPart.NextOwnerMask & allowablePermissionsMask;
|
||||||
item.EveryOnePermissions = grp.RootPart.EveryoneMask;
|
item.EveryOnePermissions = grp.RootPart.EveryoneMask & allowablePermissionsMask;
|
||||||
item.GroupPermissions = grp.RootPart.GroupMask;
|
item.GroupPermissions = grp.RootPart.GroupMask & allowablePermissionsMask;
|
||||||
}
|
}
|
||||||
item.CreationDate = Util.UnixTimeSinceEpoch();
|
item.CreationDate = Util.UnixTimeSinceEpoch();
|
||||||
|
|
||||||
|
|
|
@ -1621,12 +1621,13 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
|
|
||||||
if (Body != IntPtr.Zero)
|
if (Body != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
d.BodyDestroy(Body);
|
// d.BodyDestroy(Body);
|
||||||
Body = IntPtr.Zero;
|
// Body = IntPtr.Zero;
|
||||||
|
// do a more complet destruction
|
||||||
|
DestroyBody();
|
||||||
m_log.Warn("[PHYSICS]: MakeBody called having a body");
|
m_log.Warn("[PHYSICS]: MakeBody called having a body");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (d.GeomGetBody(prim_geom) != IntPtr.Zero)
|
if (d.GeomGetBody(prim_geom) != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
d.GeomSetBody(prim_geom, IntPtr.Zero);
|
d.GeomSetBody(prim_geom, IntPtr.Zero);
|
||||||
|
@ -3320,6 +3321,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
|
|
||||||
protected void changeBuilding(bool newbuilding)
|
protected void changeBuilding(bool newbuilding)
|
||||||
{
|
{
|
||||||
|
// Check if we need to do anything
|
||||||
|
if (newbuilding == m_building)
|
||||||
|
return;
|
||||||
|
|
||||||
if ((bool)newbuilding)
|
if ((bool)newbuilding)
|
||||||
{
|
{
|
||||||
m_building = true;
|
m_building = true;
|
||||||
|
@ -4066,4 +4071,4 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
public Vector3 value;
|
public Vector3 value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1312,6 +1312,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (!allow)
|
if (!allow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (m_host.ParentGroup.RootPart.PhysActor != null &&
|
||||||
|
m_host.ParentGroup.RootPart.PhysActor.IsPhysical)
|
||||||
|
return;
|
||||||
|
|
||||||
m_host.ScriptSetPhysicsStatus(true);
|
m_host.ScriptSetPhysicsStatus(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue