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>2013-08-15 03:32:00 +0400
committerMitchell Stokes <mogurijin@gmail.com>2013-08-15 03:32:00 +0400
commit196d30e0046088820e240642e318e051e2e69fbc (patch)
tree698f2542102463723ac4d8958b9b7b23fdfea46d /source/gameengine/Converter/BL_ActionActuator.cpp
parent9afae77fedb8a84f4d305ebce81b0cc509a2183b (diff)
BGE: The Action Actuator can now make use of additive blending.
Diffstat (limited to 'source/gameengine/Converter/BL_ActionActuator.cpp')
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index 90383021c90..a28906254a1 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -66,6 +66,7 @@ BL_ActionActuator::BL_ActionActuator(SCA_IObject *gameobj,
float endtime,
struct bAction *action,
short playtype,
+ short blend_mode,
short blendin,
short priority,
short layer,
@@ -88,6 +89,7 @@ BL_ActionActuator::BL_ActionActuator(SCA_IObject *gameobj,
m_stridelength(stride),
m_layer_weight(layer_weight),
m_playtype(playtype),
+ m_blendmode(blend_mode),
m_priority(priority),
m_layer(layer),
m_ipo_flags(ipo_flags),
@@ -187,6 +189,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
bool bUseContinue = false;
KX_GameObject *obj = (KX_GameObject*)GetParent();
short playtype = BL_Action::ACT_MODE_PLAY;
+ short blendmode = (m_blendmode == ACT_ACTION_ADD) ? BL_Action::ACT_BLEND_ADD : BL_Action::ACT_BLEND_BLEND;
float start = m_startframe;
float end = m_endframe;
@@ -283,7 +286,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
ResetStartTime(curtime);
}
- if (obj->PlayAction(m_action->id.name+2, start, end, m_layer, m_priority, m_blendin, playtype, m_layer_weight, m_ipo_flags))
+ if (obj->PlayAction(m_action->id.name+2, start, end, m_layer, m_priority, m_blendin, playtype, m_layer_weight, m_ipo_flags, 1.f, blendmode))
{
m_flag |= ACT_FLAG_ACTIVE;
if (bUseContinue)
@@ -328,7 +331,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
// Convert into a play action and play back to the beginning
end = start;
start = obj->GetActionFrame(m_layer);
- obj->PlayAction(m_action->id.name+2, start, end, m_layer, m_priority, 0, BL_Action::ACT_MODE_PLAY, m_layer_weight, m_ipo_flags);
+ obj->PlayAction(m_action->id.name+2, start, end, m_layer, m_priority, 0, BL_Action::ACT_MODE_PLAY, m_layer_weight, m_ipo_flags, 1.f, blendmode);
m_flag |= ACT_FLAG_PLAY_END;
break;