Skip to content

Commit

Permalink
fix startpos switcher not working in the editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Fleeym committed Oct 19, 2023
1 parent 2a45949 commit 5fde53e
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 5fde53e

Please sign in to comment.