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/BL_ShapeActionActuator.cpp')
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp35
1 files changed, 31 insertions, 4 deletions
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
index 08d3e54a7c5..bb53c2d6fe6 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
@@ -1,4 +1,4 @@
-/**
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -27,6 +27,11 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file gameengine/Converter/BL_ShapeActionActuator.cpp
+ * \ingroup bgeconv
+ */
+
+
#if defined (__sgi)
#include <math.h>
#else
@@ -48,7 +53,7 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "MT_Matrix4x4.h"
-#include "BKE_utildefines.h"
+
#include "FloatValue.h"
#include "PyObjectPlus.h"
@@ -226,6 +231,16 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
apply=false;
}
break;
+ case ACT_ACTION_PINGPONG:
+ if (bPositiveEvent){
+ if (!(m_flag & ACT_FLAG_LOCKINPUT)){
+ m_flag &= ~ACT_FLAG_KEYUP;
+ m_localtime = m_starttime;
+ m_starttime = curtime;
+ m_flag |= ACT_FLAG_LOCKINPUT;
+ }
+ }
+ break;
case ACT_ACTION_FLIPPER:
if (bPositiveEvent){
if (!(m_flag & ACT_FLAG_LOCKINPUT)){
@@ -300,6 +315,18 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
break;
case ACT_ACTION_LOOP_STOP:
break;
+ case ACT_ACTION_PINGPONG:
+ if (wrap){
+ if (!(m_flag & ACT_FLAG_REVERSE))
+ m_localtime = m_endframe;
+ else
+ m_localtime = m_startframe;
+
+ m_flag &= ~ACT_FLAG_LOCKINPUT;
+ m_flag ^= ACT_FLAG_REVERSE; //flip direction
+ keepgoing = false;
+ }
+ break;
case ACT_ACTION_FLIPPER:
if (wrap){
if (!(m_flag & ACT_FLAG_REVERSE)){
@@ -408,7 +435,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
return keepgoing;
};
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -491,4 +518,4 @@ int BL_ShapeActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE
}
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON