Progress on Vertical Dungeon Clipping (broken) #62

Merged
SenseiKiwi merged 1 commits from master into master 2013-08-01 17:40:36 +00:00
Showing only changes of commit a081419855 - Show all commits

View File

@@ -85,11 +85,13 @@ public class SchematicLoader
World world = dimHelper.getWorld(destDimID); World world = dimHelper.getWorld(destDimID);
//Adjust the height at which the dungeon is placed to prevent vertical clipping //Adjust the height at which the dungeon is placed to prevent vertical clipping
//link.destYCoord = adjustDestinationY(world, link.destYCoord, dungeon); int fixedY = adjustDestinationY(world, link.destYCoord, dungeon);
if (fixedY != link.destYCoord)
//Adjust the data for the destination link to prevent crashes {
//TODO: I really have no idea how to do this. =/ The LinkData/dimHelper implementation causes me sadness. ~SenseiKiwi dimHelper helperInstance = dimHelper.instance;
LinkData reverseLink = helperInstance.getLinkDataAtDestination(link);
helperInstance.moveLinkDataLocation(reverseLink, reverseLink.locXCoord, fixedY, reverseLink.locZCoord, reverseLink.locDimID, true);
}
dungeon.copyToWorld(world, new Point3D(link.destXCoord, link.destYCoord, link.destZCoord), link.linkOrientation, originDimID, destDimID); dungeon.copyToWorld(world, new Point3D(link.destXCoord, link.destYCoord, link.destZCoord), link.linkOrientation, originDimID, destDimID);
return true; return true;
} }