summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-30Change: use TCP for everything except for master-server and initial server ↵Patric Stout
scan (#9130) This means that pressing Refresh button and adding servers manually now uses TCP. The master-server and initial scan are still UDP as they will be replaced by Game Coordinator; no need to change this now. If we query a server that is too old, show a proper warning to the user informing him the server is too old.
2021-04-29Fix: String validation could leave invalid Utf8 encoded strings (#9096)rubidium42
In case a character was encoded in multiple bytes, but required fewer bytes to be encoded, the first byte would be copied to the output leaving an invalid Utf8 encoded string. Later uses of the validated string would use the same decode logic, which would yield a question mark and just read a single byte, so nothing dangerous happened. Furthermore, because the next byte would not be a first byte of an encoded Utf8 character, the last few valid characters could be removed by the validation as well.
2021-04-29Cleanup: Remove old FiosList helper methods. (#9139)PeterN
2021-04-29Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loopsglx22
2021-04-29Codechange: Replace window related FOR_ALL with range-based for loopsglx22
2021-04-29Change: [Network] Encapsulate logic about the connection string to the ↵rubidium42
network code (#23)
2021-04-29Codechange: use NetworkAddress instead of two host/port variables where possiblePatric Stout
This also means we no longer need last_host/last_port, but can just use a single last_joined setting.
2021-04-29Codechange: use std::string over stack-based strings if possiblePatric Stout
2021-04-29Cleanup: remove write-only variable "hostname" in NetworkGameListPatric Stout
2021-04-29Fix: 'Cache' top and bottom lines of textfile viewer to avoid overdraw. (#9131)PeterN
* Fix: 'Cache' top and bottom lines of textfile viewer to avoid overdraw. The text file viewer calculated the number of lines required to set the scrollbar, but did not retain this information, so this was recalculated on every draw operation. This includes overdrawing text outside the bounds of the current scroll position. With this change the top and bottom lines for each line of text are remembered, and reflowing is avoided where possible. Text outside the current scroll bounds is not drawn. Additionally the scroll interval is now based on text lines instead of pixel lines, which increases the text capacity depending on the font size. * Fix: Limit text viewer to showing 64k lines. Text files with more than 64k wrapped lines would exceed the scrollbar capacity and cause an assert. This is harder to reach now that the scrollbar counts lines instead of pixels.
2021-04-29Update: Translations from eintstranslators
norwegian (bokmal): 16 changes by Anolitt finnish: 2 changes by hpiirai
2021-04-29Fix: [MinGW] Set minimum OS version to Windows XP (#9135)Loïc Guilloux
2021-04-28Cleanup: Replace FOR_ALL_SORTED_CARGOSPECS macro with range iterator.Peter Nelson
2021-04-28Cleanup: Replace FOR_ALL_SORTED_ROADTYPES macro with range iterator.Peter Nelson
2021-04-28Cleanup: Replace FOR_ALL_SORTED_RAILTYPES macro with range iterator.Peter Nelson
2021-04-28Fix: Incorrect vertical alignment of icon and text in DropDownListIconItem. ↵PeterN
(#9133) This happens if the bounding dimensions are changed so that each item is the same size, as happens on the railtype/roadtype dropdown lists, as the vertical offset was calculated before this dimension is changed.
2021-04-28Fix b3003dd1: swap SERVER_GAME_INFO with CLIENT_GAME_INFO (#9129)Patric Stout
The idea is that if you query an older server that does not support this packet yet, the client receives an error. The assumption was that on every "illegal packet" the connection would be closed. This turns out to be false. Now CLIENT_GAME_INFO aligns with the old PACKET_CLIENT_NEWGRFS_CHECKED, which does a pre-check (which fails), and an error is sent back and the connection is closed. This is not a nice solution, but it is the best we got.
2021-04-28Codechange: Use __attribute__ access none to silence GCC 11 ↵Milek7
-Wmaybe-uninitialized warnings (#9124)
2021-04-28Update: Translations from eintstranslators
spanish (mexican): 40 changes by absay english (us): 1 change by 2TallTyler korean: 3 changes by telk5093 german: 1 change by danidoedel finnish: 1 change by hpiirai catalan: 1 change by J0anJosep portuguese: 45 changes by azulcosta portuguese (brazilian): 44 changes by Vimerum
2021-04-27Fix: missing <limits> include in network/core/packet.h (#9123)Milek7
2021-04-27Change: no longer use UDP when entering the lobby of a serverPatric Stout
The lobby of a server requested some parts via UDP and some via TCP. This is strictly seen fine, but for future extensions it is a lot easier if just one protocol is used.
2021-04-27Codechange: refactor CheckGameCompatibility() from existing functionPatric Stout
Later commits use this function in other places too.
2021-04-27Add: ability to retrieve game info from server over TCPPatric Stout
2021-04-27Codechange: be explicit in pointer comparisonsPatric Stout
2021-04-27Codechange: move all NetworkGameInfo related functions to a single filePatric Stout
It currently was a bit scattered over the place. Part of NetworkGameInfo is also the GRF Identifiers that goes with it.
2021-04-27Change: [Network] lower TCP connect() timeout to 3s (#9112)Patric Stout
Currently we use default OS timeout for TCP connections, which is around 30s. 99% of the users will never notice this, but there are a few cases where this is an issue: - If you have a broken IPv6 connection, using Content Service is first tried over IPv6. Only after 30s it times out and tries IPv4. Nobody is waiting for that 30s. - Upcoming STUN support has several methods of establishing a connection between client and server. This requires feedback from connect() to know if any method worked (they have to be tried one by one). With 30s, this would take a very long time. What is good to mention, is that there is no good value here. Any value will have edge-cases where the experience is suboptimal. But with 3s we support most of the stable connections, and if it fails, the user can just retry. On the other side of the spectrum, with 30s, it means the user has no possibility to use the service. So worst case we annoy a few users with them having the retry vs annoying a few users which have no means of resolving the situation.
2021-04-27Cleanup: remove #ifdefs for compiling the old content serverrubidium42
2021-04-27Update: Translations from eintstranslators
japanese: 26 changes by scabtert catalan: 43 changes by J0anJosep
2021-04-27Fix: truncating strings in settings could leave invalid Utf8 charactersrubidium42
2021-04-27Codechange: writing and string validation to its own functionsrubidium42
2021-04-27Feature: allow non-ASCII currency separatorsrubidium42
2021-04-27Change: [Network] Safeguard from using errno/strerror for handling network ↵rubidium42
errors They are likely not working as expected on Windows, so prevent their usage. Winsock does not set errno and strerror does not return anything useful for Winsock error numbers.
2021-04-27Codechange: [Network] Do not leak os_abstraction.h via base_media_func.hrubidium42
2021-04-27Codechange: [Network] Do not leak os_abstraction.h via fios.hrubidium42
2021-04-27Codechange: [Network] Do not leak os_abstraction.h via network_funcrubidium42
2021-04-27Change: [Network] Use string error messages instead of numeric error numbers ↵rubidium42
that need to be looked up
2021-04-27Fix: [Network] errno and strerror do not handle network errors on Windowsrubidium42
2021-04-27Fix: [NewGRF] Errors with severity ERROR also display a pop-up window (#9119)Chris
2021-04-26Update: Translations from eintstranslators
english (us): 39 changes by 2TallTyler korean: 44 changes by telk5093 german: 43 changes by danidoedel russian: 7 changes by Ln-Wolf finnish: 39 changes by hpiirai
2021-04-26Fix 8a95fee4: Missing initialiser in Packet constructorCharles Pigott
2021-04-25Change: [Network] Remove now defunct savegame transfer packet limiterrubidium42
2021-04-25Change: use 32 KiB packets to send requests to the content serverRubidium
2021-04-25Change: use 32 KiB packets to transfer the savegameRubidium
2021-04-25Codechange: differentiate between UDP, TCP and compatibility MTU valuesRubidium
2021-04-25Codechange: allow different limits in packet sizesRubidium
2021-04-25Fix #9109: Malformed STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD in Japanese lang ↵Charles Pigott
(#9110)
2021-04-25Fix: Count engine details text in lines rather than pixels. (#9107)PeterN
This allows the details panel to scale correctly for different zoom levels.
2021-04-25Change: [Actions] Reword bug/crash report instructions (#9104)Tyler Trahan
2021-04-25Update: Translations from eintstranslators
norwegian (bokmal): 4 changes by Anolitt spanish (mexican): 3 changes by absay japanese: 60 changes by scabtert, 38 changes by Azusa257 english (us): 3 changes by 2TallTyler korean: 3 changes by telk5093 russian: 4 changes by Ln-Wolf finnish: 3 changes by hpiirai slovak: 20 changes by FuryPapaya
2021-04-25Fix: [Network] Prevent stalling save game transfer when compression is slowrubidium42