summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/koopatlas/player.cpp32
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;