* This wraps the autopilot request to the client's sit response. An interesting, but successful way to do it.
* This also takes care of a few error situations that were previously never seen.0.6.0-stable
parent
3cbc01ee88
commit
c892ddcd20
|
@ -838,6 +838,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
event RequestObjectPropertiesFamily OnObjectGroupRequest;
|
event RequestObjectPropertiesFamily OnObjectGroupRequest;
|
||||||
event ScriptReset OnScriptReset;
|
event ScriptReset OnScriptReset;
|
||||||
|
event UpdateVector OnAutoPilotGo;
|
||||||
|
|
||||||
[Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")]
|
[Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")]
|
||||||
void OutPacket(Packet newPack, ThrottleOutPacketType packType);
|
void OutPacket(Packet newPack, ThrottleOutPacketType packType);
|
||||||
|
|
|
@ -269,6 +269,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
private RequestObjectPropertiesFamily handlerObjectGroupRequest = null;
|
private RequestObjectPropertiesFamily handlerObjectGroupRequest = null;
|
||||||
private ScriptReset handlerScriptReset = null;
|
private ScriptReset handlerScriptReset = null;
|
||||||
|
private UpdateVector handlerAutoPilotGo = null;
|
||||||
|
|
||||||
/* Properties */
|
/* Properties */
|
||||||
|
|
||||||
|
@ -900,6 +901,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
|
public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
|
||||||
public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
|
public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
|
||||||
public event ScriptReset OnScriptReset;
|
public event ScriptReset OnScriptReset;
|
||||||
|
public event UpdateVector OnAutoPilotGo;
|
||||||
|
|
||||||
#region Scene/Avatar to Client
|
#region Scene/Avatar to Client
|
||||||
|
|
||||||
|
@ -1125,7 +1127,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
patches[0] = patchx + 0 + patchy * 16;
|
patches[0] = patchx + 0 + patchy * 16;
|
||||||
|
|
||||||
Packet layerpack = LLClientView.TerrainManager.CreateLandPacket(map, patches);
|
LayerDataPacket layerpack = LLClientView.TerrainManager.CreateLandPacket(map, patches);
|
||||||
layerpack.Header.Zerocoded = true;
|
layerpack.Header.Zerocoded = true;
|
||||||
OutPacket(layerpack, ThrottleOutPacketType.Land);
|
OutPacket(layerpack, ThrottleOutPacketType.Land);
|
||||||
}
|
}
|
||||||
|
@ -3966,7 +3968,50 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
get { return m_packetProcessingEnabled; }
|
get { return m_packetProcessingEnabled; }
|
||||||
set { m_packetProcessingEnabled = value; }
|
set { m_packetProcessingEnabled = value; }
|
||||||
}
|
}
|
||||||
|
public void DecipherGenericMessage(string gmMethod, LLUUID gmInvoice, GenericMessagePacket.ParamListBlock[] gmParams)
|
||||||
|
{
|
||||||
|
switch (gmMethod)
|
||||||
|
{
|
||||||
|
case "autopilot":
|
||||||
|
float locx = 0f;
|
||||||
|
float locy = 0f;
|
||||||
|
float locz = 0f;
|
||||||
|
uint regionX = 0;
|
||||||
|
uint regionY = 0;
|
||||||
|
try
|
||||||
|
|
||||||
|
{
|
||||||
|
Helpers.LongToUInts(Scene.RegionInfo.RegionHandle,out regionX, out regionY);
|
||||||
|
locx = Convert.ToSingle(Helpers.FieldToUTF8String(gmParams[0].Parameter)) - (float)regionX;
|
||||||
|
locy = Convert.ToSingle(Helpers.FieldToUTF8String(gmParams[1].Parameter)) - (float)regionY;
|
||||||
|
locz = Convert.ToSingle(Helpers.FieldToUTF8String(gmParams[2].Parameter));
|
||||||
|
}
|
||||||
|
catch (InvalidCastException)
|
||||||
|
{
|
||||||
|
m_log.Error("[CLIENT]: Invalid autopilot request");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
handlerAutoPilotGo = OnAutoPilotGo;
|
||||||
|
if (handlerAutoPilotGo != null)
|
||||||
|
{
|
||||||
|
handlerAutoPilotGo(0, new LLVector3(locx, locy, locz), this);
|
||||||
|
}
|
||||||
|
m_log.InfoFormat("[CLIENT]: Client Requests autopilot to position <{0},{1},{2}>", locx, locy, locz);
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
m_log.Debug("[CLIENT]: Unknown Generic Message, Method: " + gmMethod + ". Invoice: " + gmInvoice.ToString() + ". Dumping Params:");
|
||||||
|
for (int hi = 0; hi < gmParams.Length; hi++)
|
||||||
|
{
|
||||||
|
System.Console.WriteLine(gmParams[hi].ToString());
|
||||||
|
}
|
||||||
|
//gmpack.MethodData.
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
protected void ProcessInPacket(Packet Pack)
|
protected void ProcessInPacket(Packet Pack)
|
||||||
{
|
{
|
||||||
ack_pack(Pack);
|
ack_pack(Pack);
|
||||||
|
@ -3998,6 +4043,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
#region Scene/Avatar
|
#region Scene/Avatar
|
||||||
|
|
||||||
|
case PacketType.GenericMessage:
|
||||||
|
GenericMessagePacket gmpack = (GenericMessagePacket)Pack;
|
||||||
|
|
||||||
|
DecipherGenericMessage(Helpers.FieldToUTF8String(gmpack.MethodData.Method),gmpack.MethodData.Invoice,gmpack.ParamList);
|
||||||
|
|
||||||
|
break;
|
||||||
case PacketType.AvatarPropertiesRequest:
|
case PacketType.AvatarPropertiesRequest:
|
||||||
AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
|
AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
|
||||||
|
|
||||||
|
@ -5933,10 +5984,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// TODO: handle this packet
|
// TODO: handle this packet
|
||||||
m_log.Warn("[CLIENT]: unhandled CreateGroupRequest packet");
|
m_log.Warn("[CLIENT]: unhandled CreateGroupRequest packet");
|
||||||
break;
|
break;
|
||||||
case PacketType.GenericMessage:
|
//case PacketType.GenericMessage:
|
||||||
// TODO: handle this packet
|
// TODO: handle this packet
|
||||||
m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
|
//m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
|
||||||
break;
|
//break;
|
||||||
case PacketType.MapItemRequest:
|
case PacketType.MapItemRequest:
|
||||||
// TODO: handle this packet
|
// TODO: handle this packet
|
||||||
m_log.Warn("[CLIENT]: unhandled MapItemRequest packet");
|
m_log.Warn("[CLIENT]: unhandled MapItemRequest packet");
|
||||||
|
|
|
@ -289,6 +289,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
|
||||||
public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
|
public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
|
||||||
public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
|
public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
|
||||||
public event ScriptReset OnScriptReset;
|
public event ScriptReset OnScriptReset;
|
||||||
|
public event UpdateVector OnAutoPilotGo;
|
||||||
|
|
||||||
#pragma warning restore 67
|
#pragma warning restore 67
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -1737,6 +1737,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel;
|
client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel;
|
||||||
client.OnScriptReset += ProcessScriptReset;
|
client.OnScriptReset += ProcessScriptReset;
|
||||||
|
|
||||||
|
|
||||||
// EventManager.TriggerOnNewClient(client);
|
// EventManager.TriggerOnNewClient(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
SceneObjectPart part=m_scene.GetSceneObjectPart(objectID);
|
SceneObjectPart part=m_scene.GetSceneObjectPart(objectID);
|
||||||
|
|
||||||
|
if (part == null)
|
||||||
|
return 0;
|
||||||
|
|
||||||
uint perms=part.GetEffectiveObjectFlags() |
|
uint perms=part.GetEffectiveObjectFlags() |
|
||||||
(uint)LLObject.ObjectFlags.ObjectModify |
|
(uint)LLObject.ObjectFlags.ObjectModify |
|
||||||
(uint)LLObject.ObjectFlags.ObjectCopy |
|
(uint)LLObject.ObjectFlags.ObjectCopy |
|
||||||
|
|
|
@ -472,6 +472,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
UpdateParentIDs();
|
UpdateParentIDs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -488,12 +489,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
newPart.LinkNum = m_parts.Count;
|
newPart.LinkNum = m_parts.Count;
|
||||||
m_parts.Add(newPart.UUID, newPart);
|
m_parts.Add(newPart.UUID, newPart);
|
||||||
SetPartAsRoot(newPart);
|
SetPartAsRoot(newPart);
|
||||||
|
// one of these is a proxy.
|
||||||
|
if (shape.PCode != (byte)PCode.None && shape.PCode != (byte)PCode.ParticleSystem)
|
||||||
AttachToBackup();
|
AttachToBackup();
|
||||||
|
|
||||||
//ApplyPhysics(scene.m_physicalPrim);
|
//ApplyPhysics(scene.m_physicalPrim);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -80,6 +80,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
private Dictionary<LLUUID, ScriptControllers> scriptedcontrols = new Dictionary<LLUUID, ScriptControllers>();
|
private Dictionary<LLUUID, ScriptControllers> scriptedcontrols = new Dictionary<LLUUID, ScriptControllers>();
|
||||||
private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO;
|
private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO;
|
||||||
private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO;
|
private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO;
|
||||||
|
private SceneObjectGroup proxyObjectGroup = null;
|
||||||
|
private SceneObjectPart proxyObjectPart = null;
|
||||||
|
|
||||||
public Vector3 lastKnownAllowedPosition = new Vector3();
|
public Vector3 lastKnownAllowedPosition = new Vector3();
|
||||||
public bool sentMessageAboutRestrictedParcelFlyingDown = false;
|
public bool sentMessageAboutRestrictedParcelFlyingDown = false;
|
||||||
|
@ -89,6 +91,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
private readonly List<NewForce> m_forcesList = new List<NewForce>();
|
private readonly List<NewForce> m_forcesList = new List<NewForce>();
|
||||||
private short m_updateCount = 0;
|
private short m_updateCount = 0;
|
||||||
private uint m_requestedSitTargetID = 0;
|
private uint m_requestedSitTargetID = 0;
|
||||||
|
private LLUUID m_requestedSitTargetUUID = LLUUID.Zero;
|
||||||
|
|
||||||
private LLVector3 m_requestedSitOffset = new LLVector3();
|
private LLVector3 m_requestedSitOffset = new LLVector3();
|
||||||
|
|
||||||
private LLVector3 m_LastFinitePos = new LLVector3();
|
private LLVector3 m_LastFinitePos = new LLVector3();
|
||||||
|
@ -144,6 +148,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
//Reuse the LLVector3 instead of creating a new one on the UpdateMovement method
|
//Reuse the LLVector3 instead of creating a new one on the UpdateMovement method
|
||||||
private LLVector3 movementvector = new LLVector3();
|
private LLVector3 movementvector = new LLVector3();
|
||||||
|
|
||||||
|
private bool m_autopilotMoving = false;
|
||||||
|
private LLVector3 m_autoPilotTarget = LLVector3.Zero;
|
||||||
|
private bool m_sitAtAutoTarget = false;
|
||||||
|
|
||||||
private List<LLUUID> m_knownPrimUUID = new List<LLUUID>();
|
private List<LLUUID> m_knownPrimUUID = new List<LLUUID>();
|
||||||
|
|
||||||
// Agent's Draw distance.
|
// Agent's Draw distance.
|
||||||
|
@ -439,6 +447,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_controllingClient.OnStartAnim += HandleStartAnim;
|
m_controllingClient.OnStartAnim += HandleStartAnim;
|
||||||
m_controllingClient.OnStopAnim += HandleStopAnim;
|
m_controllingClient.OnStopAnim += HandleStopAnim;
|
||||||
m_controllingClient.OnForceReleaseControls += HandleForceReleaseControls;
|
m_controllingClient.OnForceReleaseControls += HandleForceReleaseControls;
|
||||||
|
m_controllingClient.OnAutoPilotGo += DoAutoPilot;
|
||||||
|
|
||||||
// ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
|
// ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
|
||||||
// ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
|
// ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
|
||||||
|
@ -472,6 +481,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public uint GenerateClientFlags(LLUUID ObjectID)
|
public uint GenerateClientFlags(LLUUID ObjectID)
|
||||||
{
|
{
|
||||||
return m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(m_uuid, ObjectID);
|
return m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(m_uuid, ObjectID);
|
||||||
|
@ -835,6 +846,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_autopilotMoving)
|
||||||
|
CheckAtSitTarget();
|
||||||
|
|
||||||
if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0)
|
if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0)
|
||||||
{
|
{
|
||||||
// TODO: This doesn't enable the "stand up" button on the viewer yet (probably a parent ID problem)
|
// TODO: This doesn't enable the "stand up" button on the viewer yet (probably a parent ID problem)
|
||||||
|
@ -856,14 +870,16 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
bool DCFlagKeyPressed = false;
|
bool DCFlagKeyPressed = false;
|
||||||
Vector3 agent_control_v3 = new Vector3(0, 0, 0);
|
Vector3 agent_control_v3 = new Vector3(0, 0, 0);
|
||||||
Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z);
|
Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z);
|
||||||
|
if (PhysicsActor != null)
|
||||||
|
{
|
||||||
bool oldflying = PhysicsActor.Flying;
|
bool oldflying = PhysicsActor.Flying;
|
||||||
|
|
||||||
PhysicsActor.Flying = ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
|
PhysicsActor.Flying = ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
|
||||||
if (PhysicsActor.Flying != oldflying)
|
if (PhysicsActor.Flying != oldflying)
|
||||||
{
|
{
|
||||||
update_movementflag = true;
|
update_movementflag = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (q != m_bodyRot)
|
if (q != m_bodyRot)
|
||||||
{
|
{
|
||||||
m_bodyRot = q;
|
m_bodyRot = q;
|
||||||
|
@ -930,11 +946,78 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
m_scene.EventManager.TriggerOnClientMovement(this);
|
m_scene.EventManager.TriggerOnClientMovement(this);
|
||||||
|
|
||||||
m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
|
m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void DoAutoPilot(uint not_used, LLVector3 Pos, IClientAPI remote_client)
|
||||||
|
{
|
||||||
|
m_autopilotMoving = true;
|
||||||
|
m_autoPilotTarget = Pos;
|
||||||
|
m_sitAtAutoTarget = false;
|
||||||
|
PrimitiveBaseShape proxy = PrimitiveBaseShape.Default;
|
||||||
|
//proxy.PCode = (byte)PCode.ParticleSystem;
|
||||||
|
uint nextUUID = m_scene.NextLocalId;
|
||||||
|
|
||||||
|
proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, Pos, new LLQuaternion(Rotation.x, Rotation.y, Rotation.z, Rotation.w), proxy);
|
||||||
|
if (proxyObjectGroup != null)
|
||||||
|
{
|
||||||
|
proxyObjectGroup.SendGroupFullUpdate();
|
||||||
|
remote_client.SendSitResponse(proxyObjectGroup.UUID, LLVector3.Zero, LLQuaternion.Identity, true, LLVector3.Zero, LLVector3.Zero, false);
|
||||||
|
m_scene.DeleteSceneObject(proxyObjectGroup);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_autopilotMoving = false;
|
||||||
|
m_autoPilotTarget = LLVector3.Zero;
|
||||||
|
ControllingClient.SendAlertMessage("Autopilot cancelled");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CheckAtSitTarget()
|
||||||
|
{
|
||||||
|
//m_log.Debug("[AUTOPILOT]: " + Util.GetDistanceTo(AbsolutePosition, m_autoPilotTarget).ToString());
|
||||||
|
if (Util.GetDistanceTo(AbsolutePosition, m_autoPilotTarget) <= 1.5)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (m_sitAtAutoTarget)
|
||||||
|
{
|
||||||
|
SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetUUID);
|
||||||
|
if (part != null)
|
||||||
|
{
|
||||||
|
AbsolutePosition = part.AbsolutePosition;
|
||||||
|
Velocity = new LLVector3(0, 0, 0);
|
||||||
|
SendFullUpdateToAllClients();
|
||||||
|
|
||||||
|
//HandleAgentSit(ControllingClient, m_requestedSitTargetUUID);
|
||||||
|
}
|
||||||
|
//ControllingClient.SendSitResponse(m_requestedSitTargetID, m_requestedSitOffset, LLQuaternion.Identity, false, LLVector3.Zero, LLVector3.Zero, false);
|
||||||
|
m_requestedSitTargetUUID = LLUUID.Zero;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//ControllingClient.SendAlertMessage("Autopilot cancelled");
|
||||||
|
//SendTerseUpdateToAllClients();
|
||||||
|
//PrimitiveBaseShape proxy = PrimitiveBaseShape.Default;
|
||||||
|
//proxy.PCode = (byte)PCode.ParticleSystem;
|
||||||
|
////uint nextUUID = m_scene.NextLocalId;
|
||||||
|
|
||||||
|
//proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, m_autoPilotTarget, LLQuaternion.Identity, proxy);
|
||||||
|
//if (proxyObjectGroup != null)
|
||||||
|
//{
|
||||||
|
//proxyObjectGroup.SendGroupFullUpdate();
|
||||||
|
//ControllingClient.SendSitResponse(LLUUID.Zero, m_autoPilotTarget, LLQuaternion.Identity, true, LLVector3.Zero, LLVector3.Zero, false);
|
||||||
|
//m_scene.DeleteSceneObject(proxyObjectGroup);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
m_autoPilotTarget = LLVector3.Zero;
|
||||||
|
m_autopilotMoving = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Perform the logic necessary to stand the client up. This method also executes
|
/// Perform the logic necessary to stand the client up. This method also executes
|
||||||
/// the stand animation.
|
/// the stand animation.
|
||||||
|
@ -963,7 +1046,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
m_parentID = 0;
|
m_parentID = 0;
|
||||||
SendFullUpdateToAllClients();
|
SendFullUpdateToAllClients();
|
||||||
|
m_requestedSitTargetID = 0;
|
||||||
if (m_physicsActor != null)
|
if (m_physicsActor != null)
|
||||||
{
|
{
|
||||||
SetHeight(m_avHeight);
|
SetHeight(m_avHeight);
|
||||||
|
@ -1005,7 +1088,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = part.AbsolutePosition + offset;
|
pos = part.AbsolutePosition + offset;
|
||||||
|
//if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
|
||||||
|
//{
|
||||||
|
// offset = pos;
|
||||||
|
//autopilot = false;
|
||||||
|
//}
|
||||||
if (m_physicsActor != null)
|
if (m_physicsActor != null)
|
||||||
{
|
{
|
||||||
// If we're not using the client autopilot, we're immediately warping the avatar to the location
|
// If we're not using the client autopilot, we're immediately warping the avatar to the location
|
||||||
|
@ -1030,11 +1117,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
ControllingClient.SendSitResponse(targetID, offset, sitOrientation, autopilot, LLVector3.Zero, LLVector3.Zero, false);
|
ControllingClient.SendSitResponse(targetID, offset, sitOrientation, autopilot, LLVector3.Zero, LLVector3.Zero, false);
|
||||||
|
m_requestedSitTargetUUID = targetID;
|
||||||
// This calls HandleAgentSit twice, once from here, and the client calls
|
// This calls HandleAgentSit twice, once from here, and the client calls
|
||||||
// HandleAgentSit itself after it gets to the location
|
// HandleAgentSit itself after it gets to the location
|
||||||
// It doesn't get to the location until we've moved them there though
|
// It doesn't get to the location until we've moved them there though
|
||||||
// which happens in HandleAgentSit :P
|
// which happens in HandleAgentSit :P
|
||||||
|
m_autopilotMoving = autopilot;
|
||||||
|
m_autoPilotTarget = pos;
|
||||||
|
m_sitAtAutoTarget = autopilot;
|
||||||
if (!autopilot)
|
if (!autopilot)
|
||||||
HandleAgentSit(remoteClient, UUID);
|
HandleAgentSit(remoteClient, UUID);
|
||||||
}
|
}
|
||||||
|
@ -1064,6 +1154,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
|
SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
|
||||||
|
|
||||||
|
if (m_sitAtAutoTarget || !m_autopilotMoving)
|
||||||
|
{
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
if (part.GetAvatarOnSitTarget() == UUID)
|
if (part.GetAvatarOnSitTarget() == UUID)
|
||||||
|
@ -1089,7 +1181,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_parentPosition = part.AbsolutePosition;
|
m_parentPosition = part.AbsolutePosition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
m_parentID = m_requestedSitTargetID;
|
m_parentID = m_requestedSitTargetID;
|
||||||
|
|
||||||
Velocity = new LLVector3(0, 0, 0);
|
Velocity = new LLVector3(0, 0, 0);
|
||||||
|
|
|
@ -194,7 +194,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
|
public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
|
||||||
public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
|
public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
|
||||||
public event ScriptReset OnScriptReset;
|
public event ScriptReset OnScriptReset;
|
||||||
|
public event UpdateVector OnAutoPilotGo;
|
||||||
|
|
||||||
#pragma warning restore 67
|
#pragma warning restore 67
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue