diff options
author | Treeki <treeki@gmail.com> | 2013-02-25 21:59:28 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-02-25 21:59:28 +0100 |
commit | 3b59105479cef91a00207142a237e188d9aec35b (patch) | |
tree | e29ee7a4691af5a65873db589a4e9ce982085696 /src | |
parent | dc47aaf9dc94ecd7f46e859e165e7ede9849116f (diff) | |
download | kamek-3b59105479cef91a00207142a237e188d9aec35b.tar.gz kamek-3b59105479cef91a00207142a237e188d9aec35b.zip |
make WM Player play model animations even when the map is not running
Diffstat (limited to 'src')
-rw-r--r-- | src/koopatlas/player.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/koopatlas/player.cpp b/src/koopatlas/player.cpp index 3edb202..a087cce 100644 --- a/src/koopatlas/player.cpp +++ b/src/koopatlas/player.cpp @@ -68,10 +68,8 @@ int daWMPlayer_c::onExecute() { dKPMusic::playStarMusic(); } - if (!dScKoopatlas_c::instance->mapIsRunning()) - return true; - - dScKoopatlas_c::instance->pathManager.execute(); + if (dScKoopatlas_c::instance->mapIsRunning()) + dScKoopatlas_c::instance->pathManager.execute(); this->modelHandler->update(); pats[((dPlayerModel_c*)modelHandler->mdlClass)->currentPlayerModelID].process(); @@ -86,21 +84,23 @@ int daWMPlayer_c::onExecute() { // Z is unused for now modelHandler->setMatrix(myMatrix); - if (hasEffect) { - Vec effPos = {pos.x, pos.y, 3300.0f}; - effect.spawn(effectName, 0, &effPos, &rot, &scale); - } + if (dScKoopatlas_c::instance->mapIsRunning()) { + if (hasEffect) { + Vec effPos = {pos.x, pos.y, 3300.0f}; + effect.spawn(effectName, 0, &effPos, &rot, &scale); + } - if (hasSound) { - timer++; + if (hasSound) { + timer++; - if (timer == 12) { - if (step) { MapSoundPlayer(SoundRelatedClass, soundName, 1); step = false; } - else { MapSoundPlayer(SoundRelatedClass, soundName+1, 1); step = true; } - timer = 0; - } + if (timer == 12) { + if (step) { MapSoundPlayer(SoundRelatedClass, soundName, 1); step = false; } + else { MapSoundPlayer(SoundRelatedClass, soundName+1, 1); step = true; } + timer = 0; + } - if (timer > 12) { timer = 0; } + if (timer > 12) { timer = 0; } + } } return true; |