mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 07:24:57 +01:00
fix(editor): Fields: the edits of a field stick, the natural slopes stay when the formations are laid again, no holes far off or by a missing chunk
The copy of the field the widgets edit is kept while one of them is held, so a drag ends with what it was dragged to. Laying the formations again keeps the natural shape of the slopes of each. The surfaces of the fields are made as far as the chunks are drawn, so their holes never show without them; a field over ground with no chunk is made of what has ground, and waits only for chunks which are in the files but not loaded yet. Outline it again puts the points on the ground and the cut changes that field. The holes of the fields are marked (254) and giving one back closes only its own, the holes cut by hand stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
This commit is contained in:
@@ -614,6 +614,9 @@ class editor_mode : public application_mode, private editor_track::observer, pri
|
||||
terrain_waves m_waves;
|
||||
heightmap::modifier::natural_shape m_natural{0.8, 15.0, 0.15, 0.3, 0.08};
|
||||
int m_patch_selected{-1}; // field chosen in the list
|
||||
heightmap::surface_patch m_patch_edit; // its copy the widgets edit, kept while one of them is held
|
||||
int m_patch_edited{-1}; // which field m_patch_edit is of
|
||||
std::string m_patch_reoutline; // the field whose outline was put back to be drawn again: cutting out changes it
|
||||
void render_fields_ui();
|
||||
void cut_out_field();
|
||||
void render_waves_options();
|
||||
|
||||
Reference in New Issue
Block a user