summaryrefslogtreecommitdiffstats
path: root/pacman-c++/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pacman-c++/server.cpp')
-rw-r--r--pacman-c++/server.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/pacman-c++/server.cpp b/pacman-c++/server.cpp
index 962d1bf..2311c81 100644
--- a/pacman-c++/server.cpp
+++ b/pacman-c++/server.cpp
@@ -24,7 +24,7 @@ bool Server::run()
24 /* create eating order list first - this can also be created dynamically per round (theoretically) */ 24 /* create eating order list first - this can also be created dynamically per round (theoretically) */
25 for(unsigned int i = 0; i < m_maxplayers; ++i) 25 for(unsigned int i = 0; i < m_maxplayers; ++i)
26 m_eatingorder.append(Color::order[i]); 26 m_eatingorder.append(Color::order[i]);
27 m_eatingorder.append(Color::order[0]); 27 m_eatingorder.append(m_eatingorder.at(0));
28 28
29 m_tickTimer = new QTimer(this); 29 m_tickTimer = new QTimer(this);
30 m_tickTimer->setInterval(Constants::tick); 30 m_tickTimer->setInterval(Constants::tick);
@@ -604,6 +604,11 @@ void Server::initRoundMap()
604 /* reset scene and clean up items */ 604 /* reset scene and clean up items */
605 reset(); 605 reset();
606 606
607 /* randomize color eating order */
608 m_eatingorder.removeLast();
609 random_shuffle(m_eatingorder.begin(), m_eatingorder.end());
610 m_eatingorder.append(m_eatingorder.at(0));
611
607 /* create new map */ 612 /* create new map */
608 Transmission::map_t map = Util::createDemoMap(); 613 Transmission::map_t map = Util::createDemoMap();
609 Util::placeActors(map, m_maxplayers, Color::order); 614 Util::placeActors(map, m_maxplayers, Color::order);