A while ago a friend of mine started to re-format parts of the ioquake3 code a bit, to enhance readability. There is one file in the game code that is really very badly formatted (lot of missing brackets, no new lines, whitespace etc.)
There are two places inside bg_lib.c where we can’t really understand how to read them because of missing brackets.
It’s from line 1815 to 1827
and from line 1940 to 1947
Can some developer/programmer please tell us how those specific lines of code are working? Where would be brackets like ‘{’ and ‘}’?
In other words if you have a look at the specific parts of code, where is it meant to be an ‘else if’ and where is an ‘else’ and ‘if’?
Here is where a friend of mine did it: https://github.com/ioid3-games/ioid3-q3/blob/master/code/game/bg_lib.c#L2025 respectively https://github.com/ioid3-games/ioid3-q3/blob/master/code/game/bg_lib.c#L2164
Unfortunately I think he did it wrong. Both of us aren’t programmers, so maybe I am wrong.
Well, I know this is a somehow weird/useless question but nevertheless any help would be appreciated!
Thanks in advance!