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>2011-06-29 05:53:17 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-06-29 05:53:17 +0400
commitd122f24c1af429dd59a0051db01650fd2b1abbba (patch)
treed81cf34654d6eb2910e1d7ca338e90060b034624 /source/gameengine/Ketsji/BL_Action.cpp
parentde3c95a09c9eb82b04da4345c98eb53030342af8 (diff)
BGE Animations: Fixing a bug with priority and non continuous animations.
Diffstat (limited to 'source/gameengine/Ketsji/BL_Action.cpp')
-rw-r--r--source/gameengine/Ketsji/BL_Action.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/BL_Action.cpp b/source/gameengine/Ketsji/BL_Action.cpp
index 1741e74a771..149189b6a79 100644
--- a/source/gameengine/Ketsji/BL_Action.cpp
+++ b/source/gameengine/Ketsji/BL_Action.cpp
@@ -104,7 +104,7 @@ BL_Action::~BL_Action()
delete m_ptrrna;
}
-void BL_Action::Play(const char* name,
+bool BL_Action::Play(const char* name,
float start,
float end,
short priority,
@@ -118,7 +118,7 @@ void BL_Action::Play(const char* name,
// Only start playing a new action if we're done, or if
// the new action has a higher priority
if (priority != 0 && !IsDone() && priority >= m_priority)
- return;
+ return false;
m_priority = priority;
bAction* prev_action = m_action;
@@ -128,7 +128,7 @@ void BL_Action::Play(const char* name,
{
printf("Failed to load action: %s\n", name);
m_done = true;
- return;
+ return false;
}
if (prev_action != m_action)
@@ -178,6 +178,8 @@ void BL_Action::Play(const char* name,
m_speed = playback_speed;
m_done = false;
+
+ return true;
}
void BL_Action::Stop()
@@ -329,6 +331,9 @@ void BL_Action::Update(float curtime)
game_blend_poses(m_pose, m_blendpose, weight);
}
+
+ // Handle layer blending
+
obj->SetPose(m_pose);
obj->SetActiveAction(NULL, 0, curtime);