Skip to content

Commit

Permalink
Fixed construction marker
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikLundell committed May 26, 2024
1 parent b03cb4b commit d61e5b9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/mapgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8010,13 +8010,12 @@ bool apply_construction_marker( const update_mapgen_id &update_mapgen_id,
rotation_guard rot( md );

if( update_function->second.funcs()[0]->update_map( fake_md ) ) {
for( const tripoint &pos : tmp_map.points_on_zlevel( fake_map::fake_map_z ) ) {
const tripoint level_pos = tripoint( pos.xy(), omt_pos.z() );
if( tmp_map.ter( pos ) != ter_t_grass || tmp_map.has_furn( level_pos ) ) {
for( const tripoint &pos : tmp_map.points_on_zlevel( omt_pos.z() ) ) {
if( tmp_map.ter( pos ) != ter_t_grass || tmp_map.has_furn( pos ) ) {
if( apply ) {
update_tmap.add_field( level_pos, fd_construction_site, 1, time_duration::from_turns( 0 ), false );
update_tmap.add_field( pos, fd_construction_site, 1, time_duration::from_turns( 0 ), false );
} else {
update_tmap.delete_field( level_pos, fd_construction_site );
update_tmap.delete_field( pos, fd_construction_site );
}
}
}
Expand Down

0 comments on commit d61e5b9

Please sign in to comment.