From 3c2e420d3418f326e091c67673f9eec610e45fc2 Mon Sep 17 00:00:00 2001 From: totycro Date: Mon, 11 Apr 2011 13:53:10 +0200 Subject: Fixed actor creation movement --- pacman-c++/sceneholder.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pacman-c++') diff --git a/pacman-c++/sceneholder.cpp b/pacman-c++/sceneholder.cpp index 0047e59..49ce6e9 100644 --- a/pacman-c++/sceneholder.cpp +++ b/pacman-c++/sceneholder.cpp @@ -89,12 +89,12 @@ void SceneHolder::updateMap(const Transmission::map_t& map) m_actors[color] = actor; m_scene->addItem(actor); actor->setPos(mapPositionToCoord(x, y)); - } - - Actor::Movement direction = + } else { + Actor::Movement direction = Util::transmissionMovementToActor(cur & Transmission::direction_mask); - actor->move(direction); - qDebug() << "actor " << color << " move " << direction << "to " << x << y; + actor->move(direction); + qDebug() << "actor " << color << " move " << direction << "to " << x << y; + } } else if (cur & Transmission::empty) { -- cgit v1.2.3