From fae7c3377c8995b217e620c5cf1e963b3ab1e84a Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 12 Apr 2011 16:22:19 +0200 Subject: finding out which actor has eaten which element didn't work correctly. instead of checking that on client side the server now just sends the id of the actor withing the explicit empty id data field --- pacman-c++/server.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pacman-c++/server.cpp') diff --git a/pacman-c++/server.cpp b/pacman-c++/server.cpp index 9a7b188..b0ac6f8 100644 --- a/pacman-c++/server.cpp +++ b/pacman-c++/server.cpp @@ -87,8 +87,11 @@ invalid_direction: PixmapItem *oldItem = visualMap[mapPosition.x()][mapPosition.y()]; if (oldItem != NULL) { + /* set item to explicit empty + * and add actor that removed/has eaten that item + */ if (oldItem->eaten()) - map[mapPosition.x()][mapPosition.y()] = Transmission::empty; + map[mapPosition.x()][mapPosition.y()] = Transmission::empty | actor->color(); } // new item -- cgit v1.2.3