Merge from trunk
(The last time there was some files missing due to failed connection to svn server while merging.. thats why this stuff of reverting last merge and redoing it) svn merge -r 16231:16608 https://svn.blender.org/svnroot/bf-blender/trunk/blender
This commit is contained in:
@@ -33,8 +33,11 @@
|
||||
#include "SCA_LogicManager.h"
|
||||
#include "SCA_ISensor.h"
|
||||
#include "SCA_IActuator.h"
|
||||
#include "PyObjectPlus.h"
|
||||
#include "compile.h"
|
||||
#include "eval.h"
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
@@ -139,6 +142,14 @@ void SCA_PythonController::SetDictionary(PyObject* pythondictionary)
|
||||
m_pythondictionary = PyDict_Copy(pythondictionary); /* new reference */
|
||||
}
|
||||
|
||||
int SCA_PythonController::IsTriggered(class SCA_ISensor* sensor)
|
||||
{
|
||||
if (std::find(m_triggeredSensors.begin(), m_triggeredSensors.end(), sensor) !=
|
||||
m_triggeredSensors.end())
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static char* sPyGetCurrentController__doc__;
|
||||
#endif
|
||||
@@ -294,7 +305,7 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
|
||||
// something in this dictionary and crash?
|
||||
PyDict_Clear(excdict);
|
||||
Py_DECREF(excdict);
|
||||
|
||||
m_triggeredSensors.erase(m_triggeredSensors.begin(), m_triggeredSensors.end());
|
||||
m_sCurrentController = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user