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:
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp31
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.h22
2 files changed, 21 insertions, 32 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index 22ee2371e8c..0289ec42d74 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -166,28 +166,18 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
// result = true if animation has to be continued, false if animation stops
// maybe there are events for us in the queue !
- if (frame)
+
+ for (vector<CValue*>::iterator i=m_events.end(); !(i==m_events.begin());)
{
- for (vector<CValue*>::iterator i=m_events.end(); !(i==m_events.begin());)
- {
- i--;
- if ((*i)->GetNumber() == 0.0f)
- bNegativeEvent = true;
- else
- bPositiveEvent= true;
- (*i)->Release();
- m_events.pop_back();
- }
-
- if (bPositiveEvent)
- m_flag |= ACT_FLAG_ACTIVE;
-
- if (bNegativeEvent)
+ i--;
+ if ((*i)->GetNumber() == 0.0f)
{
- if (!(m_flag & ACT_FLAG_ACTIVE))
- return false;
- m_flag &= ~ACT_FLAG_ACTIVE;
+ bNegativeEvent = true;
}
+ else
+ bPositiveEvent= true;
+ (*i)->Release();
+ m_events.pop_back();
}
/* We know that action actuators have been discarded from all non armature objects:
@@ -246,7 +236,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
if (!(m_flag & ACT_FLAG_LOCKINPUT)){
m_flag &= ~ACT_FLAG_REVERSE;
m_flag |= ACT_FLAG_LOCKINPUT;
- SetStartTime(curtime);
+ m_starttime = curtime;
}
}
else if (bNegativeEvent){
@@ -334,7 +324,6 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
m_localtime = m_endframe;
m_flag &= ~ACT_FLAG_LOCKINPUT;
}
- SetStartTime(curtime);
}
break;
case ACT_ACTION_PLAY:
diff --git a/source/gameengine/Converter/BL_ActionActuator.h b/source/gameengine/Converter/BL_ActionActuator.h
index 1c3f57e965a..0c1eb780bcb 100644
--- a/source/gameengine/Converter/BL_ActionActuator.h
+++ b/source/gameengine/Converter/BL_ActionActuator.h
@@ -52,22 +52,22 @@ public:
PyTypeObject* T=&Type)
: SCA_IActuator(gameobj,T),
- m_lastpos(0, 0, 0),
m_blendframe(0),
+ m_lastpos(0, 0, 0),
m_flag(0),
m_startframe (starttime),
m_endframe(endtime) ,
m_localtime(starttime),
m_lastUpdate(-1),
- m_blendin(blendin),
- m_stridelength(stride),
m_playtype(playtype),
+ m_blendin(blendin),
m_priority(priority),
+ m_stridelength(stride),
m_pose(NULL),
m_blendpose(NULL),
m_userpose(NULL),
- m_action(action),
- m_propname(propname)
+ m_propname(propname),
+ m_action(action)
{
};
virtual ~BL_ActionActuator();
@@ -115,8 +115,8 @@ protected:
void SetLocalTime(float curtime);
bool ClampLocalTime();
- MT_Point3 m_lastpos;
float m_blendframe;
+ MT_Point3 m_lastpos;
int m_flag;
/** The frame this action starts */
float m_startframe;
@@ -128,23 +128,23 @@ protected:
float m_localtime;
float m_lastUpdate;
+ short m_playtype;
float m_blendin;
float m_blendstart;
- float m_stridelength;
- short m_playtype;
short m_priority;
+ float m_stridelength;
struct bPose* m_pose;
struct bPose* m_blendpose;
struct bPose* m_userpose;
- struct bAction *m_action;
STR_String m_propname;
+ struct bAction *m_action;
+
};
enum {
ACT_FLAG_REVERSE = 0x00000001,
ACT_FLAG_LOCKINPUT = 0x00000002,
- ACT_FLAG_KEYUP = 0x00000004,
- ACT_FLAG_ACTIVE = 0x00000008
+ ACT_FLAG_KEYUP = 0x00000004
};
#endif