diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-05-27 22:26:44 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-05-27 22:29:42 +0200 |
commit | b22d852b4c4aa89e0394397a703ecfa442b0a928 (patch) | |
tree | a1e29142aabf11393eb3e0604deb4b89a6124fe7 /src/object/motion | |
parent | 12313fecf5a0ccad45f88575a24582b8363bd5a7 (diff) | |
download | colobot-b22d852b4c4aa89e0394397a703ecfa442b0a928.tar.gz colobot-b22d852b4c4aa89e0394397a703ecfa442b0a928.tar.bz2 colobot-b22d852b4c4aa89e0394397a703ecfa442b0a928.zip |
Fixed variable shadowing warnings
* fixed -Wshadow warnings
* refactored some constructors
Diffstat (limited to 'src/object/motion')
-rw-r--r-- | src/object/motion/motionhuman.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/object/motion/motionhuman.cpp b/src/object/motion/motionhuman.cpp index b1de44e..edee260 100644 --- a/src/object/motion/motionhuman.cpp +++ b/src/object/motion/motionhuman.cpp @@ -1617,18 +1617,18 @@ bool CMotionHuman::EventFrame(const Event &event) legAction == MH_MARCHTAKE ) { Sound sound[2]; - float speed, synchro, volume[2], freq[2], hard, level; + float synchro, volume[2], freq[2], hard; - speed = m_physics->GetLinMotionX(MO_REASPEED); + float speedX = m_physics->GetLinMotionX(MO_REASPEED); if ( m_object->GetFret() == 0 ) { - if ( speed > 0.0f ) synchro = 0.21f; // synchro forward + if ( speedX > 0.0f ) synchro = 0.21f; // synchro forward else synchro = 0.29f; // synchro backward } else { - if ( speed > 0.0f ) synchro = 0.15f; // synchro forward + if ( speedX > 0.0f ) synchro = 0.15f; // synchro forward else synchro = 0.35f; // synchro backward } time = rTime[1]+synchro; |