Merge branch 'ubitwork' into avination

avinationmerge
Melanie 2012-09-04 13:02:33 +02:00
commit 8a537f8f66
4 changed files with 19 additions and 3 deletions

View File

@ -151,6 +151,12 @@ namespace OpenSim.Region.ClientStack.Linden
ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
uint locationID, uint flags, string capsURL, UUID agentID)
{
// not sure why flags get overwritten here
if ((flags & (uint)TeleportFlags.IsFlying) != 0)
flags = (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.IsFlying;
else
flags = (uint)TeleportFlags.ViaLocation;
OSDMap info = new OSDMap();
info.Add("AgentID", OSD.FromUUID(agentID));
info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this?
@ -159,7 +165,8 @@ namespace OpenSim.Region.ClientStack.Linden
info.Add("SimAccess", OSD.FromInteger(simAccess));
info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes()));
info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port));
info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation
// info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation
info.Add("TeleportFlags", OSD.FromUInteger(flags));
OSDArray infoArr = new OSDArray();
infoArr.Add(info);

View File

@ -808,7 +808,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType);
handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes;
OutPacket(handshake, ThrottleOutPacketType.Task);
// OutPacket(handshake, ThrottleOutPacketType.Task);
// use same as MoveAgentIntoRegion (both should be task )
OutPacket(handshake, ThrottleOutPacketType.Unknown);
}
public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)

View File

@ -264,6 +264,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
position.Z = newPosZ;
}
if (sp.Flying)
teleportFlags |= (uint)TeleportFlags.IsFlying;
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring);
sp.ControllingClient.SendTeleportStart(teleportFlags);
@ -471,6 +474,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if (sp.ParentID != (uint)0)
sp.StandUp();
else if (sp.Flying)
teleportFlags |= (uint)TeleportFlags.IsFlying;
sp.ControllingClient.SendTeleportStart(teleportFlags);
// the avatar.Close below will clear the child region list. We need this below for (possibly)

View File

@ -1264,7 +1264,8 @@ namespace OpenSim.Region.Framework.Scenes
Vector3 look = Velocity;
if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
// if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
if ((Math.Abs(look.X) < 0.1) && (Math.Abs(look.Y) < 0.1) && (Math.Abs(look.Z) < 0.1))
{
look = new Vector3(0.99f, 0.042f, 0);
}