Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster

avinationmerge
Melanie 2013-10-06 18:33:49 +01:00
commit 9800c6fa6c
6 changed files with 34 additions and 6 deletions

View File

@ -1967,6 +1967,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemoveHTTPHandler(string httpMethod, string path) public void RemoveHTTPHandler(string httpMethod, string path)
{ {
if (path == null) return; // Caps module isn't loaded, tries to remove handler where path = null
lock (m_HTTPHandlers) lock (m_HTTPHandlers)
{ {
if (httpMethod != null && httpMethod.Length == 0) if (httpMethod != null && httpMethod.Length == 0)

View File

@ -685,6 +685,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (changed && m_scene.AvatarFactory != null) if (changed && m_scene.AvatarFactory != null)
m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID); m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID);
so.RootPart.Shape.LastAttachPoint = (byte)so.AttachmentPoint;
sp.RemoveAttachment(so); sp.RemoveAttachment(so);
so.FromItemID = UUID.Zero; so.FromItemID = UUID.Zero;
@ -699,7 +701,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
so.ClearPartAttachmentData(); so.ClearPartAttachmentData();
rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false); rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false);
so.HasGroupChanged = true; so.HasGroupChanged = true;
so.RootPart.Shape.LastAttachPoint = (byte)so.AttachmentPoint;
rootPart.Rezzed = DateTime.Now; rootPart.Rezzed = DateTime.Now;
rootPart.RemFlag(PrimFlags.TemporaryOnRez); rootPart.RemFlag(PrimFlags.TemporaryOnRez);
so.AttachToBackup(); so.AttachToBackup();

View File

@ -392,7 +392,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
// no sense. State must be preserved because it's the tree type // no sense. State must be preserved because it's the tree type
if (objectGroup.RootPart.Shape.PCode != (byte) PCode.Tree && if (objectGroup.RootPart.Shape.PCode != (byte) PCode.Tree &&
objectGroup.RootPart.Shape.PCode != (byte) PCode.NewTree) objectGroup.RootPart.Shape.PCode != (byte) PCode.NewTree)
{
objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint; objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint;
if (objectGroup.RootPart.AttachPoint > 0)
objectGroup.RootPart.Shape.LastAttachPoint = objectGroup.RootPart.AttachPoint;
}
objectGroup.AbsolutePosition = inventoryStoredPosition; objectGroup.AbsolutePosition = inventoryStoredPosition;
objectGroup.RootPart.RotationOffset = inventoryStoredRotation; objectGroup.RootPart.RotationOffset = inventoryStoredRotation;

View File

@ -498,6 +498,7 @@ namespace OpenSim.Region.Framework.Scenes
k.Position = pos; k.Position = pos;
// k.Velocity = Vector3.Zero; // k.Velocity = Vector3.Zero;
} }
k.AngularVelocity = (Vector3)k.Position;
k.StartRotation = rot; k.StartRotation = rot;
if (k.Rotation.HasValue) if (k.Rotation.HasValue)
@ -638,7 +639,7 @@ namespace OpenSim.Region.Framework.Scenes
m_group.RootPart.Velocity = Vector3.Zero; m_group.RootPart.Velocity = Vector3.Zero;
m_group.RootPart.AngularVelocity = Vector3.Zero; m_group.RootPart.AngularVelocity = Vector3.Zero;
m_nextPosition = (Vector3)m_currentFrame.Position; m_nextPosition = NormalizeVector(m_currentFrame.AngularVelocity);
m_group.AbsolutePosition = m_nextPosition; m_group.AbsolutePosition = m_nextPosition;
// we are sending imediate updates, no doing force a extra terseUpdate // we are sending imediate updates, no doing force a extra terseUpdate
@ -726,7 +727,26 @@ namespace OpenSim.Region.Framework.Scenes
m_group.SendGroupRootTerseUpdate(); m_group.SendGroupRootTerseUpdate();
} }
} }
private Vector3 NormalizeVector(Vector3? pPosition)
{
if (pPosition == null)
return Vector3.Zero;
Vector3 tmp = (Vector3) pPosition;
while (tmp.X > Constants.RegionSize)
tmp.X -= Constants.RegionSize;
while (tmp.X < 0)
tmp.X += Constants.RegionSize;
while (tmp.Y > Constants.RegionSize)
tmp.Y -= Constants.RegionSize;
while (tmp.Y < 0)
tmp.Y += Constants.RegionSize;
return tmp;
}
public Byte[] Serialize() public Byte[] Serialize()
{ {
StopTimer(); StopTimer();

View File

@ -1667,7 +1667,8 @@ namespace OpenSim.Region.Framework.Scenes
ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
if (avatar == null) if (avatar == null)
return; return;
m_rootPart.Shape.LastAttachPoint = m_rootPart.Shape.State;
m_rootPart.AttachedPos = m_rootPart.OffsetPosition;
avatar.RemoveAttachment(this); avatar.RemoveAttachment(this);
Vector3 detachedpos = new Vector3(127f,127f,127f); Vector3 detachedpos = new Vector3(127f,127f,127f);
@ -2107,6 +2108,7 @@ namespace OpenSim.Region.Framework.Scenes
if (RootPart.Shape.PCode == 9 && RootPart.Shape.State != 0) if (RootPart.Shape.PCode == 9 && RootPart.Shape.State != 0)
{ {
RootPart.Shape.LastAttachPoint = RootPart.Shape.State;
RootPart.Shape.State = 0; RootPart.Shape.State = 0;
ScheduleGroupForFullUpdate(); ScheduleGroupForFullUpdate();
} }