X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp.cpp;h=10a72b8e89e698f2abf52164df4bc91a6b164c96;hb=1a7bbd64b1fef1f4e2f9303f820d6f3ce76cebf1;hp=202f98c5b4fe46af2ae85a8824d69908fc354a31;hpb=cb959294a8271969ddfe411471d7f04e82c4788a;p=blank.git diff --git a/src/app.cpp b/src/app.cpp index 202f98c..10a72b8 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -119,7 +119,7 @@ void Application::Update(int dt) { outline_visible = true; outline.Clear(); chunk->BlockAt(blkid).type->FillOutlineModel(outline); - outline_transform = glm::translate(chunk->Transform(), pos); + outline_transform = glm::translate(chunk->Transform(world.Player().ChunkCoords()), pos); outline_transform = glm::scale(outline_transform, glm::vec3(1.0001f)); } else { outline_visible = false; @@ -145,7 +145,7 @@ void Application::Update(int dt) { glm::vec3 next_pos = Chunk::ToCoords(blkid) + normal; if (!Chunk::InBounds(next_pos)) { mod_chunk = &world.Next(*chunk, normal); - next_pos -= normal * Chunk::Extent(); + next_pos -= normal * glm::vec3(Chunk::Extent()); } mod_chunk->BlockAt(next_pos).type = world.BlockTypes()[place_id]; mod_chunk->Invalidate();