i.atEnd() == false; i++)
{
RemoteClient *client = i.getNode()->getValue();
+
+ // If definitions and textures have not been sent, don't
+ // send objects either
+ if(!client->definitions_sent)
+ continue;
+
Player *player = m_env->getPlayer(client->peer_id);
if(player==NULL)
{
// Send inventory to player
UpdateCrafting(peer_id);
SendInventory(peer_id);
-
+
// Send player items to all players
SendPlayerItems();
m_con.Send(peer_id, 0, data, true);
}
+ // Now the client should know about everything
+ getClient(peer_id)->definitions_sent = true;
+
// Send information about server to player in chat
SendChatMessage(peer_id, getStatusString());
if(player->hp != 0)
return;
+ srp->m_respawn_active = false;
+
RespawnPlayer(player);
actionstream<<player->getName()<<" respawns at "
RemoteClient *client = i.getNode()->getValue();
assert(client->peer_id == i.getNode()->getKey());
+ // If definitions and textures have not been sent, don't
+ // send MapBlocks either
+ if(!client->definitions_sent)
+ continue;
+
total_sending += client->SendingCount();
if(client->serialization_version == SER_FMT_VER_INVALID)
{
player->hp = 20;
ServerRemotePlayer *srp = static_cast<ServerRemotePlayer*>(player);
- srp->m_respawn_active = false;
bool repositioned = scriptapi_on_respawnplayer(m_lua, srp);
if(!repositioned){
v3f pos = findSpawnPos(m_env->getServerMap());
// Version is stored in here after INIT before INIT2
u8 pending_serialization_version;
+ bool definitions_sent;
+
RemoteClient():
m_time_from_building(9999),
m_excess_gotblocks(0)
serialization_version = SER_FMT_VER_INVALID;
net_proto_version = 0;
pending_serialization_version = SER_FMT_VER_INVALID;
+ definitions_sent = false;
m_nearest_unsent_d = 0;
m_nearest_unsent_reset_timer = 0.0;
m_nothing_to_send_counter = 0;