aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen/mg_schematic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen/mg_schematic.cpp')
-rw-r--r--src/mapgen/mg_schematic.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mapgen/mg_schematic.cpp b/src/mapgen/mg_schematic.cpp
index fc77194ac..ba619b2e0 100644
--- a/src/mapgen/mg_schematic.cpp
+++ b/src/mapgen/mg_schematic.cpp
@@ -188,15 +188,15 @@ bool Schematic::placeOnVManip(MMVManip *vm, v3s16 p, u32 flags,
//// Adjust placement position if necessary
if (flags & DECO_PLACE_CENTER_X)
- p.X -= (s.X + 1) / 2;
+ p.X -= (s.X - 1) / 2;
if (flags & DECO_PLACE_CENTER_Y)
- p.Y -= (s.Y + 1) / 2;
+ p.Y -= (s.Y - 1) / 2;
if (flags & DECO_PLACE_CENTER_Z)
- p.Z -= (s.Z + 1) / 2;
+ p.Z -= (s.Z - 1) / 2;
blitToVManip(vm, p, rot, force_place);
- return vm->m_area.contains(VoxelArea(p, p + s - v3s16(1,1,1)));
+ return vm->m_area.contains(VoxelArea(p, p + s - v3s16(1, 1, 1)));
}
void Schematic::placeOnMap(ServerMap *map, v3s16 p, u32 flags,
@@ -219,16 +219,16 @@ void Schematic::placeOnMap(ServerMap *map, v3s16 p, u32 flags,
//// Adjust placement position if necessary
if (flags & DECO_PLACE_CENTER_X)
- p.X -= (s.X + 1) / 2;
+ p.X -= (s.X - 1) / 2;
if (flags & DECO_PLACE_CENTER_Y)
- p.Y -= (s.Y + 1) / 2;
+ p.Y -= (s.Y - 1) / 2;
if (flags & DECO_PLACE_CENTER_Z)
- p.Z -= (s.Z + 1) / 2;
+ p.Z -= (s.Z - 1) / 2;
//// Create VManip for effected area, emerge our area, modify area
//// inside VManip, then blit back.
v3s16 bp1 = getNodeBlockPos(p);
- v3s16 bp2 = getNodeBlockPos(p + s - v3s16(1,1,1));
+ v3s16 bp2 = getNodeBlockPos(p + s - v3s16(1, 1, 1));
MMVManip vm(map);
vm.initialEmerge(bp1, bp2);