#3566 closed defect (fixed)
[PATCH] Visual Replay - everything invisible after replay
Reported by: | elexis | Owned by: | JoshuaJB |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 19 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description
Reproduce:
- Replay any commands.txt
- Wait for it to finish
- After being asked if you want to exit, click no
Notice all buildings and units have become invisible.
This issue has become visible after r17159 but is in fact caused by the visual replay function executing one turn too much, i.e. a turn that doesn't actually exist in the replay.
Since the turn doesn't exist, m_TurnLength
of that turn will be zero in the NetTurnManager
, cauing m_DeltaSimTime
to be zero too.
See also #3527.
This issue is easy to fix, but the more important question to me seems:
Why do buildings and trees disappear then?
It seems this is caused by the call to CSimulation2Impl::Interpolate
.
Those things should not be interpolated, as their position never changes (performance issue). (Can be done in another ticket).
Attachments (3)
Change History (7)
by , 8 years ago
Attachment: | t3566_correct_finalReplayTurn_v1.patch added |
---|
by , 8 years ago
Attachment: | commands.txt added |
---|
by , 8 years ago
Attachment: | t3566_correct_finalReplayTurn_v1.1.patch added |
---|
Fail, thx for noticing Stan.
comment:4 by , 8 years ago
Keywords: | patch removed |
---|
The patch was good and fixed the issue, but it exposed another bug in the replay logic. At the end of reading the commands file, the normal simulation logic takes over and keeps running. This means that eg. the AI keeps expanding, your units keep running under UnitAI, etc. Please create a new ticket to address this issue. The fix should be pretty simple.
Thanks!
Replay with only one turn for fast testing.