Events during attacks may modify either of the units involved. If, as a result, one of the units does not have a weapon of the type used any more, this previously caused a segmentation fault in unit_attack() in udisplay.cpp. The solution is to set the remaining number of strikes for the unit to zero. This prevents that unit from striking again, but lets the opponent continue its attack.
Fixes#4927 and #5914
This should allow it to run in different configurations:
- When clicking "run" in Xcode, it's adjacent to the Wesnoth applicaiton
- If you wanted a standalone install of wesnothd you'd now only need to copy over the Frameworks directory.
All of this assumes that wesnothd will run at all, which works with a debug build but probably not in the actual release.
The motivation for this is that Xcode is (for some reason) incapable of automatically reloading a scheme that has changed on disk, and overwrites it the moment you try to edit it with whatever it has in memory.
With this change, the information lost when it does that will be much less; in many cases, just a checkbox to toggle back on.
It is not used, and appears to have been unused for a long time.
It was related to mouseover hex brightening, but the brightening
amount is hardcoded. There were associated hex_semi_brightening,
mouseover_image and selected_image keys, but that info is also
hardcoded, and those keys appear to have been removed already.
This seems to have been applied to 1.14, but not 1.15/master at the time.
-
Revert network_transmission.cpp/hpp to its 1.14.7 version
I re-ran the timing test discussed in PR wesnoth#4201 (comment linked to below), and
saw similar numbers. The old, simpler code downloads an 86.1MB addon in 25
seconds, the code with the extra thread takes 29 seconds.
https://github.com/wesnoth/wesnoth/pull/4201#issuecomment-517856090
sdl_copy_portion (only used one place internally, so inlined there)
stretch_surface_horizontal (obsoleted by hardware rendering)
stretch_surface_vertical (obsoleted by hardware rendering)
tile_surface (obsoleted by hardware rendering)
surface_submerge_alpha (now done via IPF)
blit_surface (not used anywhere, so sdl_blit must be fine)
Functions have moved to draw.hpp and sdl/texture.hpp as appropriate.
Most of these had already moved. set_texture_blend_mode() was the last
uncategorized function. It is now in texture.hpp.