diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2004-03-23 01:02:18 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2004-03-23 01:02:18 +0300 |
commit | 00291b5cf4a0f16ddca425b74ed30e8ac35d40e2 (patch) | |
tree | 952bb1c2f6fd8c2f34b950597ed0fa73a4ea7594 /source/gameengine/GameLogic/SCA_RandomActuator.cpp | |
parent | 5b90aafbd6815e29343f8e9aba9e3e20f85b3cc0 (diff) |
[GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics.
[SCons] Build with Solid as default when enabling the gameengine in the build process
[SCons] Build solid and qhull from the extern directory and link statically against them
That was about it.
There are a few things that needs double checking:
* Makefiles
* Projectfiles
* All the other systems than Linux and Windows on which the build (with scons) has been successfully tested.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_RandomActuator.cpp')
-rw-r--r-- | source/gameengine/GameLogic/SCA_RandomActuator.cpp | 16 |
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 */ |