Skip to content

Commit

Permalink
Merge pull request CleverRaven#78493 from akrieger/disable_warhol_mode
Browse files Browse the repository at this point in the history
Fix perspective shift in construction
  • Loading branch information
Maleclypse authored Dec 12, 2024
2 parents b871679 + d7411cd commit 2a8e243
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/construction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ construction_id construction_menu( const bool blueprint )
tilecontext->set_disable_occlusion( true );
g->invalidate_main_ui_adaptor();
#endif
restore_on_out_of_scope restore_view( player_character.view_offset );
std::unique_ptr<restore_on_out_of_scope<tripoint_rel_ms>> restore_view =
std::make_unique<restore_on_out_of_scope<tripoint_rel_ms>>( player_character.view_offset );

const auto recalc_buffer = [&]() {
//leave room for top and bottom UI text
Expand Down Expand Up @@ -1061,7 +1062,7 @@ construction_id construction_menu( const bool blueprint )
add_msg( m_info, _( "It is too dark to construct right now." ) );
} else {
draw_preview.reset();
restore_view.cancel();
restore_view.reset();
restore_ui.reset();
ui.reset();
place_construction( { constructs[select] } );
Expand Down

0 comments on commit 2a8e243

Please sign in to comment.