]> git.localhorst.tv Git - blank.git/blobdiff - src/interface.cpp
trying to fix the initial aiming issue
[blank.git] / src / interface.cpp
index dddb7324f965fc7fe2a4f90810837b7e3e6598c2..b5aac9641061038a294fa5dea4a541ba8d19a546 100644 (file)
@@ -105,6 +105,8 @@ void Interface::PrintBlockInfo() {
        std::cout << std::endl;
        if (!aim_chunk) {
                std::cout << "not looking at any block" << std::endl;
+               Ray aim = ctrl.Aim();
+               std::cout << "aim ray: " << aim.orig << ", " << aim.dir << std::endl;
                return;
        }
        std::cout << "looking at block " << aim_block
@@ -124,24 +126,24 @@ void Interface::PrintChunkInfo() {
                << aim_chunk->Position()
                << std::endl;
 
-       std::cout << "  neighbors:";
+       std::cout << "  neighbors:" << std::endl;
        if (aim_chunk->HasNeighbor(Block::FACE_LEFT)) {
-               std::cout << " left";
+               std::cout << " left  " << aim_chunk->GetNeighbor(Block::FACE_LEFT).Position() << std::endl;
        }
        if (aim_chunk->HasNeighbor(Block::FACE_RIGHT)) {
-               std::cout << " right";
+               std::cout << " right " << aim_chunk->GetNeighbor(Block::FACE_RIGHT).Position() << std::endl;
        }
        if (aim_chunk->HasNeighbor(Block::FACE_UP)) {
-               std::cout << " up";
+               std::cout << " up    " << aim_chunk->GetNeighbor(Block::FACE_UP).Position() << std::endl;
        }
        if (aim_chunk->HasNeighbor(Block::FACE_DOWN)) {
-               std::cout << " down";
+               std::cout << " down  " << aim_chunk->GetNeighbor(Block::FACE_DOWN).Position() << std::endl;
        }
        if (aim_chunk->HasNeighbor(Block::FACE_FRONT)) {
-               std::cout << " front";
+               std::cout << " front " << aim_chunk->GetNeighbor(Block::FACE_FRONT).Position() << std::endl;
        }
        if (aim_chunk->HasNeighbor(Block::FACE_BACK)) {
-               std::cout << " back";
+               std::cout << " back  " << aim_chunk->GetNeighbor(Block::FACE_BACK).Position() << std::endl;
        }
        std::cout << std::endl;
 }