diff options
| author | manuel <manuel@mausz.at> | 2011-04-17 19:19:56 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-17 19:19:56 +0200 |
| commit | 65195fdab6262d31056c74f922376de3b009943c (patch) | |
| tree | e76a6141ae0603494dab0830baa41ec29a55f74e /pacman-c++/server.h | |
| parent | 8187d48b30defcb11c61ba5365fe974151849e38 (diff) | |
| download | foop-65195fdab6262d31056c74f922376de3b009943c.tar.gz foop-65195fdab6262d31056c74f922376de3b009943c.tar.bz2 foop-65195fdab6262d31056c74f922376de3b009943c.zip | |
a bigger commit again:
- fix pacman movement. now more like real pacman (again). e.g. if you press a direction-key again: the pacman will move in that direction as soon as possible and no repeated keypress is needed
- add random colorized blocks (without dieing yet)
- add cmdline-option: --nocolorblocks to disable that
Diffstat (limited to 'pacman-c++/server.h')
| -rw-r--r-- | pacman-c++/server.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pacman-c++/server.h b/pacman-c++/server.h index 0f2879d..a50cfe3 100644 --- a/pacman-c++/server.h +++ b/pacman-c++/server.h | |||
| @@ -35,6 +35,7 @@ protected: | |||
| 35 | void sendUpdate(Transmission::map_t map); | 35 | void sendUpdate(Transmission::map_t map); |
| 36 | 36 | ||
| 37 | QPoint addRandomPoint(Transmission::map_t map, Transmission::field_t type = Transmission::bonuspoint); | 37 | QPoint addRandomPoint(Transmission::map_t map, Transmission::field_t type = Transmission::bonuspoint); |
| 38 | void colorizeBlocks(Transmission::map_t map); | ||
| 38 | 39 | ||
| 39 | protected: | 40 | protected: |
| 40 | QMap<Color::Color, QTcpSocket *> m_clientConnections; | 41 | QMap<Color::Color, QTcpSocket *> m_clientConnections; |
| @@ -45,6 +46,11 @@ protected: | |||
| 45 | /* allocate as member variable as this packet is large and used often */ | 46 | /* allocate as member variable as this packet is large and used often */ |
| 46 | ProtoBuf::MapUpdate m_updatepacket; | 47 | ProtoBuf::MapUpdate m_updatepacket; |
| 47 | 48 | ||
| 49 | /* list of blocks */ | ||
| 50 | QList<QPoint> m_blocks; | ||
| 51 | /* currently colored blocks + tickcount before they will turn to non-colored back */ | ||
| 52 | QMap<QPoint, unsigned int> m_coloredBlocks; | ||
| 53 | |||
| 48 | QHostAddress m_bindaddress; | 54 | QHostAddress m_bindaddress; |
| 49 | unsigned int m_port; | 55 | unsigned int m_port; |
| 50 | unsigned int m_maxplayers; | 56 | unsigned int m_maxplayers; |
