Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2012-06-23 07:39:03 +0400
committerMitchell Stokes <mogurijin@gmail.com>2012-06-23 07:39:03 +0400
commit79fb3311a3397ddf6b1a3e0e10b4dc0f4fee4d70 (patch)
treea79599b1a3aaced53df0f3041db4aa0d12ebe46d
parenta21a0a4dcfbcbeaefd16c6ce56e71c8b9e843c0b (diff)
Fix for [#29412] "Priority 0 cause problems with pulse mode" reported by Guillaume Côté.
Right now this is being fixed by not allowing the exact same action (action, start/end frames, speed, etc) to be played if it's already playing. Hopefully this will not cause more issues than it solves.
-rw-r--r--source/gameengine/Ketsji/BL_Action.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/BL_Action.cpp b/source/gameengine/Ketsji/BL_Action.cpp
index 15be4c46894..fbeb34b70b4 100644
--- a/source/gameengine/Ketsji/BL_Action.cpp
+++ b/source/gameengine/Ketsji/BL_Action.cpp
@@ -141,6 +141,16 @@ bool BL_Action::Play(const char* name,
return false;
}
+ // If we have the same settings, don't play again
+ // This is to resolve potential issues with pulses on sensors such as the ones
+ // reported in bug #29412. The fix is here so it works for both logic bricks and Python.
+ // However, this may eventually lead to issues where a user wants to override an already
+ // playing action with the same action and settings. If this becomes an issue,
+ // then this fix may have to be re-evaluated.
+ if (!IsDone() && m_action == prev_action && m_startframe == start && m_endframe == end
+ && m_priority == priority && m_speed == playback_speed)
+ return false;
+
if (prev_action != m_action)
{
// First get rid of any old controllers