diff options
author | Melanie | 2012-06-08 15:15:17 +0200 |
---|---|---|
committer | Melanie | 2012-06-08 15:15:17 +0200 |
commit | dadac6816b7cc600a2d87db51343c5147f5859a1 (patch) | |
tree | 0e8a110868ddc42676c5bd533513f8bee6101bae /OpenSim | |
parent | Replace the stock libomv with our home grown 0.9.1 with the texture bug fixed. (diff) | |
parent | Add a frame based watchdog function to keyframed motion (diff) | |
download | opensim-SC_OLD-dadac6816b7cc600a2d87db51343c5147f5859a1.zip opensim-SC_OLD-dadac6816b7cc600a2d87db51343c5147f5859a1.tar.gz opensim-SC_OLD-dadac6816b7cc600a2d87db51343c5147f5859a1.tar.bz2 opensim-SC_OLD-dadac6816b7cc600a2d87db51343c5147f5859a1.tar.xz |
Merge branch 'ubitwork' into avination
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index b7b0d27..0219d9c 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | |||
@@ -64,6 +64,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
64 | 64 | ||
65 | [NonSerialized()] | 65 | [NonSerialized()] |
66 | protected Timer m_timer = new Timer(); | 66 | protected Timer m_timer = new Timer(); |
67 | [NonSerialized()] | ||
68 | protected bool m_frameHooked; | ||
69 | [NonSerialized()] | ||
70 | protected int frameCount = 0; | ||
67 | 71 | ||
68 | [NonSerialized()] | 72 | [NonSerialized()] |
69 | private SceneObjectGroup m_group; | 73 | private SceneObjectGroup m_group; |
@@ -162,6 +166,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
162 | if (m_keyframes.Length > 0) | 166 | if (m_keyframes.Length > 0) |
163 | m_timer.Start(); | 167 | m_timer.Start(); |
164 | m_running = true; | 168 | m_running = true; |
169 | if (!m_frameHooked) | ||
170 | { | ||
171 | m_group.Scene.EventManager.OnFrame += OnFrame; | ||
172 | m_frameHooked = true; | ||
173 | } | ||
174 | } | ||
175 | |||
176 | private void OnFrame() | ||
177 | { | ||
178 | frameCount++; | ||
179 | if (frameCount >= 30) | ||
180 | { | ||
181 | frameCount = 0; | ||
182 | if (m_running) | ||
183 | Start(); | ||
184 | } | ||
165 | } | 185 | } |
166 | 186 | ||
167 | public void Stop() | 187 | public void Stop() |