summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAtle Hellvik Havsø <atle@havso.net>2010-11-21 16:31:10 +0100
committerAtle Hellvik Havsø <atle@havso.net>2010-11-21 16:31:10 +0100
commitb9942d8af0400f943b9b5bd67faf417a932750f5 (patch)
tree46d4a8c42120079f7db62036b63a26608966cfb5 /common
parent09def96d8546284367b08e90795752d1934d35eb (diff)
Server sends the players id in the game together with the GameStart message.
Signed-off-by: Atle Hellvik Havsø <atle@havso.net>
Diffstat (limited to 'common')
-rw-r--r--common/message.cpp2
-rw-r--r--common/message.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/common/message.cpp b/common/message.cpp
index b69ddef..4f7bad3 100644
--- a/common/message.cpp
+++ b/common/message.cpp
@@ -116,10 +116,12 @@ Message::GameStart::GameStart() : BoostBase(Types::GameStart) {
void Message::GameStart::serialize(boost::archive::text_oarchive& ar) {
ar & players;
+ ar & player_id;
}
void Message::GameStart::deserialize(boost::archive::text_iarchive& ar) {
ar & players;
+ ar & player_id;
}
Message::Ready::Ready() : NullBase(Types::Ready) {
diff --git a/common/message.h b/common/message.h
index 447d12d..584a850 100644
--- a/common/message.h
+++ b/common/message.h
@@ -114,6 +114,7 @@ namespace Message {
GameStart();
std::vector<std::string> players;
+ int player_id;
virtual void serialize(boost::archive::text_oarchive& ar);
virtual void deserialize(boost::archive::text_iarchive& ar);