Have some real bad lock ups when the oct is semi full

This commit is contained in:
2018-03-01 21:54:16 -08:00
parent 6650eb784d
commit 8f822e14f7
3 changed files with 34 additions and 22 deletions

View File

@@ -51,7 +51,7 @@ bool Application::init_clcaster() {
raycaster->assign_map(map);
camera = std::make_shared<Camera>(
sf::Vector3f(3.5f, 3.5f, 3.5f), // Starting position
sf::Vector3f(30.5f, 30.5f, 30.5f), // Starting position
sf::Vector2f(1.57f, 0.0f), // Direction
window.get()
);

View File

@@ -16,7 +16,17 @@ ArrayMap::ArrayMap(sf::Vector3i dimensions) {
for (int x = 0; x < dimensions.x; x++) {
for (int y = 0; y < dimensions.y; y++) {
setVoxel(sf::Vector3i(x, y, 0), 5);
for (int z = 0; z < 2; z++) {
setVoxel(sf::Vector3i(x, y, z), 5);
}
}
}
for (int x = 0; x < dimensions.x/2-1; x++) {
for (int y = 0; y < dimensions.y/2-1; y++) {
for (int z = 0; z < dimensions.z/2-1; z++) {
setVoxel(sf::Vector3i(x, y, z), 5);
}
}
}
}