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:
authorCampbell Barton <ideasman42@gmail.com>2011-09-01 06:12:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-01 06:12:53 +0400
commit2365c64014b3e067bb212b2061f1d14c1f944090 (patch)
treeccf060ca327a060e524ec92bba3622d9a1139a64 /source/gameengine/GameLogic/SCA_RandomSensor.cpp
parent00143a3d557d87dda2bb7074dfe2b1a3acf5f28f (diff)
whitespace bge edits
Diffstat (limited to 'source/gameengine/GameLogic/SCA_RandomSensor.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.cpp b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
index 99e25042582..c23722d2d3c 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
@@ -48,8 +48,8 @@
/* ------------------------------------------------------------------------- */
SCA_RandomSensor::SCA_RandomSensor(SCA_EventManager* eventmgr,
- SCA_IObject* gameobj,
- int startseed)
+ SCA_IObject* gameobj,
+ int startseed)
: SCA_ISensor(gameobj,eventmgr)
{
m_basegenerator = new SCA_RandomNumberGenerator(startseed);
@@ -65,10 +65,10 @@ SCA_RandomSensor::~SCA_RandomSensor()
void SCA_RandomSensor::Init()
{
- m_iteration = 0;
+ m_iteration = 0;
m_interval = 0;
m_lastdraw = false;
- m_currentDraw = m_basegenerator->Draw();
+ m_currentDraw = m_basegenerator->Draw();
}
@@ -97,19 +97,19 @@ bool SCA_RandomSensor::IsPositiveTrigger()
bool SCA_RandomSensor::Evaluate()
{
- /* Random generator is the generator from Line 25 of Table 1 in */
- /* [KNUTH 1981, The Art of Computer Programming Vol. 2 */
- /* (2nd Ed.), pp102] */
- /* It's a very simple max. length sequence generator. We can */
- /* draw 32 bool values before having to generate the next */
- /* sequence value. There are some theorems that will tell you */
- /* this is a reasonable way of generating bools. Check Knuth. */
- /* Furthermore, we only draw each <delay>-eth frame. */
+ /* Random generator is the generator from Line 25 of Table 1 in */
+ /* [KNUTH 1981, The Art of Computer Programming Vol. 2 */
+ /* (2nd Ed.), pp102] */
+ /* It's a very simple max. length sequence generator. We can */
+ /* draw 32 bool values before having to generate the next */
+ /* sequence value. There are some theorems that will tell you */
+ /* this is a reasonable way of generating bools. Check Knuth. */
+ /* Furthermore, we only draw each <delay>-eth frame. */
bool evaluateResult = false;
if (++m_interval > m_pulse_frequency) {
- bool drawResult = false;
+ bool drawResult = false;
m_interval = 0;
if (m_iteration > 31) {
m_currentDraw = m_basegenerator->Draw();
@@ -122,8 +122,8 @@ bool SCA_RandomSensor::Evaluate()
evaluateResult = drawResult != m_lastdraw;
m_lastdraw = drawResult;
}
-
- /* now pass this result to some controller */
+
+ /* now pass this result to some controller */
return evaluateResult;
}