fix nodes removal when digging doors

This commit is contained in:
darkrose 2013-10-10 19:03:49 +10:00
parent 64f4805f60
commit 8a0a126267
1 changed files with 6 additions and 4 deletions

View File

@ -2669,25 +2669,27 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
&& (n.getContent()&CONTENT_HATCH_MASK) != CONTENT_HATCH_MASK && (n.getContent()&CONTENT_HATCH_MASK) != CONTENT_HATCH_MASK
) { ) {
if ((n.getContent()&CONTENT_DOOR_SECT_MASK) == CONTENT_DOOR_SECT_MASK) { if ((n.getContent()&CONTENT_DOOR_SECT_MASK) == CONTENT_DOOR_SECT_MASK) {
sendRemoveNode(p_under+v3s16(0,-1,0), peer_id, &far_players, 30); sendRemoveNode(p_under+v3s16(0,-1,0), 0, &far_players, 30);
{ {
MapEditEventIgnorer ign(&m_ignore_map_edit_events); MapEditEventIgnorer ign(&m_ignore_map_edit_events);
m_env.getMap().removeNodeAndUpdate(p_under+v3s16(0,-1,0), modified_blocks); m_env.getMap().removeNodeAndUpdate(p_under+v3s16(0,-1,0), modified_blocks);
} }
}else{ }else{
sendRemoveNode(p_under+v3s16(0,1,0), peer_id, &far_players, 30); sendRemoveNode(p_under+v3s16(0,1,0), 0, &far_players, 30);
{ {
MapEditEventIgnorer ign(&m_ignore_map_edit_events); MapEditEventIgnorer ign(&m_ignore_map_edit_events);
m_env.getMap().removeNodeAndUpdate(p_under+v3s16(0,1,0), modified_blocks); m_env.getMap().removeNodeAndUpdate(p_under+v3s16(0,1,0), modified_blocks);
} }
} }
} sendRemoveNode(p_under, 0, &far_players, 30);
}else{
/* /*
Send the removal to all close-by players. Send the removal to all close-by players.
- If other player is close, send REMOVENODE - If other player is close, send REMOVENODE
- Otherwise set blocks not sent - Otherwise set blocks not sent
*/ */
sendRemoveNode(p_under, peer_id, &far_players, 30); sendRemoveNode(p_under, peer_id, &far_players, 30);
}
/* /*
Update and send inventory Update and send inventory