mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'avination-current'
Conflicts: OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
This commit is contained in:
@@ -265,14 +265,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
private void StartTimer()
|
||||
{
|
||||
KeyframeTimer.Add(this);
|
||||
m_timerStopped = false;
|
||||
lock (m_frames)
|
||||
{
|
||||
KeyframeTimer.Add(this);
|
||||
m_timerStopped = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void StopTimer()
|
||||
{
|
||||
m_timerStopped = true;
|
||||
KeyframeTimer.Remove(this);
|
||||
lock (m_frames)
|
||||
m_timerStopped = true;
|
||||
}
|
||||
|
||||
public static KeyframeMotion FromData(SceneObjectGroup grp, Byte[] data)
|
||||
@@ -427,19 +430,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
m_running = false;
|
||||
StopTimer();
|
||||
m_running = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
StopTimer();
|
||||
m_running = false;
|
||||
m_isCrossing = false;
|
||||
m_waitingCrossing = false;
|
||||
|
||||
StopTimer();
|
||||
|
||||
m_basePosition = m_group.AbsolutePosition;
|
||||
m_baseRotation = m_group.GroupRotation;
|
||||
|
||||
@@ -452,14 +454,34 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
m_running = false;
|
||||
StopTimer();
|
||||
m_running = false;
|
||||
|
||||
m_group.RootPart.Velocity = Vector3.Zero;
|
||||
m_group.RootPart.AngularVelocity = Vector3.Zero;
|
||||
m_group.SendGroupRootTerseUpdate();
|
||||
// m_group.RootPart.ScheduleTerseUpdate();
|
||||
}
|
||||
|
||||
public void Suspend()
|
||||
{
|
||||
lock (m_frames)
|
||||
{
|
||||
if (m_timerStopped)
|
||||
return;
|
||||
m_timerStopped = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
lock (m_frames)
|
||||
{
|
||||
if (!m_timerStopped)
|
||||
return;
|
||||
if (m_running && !m_waitingCrossing)
|
||||
StartTimer();
|
||||
}
|
||||
}
|
||||
|
||||
private void GetNextList()
|
||||
@@ -550,6 +572,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
pos = (Vector3)k.Position;
|
||||
rot = (Quaternion)k.Rotation;
|
||||
|
||||
}
|
||||
|
||||
m_basePosition = pos;
|
||||
@@ -560,6 +583,35 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
|
||||
public void OnTimer(double tickDuration)
|
||||
{
|
||||
if (!Monitor.TryEnter(m_frames))
|
||||
return;
|
||||
if (m_timerStopped)
|
||||
KeyframeTimer.Remove(this);
|
||||
else
|
||||
DoOnTimer(tickDuration);
|
||||
Monitor.Exit(m_frames);
|
||||
}
|
||||
|
||||
private void Done()
|
||||
{
|
||||
KeyframeTimer.Remove(this);
|
||||
m_timerStopped = true;
|
||||
m_running = false;
|
||||
m_isCrossing = false;
|
||||
m_waitingCrossing = false;
|
||||
|
||||
m_basePosition = m_group.AbsolutePosition;
|
||||
m_baseRotation = m_group.GroupRotation;
|
||||
|
||||
m_group.RootPart.Velocity = Vector3.Zero;
|
||||
m_group.RootPart.AngularVelocity = Vector3.Zero;
|
||||
m_group.SendGroupRootTerseUpdate();
|
||||
// m_group.RootPart.ScheduleTerseUpdate();
|
||||
m_frames.Clear();
|
||||
}
|
||||
|
||||
private void DoOnTimer(double tickDuration)
|
||||
{
|
||||
if (m_skipLoops > 0)
|
||||
{
|
||||
@@ -567,8 +619,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_timerStopped) // trap events still in air even after a timer.stop
|
||||
return;
|
||||
|
||||
if (m_group == null)
|
||||
return;
|
||||
@@ -608,7 +658,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
if (m_frames.Count == 0)
|
||||
{
|
||||
Stop();
|
||||
Done();
|
||||
Scene scene = m_group.Scene;
|
||||
|
||||
IScriptModule[] scriptModules = scene.RequestModuleInterfaces<IScriptModule>();
|
||||
@@ -707,11 +757,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
if (angle > 0.01f)
|
||||
*/
|
||||
if(Math.Abs(step.X - current.X) > 0.001f
|
||||
|| Math.Abs(step.Y - current.Y) > 0.001f
|
||||
if (Math.Abs(step.X - current.X) > 0.001f
|
||||
|| Math.Abs(step.Y - current.Y) > 0.001f
|
||||
|| Math.Abs(step.Z - current.Z) > 0.001f)
|
||||
// assuming w is a dependente var
|
||||
|
||||
// assuming w is a dependente var
|
||||
{
|
||||
// m_group.UpdateGroupRotationR(step);
|
||||
m_group.RootPart.RotationOffset = step;
|
||||
|
||||
Reference in New Issue
Block a user