mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-05 08:13:22 +00:00

The previous bugfix fixed a crash when loading savegames with units whose abilities accessed the map while the display_context was still being constructed, however it reintroduced a bug in the scenario editor. Using the unit tool always crashed when adding any unit. This commit uses 4d1fc268b1's code path whenever possible, however it falls back to 6a21fdc675's code path when 4d1fc268b1 would assert. In practise one path is used in game and the other is used in the scenario editor, but doing the logic in this way ensures that any edge cases are going to affect the scenario editor rather than the game itself. Cherry picked from commit 1485cfd6256b73bb06aa34c512c2890749b45487, with conflicts because code from attack_type::weapon_specials() has moved to attack_type::weapon_specials_impl_adj().
81 B
81 B
Editor
- Fixed: the unit tool crashes when placing a unit (issue #7296).