Fix broken build
authorsfan5 <sfan5@live.de>
Sun, 22 Sep 2019 22:28:26 +0000 (00:28 +0200)
committerGitHub <noreply@github.com>
Sun, 22 Sep 2019 22:28:26 +0000 (00:28 +0200)
The variable name changed but this didn't cause merge conflicts, so it wasn't caught before.

src/network/serverpackethandler.cpp

index 8c2ba823c88b89ec0689601709c335a4b3ccbfde..d8fbeebd55c6a1ef55adfb117156c89b49e6fe2a 100644 (file)
@@ -1166,9 +1166,9 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
                        u16 wear = pointed_object->punch(dir, &toolcap, playersao,
                                        time_from_last_punch);
 
-                       bool changed = punchitem.addWear(wear, m_itemdef);
+                       bool changed = selected_item.addWear(wear, m_itemdef);
                        if (changed)
-                               playersao->setWieldedItem(punchitem);
+                               playersao->setWieldedItem(selected_item);
 
                        // If the object is a player and its HP changed
                        if (src_original_hp != pointed_object->getHP() &&