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/GameLogic/SCA_RandomActuator.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
index 350b2f58b06..4347e5cef67 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
@@ -56,10 +56,10 @@ SCA_RandomActuator::SCA_RandomActuator(SCA_IObject *gameobj,
const STR_String &propName,
PyTypeObject* T)
: SCA_IActuator(gameobj, T),
- m_distribution(mode),
m_propname(propName),
m_parameter1(para1),
- m_parameter2(para2)
+ m_parameter2(para2),
+ m_distribution(mode)
{
m_base = new SCA_RandomNumberGenerator(seed);
m_counter = 0;
@@ -94,7 +94,7 @@ bool SCA_RandomActuator::Update(double curtime,double deltatime)
RemoveAllEvents();
- CValue *tmpval;
+ CValue *tmpval = NULL;
if (bNegativeEvent)
return false; // do nothing on negative events
@@ -241,7 +241,15 @@ bool SCA_RandomActuator::Update(double curtime,double deltatime)
}
break;
default:
- ; /* unknown distribution... */
+ {
+ /* unknown distribution... */
+ static bool randomWarning = false;
+ if (!randomWarning) {
+ randomWarning = true;
+ std::cout << "RandomActuator '" << GetName() << "' has an unknown distribution." << std::endl;
+ }
+ return false;
+ }
}
/* Round up: assign it */