1
0
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:
Foghrye4
2016-04-21 21:39:30 +03:00
parent bf1825200d
commit ae980f5268
10 changed files with 75 additions and 135 deletions

View File

@@ -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(): "