diff options
Diffstat (limited to 'source/gameengine/Converter/BL_ShapeActionActuator.cpp')
-rw-r--r-- | source/gameengine/Converter/BL_ShapeActionActuator.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp index a730041cdae..13e79b13304 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp +++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp @@ -222,22 +222,22 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) priority = m_priority; /* Determine pre-incrementation behavior and set appropriate flags */ - switch (m_playtype){ + switch (m_playtype) { case ACT_ACTION_MOTION: - if (bNegativeEvent){ + if (bNegativeEvent) { keepgoing=false; apply=false; }; break; case ACT_ACTION_FROM_PROP: - if (bNegativeEvent){ + if (bNegativeEvent) { apply=false; keepgoing=false; } break; case ACT_ACTION_LOOP_END: - if (bPositiveEvent){ - if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + if (bPositiveEvent) { + if (!(m_flag & ACT_FLAG_LOCKINPUT)) { m_flag &= ~ACT_FLAG_KEYUP; m_flag &= ~ACT_FLAG_REVERSE; m_flag |= ACT_FLAG_LOCKINPUT; @@ -245,20 +245,20 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) m_starttime = curtime; } } - if (bNegativeEvent){ + if (bNegativeEvent) { m_flag |= ACT_FLAG_KEYUP; } break; case ACT_ACTION_LOOP_STOP: - if (bPositiveEvent){ - if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + if (bPositiveEvent) { + if (!(m_flag & ACT_FLAG_LOCKINPUT)) { m_flag &= ~ACT_FLAG_REVERSE; m_flag &= ~ACT_FLAG_KEYUP; m_flag |= ACT_FLAG_LOCKINPUT; SetStartTime(curtime); } } - if (bNegativeEvent){ + if (bNegativeEvent) { m_flag |= ACT_FLAG_KEYUP; m_flag &= ~ACT_FLAG_LOCKINPUT; keepgoing=false; @@ -266,8 +266,8 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } break; case ACT_ACTION_PINGPONG: - if (bPositiveEvent){ - if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + if (bPositiveEvent) { + if (!(m_flag & ACT_FLAG_LOCKINPUT)) { m_flag &= ~ACT_FLAG_KEYUP; m_localtime = m_starttime; m_starttime = curtime; @@ -276,22 +276,22 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } break; case ACT_ACTION_FLIPPER: - if (bPositiveEvent){ - if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + if (bPositiveEvent) { + if (!(m_flag & ACT_FLAG_LOCKINPUT)) { m_flag &= ~ACT_FLAG_REVERSE; m_flag |= ACT_FLAG_LOCKINPUT; SetStartTime(curtime); } } - else if (bNegativeEvent){ + else if (bNegativeEvent) { m_flag |= ACT_FLAG_REVERSE; m_flag &= ~ACT_FLAG_LOCKINPUT; SetStartTime(curtime); } break; case ACT_ACTION_PLAY: - if (bPositiveEvent){ - if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + if (bPositiveEvent) { + if (!(m_flag & ACT_FLAG_LOCKINPUT)) { m_flag &= ~ACT_FLAG_REVERSE; m_localtime = m_starttime; m_starttime = curtime; @@ -304,8 +304,8 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } /* Perform increment */ - if (keepgoing){ - if (m_playtype == ACT_ACTION_MOTION){ + if (keepgoing) { + if (m_playtype == ACT_ACTION_MOTION) { MT_Point3 newpos; MT_Point3 deltapos; @@ -322,7 +322,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } /* Check if a wrapping response is needed */ - if (length){ + if (length) { if (m_localtime < m_startframe || m_localtime > m_endframe) { m_localtime = m_startframe + fmod(m_localtime, length); @@ -333,14 +333,14 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) m_localtime = m_startframe; /* Perform post-increment tasks */ - switch (m_playtype){ + switch (m_playtype) { case ACT_ACTION_FROM_PROP: { CValue* propval = GetParent()->GetProperty(m_propname); if (propval) m_localtime = propval->GetNumber(); - if (bNegativeEvent){ + if (bNegativeEvent) { keepgoing=false; } } @@ -350,7 +350,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) case ACT_ACTION_LOOP_STOP: break; case ACT_ACTION_PINGPONG: - if (wrap){ + if (wrap) { if (!(m_flag & ACT_FLAG_REVERSE)) m_localtime = m_endframe; else @@ -362,8 +362,8 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } break; case ACT_ACTION_FLIPPER: - if (wrap){ - if (!(m_flag & ACT_FLAG_REVERSE)){ + if (wrap) { + if (!(m_flag & ACT_FLAG_REVERSE)) { m_localtime=m_endframe; //keepgoing = false; } @@ -374,8 +374,8 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } break; case ACT_ACTION_LOOP_END: - if (wrap){ - if (m_flag & ACT_FLAG_KEYUP){ + if (wrap) { + if (m_flag & ACT_FLAG_KEYUP) { keepgoing = false; m_localtime = m_endframe; m_flag &= ~ACT_FLAG_LOCKINPUT; @@ -384,7 +384,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } break; case ACT_ACTION_PLAY: - if (wrap){ + if (wrap) { m_localtime = m_endframe; keepgoing = false; m_flag &= ~ACT_FLAG_LOCKINPUT; @@ -415,7 +415,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) if (apply) { /* Priority test */ - if (obj->SetActiveAction(this, priority, curtime)){ + if (obj->SetActiveAction(this, priority, curtime)) { BL_ShapeDeformer *shape_deformer = dynamic_cast<BL_ShapeDeformer*>(obj->GetDeformer()); Key *key = NULL; @@ -430,7 +430,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) else { ListBase tchanbase= {NULL, NULL}; - if (m_blendin && m_blendframe==0.0f){ + if (m_blendin && m_blendframe==0.0f) { // this is the start of the blending, remember the startup shape obj->GetShape(m_blendshape); m_blendstart = curtime; @@ -451,7 +451,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } else { // the key have changed, apply blending if needed - if (m_blendin && (m_blendframe<m_blendin)){ + if (m_blendin && (m_blendframe<m_blendin)) { newweight = (m_blendframe/(float)m_blendin); BlendShape(key, 1.0f - newweight); @@ -471,7 +471,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } } - if (!keepgoing){ + if (!keepgoing) { m_blendframe = 0.0f; } return keepgoing; |