From 4cad4a27677b0490d3ba0018bc3404961f925ed5 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 8 Nov 2008 10:17:37 +0000 Subject: docking, bumps network protocol version --- src/core/zone.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/core/zone.cc') diff --git a/src/core/zone.cc b/src/core/zone.cc index 2dfc5c2..5d9c48f 100644 --- a/src/core/zone.cc +++ b/src/core/zone.cc @@ -118,7 +118,7 @@ void Zone ::clear() zone_registry.clear(); } -/* ---- The Zone class --------------------------------------------- */ +/* ---- class Zone ------------------------------------------------- */ Zone::Zone(std::string const & label) : zone_label(label) @@ -127,6 +127,7 @@ Zone::Zone(std::string const & label) : zone_name.clear(); zone_sky.clear(); zone_sky_texture = 0; + zone_defaultview = 0; } Zone::Zone(std::istream & is) @@ -197,6 +198,7 @@ void Zone::serialize_server_update(std::ostream & os) const os << zone_label << " "; os << "\"" << zone_name << "\" "; os << "\"" << zone_sky << "\" "; + os << (zone_defaultview ? zone_defaultview->id() : 0 ); } @@ -205,6 +207,7 @@ void Zone::receive_server_update(std::istream &is) is >> zone_label; std::string n; + unsigned int id = 0; char c; while ( (is.get(c)) && (c != '"')); @@ -218,6 +221,9 @@ void Zone::receive_server_update(std::istream &is) n += c; zone_sky.assign(n); n.clear(); + + is >> id; + zone_defaultview = Entity::find(id); } } -- cgit v1.2.3