Follow-up Comment #1, bug #11719 (project wesnoth):
This appears to be a result of the way the stats system works. Here's my
understanding of the issue:
The master_stats vector contains one entry per scenario in a campaign. In
the entry for each scenario, are the name of the scenario and an element
"team_stats" which is presumably where the stats for that scenario are stored
(xcode is refusing to resolve the team_stats element for some reason); in
paticular the stats include both the totals for that scenario, and the totals
for a turn.
Now, when displaying the game statistics, all the entries of the master_stats
vector in the relevant team are added together - giving a global stat total.
This is perfectly fine and correct for the scenario totals, but causes some
interesting oddness for the "this turn" stats. These, too, are added up over
all scenarios - which means that the statistics for the final turn of all
completed scenarios are included in the displayed stats for "this turn".
This is.. strange for the user ;P
There appear to me to be two ways to "fix" this:
- either fudge merge_stats to Do The Right Thing with the "this turn" based
stats. I'm not sure if merge_stats is used from elsewhere in the code than
the stats dialog for the user, so I'm not sure whether this would involve a
change to merge_stats or an entirely new function... (or changing the
interface to merge_stats)...
- Reset the turn-based stats in master_stats for completed scenarios to 0 at
some point - presumably when "end scenario" is clicked.
I prefer the latter - the former seems ugly. However, I know too little
about the code to judge the possible reprecussions of either option...
Thoughts?
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?11719>
_______________________________________________
Nachricht geschickt von/durch Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs