Use let instead of var.
Do not redeclare timeToTarget and cmpTimer.
Remove unused variable graphicalPosition.
Fix some whitespace issues.
This was SVN commit r17507.
Remove all remaining variables referencing GUI objects in
updateGUIObjects.
Do more simple checks and insert new calls at more coherent places.
This was SVN commit r17488.
Move GUI updates from loadPersistMatchSettings to updateGUIObjects.
Simplify updateGUIObjects and use setGUIBoolean.
Move SetRankedGame from updateGUIObjects to handleGamesetupMessage.
Early return in handleGamesetupMessage.
This was SVN commit r17485.
Remove duplicate GUI updates which are done in initMapNameList and
updateGUIObjects.
Remove the g_IsInGuiUpdate line as the variable will be overwritten with
the next statement.
This was SVN commit r17484.
Don't copy the label from the dropdownlist, but create it from
g_MapFilters.
Move placeholder items to g_RandomMap and g_RandomCiv.
This was SVN commit r17483.
Remove 4 duplicate GUI updates in updateGUIObjects.
mapSelectionBox is updated in initMapNameList, the other three are done
80 lines below.
Inline finding of the selected map.
This was SVN commit r17482.
Abort in case a client tries to update the gamesettings.
Rename onGameAttributesChange to updateGUIObjects.
Move a check to sendRegisterGameStanza().
This was SVN commit r17481.
Deobfuscate mapfilter code. Remove unneeded, peculiar functions.
Construct g_MapFilters in-place and mark as const.
In initMapNameList, load "all" maps if no mapfilter is specified.
This was SVN commit r17480.
Remove the "sdl1" option from premake4.lua (thanks historic_bruno).
Improve isUnprintableChar indentation, resolve two defines, change SDL*
to SDL2 in premake (thanks leper).
This was SVN commit r17479.
The caption of mapSelectionText (mapname-label visible to clients)
showed "random" instead of a translated "Random".
Move hardcoded "orange" color to a global const.
Simplify loadMapData.
Rename saveGameAttributes() to savePersistMatchSettings().
This was SVN commit r17475.
Use hideControl for playerdropdowns.
Remove some superfluous checks and comments.
Simplify using logical or, math and ternary operator.
This was SVN commit r17472.
Use let in function scope too.
Though spider monkey doesn't support let fully yet, it might be able to
detect some more reference errors in the code with later versions.
For example if a let variable is referenced before being defined
(temporal dead zone).
Besides, it is an easier rule to follow (let in functions, var for
globals) and makes the code more coherent.
This was SVN commit r17471.
The usual suspects:
Move all constants to the top.
Rename all globals to g_Foo.
Use let for all local variables (except in the for-each parts which will
be updated later).
Quote object keys.
Ternary operator.
Fat-arrow functions.
Whitespace issues.
This was SVN commit r17468.
Move some shared color-code to color.js.
Remove shuffleArray() as it's unused since bbc325fb5a.
Add JSdoc comments and use let.
This was SVN commit r17466.
Moves cropping of the mappreview image to a common function
setMapPreviewImage.
Also avoids magic numbers by using the actual formula.
This was SVN commit r17459.
"color" can make use of the sprite's alpha texture, and the "add_color"
effect will now take the original image's alpha into account.
Remove the no longer needed "unaffordableMask" images on a variety of
panels.
Somewhat based on a patch by BoeseRaupe. Fixes#2421 and #3688.
This was SVN commit r17456.
Rename panelsData and teamMiscHelperData to g_Foo.
Use let instead of var everywhere except for globals.
Quote object keys, add some spaces.
This was SVN commit r17455.