Skip to content

Use if-range checks instead of switch for demo versions

Currently, the act of incrementing DEMOVERSION invalidates previous-version replays in and of itself, unless you manually add the old version number to five switch blocks. This merge request replaces the explicit-value switch checks with ranged-value if checks, making it easier to increment DEMOVERSION without having to keep track of the switch blocks.

(Additionally, cnamelen and use_old_demo_vars variables have been removed, in favour of checking the demo version instead of those variables where applicable, similar to other places that check for old demo versions. This is to make the new if areas slightly neater, compared to adding an extra check next to them to set cnamelen/use_old_demo_vars.)

-

TL;DR: Made demo/replay version maintenance simpler (Only relevant for hardcoders)

Merge request reports

Loading