From f1a12f3949471b5ca7944aa609d2a8fc72fcbda6 Mon Sep 17 00:00:00 2001 From: barbeque-squared Date: Tue, 31 Dec 2024 13:07:45 +0100 Subject: [PATCH] remove 8 and 12 player options from the player selection screen --- src/base/UIni.pas | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/base/UIni.pas b/src/base/UIni.pas index 207c01661..46894c2fc 100644 --- a/src/base/UIni.pas +++ b/src/base/UIni.pas @@ -77,9 +77,18 @@ TInputDeviceConfig = record LATENCY_AUTODETECT = -1; // for field Latency DEFAULT_RESOLUTION = '800x600'; DEFAULT_THEME = 'Modern'; + // TODO: the menu options only go up to 6, but there are internals that still go up to 12 + // IMaxPlayerCount is untouched because lowering (or raising) it causes very strange behaviour, such as: + // * the game starts in a completely different language than the config specifies + // * the game crashes randomly + // 8 and 12 players have never worked at any point in history + // it all needs refactoring at some point anyway because: + // * a lot of code works with the _index_ of IPlayers (instead of just the number of actual players) + // * it should be possible to play with 5 players [without duplicating a lot of code] + // * there might be a valid usecase for 0 players IMaxPlayerCount = 12; - IPlayers: array[0..6] of UTF8String = ('1', '2', '3', '4', '6', '8', '12'); - IPlayersVals: array[0..6] of integer = ( 1 , 2 , 3 , 4 , 6 , 8 , 12); + IPlayers: array[0..4] of UTF8String = ('1', '2', '3', '4', '6'); + IPlayersVals: array[0..4] of integer = ( 1 , 2 , 3 , 4 , 6 ); type