@@ -2545,14 +2545,17 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
2545
2545
if (is_valid_dig && n.getContent () != CONTENT_IGNORE)
2546
2546
m_script->node_on_dig (p_under, n, playersao);
2547
2547
2548
+ v3s16 blockpos = getNodeBlockPos (floatToInt (pointed_pos_under, BS));
2549
+ RemoteClient *client = getClient (peer_id);
2548
2550
// Send unusual result (that is, node not being removed)
2549
2551
if (m_env->getMap ().getNodeNoEx (p_under).getContent () != CONTENT_AIR)
2550
2552
{
2551
2553
// Re-send block to revert change on client-side
2552
- RemoteClient *client = getClient (peer_id);
2553
- v3s16 blockpos = getNodeBlockPos (floatToInt (pointed_pos_under, BS));
2554
2554
client->SetBlockNotSent (blockpos);
2555
2555
}
2556
+ else {
2557
+ client->ResendBlockIfOnWire (blockpos);
2558
+ }
2556
2559
}
2557
2560
} // action == 2
2558
2561
@@ -2594,15 +2597,21 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
2594
2597
2595
2598
// If item has node placement prediction, always send the
2596
2599
// blocks to make sure the client knows what exactly happened
2597
- if (item.getDefinition (m_itemdef).node_placement_prediction != " " ){
2598
- RemoteClient *client = getClient (peer_id);
2599
- v3s16 blockpos = getNodeBlockPos (floatToInt (pointed_pos_above, BS));
2600
+ RemoteClient *client = getClient (peer_id);
2601
+ v3s16 blockpos = getNodeBlockPos (floatToInt (pointed_pos_above, BS));
2602
+ v3s16 blockpos2 = getNodeBlockPos (floatToInt (pointed_pos_under, BS));
2603
+ if (item.getDefinition (m_itemdef).node_placement_prediction != " " ) {
2600
2604
client->SetBlockNotSent (blockpos);
2601
- v3s16 blockpos2 = getNodeBlockPos (floatToInt (pointed_pos_under, BS));
2602
- if (blockpos2 != blockpos){
2605
+ if (blockpos2 != blockpos) {
2603
2606
client->SetBlockNotSent (blockpos2);
2604
2607
}
2605
2608
}
2609
+ else {
2610
+ client->ResendBlockIfOnWire (blockpos);
2611
+ if (blockpos2 != blockpos) {
2612
+ client->ResendBlockIfOnWire (blockpos2);
2613
+ }
2614
+ }
2606
2615
} // action == 3
2607
2616
2608
2617
/*
0 commit comments