Also:
- Since draw distance is used to account for the object's size, have parameters depending on geometry detail correct for it. The minimum switch distance increases slightly with each geometry detail level.
- Clarify what the formula spreading the distances for each LoD level does
- Adjust slightly the auto-LoD multipliers.
Based on the alerts for timed challenges:
- Change the timer color when an elimination is coming shortly
- Play a sound when an elimination is coming shortly
Add all significant changes since the release of 1.4 that will be included for the 1.5 release.
The changelog for 1.4 remains incomplete and will be updated later.
Doing additional checks every frame was wasteful, and this change will also allow to easily adapt this logic to account for an object's size.
Also fix and improve comments
The SFX manager and SFXOpenAL would check if SFXs are enabled before pausing (looping) sound effects, so disabling SFXs in the options would fail to stop looping SFxs.
Furthermore, 'OnSoundEnabledBack' would pause all looping SFXs. This commit checks for the pause status of the World (if applicable) to decide if the looping SFXs should be immediately resumed (networking) or not (real pause).
Also clean some comments and move some code around.
This patch doesn't address sound resuming when going from the pause menu to the options in networked mode, whereas it doesn't in a normal race. This is what caused the bug to trigger in the first place, but it's very minor by itself and the design of the SFX code could have triggered other future issues too.
- It is visually more pleasant to have a low quality model than to have a sudden popping from the high quality one appearing when already close
- This also boosts performance
The latest version was bugged as it removed all standard objects, but removing only objects marked by track-makers removed almost nothing of note, and bugs would sometimes remove normal objects. Fix#5052. Fix#5066. This makes #5063 moot.
- Increase the effect preventing LoD objects from popping at very short distances
- Add comments to all the steps and other clarifications
- Update the multiplier values to be approximately equally spaced geometrically
Same approach as with the options screen: managing all the generic includes needed by all help screens in one place and adding a new standalone 'switchTab function
It makes a lot of sense there too, and it makes the UI settings less crowded. This allows also to put the label as a section title, fixing an overflow that happened with some translations when using the very large font size.
* Use a new file for includes to reduce redundancy between option files
* Remove some unnecessary includes
* Reorder some includes
* Increase spacing in the graphics settings screen
* Increase spacing in the audio settings screen
Use a 'drawTeamScorers' function to reduce code duplication and make it easier to understand what's going on. Some minor clean-up has also been done, but more could be done, especially regarding variables that had to be recreated in the new separate function.
- Remove excessive indentations in race_result_gui.cpp
- Move the bulk of the displayPostRaceInfo function into new functions: displayHighscores, displayLapDifficulty and displayChallengeInfo
- Add comments for the closing braces of functions, for the closing braces of some large code blocks, and explaining some functions
- Increase the Auto-LoD distance on tracks with a low scene complexity (fix#5065)
- Increase the Auto-LoD distance when the old formula gives a too low base distance (small objects). This helps with some of the worst popping issues for comparatively little performance cost.
- Make the LoD distance auto-compute code clearer by moving the settings-related multiplier after the squaring step
- Also fix a couple of unrelated warnings about comparison between signed and unsigned integers
With the existing engine and tracks, when the framerate is rather GPU-limited, the performance cost of increasing LoD distance is minor. It becomes more significant at higher framerates when the CPU can be more of a limiting factor, but it also noticeably enhances the player experience by removing the distracting 'popping' when an object visibly changes shape or appears because of LoD.
- Lowest is changed from 0.75 to 0.8
- Low is reduced to 0.8, just like Lowest. The difference is now only the display of optional geometry objects, but it's a big difference.
- Medium is changed from 1.25 to 1.3
- High is changed from 1.3 to 1.8
- Very high is changed from 1.8 to 2.4
- Ultra is changed from 3.0 to 3.2
- Ensure that optional geometry objects are properly removed. This provides a massive performance boost, at the cost of visuals. Benchmark on graphics 2 with lowest geometry level: bugged has 202 steady FPS, 230 mostly stable FPS, fixed has 427 steady FPS, 495 mostly stable FPS.
- Restrict the removal of objects based on geometry detail to the lowest geometry level. This ignore the different levels of geometry removal that track authors can set for objects, and which was mostly unused: all objects marked for removal at any level are either all removed or all kept.