From 71b6b902732bfc0c53033d58f91a6b1e70e8371f Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 21 Feb 2008 21:01:17 +0000 Subject: more minor updates --- src/core/netconnection.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core/netconnection.cc') diff --git a/src/core/netconnection.cc b/src/core/netconnection.cc index 4770528..455c03d 100644 --- a/src/core/netconnection.cc +++ b/src/core/netconnection.cc @@ -33,7 +33,9 @@ void NetConnection::connect(std::string const &to_host, int to_port) } std::ostringstream osstream; - osstream << "name " << game()->localplayer()->name() << std::endl; + osstream << "pif "; + game()->localplayer()->serialize_client_update(osstream); + osstream << '\n'; send(osstream.str()); } @@ -154,8 +156,8 @@ void NetConnection::parse_incoming_message(const std::string & message) Entity *e = Entity::find(id); con_debug << "Received die entity id " << id << "\n"; - if (game()->localplayer()->control == e) - game()->localplayer()-> control = 0; + if (localcontrol() == e) + localplayer()->player_control = 0; if (e) Entity::remove(id); -- cgit v1.2.3