1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Merge pull request #8776 from osjc/FixGetNode

Finish getNode cleanup
This commit is contained in:
Jozef Behran 2019-08-10 19:45:44 +02:00 committed by sfan5
parent 291e7730cf
commit 86d7f84b89
26 changed files with 120 additions and 139 deletions

View file

@ -1122,7 +1122,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
MapNode n(CONTENT_IGNORE);
bool pos_ok;
n = m_env->getMap().getNodeNoEx(p_under, &pos_ok);
n = m_env->getMap().getNode(p_under, &pos_ok);
if (!pos_ok) {
infostream << "Server: Not punching: Node not found."
<< " Adding block to emerge queue."
@ -1185,7 +1185,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
// Only digging of nodes
if (pointed.type == POINTEDTHING_NODE) {
bool pos_ok;
MapNode n = m_env->getMap().getNodeNoEx(p_under, &pos_ok);
MapNode n = m_env->getMap().getNode(p_under, &pos_ok);
if (!pos_ok) {
infostream << "Server: Not finishing digging: Node not found."
<< " Adding block to emerge queue."
@ -1269,7 +1269,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
v3s16 blockpos = getNodeBlockPos(floatToInt(pointed_pos_under, BS));
RemoteClient *client = getClient(pkt->getPeerId());
// Send unusual result (that is, node not being removed)
if (m_env->getMap().getNodeNoEx(p_under).getContent() != CONTENT_AIR) {
if (m_env->getMap().getNode(p_under).getContent() != CONTENT_AIR) {
// Re-send block to revert change on client-side
client->SetBlockNotSent(blockpos);
}