Skip to content

Commit

Permalink
Merge pull request #70 from HJfod/editor-startpos-fix
Browse files Browse the repository at this point in the history
fix startpos switcher not working in the editor
  • Loading branch information
Fleeym authored Oct 19, 2023
2 parents 2a45949 + 5fde53e commit 9dc005b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/features/StartPosSwitcher/StartPosSwitcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ class $modify(StartPosSwitchLayer, LevelEditorLayer) {

void setupLevelStart(LevelSettingsObject* obj) {
StartPosManager::get()->setStartPositions(m_objects);
if (!m_editorInitialising) {
if (m_editorInitialising) {
return;
}
if (StartPosManager::get()->isLevelStart()) {
this->setStartPosObject(nullptr);
m_player1->setStartPos(CCPointZero);
m_player1->setStartPos(CCPoint(0.0f, 105.f));
m_player1->resetObject();
m_player2->setStartPos(CCPointZero);
m_player2->setStartPos(CCPoint(0.0f, 105.f));
m_player2->resetObject();
LevelEditorLayer::setupLevelStart(m_levelSettings);
return;
Expand Down

0 comments on commit 9dc005b

Please sign in to comment.