From 54c29f6e8ae8f504e455de79ecbb1a16d0e634a1 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 10 Oct 2012 18:11:03 +0000 Subject: Added zone info parameters to the zone update network message, updated the network protocol version to 24. --- src/core/entity.cc | 4 ++-- src/core/net.h | 2 +- src/core/zone.cc | 10 +++++++++- 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/entity.cc b/src/core/entity.cc index 7bb5278..1b879f3 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -443,7 +443,7 @@ void Entity::receive_server_create(std::istream &is) if (is >> o) { if (!o) { if (inventory()) { - con_warn << "Receive no inventory for entity " << id() << " " << label() << " with inventory!" << std::endl; + con_warn << "No inventory received for entity " << id() << " " << label() << " with inventory!" << std::endl; entity_inventory->clear(); } } else { @@ -453,7 +453,7 @@ void Entity::receive_server_create(std::istream &is) } } else { if (inventory()) { - con_warn << "Receive no inventory for entity " << id() << " " << label() << " with inventory!" << std::endl; + con_warn << "No inventory received for entity " << id() << " " << label() << " with inventory!" << std::endl; entity_inventory->clear(); } } diff --git a/src/core/net.h b/src/core/net.h index 8f3175d..0e36806 100644 --- a/src/core/net.h +++ b/src/core/net.h @@ -11,7 +11,7 @@ namespace core { /// network protocol version -const unsigned int PROTOCOLVERSION = 23; +const unsigned int PROTOCOLVERSION = 24; /// maximum lenght of a (compressed) network message block const unsigned int FRAMESIZE = 1152; diff --git a/src/core/zone.cc b/src/core/zone.cc index 2059e03..b038d82 100644 --- a/src/core/zone.cc +++ b/src/core/zone.cc @@ -281,7 +281,9 @@ void Zone::serialize_server_update(std::ostream & os) const os << zone_ambient_color.r << " "; os << zone_ambient_color.g << " "; os << zone_ambient_color.b << " "; - os << (zone_defaultview ? zone_defaultview->id() : 0); + os << (zone_defaultview ? zone_defaultview->id() : 0) << " "; + os << zone_location << " "; + os << zone_flags; } @@ -318,6 +320,12 @@ void Zone::receive_server_update(std::istream &is) // default view is >> id; zone_defaultview = Entity::find(id); + + // location + is >> zone_location; + + // flags + is >> zone_flags; } } -- cgit v1.2.3