summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2019-03-26Codechange: Replaced SmallVector::Get() const with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Contains() with std::find() patternHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Find() const with suitable alternativesHenry Wilson
The use of std::none_of in network/core/host.cpp is driven by the non-const comparison operator use by NetworkAddress. A future commit should address the const_casts in that class to ensure const-correctness.
2019-03-26Codechange: Replaced SmallVector::Find() non-const with std::find()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Reset() with std::vector::clear() + ↵Henry Wilson
shrink_to_fit()
2019-03-26Codechange: Replace SmallVector::Length() with std::vector::size()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit()Henry Wilson
2019-03-26Codechange: Replace SmallVector::Clear() with std::vector::clear()Henry Wilson
2019-03-24Codechange: Use override keyword in networking classes.peter1138
2019-03-24Codechange: Use override specifier in Window-derived classes.peter1138
2019-03-24Codechange: Use override specifer for overriding member declarationsHenry Wilson
This is a C++11 feature that allows the compiler to check that a virtual member declaration overrides a base-class member with the same signature. Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked as virtual despite being a template.
2019-03-20Remove: ENABLE_NETWORK switchPatric Stout
This switch has been a pain for years. Often disabling broke compilation, as no developer compiles OpenTTD without, neither do any of our official binaries. Additionaly, it has grown so hugely in our codebase, that it clearly shows that the current solution was a poor one. 350+ instances of "#ifdef ENABLE_NETWORK" were in the code, of which only ~30 in the networking code itself. The rest were all around the code to do the right thing, from GUI to NewGRF. A more proper solution would be to stub all the functions, and make sure the rest of the code can simply assume network is available. This was also partially done, and most variables were correct if networking was disabled. Despite that, often the #ifdefs were still used. With the recent removal of DOS, there is also no platform anymore which we support where networking isn't working out-of-the-box. All in all, it is time to remove the ENABLE_NETWORK switch. No replacement is planned, but if you feel we really need this option, we welcome any Pull Request which implements this in a way that doesn't crawl through the code like this diff shows we used to.
2019-03-07Cleanup: Remove repeated network error message on connection timeout. (#7327)SamuXarick
2019-03-05Fix: warnings when compiling for a recent version of HaikuPatric Stout
This might break older Haiku versions, but it is hard to tell.
2019-03-05Remove: BeOS support (deprecated by Haiku)Patric Stout
In 10 years there is no commit to change how BeOS works, and we have no active maintainer for it. It is unlikely it works in its current state (but not impossible). With the arrival of SDL2 (and removal of SDL), BeOS is no longer support. SDL2 suggests to use Haiku instead of BeOS.
2019-03-05Remove: MorphOS / AmigaOS supportPatric Stout
In 10 years there is no commit to change how MorphOS works, and we have no active maintainer for it. It is unlikely it works in its current state (but not impossible). With the arrival of SDL2 (and removal of SDL), MorphOS is no longer support. There is an SDL2 port for MorphOS, but it is not maintained by upstream SDL2, and nobody can currently test it out. If anyone wants to re-add MorphOS, please do (revert this patch, fix the problems, and create a Pull Request). If you need any help doing so, let us know! It is not that we don't like MorphOS, it is that we don't have anyone fixing the problems :(
2019-03-03Fix #7280: Save in the right location on desync and server timeoutNiels Martin Hansen
2019-02-16Fix: colour of network specific strings in company dropdown menusglx
2019-02-12Fix: Do not mangle tagged revision strings for network revision stringsNiels Martin Hansen
2019-02-12Fix: CompanyEconomy documentationThomas den Hollander
Company income was described as an unsigned integer, but it should be signed.
2019-02-06Fix fdc2e85: Double close of file handlesNiels Martin Hansen
When unpacking downloaded content, the downloaded .gz file was being opened with `fopen`, the OS file handle given to zlib, and then afterwards zlib told to close the file. But the `FILE *` object was never closed with `fclose`, meaning the stdio library would have a hanging file object, whose file handle was now invalid or referred to a different file. This caused asserts during shutdown with Microsoft's C library in debug mode. Fix this by properly duplicating the OS handle and `fclose`ing the `FILE *` object, before giving the handle to zlib.
2019-02-04Add: CompanyCtrlAction enum for CMD_COMPANY_CTRL actionsglx
2019-02-03Change: Make a shortened network revision string for use in server queriesNiels Martin Hansen
2019-02-03Change: Increase NETWORK_REVISION_LENGTH to 33 bytesNiels Martin Hansen
2019-01-28Add: allow opening of one TextfileWindow per typeglx
2019-01-17Codechange: Remove unnecessarily defined functions under MinGWCharles Pigott
2019-01-12Fix #6780: Some windows didn't get updated from OnTick() (#7048)PeterN
2018-12-27Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined ↵glx
macro _WIN32
2018-10-31Doc: Lots and lots of doxymentation fixesCharles Pigott
2018-06-23Feature #986: Automatic save when losing connection to a network gameNiels Martin Hansen
2018-04-30Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation.J0an Josep
2018-04-30Fix: Some spelling errors in printed messagesMatthijs Kooijman
2018-04-29Remove: PSP supportPatric Stout
2017-08-13(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)frosch
2017-03-14(svn r27794) -Fix [FS#6526]: Chat text background overflowed due to missing ↵peter1138
padding.
2017-01-14(svn r27729) -Codechange: Do not count static NewGRF when checking for the ↵frosch
maximum number of NewGRFs in a game. -Codechange: Remove LAST_GRF_SLOT and MAX_NEWGRFS. Now NETWORK_MAX_GRF_COUNT is the only constant to specify the maximum number of non-static NewGRF. -Codechange: Increase the number of file slots, effectively increasing the maximum number of static NewGRF and baseset GRFs.
2016-10-30(svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) ↵frosch
threads. (JGR)
2016-09-04(svn r27653) -Fix(r27647): Rename FileOperation enum and values to ↵alberth
SaveLoadOperation to avoid nameclash with windows compiler toolkit.
2016-09-04(svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and ↵alberth
DetailedFileType.
2016-09-04(svn r27648) -Codechange: Remove remaining _saveload_mode usage.alberth
2016-05-22(svn r27577) -Fix [FS#6386]: Dock and roadstop picker, client list and town ↵frosch
authority window did not auto-resize according to their content when they were positioned at the bottom of the screen. (Eearslya)
2016-05-22(svn r27576) -Fix (r27570): Compilation failure with all compilers but mine.frosch
2016-05-22(svn r27571) -Codechange: Consistent naming for command callbacks which play ↵frosch
a sound effect.
2016-05-22(svn r27570) -Fix [FS#6449]: Various incorrect but uncritical size ↵frosch
computations in the content client.
2015-12-10(svn r27469) -Fix (r27468): Don't fetch all content info from content server ↵zuu
when showing a online content window with exactly one type of content.
2015-12-10(svn r27468) -Fix (r27444): Game Scripts were not displayed in the content ↵zuu
download window when opened from the AI/GS settings window.
2015-11-14(svn r27444) -Add: When viewing online content of a particular type, hide ↵zuu
content of other types unless they have been (auto)selected for download.
2015-11-14(svn r27443) -Fix: Negoation in comment was wrong.zuu
2015-10-30(svn r27421) -Fix [FS#6265]: Consider text and icon sizes when drawing the ↵frosch
client list. (_dp_)
2015-09-19(svn r27400) -Fix [FS#6368] (r26449): when a dedicated server was paused ↵rubidium
with no clients the tick length was increased significantly, making any assumptions about the tick length used further down in the code are not true anymore. One of such assumptions was that one should readvertise every 15 minutes worth of original ticks, but due to the lengthening this timeframe would be more like 45-60 minutes. Now we'll take the operating system's millisecond counter instead