#3581 closed defect (fixed)
[PATCH] Visual Replay - simulation continues after end
Reported by: | elexis | Owned by: | elexis |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 19 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
Once the replay ends, the simulation continues internally. With AIs it becomes noticable as they continue the game as if nothing has happened.
You can easily reproduce it by replaying the attached file with only one turn, clicking "no" on the exit question and then see the AI continue to build stuff.
The cause of this bug, i.e. the turn manager continuing after the end exists since #9 / r16727, but it never got apparent until both #3309 and #3566 were fixed. Presumably the last mock turn with a duration 0 prevented the game from continuing.
When I apply this attachment:visual_replay_a18_megapatch.patch:ticket:9 to my a18 and replay that file, the units continue with their current animation but all keep standing on ground, despite the turn manager doing more turns.
Attachments (2)
Change History (8)
by , 8 years ago
Attachment: | commands.txt added |
---|
comment:1 by , 8 years ago
Description: | modified (diff) |
---|---|
Keywords: | patch review added |
Milestone: | Backlog → Alpha 19 |
Summary: | Visual Replay - simulation continues after end → [PATCH] Visual Replay - simulation continues after end |
by , 8 years ago
Attachment: | t3581_stop_simulation_after_replay_v1.patch added |
---|
comment:2 by , 8 years ago
Owner: | set to |
---|
comment:4 by , 8 years ago
Keywords: | review removed |
---|
comment:5 by , 8 years ago
I'm glad the simulation doesn't continue anymore. The stats will not change anymore and one can check the state of the game at the end.
But some things can still be improved:
- animations should stop too
- would be nice if changing the perspective still works after the end (see also #3168)
The problem is that
main.cpp
callingFrame()
in a loop, callingg_Game->Update()
as long as the game exists and was started, callingm_TurnManager->Update()
every time which always increases the turnnumber by 1.So the simple solution is to move the
m_FinalReplayTurn
fromReplayTurnManager
to the parent classNetTurnManager
, so that the parent class functionUpdate()
knows about potentially finite games.