summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-12Codechange: make Window destruction not rely on undefined behavior.frosch
2021-05-12Codechange: use IterateFromBack/Front only if the order is important.frosch
Use Iterate if the order does not matter.
2021-05-12Codechange: use iterators instead of 'subranges' when iterating from a ↵frosch
specific window. Using iterators makes it easier to include or exclude the start window in the iteration.
2021-05-12Codechange: remove excessive templating in favour of a single const_cast.frosch
The const_cast will be removed again in a later commit.
2021-05-12Cleanup: remove unneeded labels and gotos.frosch
The window list supports deletion of arbitrary windows, while iterating over it.
2021-05-12Fix #9186: Fix incorrect bounding box height causing station sprite glitch. ↵PeterN
(#9187) Increased height of small station building bounding box to cover the build rather than just the platform.
2021-05-12Update: Translations from eintstranslators
romanian: 38 changes by kneekoo slovak: 19 changes by FuryPapaya catalan: 1 change by J0anJosep turkish: 191 changes by Anceph
2021-05-12Fix #9242: Tree tick handler did not scale by map size. (#9246)PeterN
This means that random tree generation density is higher on small maps and lower on large maps. This difference is enough to make the Lumber Mill impractical to use on large maps. This change skips ticks on maps smaller than 256x256 and increases iterations or shortens the interval on maps larger than 256x256.
2021-05-12Fix #9063: Caption of news window incorrectly aligned. (#9252)PeterN
2021-05-12Change: reworked the debug levels for network facility (#9251)Patric Stout
It now follows very simple rules: 0 - Fatal, user should know about this 1 - Error, but we are recovering 2 - Warning, wrong but okay if you don't know 3 - Info, information you might care about 4 - 5 - Debug #1 - High level debug messages 6 - Debug #2 - Low level debug messages 7 - Trace information
2021-05-12Fix 91b8ce07: dedicated servers could no longer create screenshots (#9232)Patric Stout
Although most commands are not useful on a dedicated server, screenshot commands should be dequeued.
2021-05-12Fix #9202: Invalid test for unset NewGRF override mapping. (#9226)PeterN
2021-05-11Fix: [Actions] Annotations not shown for MSVC (#9247)Loïc Guilloux
2021-05-11Update: Translations from eintstranslators
korean: 1 change by telk5093 slovak: 149 changes by ApplePie420
2021-05-11Fix: [Network] mark server as offline when no longer reachable (#9244)Patric Stout
2021-05-11Fix #9243: [Network] For a dedicated server use a fallback client and server ↵rubidium42
name Also warn when the client or server name has not been set and provide pointers on how to set them
2021-05-11Fix: [Network] don't rebuild the host-list during iterating the list (#9240)Patric Stout
Additionally, only rebuild it when we added a new manual server, as otherwise it is a noop anyway.
2021-05-11Fix: [Network] don't mark the last-joined server as manual (#9239)Patric Stout
2021-05-11Fix: [Network] clients leaving because of broken connections was not ↵Patric Stout
broadcasted (#9238) The code mixed up "client has quit but we already told everyone" with "client lost connection, handle this". Split up those two signals: - CLIENT_QUIT means we told everyone and the connection is now dead - CONNECTION_LIST means we should tell everyone we lost a client
2021-05-10Update: Translations from eintstranslators
german: 2 changes by Wuzzy2
2021-05-10Fix: leaking file descriptorsRubidium
2021-05-10Fix: memory leak due to assigning result of strdup to a std::stringRubidium
2021-05-10Cleanup: [Fluidsynth] Remove fluid_player_joinRubidium
The function fluid_player_join in the library is broken beyond compare for the usecases it was used for (see their #872). It does not wait until it is safe to delete the player, so it is up to the end user to ensure that. For OpenTTD we acquire a lock before fluid_synth_write_s16 and we acquire the same lock in the stop function. So, only one of the functions can be doing its thing, meaning we do not need to wait for the player to be stopped as it cannot be doing anything as we prevent that by the lock.
2021-05-10Add: [Actions] Check CI annotations to detect compile warnings (#9217)Loïc Guilloux
2021-05-10Change: reworded many of the network errors during connect/listen (#9230)Patric Stout
Also changed some levels to 0, as a failing listen() is something we should tell the user about. Hiding this information is a bit evil.
2021-05-09Update: Translations from eintstranslators
finnish: 1 change by hpiirai
2021-05-09Fix: lobby window doesn't close if no connection could be established (#9223)Patric Stout
2021-05-09Fix: [MinGW] Reapply 48fd7b27 to fix launch on Windows 7 x64 (#9225)Loïc Guilloux
2021-05-08Fix: Apply unscaled padding to Viewport inside WWT_INSET. (#9219)PeterN
Since pixel dimensions in SetPadding() are scaled by GUI size, padding for inset viewports was excessive. Instead, automatically apply padding for WWT_INSET at widget level. This applies to all widgets inside a WWT_INSET, which in all instances is a NWID_VIEWPORT.
2021-05-08Fix: only query a manually added server if it isn't there yetPatric Stout
But always mark it as manually, no matter if it was there or not.
2021-05-08Fix: don't do a network disconnect between two queriesPatric Stout
This meant that on opening the Multiplayer window, if you had more than one server configured, it would one by one cancel all pending queries and send a new. Result: only the last server was updated.
2021-05-08Fix: destroying a TCPConnecter that was still resolving made illegal writesPatric Stout
Basically, we should join the resolve thread before we destruct the object.
2021-05-08Codechange: move connection_string to private for TCPConnecterPatric Stout
The most common case never needs access to it anymore. Make the one exception to this explicit. This means the fact that we store it is now an implementation detail.
2021-05-08Fix fdc11a9: Missing sprite count determined on the wrong filerubidium42
2021-05-08Cleanup: remove the old FIO slot functionsRubidium
2021-05-08Codechange: let NewGRF make use of SpriteFile instead of most of the FIO ↵Rubidium
slot functions
2021-05-08Codechange: introduce SpriteFile to be used by the sprite loader instead of ↵Rubidium
the global FIO slot functionality
2021-05-08Codechange: lets music make use of RandomAccessFile instead of the FIO slot ↵Rubidium
functions
2021-05-08Codechange: let NewGRF sounds make use of RandomAccessFile instead of the ↵Rubidium
FIO slot functions
2021-05-08Codechange: use the new RandomAccessFile as backend for the FIO slot functionsRubidium
2021-05-08Add: concept of a RandomAccessFile to replace the FIO slot functionsRubidium
2021-05-08Codechange: Don't save unused NewGRF override mappings. (#9202)PeterN
2021-05-08Change: Use gender-neutral pronouns in console command messages (and ↵William Davis
comments) (#9203)
2021-05-08Fix f7e390bd: getpeername() doesn't work on closed sockets (#9213)Patric Stout
2021-05-08Fix #9209: Excessive time resizing highscore/news window when screen is too ↵PeterN
small. (#9210) If the highscore/news window panel size, which is now scaled by GUI zoom, is larger than the screen size, a loop will be entered where the window is repeatedly resized. This is resolved by removing the minimal size from the panel, as the window is always resized to cover the screen anyway. This means the screen size can never be too small.
2021-05-08Codechange: Slider widget used different range for drawing vs setting.Peter Nelson
Using the same range for setting means that no workaround for setting the extremes is necessary.
2021-05-08Codechange: Make GetCurrentRect() conform to usual Rect bounds, and reuse it.Peter Nelson
Similar code is already repeated in other locations.
2021-05-08Codechange: Don't update window contents if scrollbar position has not moved.Peter Nelson
2021-05-08Codechange: Set specific widgets dirty instead of window.Peter Nelson
2021-05-08Codechange: [Network] Change ChatMessage's message to std::string and ↵rubidium42
simplify some code