From 7888930bf0a75999e103f7781c095e04b6860ee5 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 15 Nov 2009 15:35:59 +0000 Subject: added entity request network message --- src/core/netserver.cc | 130 ++++++++++++++++++++++++++++---------------------- 1 file changed, 72 insertions(+), 58 deletions(-) (limited to 'src/core/netserver.cc') diff --git a/src/core/netserver.cc b/src/core/netserver.cc index 65388e8..6ba9dc7 100644 --- a/src/core/netserver.cc +++ b/src/core/netserver.cc @@ -506,12 +506,12 @@ void NetServer::send_entity_delete(NetClient *client, Entity *entity) } } -// broadcast a "sup" server update entity message to all clients +// send a "sup" server update entity message to a client void NetServer::send_entity_update(NetClient *client, Entity *entity) { if ((client->state() == NetClient::Connected) && !entity->serverside()) { std::ostringstream msg; - msg << "sup " << entity->id() << " "; + msg << "sup " << entity->id() << " " << entity->type() << " "; entity->serialize_server_update(msg); msg << '\n'; @@ -584,6 +584,8 @@ void NetServer::send_info_update(NetClient *client, Info *info) * ping * say * priv + * info