fix unscripted sits without physics help

avinationmerge
UbitUmarov 2015-09-26 03:14:06 +01:00
parent d0a7e5bd78
commit 05db03e809
1 changed files with 4 additions and 9 deletions

View File

@ -3044,7 +3044,6 @@ namespace OpenSim.Region.Framework.Scenes
{ {
m_requestedSitTargetID = part.LocalId; m_requestedSitTargetID = part.LocalId;
m_requestedSitTargetUUID = part.UUID; m_requestedSitTargetUUID = part.UUID;
} }
else else
{ {
@ -3058,9 +3057,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool PhysicsSit(SceneObjectPart part, Vector3 offset) public bool PhysicsSit(SceneObjectPart part, Vector3 offset)
{ {
if (part == null || part.ParentGroup.IsAttachment) if (part == null || part.ParentGroup.IsAttachment)
{
return true; return true;
}
if ( m_scene.PhysicsScene == null) if ( m_scene.PhysicsScene == null)
return false; return false;
@ -3078,12 +3075,10 @@ namespace OpenSim.Region.Framework.Scenes
return true; return true;
} }
// not doing autopilot
m_requestedSitTargetID = 0;
if (m_scene.PhysicsScene.SitAvatar(part.PhysActor, AbsolutePosition, CameraPosition, offset, new Vector3(0.35f, 0, 0.65f), PhysicsSitResponse) != 0) if (m_scene.PhysicsScene.SitAvatar(part.PhysActor, AbsolutePosition, CameraPosition, offset, new Vector3(0.35f, 0, 0.65f), PhysicsSitResponse) != 0)
{
return true; return true;
}
return false; return false;
} }
@ -3161,7 +3156,7 @@ namespace OpenSim.Region.Framework.Scenes
m_pos = offset; m_pos = offset;
ControllingClient.SendSitResponse( ControllingClient.SendSitResponse(
part.ParentGroup.UUID, offset, Orientation, false, cameraAtOffset, cameraEyeOffset, forceMouselook); part.ParentGroup.UUID, offset, Orientation, true, cameraAtOffset, cameraEyeOffset, forceMouselook);
m_requestedSitTargetID = 0; m_requestedSitTargetID = 0;
@ -4459,7 +4454,7 @@ namespace OpenSim.Region.Framework.Scenes
PhysicsActor = scene.AddAvatar( PhysicsActor = scene.AddAvatar(
LocalId, Firstname + "." + Lastname, pVec, LocalId, Firstname + "." + Lastname, pVec,
Appearance.AvatarBoxSize,Appearance.AvatarFeetOffset, isFlying); Appearance.AvatarBoxSize,Appearance.AvatarFeetOffset, isFlying);
PhysicsActor.Orientation = m_bodyRot;
//PhysicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; //PhysicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
PhysicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; PhysicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
PhysicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong PhysicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong