From 5c192b9bab4eb3e921f54a94125215c3683f2eca Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 17 Aug 2012 13:26:18 -0700 Subject: Modify order of code so SOP doesn't set the physics actor flying property multiple times every time Update is called. This eliminates zillions of settings which is better for BulletSim. The should be no functionality change. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 548dfd3..98afb75 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1385,17 +1385,22 @@ namespace OpenSim.Region.Framework.Scenes bool DCFlagKeyPressed = false; Vector3 agent_control_v3 = Vector3.Zero; - bool oldflying = Flying; + bool newFlying = actor.Flying; if (ForceFly) - actor.Flying = true; + newFlying = true; else if (FlyDisabled) - actor.Flying = false; + newFlying = false; else - actor.Flying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); - - if (actor.Flying != oldflying) - update_movementflag = true; + newFlying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); + + if (actor.Flying != newFlying) + { + // Note: ScenePresence.Flying is actually fetched from the physical actor + // so setting PhysActor.Flying here also sets the ScenePresence's value. + actor.Flying = newFlying; + update_movementflag = true; + } if (ParentID == 0) { -- cgit v1.1 From 7243d4f84248092eb5fe4ebe3673501bc84ce250 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 17 Aug 2012 14:45:18 -0700 Subject: BulletSim: Properly regenerate hulls when objects made physical. This fixes the problem of non-base shapes (cubes and spheres) falling through the terrain. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 98afb75..65d526f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1392,14 +1392,14 @@ namespace OpenSim.Region.Framework.Scenes else if (FlyDisabled) newFlying = false; else - newFlying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); - - if (actor.Flying != newFlying) - { - // Note: ScenePresence.Flying is actually fetched from the physical actor - // so setting PhysActor.Flying here also sets the ScenePresence's value. - actor.Flying = newFlying; - update_movementflag = true; + newFlying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); + + if (actor.Flying != newFlying) + { + // Note: ScenePresence.Flying is actually fetched from the physical actor + // so setting PhysActor.Flying here also sets the ScenePresence's value. + actor.Flying = newFlying; + update_movementflag = true; } if (ParentID == 0) -- cgit v1.1 From ba58331b29225ead620087ca4ff3bae4a905994d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 24 Aug 2012 22:56:05 +0100 Subject: Extend "Restarting scripts in attachments" debug log message to show actual name of user and the region they are in --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 65d526f..5bf69ad 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -891,7 +891,9 @@ namespace OpenSim.Region.Framework.Scenes { if (wasChild && HasAttachments()) { - m_log.DebugFormat("[SCENE PRESENCE]: Restarting scripts in attachments..."); + m_log.DebugFormat( + "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); + // Resume scripts foreach (SceneObjectGroup sog in m_attachments) { -- cgit v1.1 From 663bfbb372218af6e2a854a011152c9efdb82eaa Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sat, 1 Sep 2012 02:18:36 +0100 Subject: although the attachmentPoint argument is a uint, zero is not a valid attachment point --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5bf69ad..22d3289 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3418,7 +3418,9 @@ namespace OpenSim.Region.Framework.Scenes public List GetAttachments(uint attachmentPoint) { List attachments = new List(); - + + if (attachmentPoint >= 0) + { lock (m_attachments) { foreach (SceneObjectGroup so in m_attachments) @@ -3427,6 +3429,7 @@ namespace OpenSim.Region.Framework.Scenes attachments.Add(so); } } + } return attachments; } -- cgit v1.1 From 8d431c63594b7576fe295d50658531e81df2ac4e Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sat, 1 Sep 2012 02:20:07 +0100 Subject: formatting --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 22d3289..1222ac6 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3421,15 +3421,15 @@ namespace OpenSim.Region.Framework.Scenes if (attachmentPoint >= 0) { - lock (m_attachments) - { - foreach (SceneObjectGroup so in m_attachments) + lock (m_attachments) { - if (attachmentPoint == so.AttachmentPoint) - attachments.Add(so); + foreach (SceneObjectGroup so in m_attachments) + { + if (attachmentPoint == so.AttachmentPoint) + attachments.Add(so); + } } } - } return attachments; } -- cgit v1.1 From b4923da3348b05e4b85f842210bea4e6f08b4cef Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 13 Aug 2012 16:02:50 +0300 Subject: Changed "course" to "coarse" in several places --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 1222ac6..b6d0a3b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -68,7 +68,7 @@ namespace OpenSim.Region.Framework.Scenes public ScriptControlled eventControls; } - public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence, List coarseLocations, List avatarUUIDs); + public delegate void SendCoarseLocationsMethod(UUID scene, ScenePresence presence, List coarseLocations, List avatarUUIDs); public class ScenePresence : EntityBase, IScenePresence { @@ -186,7 +186,7 @@ namespace OpenSim.Region.Framework.Scenes /// public bool SitGround { get; private set; } - private SendCourseLocationsMethod m_sendCourseLocationsMethod; + private SendCoarseLocationsMethod m_sendCoarseLocationsMethod; //private Vector3 m_requestedSitOffset = new Vector3(); @@ -695,7 +695,7 @@ namespace OpenSim.Region.Framework.Scenes AttachmentsSyncLock = new Object(); AllowMovement = true; IsChildAgent = true; - m_sendCourseLocationsMethod = SendCoarseLocationsDefault; + m_sendCoarseLocationsMethod = SendCoarseLocationsDefault; Animator = new ScenePresenceAnimator(this); PresenceType = type; DrawDistance = world.DefaultDrawDistance; @@ -2432,17 +2432,17 @@ namespace OpenSim.Region.Framework.Scenes public void SendCoarseLocations(List coarseLocations, List avatarUUIDs) { - SendCourseLocationsMethod d = m_sendCourseLocationsMethod; + SendCoarseLocationsMethod d = m_sendCoarseLocationsMethod; if (d != null) { d.Invoke(m_scene.RegionInfo.originRegionID, this, coarseLocations, avatarUUIDs); } } - public void SetSendCourseLocationMethod(SendCourseLocationsMethod d) + public void SetSendCoarseLocationMethod(SendCoarseLocationsMethod d) { if (d != null) - m_sendCourseLocationsMethod = d; + m_sendCoarseLocationsMethod = d; } public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p, List coarseLocations, List avatarUUIDs) @@ -2646,7 +2646,7 @@ namespace OpenSim.Region.Framework.Scenes #region Significant Movement Method /// - /// This checks for a significant movement and sends a courselocationchange update + /// This checks for a significant movement and sends a coarselocationchange update /// protected void CheckForSignificantMovement() { -- cgit v1.1 From c97890ca69df91e6590ac7dd234a3e86cf7fbaf1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 29 Oct 2012 22:53:06 +0000 Subject: Add "force gc" region console command which manually invokes garbage collection. For debugging purposes. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b6d0a3b..aa82af4 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -74,8 +74,9 @@ namespace OpenSim.Region.Framework.Scenes { // ~ScenePresence() // { -// m_log.Debug("[SCENE PRESENCE] Destructor called"); +// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name); // } + private void TriggerScenePresenceUpdated() { if (m_scene != null) -- cgit v1.1 From fd9cb3cb68959c2dd42dd0645fef50161ac085a7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 30 Oct 2012 23:08:22 +0000 Subject: Store and send the current movement animation state to a new sim on crossing --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index aa82af4..71e322d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3075,6 +3075,8 @@ namespace OpenSim.Region.Framework.Scenes cAgent.Anims = Animator.Animations.ToArray(); } catch { } + cAgent.DefaultAnim = Animator.Animations.DefaultAnimation; + cAgent.AnimState = Animator.Animations.ImplicitDefaultAnimation; if (Scene.AttachmentsModule != null) Scene.AttachmentsModule.CopyAttachments(this, cAgent); @@ -3146,6 +3148,10 @@ namespace OpenSim.Region.Framework.Scenes // FIXME: Why is this null check necessary? Where are the cases where we get a null Anims object? if (cAgent.Anims != null) Animator.Animations.FromArray(cAgent.Anims); + if (cAgent.DefaultAnim != null) + Animator.Animations.SetDefaultAnimation(cAgent.DefaultAnim.AnimID, cAgent.DefaultAnim.SequenceNum, UUID.Zero); + if (cAgent.AnimState != null) + Animator.Animations.SetImplicitDefaultAnimation(cAgent.AnimState.AnimID, cAgent.AnimState.SequenceNum, UUID.Zero); if (Scene.AttachmentsModule != null) Scene.AttachmentsModule.CopyAttachments(cAgent, this); -- cgit v1.1 From ffe4d738fbcd27e3c037693ab6812df1d9fbb977 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Wed, 31 Oct 2012 17:13:18 -0700 Subject: Add TargetVelocity to PhysicsActor interface to support distributed physics. No change to existing functions. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 71e322d..5f2a6b1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -523,7 +523,7 @@ namespace OpenSim.Region.Framework.Scenes { if (PhysicsActor != null) { - m_velocity = PhysicsActor.Velocity; + m_velocity = PhysicsActor.TargetVelocity; // m_log.DebugFormat( // "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!", -- cgit v1.1 From 2e106cd5de63caf3d4eaeda8ac9a6ab0007a6b14 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Fri, 2 Nov 2012 03:07:53 -0700 Subject: Change to earlier commit for TargetVelocity to support distributed physics. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5f2a6b1..96bca3e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -523,7 +523,7 @@ namespace OpenSim.Region.Framework.Scenes { if (PhysicsActor != null) { - m_velocity = PhysicsActor.TargetVelocity; + m_velocity = PhysicsActor.Velocity; // m_log.DebugFormat( // "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!", @@ -538,7 +538,7 @@ namespace OpenSim.Region.Framework.Scenes { try { - PhysicsActor.Velocity = value; + PhysicsActor.TargetVelocity = value; } catch (Exception e) { -- cgit v1.1 From 4fa088bafb4c78ad3177b0e944a4312bd6abdea7 Mon Sep 17 00:00:00 2001 From: teravus Date: Sun, 4 Nov 2012 22:57:24 -0500 Subject: Pipe Throttle Update Event to EventManager, client --> ScenePresence --> EventManager, so that modules can know when throttles are updated. The event contains no client specific data to preserve the possibility of 'multiple clients' and you must still call ControllingClient.GetThrottlesPacked(f) to see what the throttles actually are once the event fires. Hook EventManager.OnUpdateThrottle to GetTextureModule. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a8aa551..2b9665c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -793,6 +793,7 @@ namespace OpenSim.Region.Framework.Scenes ControllingClient.OnChangeAnim += avnHandleChangeAnim; ControllingClient.OnForceReleaseControls += HandleForceReleaseControls; ControllingClient.OnAutoPilotGo += MoveToTarget; + ControllingClient.OnUpdateThrottles += RaiseUpdateThrottles; // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); @@ -3166,6 +3167,10 @@ namespace OpenSim.Region.Framework.Scenes } private static Vector3 marker = new Vector3(-1f, -1f, -1f); + private void RaiseUpdateThrottles() + { + m_scene.EventManager.TriggerThrottleUpdate(this); + } /// /// This updates important decision making data about a child agent /// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region -- cgit v1.1 From 0962a35d2ff8e2d0a8cf87bfce542276dfb2c0f5 Mon Sep 17 00:00:00 2001 From: Iain Oliver Date: Wed, 14 Nov 2012 15:02:35 +0000 Subject: Fix movetotarget on mega regions. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 96bca3e..342de78 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1698,8 +1698,18 @@ namespace OpenSim.Region.Framework.Scenes // "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}", // Name, pos, m_scene.RegionInfo.RegionName); - if (pos.X < 0 || pos.X >= Constants.RegionSize - || pos.Y < 0 || pos.Y >= Constants.RegionSize + Vector2 regionSize; + IRegionCombinerModule regionCombinerModule = m_scene.RequestModuleInterface(); + if(regionCombinerModule != null) + { + regionSize = regionCombinerModule.GetSizeOfMegaregion(m_scene.RegionInfo.RegionID); + } + else + { + regionSize = new Vector2(Constants.RegionSize); + } + if (pos.X < 0 || pos.X >= regionSize.X + || pos.Y < 0 || pos.Y >= regionSize.Y || pos.Z < 0) return; @@ -1713,7 +1723,15 @@ namespace OpenSim.Region.Framework.Scenes // pos.Z = AbsolutePosition.Z; // } - float terrainHeight = (float)m_scene.Heightmap[(int)pos.X, (int)pos.Y]; + int X = (int)((m_scene.RegionInfo.RegionLocX * Constants.RegionSize) + pos.X); + int Y = (int)((m_scene.RegionInfo.RegionLocY * Constants.RegionSize) + pos.Y); + UUID target_regionID = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y).RegionID; + Scene targetScene = m_scene; + if(!SceneManager.Instance.TryGetScene(target_regionID, out targetScene)) + { + targetScene = m_scene; + } + float terrainHeight = (float)targetScene.Heightmap[(int)(pos.X % Constants.RegionSize), (int)(pos.Y % Constants.RegionSize)]; pos.Z = Math.Max(terrainHeight, pos.Z); // Fudge factor. It appears that if one clicks "go here" on a piece of ground, the go here request is -- cgit v1.1 From 597a101b9f65e2f0b67f9f2de99654f2e5979855 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 20 Nov 2012 05:09:44 +0000 Subject: Minor formatting for 0962a35d and a few one-line comments as to why that code is there --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 342de78..6f36c0b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1698,16 +1698,14 @@ namespace OpenSim.Region.Framework.Scenes // "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}", // Name, pos, m_scene.RegionInfo.RegionName); + // Allow move to another sub-region within a megaregion Vector2 regionSize; IRegionCombinerModule regionCombinerModule = m_scene.RequestModuleInterface(); - if(regionCombinerModule != null) - { + if (regionCombinerModule != null) regionSize = regionCombinerModule.GetSizeOfMegaregion(m_scene.RegionInfo.RegionID); - } else - { regionSize = new Vector2(Constants.RegionSize); - } + if (pos.X < 0 || pos.X >= regionSize.X || pos.Y < 0 || pos.Y >= regionSize.Y || pos.Z < 0) @@ -1723,14 +1721,15 @@ namespace OpenSim.Region.Framework.Scenes // pos.Z = AbsolutePosition.Z; // } + // Get terrain height for sub-region in a megaregion if necessary int X = (int)((m_scene.RegionInfo.RegionLocX * Constants.RegionSize) + pos.X); int Y = (int)((m_scene.RegionInfo.RegionLocY * Constants.RegionSize) + pos.Y); UUID target_regionID = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y).RegionID; Scene targetScene = m_scene; - if(!SceneManager.Instance.TryGetScene(target_regionID, out targetScene)) - { + + if (!SceneManager.Instance.TryGetScene(target_regionID, out targetScene)) targetScene = m_scene; - } + float terrainHeight = (float)targetScene.Heightmap[(int)(pos.X % Constants.RegionSize), (int)(pos.Y % Constants.RegionSize)]; pos.Z = Math.Max(terrainHeight, pos.Z); -- cgit v1.1 From 8aa5fdb6a3f1e4b349757df5d9fcc06ab8dfdb64 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 3 Dec 2012 17:05:05 +0000 Subject: *TEST* diferent avatar collider --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7f07d73..bacc9c9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -571,7 +571,18 @@ namespace OpenSim.Region.Framework.Scenes set { m_bodyRot = value; -// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, m_bodyRot); + // m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, m_bodyRot); + if (PhysicsActor != null) + { + try + { + PhysicsActor.Orientation = value; + } + catch (Exception e) + { + m_log.Error("[SCENE PRESENCE]: Orientation " + e.Message); + } + } } } @@ -3435,7 +3446,7 @@ namespace OpenSim.Region.Framework.Scenes PhysicsActor = scene.AddAvatar( LocalId, Firstname + "." + Lastname, pVec, - new Vector3(0f, 0f, Appearance.AvatarHeight), isFlying); + new Vector3(0.45f, 0.6f, Appearance.AvatarHeight), isFlying); //PhysicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; PhysicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; -- cgit v1.1