Fix merge artefacts

avinationmerge
Melanie 2010-11-05 14:46:13 +01:00
parent ddd3c6824a
commit 7844872067
2 changed files with 22 additions and 59 deletions

View File

@ -11358,12 +11358,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void ProcessInPacket(Packet packet)
{
if (m_debugPacketLevel >= 255)
m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type);
m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type);
if (!ProcessPacketMethod(Pack))
m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type);
if (!ProcessPacketMethod(packet))
m_log.Warn("[CLIENT]: unhandled packet " + packet.Type);
PacketPool.Instance.ReturnPacket(Pack);
PacketPool.Instance.ReturnPacket(packet);
}
private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)

View File

@ -127,7 +127,7 @@ namespace OpenSim.Region.Framework.Scenes
private Vector3 m_avInitialPos; // used to calculate unscripted sit rotation
private Vector3 m_avUnscriptedSitPos; // for non-scripted prims
private Vector3 m_lastPosition;
private Vector3 m_lastPosition;
private Vector3 m_lastWorldPosition;
private Quaternion m_lastRotation;
private Vector3 m_lastVelocity;
@ -892,11 +892,7 @@ namespace OpenSim.Region.Framework.Scenes
m_rootRegionHandle = m_scene.RegionInfo.RegionHandle;
<<<<<<< HEAD
m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene);
=======
m_scene.SetRootAgentScene(m_uuid);
>>>>>>> 91b1d17... Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready.
// Moved this from SendInitialData to ensure that m_appearance is initialized
// before the inventory is processed in MakeRootAgent. This fixes a race condition
@ -912,7 +908,6 @@ namespace OpenSim.Region.Framework.Scenes
{
Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.N);
pos.Y = crossedBorder.BorderLine.Z - 1;
<<<<<<< HEAD
}
//If they're TP'ing in or logging in, we haven't had time to add any known child regions yet.
@ -929,24 +924,6 @@ namespace OpenSim.Region.Framework.Scenes
pos = land.LandData.UserLocation;
}
}
=======
}
//If they're TP'ing in or logging in, we haven't had time to add any known child regions yet.
//This has the unfortunate consequence that if somebody is TP'ing who is already a child agent,
//they'll bypass the landing point. But I can't think of any decent way of fixing this.
if (KnownChildRegionHandles.Count == 0)
{
ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
if (land != null)
{
//Don't restrict gods, estate managers, or land owners to the TP point. This behaviour mimics agni.
if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero && m_userLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid) && land.LandData.OwnerID != m_uuid)
{
pos = land.LandData.UserLocation;
}
}
>>>>>>> 91b1d17... Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready.
}
if (pos.X < 0 || pos.Y < 0 || pos.Z < 0)
@ -1130,8 +1107,8 @@ namespace OpenSim.Region.Framework.Scenes
bool isFlying = false;
if (m_physicsActor != null)
isFlying = m_physicsActor.Flying;
isFlying = m_physicsActor.Flying;
RemoveFromPhysicalScene();
Velocity = Vector3.Zero;
AbsolutePosition = pos;
@ -1142,7 +1119,7 @@ namespace OpenSim.Region.Framework.Scenes
SetHeight(m_appearance.AvatarHeight);
}
SendTerseUpdateToAllClients();
SendTerseUpdateToAllClients();
}
@ -1848,14 +1825,14 @@ namespace OpenSim.Region.Framework.Scenes
// else
// { // single or child prim
// }
if (part == null) //CW: Part may be gone. llDie() for example.
{
partRot = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
}
else
{
partRot = part.GetWorldRotation();
// }
if (part == null) //CW: Part may be gone. llDie() for example.
{
partRot = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
}
else
{
partRot = part.GetWorldRotation();
}
Quaternion partIRot = Quaternion.Inverse(partRot);
@ -1863,7 +1840,6 @@ namespace OpenSim.Region.Framework.Scenes
Quaternion avatarRot = Quaternion.Inverse(Quaternion.Inverse(Rotation) * partIRot); // world or. of the av
Vector3 avStandUp = new Vector3(1.0f, 0f, 0f) * avatarRot; // 1M infront of av
<<<<<<< HEAD
if (m_physicsActor == null)
{
@ -1876,24 +1852,11 @@ namespace OpenSim.Region.Framework.Scenes
AbsolutePosition = avWorldStandUp; //KF: Fix stand up.
part.IsOccupied = false;
part.ParentGroup.DeleteAvatar(ControllingClient.AgentId);
=======
if (m_physicsActor == null)
{
AddToPhysicalScene(false);
>>>>>>> 91b1d17... Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready.
}
//CW: If the part isn't null then we can set the current position
if (part != null)
{
Vector3 avWorldStandUp = avStandUp + part.GetWorldPosition() + (m_pos * partRot); // + av sit offset!
AbsolutePosition = avWorldStandUp; //KF: Fix stand up.
part.IsOccupied = false;
}
else
{
//CW: Since the part doesn't exist, a coarse standup position isn't an issue
AbsolutePosition = m_lastWorldPosition;
else
{
//CW: Since the part doesn't exist, a coarse standup position isn't an issue
AbsolutePosition = m_lastWorldPosition;
}
m_parentPosition = Vector3.Zero;
@ -2057,7 +2020,7 @@ namespace OpenSim.Region.Framework.Scenes
// if (Util.GetDistanceTo(AbsolutePosition, autopilotTarget) < 4.5)
if( (Math.Abs(AbsolutePosition.X - autopilotTarget.X) < 256.0f) && (Math.Abs(AbsolutePosition.Y - autopilotTarget.Y) < 256.0f) )
{
autopilot = false; // close enough
autopilot = false; // close enough
m_lastWorldPosition = m_pos; /* CW - This give us a position to return the avatar to if the part is killed before standup.
Not using the part's position because returning the AV to the last known standing
position is likely to be more friendly, isn't it? */
@ -2067,7 +2030,7 @@ namespace OpenSim.Region.Framework.Scenes
} // else the autopilot will get us close
}
else
{ // its a scripted sit
{ // its a scripted sit
m_lastWorldPosition = part.AbsolutePosition; /* CW - This give us a position to return the avatar to if the part is killed before standup.
I *am* using the part's position this time because we have no real idea how far away
the avatar is from the sit target. */