Bug Tracker – Full Text Bug Listing

Bug 1297

Summary: Netdemos Record Maps in Odd Increments
Product: Odamex Reporter: HeX_Vulture <mdvulture>
Component: ClientAssignee: Odamex Bug Reporter <odamex-bug-reporter>
Status: NEW ---    
Severity: normal CC: grandpachuck187, odamex-bug-reporter
Priority: P5    
Version: 0.8.x   
Hardware: All   
OS: Other   

Description HeX_Vulture 2019-09-12 22:41:44 UTC
https://www.dropbox.com/s/nubrin6tgicpr5l/Odamex_DUEL_20190912_200422_%5BUD%5DHekksy_DUEL2020OA.WAD_MAP00.odd?dl=0

Not odd as in funny, odd as in odd numbers. The maps are in 1,3,5,7,9,11,13,15,17 in the demo provided. The even numbers in the demo appear to do nothing. Perhaps it has to do with intermission? Or in duel2020's case, lack-there-of?
Comment 1 Dr. Sean 2020-04-12 02:24:32 UTC
*** Bug 1298 has been marked as a duplicate of this bug. ***
Comment 2 Dr. Sean 2020-04-12 02:25:03 UTC
I've got some data on the netdemo issues:
1. netdemo rewinding to prev map is broken in 0.8.0 but works in 0.7.0
2. I don't seem to be able to run most versions between 0.7.0 and 0.8.0 to test exactly where it breaks
3. the netdemostats command shows that duplicate map entries are being added. The first map in the demo will be listed as map 1 in the demo UI, the second map will be listed as map 3, and the third map will be listed as map 5. When you try to rewind to the previous map, demo map index 3 does actually skip to demo map index 2 and then immediately goes to map index 3.
]netdemostats 

/home/sean/.odamex/Odamex_COOP_20200411_174813.odd
============================================
Total time: 100 seconds
Current position: 1 seconds (1%)
Number of maps: 7
> 01 Starting time: 0 seconds
> 02 Starting time: 21 seconds
> 03 Starting time: 21 seconds
> 04 Starting time: 54 seconds
> 05 Starting time: 54 seconds
> 06 Starting time: 82 seconds
> 07 Starting time: 82 seconds

This is a short demo I made.
- map01 is 01
- map02 is 02 and 03
- map03 is 04 and 05
- map04 is 06 and 07
Comment 3 Dr. Sean 2020-04-12 02:31:46 UTC
I observed that NetDemo::writeMapChange() was being called twice for all maps after the first map. This was causing each subsequent map to have duplicate entries in the netdemo map table.

The CL_FinishedFullUpdate() method was being called every time a map changed as well as CL_LoadMap(). Both methods ultimately call NetDemo::writeMapChange(). Between 0.7.0 and 0.8.0, the server behavior changed to send svc_fullupdatedone upon every map change. This behavior likely changed in this commit: https://github.com/odamex/odamex/commit/5f8765095a8d8f054d1e18780f9b073b227e6577#diff-d2f054fbe4f6ba4dd17e8a7deaf2c091