Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading a replay doesn't reset stats #4133

jostephd opened this issue Jun 22, 2019 · 0 comments


None yet
1 participant
Copy link

commented Jun 22, 2019

  1. wesnoth -t
  2. attack something
  3. save replay
  4. load replay
  5. At this point, the statistics dialog shows the statistics as they would be at the end of the replay. It should show all zero.
  6. Pressing the Stop button resets the statistics back to all-zero (see 8d1c278)

The bug does not happen if I change mid_scenario=yes to mid_scenario=no in the replay savefile. If I do that I get two entries for the scenario, though (that's #4111).

I think the problem might be in this block, but I didn't debug any further:

play_replay_ =;
LOG_CONFIG << "is middle game savefile: " << (state_.is_mid_game_save() ? "yes" : "no") << "\n";
LOG_CONFIG << "show replay: " << (play_replay_ ? "yes" : "no") << "\n";
// in case && !state_.is_mid_game_save()
// there won't be any turns to replay, but the
// user gets to watch the intro sequence again ...
if(state_.is_mid_game_save() &&

Thanks to Hardwood for initial reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.