Merge branch 'ubitwork' into avination
commit
dadac6816b
|
@ -64,6 +64,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
[NonSerialized()]
|
[NonSerialized()]
|
||||||
protected Timer m_timer = new Timer();
|
protected Timer m_timer = new Timer();
|
||||||
|
[NonSerialized()]
|
||||||
|
protected bool m_frameHooked;
|
||||||
|
[NonSerialized()]
|
||||||
|
protected int frameCount = 0;
|
||||||
|
|
||||||
[NonSerialized()]
|
[NonSerialized()]
|
||||||
private SceneObjectGroup m_group;
|
private SceneObjectGroup m_group;
|
||||||
|
@ -162,6 +166,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_keyframes.Length > 0)
|
if (m_keyframes.Length > 0)
|
||||||
m_timer.Start();
|
m_timer.Start();
|
||||||
m_running = true;
|
m_running = true;
|
||||||
|
if (!m_frameHooked)
|
||||||
|
{
|
||||||
|
m_group.Scene.EventManager.OnFrame += OnFrame;
|
||||||
|
m_frameHooked = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnFrame()
|
||||||
|
{
|
||||||
|
frameCount++;
|
||||||
|
if (frameCount >= 30)
|
||||||
|
{
|
||||||
|
frameCount = 0;
|
||||||
|
if (m_running)
|
||||||
|
Start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Stop()
|
public void Stop()
|
||||||
|
|
Loading…
Reference in New Issue