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

Kills/losses in replays are counted again after starting the replay from the beginning. #2852

Closed
EoZ8 opened this issue Apr 8, 2018 · 3 comments

Comments

Projects
None yet
5 participants
@EoZ8
Copy link

commented Apr 8, 2018

Wesnoth 1.13.13

  1. Run any replay
  2. Wait for it to finish
  3. Click start replay from the beginning and wait for it to finish again, the kills/losses in the statistics will be counted again and added to the real kills/losses after the first run of the replay, possible to be repeated indefinitely.
@Vultraz

This comment has been minimized.

Copy link
Member

commented Apr 9, 2018

Maybe @gfgtdf knows where to look for this? Sounds like it just needs a statistics::fresh_stats() call somewhere.

@gfgtdf

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2018

iirc static reset happens somewhat hacky directly in in the load game dialog, to fix this bug you'd need to call statistics::fresh_stats(); statistics::read_stats(stats); when the game is reset, (the code that catches reset game state exception iirc). I currently don't see how to get the statistics info from there

jostephd added a commit to jostephd/wesnoth that referenced this issue Mar 22, 2019

@jostephd

This comment has been minimized.

Copy link
Member

commented Mar 22, 2019

jostephd added a commit to jostephd/wesnoth that referenced this issue Mar 22, 2019

Fix wesnoth#2852: Reset statistics when rewinding a replay to the beg…
…inning.

Currently, while watching a replay of Scenario N, the statistics dialog
has the following options:

- All scenarios
- S1
- S2
- ...
- SN
- SN

The last option shows the statistics of Scenario N from the beginning
through the current point in the replay.  The other options show
end-of-scenario stats of each scenario and the cumulative stats of all
scenarios through the end of SN.

This patch causes the stats shown by the the second SN option to reset
to zero when the "reset replay" ("stop") button is selected.

jostephd added a commit to jostephd/wesnoth that referenced this issue Mar 22, 2019

@jostephd jostephd closed this in d3c1cc4 Mar 25, 2019

jostephd added a commit that referenced this issue Mar 25, 2019

jostephd added a commit that referenced this issue Mar 25, 2019

Fix #2852: Reset statistics when rewinding a replay to the beginning.
Currently, while watching a replay of Scenario N, the statistics dialog
has the following options:

- All scenarios
- S1
- S2
- ...
- SN
- SN

The last option shows the statistics of Scenario N from the beginning
through the current point in the replay.  The other options show
end-of-scenario stats of each scenario and the cumulative stats of all
scenarios through the end of SN.

This patch causes the stats shown by the the second SN option to reset
to zero when the "reset replay" ("stop") button is selected.

jostephd added a commit that referenced this issue Mar 25, 2019

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.