Skip to content

Commit

Permalink
save world keybind
Browse files Browse the repository at this point in the history
  • Loading branch information
Kade-github committed May 24, 2024
1 parent c4a8fe8 commit 7fa0f8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Game/Scenes/Gameplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,12 +632,12 @@ void Gameplay::KeyPress(int key)
{
if (key == GLFW_KEY_F5)
{
Chunk* c = wm->GetChunk(player->position.x, player->position.z);
wm->_world.p = player->playerData;

if (c != nullptr)
UnloadChunk(c);
wm->SetPlayerPosition(player->position);
wm->SaveWorldNow();

hud->ShowHint("Reloading chunk");
hud->ShowHint("Saved world");
}

if (key == GLFW_KEY_Y)
Expand Down

0 comments on commit 7fa0f8e

Please sign in to comment.