Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-21 21:01:17 +0000
committerStijn Buys <ingar@osirion.org>2008-02-21 21:01:17 +0000
commit71b6b902732bfc0c53033d58f91a6b1e70e8371f (patch)
tree0ff75879667ff985c9d69f8057727f6c805ad8b4 /src/core/netconnection.cc
parent8aa04fc836116a58f8ffd1e0c3539b9ea8a94ddf (diff)
more minor updates
Diffstat (limited to 'src/core/netconnection.cc')
-rw-r--r--src/core/netconnection.cc8
1 files changed, 5 insertions, 3 deletions
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);