Jonathan G Rennison
674732cd68
Merge: Codechange: Use null pointer literal instead of the NULL macro
6 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
Jonathan G Rennison
f887b12be2
Add 3rd party mingw-std-threads headers to fix MinGW compilation
6 years ago
Jonathan G Rennison
361758b516
Merge branches 'crashlog_improvements', 'save_ext' into jgrpp
...
# Conflicts:
# Makefile.src.in
# projects/openttd_vs140.vcxproj
# projects/openttd_vs140.vcxproj.filters
# projects/openttd_vs141.vcxproj
# projects/openttd_vs141.vcxproj.filters
# projects/openttd_vs142.vcxproj
# projects/openttd_vs142.vcxproj.filters
# src/core/smallstack_type.hpp
# src/linkgraph/linkgraphjob.cpp
# src/linkgraph/linkgraphjob.h
# src/misc.cpp
# src/network/network_udp.cpp
# src/openttd.cpp
# src/saveload/saveload.cpp
6 years ago
Michael Lutz
05bc2ed7cb
Codechange: Replace custom thread code with C++11 thread objects.
...
We assume a conforming C++11 compiler environment that has a valid <thread>-header.
Failure to run a real thread is handled gracefully.
6 years ago
Michael Lutz
05f4e73608
Codechange: Replace custom mutex code with C++11 mutex'es.
...
A conforming compiler with a valid <mutex>-header is expected.
Most parts of the code assume that locking a mutex will never fail unexpectedly,
which is generally true on all common platforms that don't just pretend to
be C++11. The use of condition variables in driver code is checked.
6 years ago
Jonathan G Rennison
ba34ec7ade
Merge branch 'master' into jgrpp
...
Replace build and refit, and group collapse implementations
Fix template creation build and refit
# Conflicts:
# Makefile.bundle.in
# config.lib
# src/animated_tile.cpp
# src/blitter/32bpp_anim.hpp
# src/blitter/32bpp_base.hpp
# src/blitter/8bpp_base.hpp
# src/blitter/null.hpp
# src/build_vehicle_gui.cpp
# src/command.cpp
# src/command_func.h
# src/console_gui.cpp
# src/core/smallstack_type.hpp
# src/date.cpp
# src/debug.cpp
# src/genworld_gui.cpp
# src/ground_vehicle.hpp
# src/group_gui.cpp
# src/lang/korean.txt
# src/linkgraph/linkgraph_gui.h
# src/main_gui.cpp
# src/misc_gui.cpp
# src/network/core/game.h
# src/network/core/packet.cpp
# src/network/core/udp.cpp
# src/network/core/udp.h
# src/network/network_content.cpp
# src/network/network_type.h
# src/network/network_udp.cpp
# src/newgrf_house.h
# src/openttd.cpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/os/unix/crashlog_unix.cpp
# src/os/windows/crashlog_win.cpp
# src/osk_gui.cpp
# src/pathfinder/opf/opf_ship.cpp
# src/rail_cmd.cpp
# src/rail_gui.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/smallmap_gui.h
# src/station_base.h
# src/station_cmd.cpp
# src/table/gameopt_settings.ini
# src/table/newgrf_debug_data.h
# src/table/settings.ini
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/train_gui.cpp
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/vehiclelist.cpp
# src/viewport.cpp
# src/widgets/dropdown.cpp
# src/window_gui.h
6 years ago
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
6 years ago
Henry Wilson
bfd79e59dc
Codechange: Replace SmallVector::Clear() with std::vector::clear()
6 years ago
peter1138
07de9d6c3f
Codechange: Use override keyword in networking classes.
6 years ago
Patric Stout
e3c639a09f
Remove: ENABLE_NETWORK switch
...
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.
6 years ago
Niels Martin Hansen
5f8354f358
Change: Make a shortened network revision string for use in server queries
6 years ago
Jonathan G Rennison
a6c5951b2f
Fix flags field not being received in Reply_CLIENT_FIND_SERVER_extended
6 years ago
Jonathan G Rennison
21040dc00b
Implementing sending server GRF info list response in multiple packets
...
Add/adjust GRF info message logging
6 years ago
Jonathan G Rennison
6342099c4d
Allow 256 NewGRFs in multiplayer
...
Add extended network format for server info
Add general UDP packet fragmentation system
Fix map dimensions >= 64k
Increase length of server revision string
Maintain backwards compatibility with trunk for advertisement/server listing
6 years ago
frosch
31f046bd9b
(svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR)
8 years ago
Jonathan G Rennison
a3768d3a29
Label threads with a descriptive name where supported (pthreads).
9 years ago
rubidium
ff5c05c1b4
(svn r27400) -Fix [FS#6368] (r26449): when a dedicated server was paused 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
9 years ago
rubidium
e8788019fa
(svn r27400) -Fix [FS#6368] (r26449): when a dedicated server was paused 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
9 years ago
rubidium
5b82822c12
(svn r26486) -Codechange: replace a number of snprintfs with seprintf
11 years ago
rubidium
6ecc602050
(svn r26486) -Codechange: replace a number of snprintfs with seprintf
11 years ago
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
11 years ago
rubidium
2be4215f43
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
11 years ago
planetmaker
c24374f99c
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
12 years ago
planetmaker
f00d9976f9
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
12 years ago
rubidium
1adb9a5c85
(svn r24070) -Fix [FS#5098]: the 'last joined' server was not properly selected anymore (adf88)
13 years ago
rubidium
5791feadf0
(svn r24070) -Fix [FS#5098]: the 'last joined' server was not properly selected anymore (adf88)
13 years ago
rubidium
d2c643df63
(svn r23754) -Fix (r23752): the locks aren't reentrant
13 years ago
rubidium
1481ae6899
(svn r23754) -Fix (r23752): the locks aren't reentrant
13 years ago
rubidium
c530450193
(svn r23752) -Fix [FS#4938]: missing locking causing crash is extreme case when being in the MP lobby
13 years ago
rubidium
22be2a7f43
(svn r23752) -Fix [FS#4938]: missing locking causing crash is extreme case when being in the MP lobby
13 years ago
rubidium
531e501b5a
(svn r23751) -Codechange: rename NetworkUDPGameLoop to a more descriptive name, and move the UDP specific bits to network_udp
13 years ago
rubidium
f8faaebaf0
(svn r23751) -Codechange: rename NetworkUDPGameLoop to a more descriptive name, and move the UDP specific bits to network_udp
13 years ago
yexo
7a7d9a7b6b
(svn r23494) -Feature: [NewGRF] action14 node INFO->URL_ to add an url
13 years ago
yexo
38102a96b9
(svn r23494) -Feature: [NewGRF] action14 node INFO->URL_ to add an url
13 years ago
rubidium
289133be14
(svn r22695) -Fix [FS#4697]: mark addresses that could not be resolved as 'do not resolve anymore' as well, instead of trying to resolve them each and every time the address is accessed
13 years ago
rubidium
7c9432f94d
(svn r22695) -Fix [FS#4697]: mark addresses that could not be resolved as 'do not resolve anymore' as well, instead of trying to resolve them each and every time the address is accessed
13 years ago
rubidium
944a5cb7aa
(svn r22423) -Document: some network stuff
14 years ago
rubidium
1ef751e855
(svn r22423) -Document: some network stuff
14 years ago
rubidium
536c581923
(svn r22401) -Codechange: replace some defines in the udp code so doxygen can create better documentation
14 years ago
rubidium
8a58e2cd16
(svn r22401) -Codechange: replace some defines in the udp code so doxygen can create better documentation
14 years ago
yexo
93533b603a
(svn r22162) -Fix [FS#4533]: No update of NewGRF window when unknown GRF name becomes available
14 years ago
yexo
d1d3084a82
(svn r22162) -Fix [FS#4533]: No update of NewGRF window when unknown GRF name becomes available
14 years ago
rubidium
71e3562f76
(svn r21463) -Fix [FS#4296] (r21405): when packets are filled their pos and size aren't the same as when they're read. As a check was incorrect.
14 years ago
rubidium
8bcba1000f
(svn r21463) -Fix [FS#4296] (r21405): when packets are filled their pos and size aren't the same as when they're read. As a check was incorrect.
14 years ago
rubidium
378e233023
(svn r21417) -Fix: ofcourse MSVC x64 has something to complain about
14 years ago
rubidium
cd7b7ca9d8
(svn r21417) -Fix: ofcourse MSVC x64 has something to complain about
14 years ago
rubidium
9139a6c858
(svn r21405) -Codechange: prepare sending of company information in the UDP packet for longer company names (in bytes), by truncating the names if needed
14 years ago
rubidium
95934b9f49
(svn r21405) -Codechange: prepare sending of company information in the UDP packet for longer company names (in bytes), by truncating the names if needed
14 years ago
rubidium
b6c2216749
(svn r21358) -Codechange: make some network function names conform to coding style
14 years ago