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/netconnection.cc | 245 +++++++++++++++++++++++++++++----------------- 1 file changed, 154 insertions(+), 91 deletions(-) (limited to 'src/core/netconnection.cc') diff --git a/src/core/netconnection.cc b/src/core/netconnection.cc index 1318467..0a816b8 100644 --- a/src/core/netconnection.cc +++ b/src/core/netconnection.cc @@ -356,7 +356,7 @@ void NetConnection::send_playerinfo() } // send a "cup" client update message to the server -void NetConnection::send_clientupdate(Entity *entity) +void NetConnection::send_client_update(Entity *entity) { // cup std::ostringstream msg; @@ -366,6 +366,15 @@ void NetConnection::send_clientupdate(Entity *entity) this->send_raw(msg.str()); } +// send a "req" entity request +void NetConnection::send_entity_request(Entity *entity) +{ + // req + std::ostringstream msg; + msg << "req " << entity->id() << '\n'; + this->send_raw(msg.str()); +} + // send a "cmd" command line message to the server void NetConnection::send_command(std::string const &cmdline) { @@ -440,12 +449,12 @@ void NetConnection::send_info_request(Info *info) * msg rcon * msg snd * die - * ent + * ent * frame - * sup + * sup * pif * pid - * inf + * inf