mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-22 20:35:24 +02:00
Removing unused include. Fixing nodemeta position on rollback action.
This commit is contained in:
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "util/string.h"
|
||||
#include "util/numeric.h"
|
||||
#include "map.h"
|
||||
#include "mapblock.h" //For getNodeBlockPos
|
||||
#include "gamedef.h"
|
||||
#include "nodedef.h"
|
||||
#include "nodemetadata.h"
|
||||
@@ -156,9 +155,7 @@ bool RollbackAction::applyRevert(Map *map, InventoryManager *imgr, IGameDef *gam
|
||||
} else {
|
||||
NodeMetadata *meta = map->getNodeMetadata(p);
|
||||
if (!meta) {
|
||||
v3s16 blockpos = getNodeBlockPos(p);
|
||||
v3s16 p_rel = p - blockpos*MAP_BLOCKSIZE;
|
||||
meta = new NodeMetadata(gamedef->idef(),p_rel);
|
||||
meta = new NodeMetadata(gamedef->idef(),p);
|
||||
if (!map->setNodeMetadata(p, meta)) {
|
||||
delete meta;
|
||||
infostream << "RollbackAction::applyRevert(): "
|
||||
|
Reference in New Issue
Block a user