summaryrefslogtreecommitdiffstats
path: root/pacman-c++
diff options
context:
space:
mode:
Diffstat (limited to 'pacman-c++')
-rw-r--r--pacman-c++/sceneholder.cpp3
-rw-r--r--pacman-c++/server.cpp3
2 files changed, 3 insertions, 3 deletions
diff --git a/pacman-c++/sceneholder.cpp b/pacman-c++/sceneholder.cpp
index 3f92860..03abf7f 100644
--- a/pacman-c++/sceneholder.cpp
+++ b/pacman-c++/sceneholder.cpp
@@ -57,9 +57,8 @@ void SceneHolder::updateMap(const Transmission::map_t& map, const unsigned int x
57 { 57 {
58 GameEntity *oldItem = visualMap[x][y]; 58 GameEntity *oldItem = visualMap[x][y];
59 /* special handling for purging field 59 /* special handling for purging field
60 * remove elements (in case it's not an actor)
61 */ 60 */
62 if (oldItem != NULL && qgraphicsitem_cast<Actor *>(oldItem) == NULL) 61 if (oldItem != NULL)
63 { 62 {
64 visualMap[x][y] = NULL; 63 visualMap[x][y] = NULL;
65 Actor *actor = NULL; 64 Actor *actor = NULL;
diff --git a/pacman-c++/server.cpp b/pacman-c++/server.cpp
index 39a6ee7..f2c0f1c 100644
--- a/pacman-c++/server.cpp
+++ b/pacman-c++/server.cpp
@@ -170,7 +170,7 @@ QPoint Server::addRandomPoint(Transmission::map_t map, Transmission::field_t typ
170 } 170 }
171 } 171 }
172 172
173 /* remove actors possitions from list 173 /* remove actors positions from list
174 * performance would be better if actors would be listed in visualMap too 174 * performance would be better if actors would be listed in visualMap too
175 * but this isn't possible that easily. see comment in updateMap(map) 175 * but this isn't possible that easily. see comment in updateMap(map)
176 */ 176 */
@@ -497,6 +497,7 @@ void Server::onRoundFinished()
497 497
498void Server::initRoundMap(bool firstPacket) 498void Server::initRoundMap(bool firstPacket)
499{ 499{
500
500 /* create new map */ 501 /* create new map */
501 Transmission::map_t map = Util::createDemoMap(); 502 Transmission::map_t map = Util::createDemoMap();
502 Util::placeActors(map, m_maxplayers, Color::order); 503 Util::placeActors(map, m_maxplayers, Color::order);