Now its a bit easier to understand which functions are in play_controller adn which in playsingle_controller as all turn related functiosn are now in playsingle_controller
Previoulsy send_actions() was called at random
parts of the code in a "better safe than sorry"
manner, which made it hard to understand when
actions are sent or which of these calls is needed.
The new approach is:
- Chat, MapLabels and other unsynced messages are sent
regularily as part of playmp_controller::play_slice()
- Synced actions are sent as soon as they are undoable:
- which is immidiately in particular for end_turn and
init_side
- after every exceution of synced commands in the end
of synced_context::run() actions are send if the
actions cannot be undone.
Using this function lets te synced context know that the current
action cannot be undone, so that it will in particular send the
actions too all players as soon as possible. The intention is
less delay in networked games.
Currently there is some redundance between is_simultanious_
and is_undo_blocked_, maybe one of these will be removed
later.
process_network_data() Now always 'procecesses'
synced choices, since they are never exceuted
anyways just put on the recorder. so chat_only=yes
now only delayes new actions. This allows us to implement
receive_actions() by just calling
process_network_data().
This change also make the game execute other unsynced
actions like map labels sooner, along with chat messages.
We now handle the case that the player becomes host during
wait_for_upload() and make the code more robust in case
[notify_next_scenario] is received at a unexpected time.
I am not really sure whether this is actually needed or whether it
actually worked before for some other reason, in any case the new
code is simpler and safer.
To make the code simpler.
the sp linger function calls play_slice() which playmp_controller already overwrites, after a little fix of that we can remove a bit of code
All of its functions were moved to playmp_controller. Since they
were already so interconnected, this makes things a little easier.
Also it was always a bit confusing that this class was called
turn_info when all it did was to process network data.
Since 1.18 linger() is called indirectly by play_scenario_main_loop()
and play_scenario() which already catches therse erros and offers the option to save the game then.
The special handlng of ingame_wesnothd_error was removed since it
was only added to fix the case of the host leaving resulting in the
game aborting (which should no loner be the case)
1) We remove the syncmp_handler class which was a
bit too complicated for its rather simple task
2) We move network related stuff out of playsingle_controller
If the first trait of a unit has no name, then clicking on the units (other)
trait in the sidebar opened the wrong page in the help.
(cherry picked from commit f9af941f1ec7165ad135cba465717203a4007287)
Not mentioned here, but turning on debug mode also affects which units,
and therefore which units' traits, are shown in help.
Having looked back into the history while wondering why it was done this way
in e9603e6e01, back then we needed a fix that could be backported to 1.14,
so couldn't add a new attribute to [unit_type].
s1m0n was in the credits for 1.16, but that was missed when his contributions
were copied to master. Fix that, along with adding his latest updates.
The fuzzy flag in -wof probably got readded by mistake when rebasing.
Setting up vcpkg tries to build xz from source, which fails because the
entire xz repo has now been made private or taken down. The vcpkg team
have been advised not to switch to an alternative repo [1], so for now
our Windows builds will always fail.
Turn those builds off, so that we don't get familiar with seeing red
status markers on all PR's CI results.
[1] `https://github.com/microsoft/vcpkg/pull/37957` - second comment is
the vcpkg team's "We have been explicitly asked by security folks to not
change the upstream [to a different repo] for liblzma at this time."
When [damage_type] is used but the opponent uses the resistance ability
against the added type, the ability filter only detected the original type and
the new type was not affected.