Skip to content

Commit

Permalink
Merge branch 'main' into 270-add-palette-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
roby2014 authored Oct 16, 2023
2 parents 3e33722 + 174a787 commit f1bb0d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engine/include/cubos/engine/renderer/plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace cubos::engine
Asset<VoxelPalette> asset;

/// @brief Previous asset handle save in order to check if asset changed later.
/// TODO: ECS should have a .changed function to make this process easier (#273).
/// @todo ECS should have a .changed function to make this process easier (#273).
Asset<VoxelPalette> prev;
};

Expand Down
4 changes: 2 additions & 2 deletions engine/src/cubos/engine/renderer/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ static void checkPaletteUpdateSystem(Write<Assets> assets, Write<Renderer> rende

if (assets->update(activePalette->asset) || activePalette->prev != activePalette->asset)
{
auto palette = assets->read(activePalette->asset).get();
(*renderer)->setPalette(palette);
auto paletteRead = assets->read(activePalette->asset);
(*renderer)->setPalette(*paletteRead);
activePalette->prev = activePalette->asset;
}
}
Expand Down

0 comments on commit f1bb0d1

Please sign in to comment.