Skip to content

Commit

Permalink
Fix another performance bottleneck
Browse files Browse the repository at this point in the history
  • Loading branch information
Laguna1989 committed Oct 10, 2022
1 parent 8207cf6 commit 390e263
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions impl/gamelib/state_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ void StateGame::createCatapults()
} else if (block->getPlayerId() == 2) {
m_scoreP2++;
}
m_hud->getObserverScoreP1()->notify(m_scoreP1);
m_hud->getObserverScoreP2()->notify(m_scoreP2);
}
m_hud->getObserverScoreP1()->notify(m_scoreP1);
m_hud->getObserverScoreP2()->notify(m_scoreP2);
});

auto inputP2 = std::make_shared<CatapultControllerAI>();
Expand All @@ -105,9 +105,9 @@ void StateGame::createCatapults()
} else if (block->getPlayerId() == 2) {
m_scoreP2++;
}
m_hud->getObserverScoreP1()->notify(m_scoreP1);
m_hud->getObserverScoreP2()->notify(m_scoreP2);
}
m_hud->getObserverScoreP1()->notify(m_scoreP1);
m_hud->getObserverScoreP2()->notify(m_scoreP2);
});
}

Expand Down

0 comments on commit 390e263

Please sign in to comment.