From 08a10b8a6a77eb729d609979ee822134d5d7a645 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 1 Dec 2011 23:55:57 +0200 Subject: Remove stuff made obsolete by making players more ActiveObject-like and raise protocol version number by one (because it is not compatible at all anymore) --- src/client.cpp | 283 --------------------------------------------------------- 1 file changed, 283 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index a165627e5..d264713e2 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -940,222 +940,6 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) //infostream<<"Adding mesh update task for received block"<isLocal()) - { - start += player_size; - continue; - } - - v3s32 ps = readV3S32(&data[start+2]); - v3s32 ss = readV3S32(&data[start+2+12]); - s32 pitch_i = readS32(&data[start+2+12+12]); - s32 yaw_i = readS32(&data[start+2+12+12+4]); - /*infostream<<"Client: got " - <<"pitch_i="< players_alive; - for(u32 i=0; iupdateName((char*)&data[start+2]); - - start += item_size; - } - - /* - Remove those players from the environment that - weren't listed by the server. - */ - //infostream<<"Removing dead players"< players = m_env.getPlayers(); - core::list::Iterator ip; - for(ip=players.begin(); ip!=players.end(); ip++) - { - // Ingore local player - if((*ip)->isLocal()) - continue; - - // Warn about a special case - if((*ip)->peer_id == 0) - { - infostream<<"Client: Removing " - "dead player with id=0"<::Iterator i; - for(i=players_alive.begin(); i!=players_alive.end(); i++) - { - if((*ip)->peer_id == *i) - { - is_alive = true; - break; - } - } - /*infostream<<"peer_id="<<((*ip)->peer_id) - <<" is_alive="<peer_id - <peer_id); - } - } //envlock -#endif - } - else if(command == TOCLIENT_SECTORMETA) - { - infostream<<"Client received DEPRECATED TOCLIENT_SECTORMETA"<inventory.print(infostream); } } - //DEBUG - else if(command == TOCLIENT_OBJECTDATA) - { - // Strip command word and create a stringstream - std::string datastring((char*)&data[2], datasize-2); - std::istringstream is(datastring, std::ios_base::binary); - - u8 buf[12]; - - /* - Read players - */ - - is.read((char*)buf, 2); - u16 playercount = readU16(buf); - - for(u16 i=0; iisLocal()) - { - continue; - } - - f32 pitch = (f32)pitch_i / 100.0; - f32 yaw = (f32)yaw_i / 100.0; - v3f position((f32)p_i.X/100., (f32)p_i.Y/100., (f32)p_i.Z/100.); - v3f speed((f32)s_i.X/100., (f32)s_i.Y/100., (f32)s_i.Z/100.); - - player->setPosition(position); - player->setSpeed(speed); - player->setPitch(pitch); - player->setYaw(yaw); - } - - /* - Read block objects - NOTE: Deprecated stuff - */ - - // Read active block count - u16 blockcount = readU16(is); - if(blockcount != 0){ - infostream<<"TOCLIENT_OBJECTDATA: blockcount != 0 " - "not supported"<