diff options
Diffstat (limited to 'pacman-c++/sceneholder.cpp')
| -rw-r--r-- | pacman-c++/sceneholder.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pacman-c++/sceneholder.cpp b/pacman-c++/sceneholder.cpp index 4d71a15..37db691 100644 --- a/pacman-c++/sceneholder.cpp +++ b/pacman-c++/sceneholder.cpp | |||
| @@ -152,7 +152,11 @@ void SceneHolder::updateMap(const Transmission::map_t& map, const unsigned int x | |||
| 152 | qDebug() << "[SceneUpdate] actor moves: color=" << color | 152 | qDebug() << "[SceneUpdate] actor moves: color=" << color |
| 153 | << "direction=" << direction << "newpos=" << QPoint(x, y); | 153 | << "direction=" << direction << "newpos=" << QPoint(x, y); |
| 154 | } | 154 | } |
| 155 | actor->setPos(mapPositionToCoord(x, y)); | 155 | |
| 156 | QPoint distance = QPoint(x, y) - CoordToMapPosition(actor->pos().x(), actor->pos().y()); | ||
| 157 | if (distance.manhattanLength() > 1) { | ||
| 158 | actor->setPos(mapPositionToCoord(x, y)); | ||
| 159 | } | ||
| 156 | } | 160 | } |
| 157 | 161 | ||
| 158 | if (cur & Transmission::empty) | 162 | if (cur & Transmission::empty) |
