From d61e5b918f573bf230a226a8133b42c4f2d5b5a8 Mon Sep 17 00:00:00 2001 From: PatrikLundell Date: Sun, 26 May 2024 12:27:54 +0200 Subject: [PATCH] Fixed construction marker --- src/mapgen.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mapgen.cpp b/src/mapgen.cpp index d32c7fb2b2b01..a9d37d70c20fe 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -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 ); } } }