Opened 9 years ago
Last modified 8 years ago
#3581 closed defect
[PATCH] Visual Replay - simulation continues after end — at Version 1
Reported by: | elexis | Owned by: | |
---|---|---|---|
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.
Change History (3)
by , 9 years ago
Attachment: | commands.txt added |
---|
comment:1 by , 9 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 , 9 years ago
Attachment: | t3581_stop_simulation_after_replay_v1.patch added |
---|
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.