diff options
| author | manuel <manuel@mausz.at> | 2011-04-12 16:22:19 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-12 16:22:19 +0200 |
| commit | fae7c3377c8995b217e620c5cf1e963b3ab1e84a (patch) | |
| tree | 61a091e2799dda061c227be54c39a61a7b83daca /pacman-c++/server.cpp | |
| parent | dbeba838ea813b620ec571265c8ea417403fc81c (diff) | |
| download | foop-fae7c3377c8995b217e620c5cf1e963b3ab1e84a.tar.gz foop-fae7c3377c8995b217e620c5cf1e963b3ab1e84a.tar.bz2 foop-fae7c3377c8995b217e620c5cf1e963b3ab1e84a.zip | |
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
Diffstat (limited to 'pacman-c++/server.cpp')
| -rw-r--r-- | pacman-c++/server.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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: | |||
| 87 | PixmapItem *oldItem = visualMap[mapPosition.x()][mapPosition.y()]; | 87 | PixmapItem *oldItem = visualMap[mapPosition.x()][mapPosition.y()]; |
| 88 | if (oldItem != NULL) | 88 | if (oldItem != NULL) |
| 89 | { | 89 | { |
| 90 | /* set item to explicit empty | ||
| 91 | * and add actor that removed/has eaten that item | ||
| 92 | */ | ||
| 90 | if (oldItem->eaten()) | 93 | if (oldItem->eaten()) |
| 91 | map[mapPosition.x()][mapPosition.y()] = Transmission::empty; | 94 | map[mapPosition.x()][mapPosition.y()] = Transmission::empty | actor->color(); |
| 92 | } | 95 | } |
| 93 | 96 | ||
| 94 | // new item | 97 | // new item |
