SITREP Friday 1 March 2019
Hi all,
I have just uploaded a new beta build for our testers. It's 5.1.39.
Changes
- Removed trailing comma from GameRecordFieldType enum. I believe this causes out of sync problems.
- Added assert to confirm returnedFieldType inside GameStateRecord_ReadFieldType()
- Ensured message variable made safe by casting to sprintf_s() inside GameRecorder::RecordOrVerifyState()
- Disabled checksum checking code within ScenMoveEvent-ProcessEventSelf() and ScenRealForce-DetermineFrontageAndDepth()
- Added code to handle cases where there is no order of march or no valid OOM index when determining partialMinute value inside ScenTaskEvent::SetTask()
- Doubled reasonableRange value when determining whether to split a force that's moving in formation - SplitForceByReachabilityAndReasonableRangeFunction:: operator()
- Added HasOrderOfMarch() to ScenForceFormation.h
- Ensured ScenRoute::MustWaitForUnitAhead() handles cases where the subject is already ahead of its unitAhead.
- Added ScenScenario::GetRemainingEffEventCount() to handle mods for different event types
- Added assert to ensure we have a valid inTask within TaskDoctrine::CreateDefendEvent()
Note the main things here are:
- the fixes to the formation movement code that should ensure units wait for their unitAhead. This was seeing mortars and HQs leading the charge.
- fix for the out of sync bug. Essentially I believe this was caused by a trailing comma in an enum used to determine the return field type in the recording. There are three types - nothing, playerAction and checksum. Pavlo cites that the C standard was changed in 1999 to allow for trailing commas in enums. But when I removed the trailing comma, all of a sudden I didn't get out of sync problems. I suspect MS did not fully implement this change in standard. Their compiler doesn't assert when it finds a trailing comma but it probably doesn't ensure that any lookup doesn't overun the enumerator.
- I have to admit that I have only done limited testing over a two day period. But I did manage to run a recording that was for five days of game time in one of the larger BAB scenarios and I have just run a multiplayer test of the tutorial for a day and a half of game time without a hitch. The testers will try and break this using both debug and release versions of the game. Hopefully they won't succeed and we can put this to bed.