diff options
| author | manuel <manuel@mausz.at> | 2011-04-20 02:19:08 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-20 02:19:08 +0200 |
| commit | bbd2a69a962d15f74a4afcb7b66462eac9fa5008 (patch) | |
| tree | 17527ce744a9f1c4beb85e953a60f832cdd09068 /pacman-c++/mainwidget.cpp | |
| parent | 58ba349f19f98fe3af5332188f5d3dfe4d076807 (diff) | |
| download | foop-bbd2a69a962d15f74a4afcb7b66462eac9fa5008.tar.gz foop-bbd2a69a962d15f74a4afcb7b66462eac9fa5008.tar.bz2 foop-bbd2a69a962d15f74a4afcb7b66462eac9fa5008.zip | |
game rounds finally implemented:
- game rounds will be detected during the round AND
- a new map will be send in the NEXT tick to the clients
Diffstat (limited to 'pacman-c++/mainwidget.cpp')
| -rw-r--r-- | pacman-c++/mainwidget.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pacman-c++/mainwidget.cpp b/pacman-c++/mainwidget.cpp index 82099c4..eb032bd 100644 --- a/pacman-c++/mainwidget.cpp +++ b/pacman-c++/mainwidget.cpp | |||
| @@ -149,7 +149,9 @@ void MainWidget::tick() | |||
| 149 | if (m_updatepacket.eating_order_size() > 0) | 149 | if (m_updatepacket.eating_order_size() > 0) |
| 150 | { | 150 | { |
| 151 | Q_ASSERT(m_scene != NULL); | 151 | Q_ASSERT(m_scene != NULL); |
| 152 | m_scene->removeActors(); | 152 | m_scene->reset(); |
| 153 | |||
| 154 | /* fetch eating order */ | ||
| 153 | QList<Color::Color> order; | 155 | QList<Color::Color> order; |
| 154 | for(int i = 0; i < m_updatepacket.eating_order_size(); ++i) | 156 | for(int i = 0; i < m_updatepacket.eating_order_size(); ++i) |
| 155 | order.append(static_cast<Color::Color>(m_updatepacket.eating_order(i) & Transmission::color_mask)); | 157 | order.append(static_cast<Color::Color>(m_updatepacket.eating_order(i) & Transmission::color_mask)); |
