Update of bug #9894 (project wesnoth):
Item Group: None => None of the others
Status: None => Confirmed
_______________________________________________________
Follow-up Comment #2:
It's not that the saves are done in the wrong order. They're done in the
right order, as I verified by running the game under debugger control and
watching the save_game() calls go by.
The problem is that if both saves are made during the same second, the game's
sort function won't know which one was created first, and they'll be sorted by
name (see gamestatus.cpp:677). If the new scenario has a name that sorts
lower than the old, we lose.
This is a timing-dependent error. It's going to happen more often on
machines with fast IO subsystems, which make it less likely that the clock
will tick over a second boundary while the replay save is being done.
There are two ways we could fix this, a pretty way and an ugly way. The
pretty way would be to collect millisecond-resolution modification times,
which would make time collisions highly unlikely. But I don't know how to do
this under Windows, or even if it's possible.
The dirty way would be to sleep for a second after doing replay saves.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?9894>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs