From 79fb3311a3397ddf6b1a3e0e10b4dc0f4fee4d70 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Sat, 23 Jun 2012 03:39:03 +0000 Subject: =?UTF-8?q?Fix=20for=20[#29412]=20"Priority=200=20cause=20problems?= =?UTF-8?q?=20with=20pulse=20mode"=20reported=20by=20Guillaume=20C=C3=B4t?= =?UTF-8?q?=C3=A9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- source/gameengine/Ketsji/BL_Action.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.2.3