Commit Graph

152 Commits (75dd135e8d8aeb376d6bf8e2e3f71bb8fd88d4d8)

Author SHA1 Message Date
Jonathan G Rennison 7960db35f2 Merge branch 'master' into jgrpp
# Conflicts:
#	config.lib
#	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/aircraft_cmd.cpp
#	src/base_station_base.h
#	src/core/pool_type.hpp
#	src/disaster_vehicle.cpp
#	src/economy.cpp
#	src/engine.cpp
#	src/group.h
#	src/group_cmd.cpp
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/network/network_command.cpp
#	src/network/network_server.cpp
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/road_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/station_sl.cpp
#	src/saveload/town_sl.cpp
#	src/saveload/vehicle_sl.cpp
#	src/screenshot.cpp
#	src/screenshot.h
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/table/settings.ini
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehiclelist.cpp
#	src/window_type.h
5 years ago
glx 41232f18c1 Codechange: Replace network related FOR_ALL with range-based for loops 5 years ago
Jonathan G Rennison cbdd9f84d8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_gui.cpp
#	src/lang/korean.txt
#	src/video/sdl2_v.cpp
#	src/video/sdl2_v.h
#	src/window.cpp
#	src/window_gui.h
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison 674732cd68 Merge: Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 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
5 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.
5 years ago
Jonathan G Rennison 940314a3c7 Use std::string for CommandContainer text instead of giant static buffer
Use move semantics for CommandContainer instance where feasible
6 years ago
Jonathan G Rennison 24b3424ca3 Merge branch 'template_train_replacement' into jgrpp
# Conflicts:
#	src/economy.cpp
#	src/network/network_command.cpp
#	src/saveload/extended_ver_sl.cpp
8 years ago
Jonathan G Rennison 285ba41699 TBTR: Fix spelling issues in comment and a method name. 8 years ago
Jonathan G Rennison 23a1c07378 Merge branch 'master' into template_train_replacement
Fix Template creation window vehicle drag cursor.
8 years ago
Jonathan G Rennison 09291a3b74 Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_anim.cpp
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
#	src/train_cmd.cpp
#	src/vehicle_base.h
8 years ago
frosch 9aa33862a7 (svn r27571) -Codechange: Consistent naming for command callbacks which play a sound effect. 8 years ago
frosch 14c1a7ad0b (svn r27571) -Codechange: Consistent naming for command callbacks which play a sound effect. 8 years ago
Jonathan G Rennison 580b2f7584 Merge branch 'template_train_replacement-sx' into jgrpp
Remove a duplicated declaration.

# Conflicts:
#	projects/openttd_vs100.vcxproj
#	projects/openttd_vs100.vcxproj.filters
#	projects/openttd_vs140.vcxproj
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs80.vcproj
#	projects/openttd_vs90.vcproj
#	source.list
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/network/network_command.cpp
#	src/saveload/extended_ver_sl.cpp
#	src/saveload/extended_ver_sl.h
#	src/saveload/saveload.cpp
#	src/train_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/window_type.h
8 years ago
Jonathan G Rennison 6be2efc084 Update from KeldorKatarn branch
This approximately corresponds to 971ba4928a5c7c7916fea55d91a3b6dd5bba140c,
excluding the different virtual train build GUI, but including the basic
changes to the original train build GUI for multiplayer to work.

Fixup
8 years ago
patch-import 536a95dfd0 Import combined Enhanced viewport: zoom out, overlays & tooltips (r53_27127) patch
https://www.tt-forums.net/viewtopic.php?f=33&t=53394
9 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 10 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 10 years ago
rubidium 75cf518a7d (svn r25770) -Fix [Admin]: the frame of a command packet wasn't set for the packets that were sent via de admin interface 11 years ago
rubidium 7adc453473 (svn r25770) -Fix [Admin]: the frame of a command packet wasn't set for the packets that were sent via de admin interface 11 years ago
michi_cc 83a0b3cf1d (svn r24139) -Add: Creating a new vehicle group by drag and drop. (Based on patch by Juanjo) 12 years ago
michi_cc 37e321044a (svn r24139) -Add: Creating a new vehicle group by drag and drop. (Based on patch by Juanjo) 12 years ago
rubidium abdd5ebfa7 (svn r23843) -Fix: minor issue with replaying ;) 13 years ago
rubidium b888027ddd (svn r23843) -Fix: minor issue with replaying ;) 13 years ago
rubidium 752474cec3 (svn r23821) -Fix-ish: when replaying a command log, ignore the command limit 13 years ago
rubidium ede8c86f77 (svn r23821) -Fix-ish: when replaying a command log, ignore the command limit 13 years ago
truebrain f66f27d249 (svn r23604) -Add: initial support for GameScripts 13 years ago
truebrain 12aa5b6a58 (svn r23604) -Add: initial support for GameScripts 13 years ago
truebrain 2b381d0765 (svn r23603) -Add: support for control commands in strings, in both network and safe/load (Rubidium) 13 years ago
truebrain 5cda1d7c90 (svn r23603) -Add: support for control commands in strings, in both network and safe/load (Rubidium) 13 years ago
truebrain bf803e40cc (svn r23384) -Remove: no longer allow a binary to be without AI support; the parts some compilers failed at, are integrated in other parts of the code now too 13 years ago
truebrain cc12942d70 (svn r23384) -Remove: no longer allow a binary to be without AI support; the parts some compilers failed at, are integrated in other parts of the code now too 13 years ago
rubidium 8c335b8db6 (svn r22845) -Fix [FS#4745]: perform stricter checks on some commands (monoid) 13 years ago
rubidium 4836a6e50e (svn r22845) -Fix [FS#4745]: perform stricter checks on some commands (monoid) 13 years ago
rubidium eb2197f4c8 (svn r22410) -Document: some more bits ;) 13 years ago
rubidium 4d5dbf5170 (svn r22410) -Document: some more bits ;) 13 years ago
frosch c5fd92a37b (svn r22123) -Fix [FS#4522]: CommandQueue::Pop() did not update 'last'; popping the last item caused the queue to disconnect unless there was only one item. 14 years ago
frosch 77fa68c1da (svn r22123) -Fix [FS#4522]: CommandQueue::Pop() did not update 'last'; popping the last item caused the queue to disconnect unless there was only one item. 14 years ago
rubidium 81643f49e1 (svn r22121) -Fix: In case of high frame_freq one could get commands executed after a new network game was started 14 years ago
rubidium d594a219c6 (svn r22121) -Fix: In case of high frame_freq one could get commands executed after a new network game was started 14 years ago
rubidium 05199a641a (svn r21890) -Cleanup: remove some unneeded includes 14 years ago
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 14 years ago
rubidium 72a4dc53d9 (svn r21668) -Feature: command logging using the admin interface (dihedral) 14 years ago
rubidium 6546561360 (svn r21668) -Feature: command logging using the admin interface (dihedral) 14 years ago
rubidium b469b1dc51 (svn r21429) -Fix [FS#3771]: the server didn't check for the paused state when allowing to execute commands 14 years ago
rubidium 0c23b0b3a4 (svn r21429) -Fix [FS#3771]: the server didn't check for the paused state when allowing to execute commands 14 years ago
rubidium c7066d00af (svn r21358) -Codechange: make some network function names conform to coding style 14 years ago
rubidium b6c2216749 (svn r21358) -Codechange: make some network function names conform to coding style 14 years ago
rubidium 242110b8cb (svn r21030) -Codechange: move ClientStatus into the network server socket class 14 years ago
rubidium f24c91c487 (svn r21030) -Codechange: move ClientStatus into the network server socket class 14 years ago
rubidium 66087c5e60 (svn r20935) -Codechange: only let the server side use a pool of connected sockets 14 years ago
rubidium 9858d699a3 (svn r20935) -Codechange: only let the server side use a pool of connected sockets 14 years ago
rubidium 8f4638ed0f (svn r20925) -Codechange: make the client send commands have a slightly more sensible name 14 years ago
rubidium 515edee17c (svn r20925) -Codechange: make the client send commands have a slightly more sensible name 14 years ago
rubidium 6d3c747d05 (svn r20553) -Feature: allow rate limiting of incoming commands 14 years ago
rubidium a4c6d07edc (svn r20553) -Feature: allow rate limiting of incoming commands 14 years ago
rubidium 8f82b2b588 (svn r20549) -Codechange: centralise the handling of the incoming commands (from clients and the server) 14 years ago
rubidium b594990071 (svn r20549) -Codechange: centralise the handling of the incoming commands (from clients and the server) 14 years ago
rubidium 3ed6ca0aed (svn r20548) -Codechange: rename some variables giving them slightly more meaningful names 14 years ago
rubidium e8e22c99fd (svn r20548) -Codechange: rename some variables giving them slightly more meaningful names 14 years ago
rubidium 6f81fa7215 (svn r20510) -Codechange: unify packet queue handling and make insertion O(1) instead of O(n) 14 years ago
rubidium 1c3d42598e (svn r20510) -Codechange: unify packet queue handling and make insertion O(1) instead of O(n) 14 years ago
alberth 603c33efc1 (svn r20269) -Codechange: Use IsLocalCompany() everywhere, document the function and two company globals. 14 years ago
alberth 7aabb887d4 (svn r20269) -Codechange: Use IsLocalCompany() everywhere, document the function and two company globals. 14 years ago
rubidium 858bd09623 (svn r20035) -Fix [FS#3909]: under some circumstances you could get into an infinite loop 14 years ago
rubidium ed35d62e70 (svn r20035) -Fix [FS#3909]: under some circumstances you could get into an infinite loop 14 years ago
frosch 65d058723e (svn r19933) -Fix [FS#3804]: Keep _current_company and _local_company in sync during GUI operation. 14 years ago
frosch 9e53f1e004 (svn r19933) -Fix [FS#3804]: Keep _current_company and _local_company in sync during GUI operation. 14 years ago
smatz 691261674a (svn r19714) -Feature: ctrl+click on a vehicle to start/stop it 14 years ago
smatz e3c89df398 (svn r19714) -Feature: ctrl+click on a vehicle to start/stop it 14 years ago
rubidium 34cdcaf8b2 (svn r19620) -Fix: desync when a command is received and in the queue while a client starts joining, i.e. save the game state. This can happen in two ways: with frame_freq > 1 a command received in a previous frame might not be executed yet or when a command is received in the same frame as the join but before the savegame is made. In both cases the joining client would not get all commands to get in-sync with the server (and the other clients). 14 years ago
rubidium 088282bcf8 (svn r19620) -Fix: desync when a command is received and in the queue while a client starts joining, i.e. save the game state. This can happen in two ways: with frame_freq > 1 a command received in a previous frame might not be executed yet or when a command is received in the same frame as the join but before the savegame is made. In both cases the joining client would not get all commands to get in-sync with the server (and the other clients). 14 years ago
alberth 68213d25ab (svn r19423) -Codechange: Move error message reporting of industry build in SE to a callback. 14 years ago
alberth db1c6b7a81 (svn r19423) -Codechange: Move error message reporting of industry build in SE to a callback. 14 years ago
terkhen 6ccd15fd08 (svn r19227) -Codechange: Reorganization of parameters at CmdBuildRoadStop. 15 years ago
terkhen 524a10b375 (svn r19227) -Codechange: Reorganization of parameters at CmdBuildRoadStop. 15 years ago
rubidium 1c494c6f71 (svn r19081) -Codechange: make it possible to disable compilation of the AI+Squirrel 15 years ago
rubidium 21bd2722cd (svn r19081) -Codechange: make it possible to disable compilation of the AI+Squirrel 15 years ago
rubidium 9467b7c6d6 (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium 7f1bf45c03 (svn r18784) -Codechange: make NetworkSend_Command accept a company instead of using _local_company to pass that information, with the whole mess when you don't want the company to be _local_company. 15 years ago
rubidium ebe99fd493 (svn r18784) -Codechange: make NetworkSend_Command accept a company instead of using _local_company to pass that information, with the whole mess when you don't want the company to be _local_company. 15 years ago
rubidium 89443276b1 (svn r18782) -Codechange: move the content of callback_table.cpp to network_command.cpp; it's only ever used there. 15 years ago
rubidium 6a047d2316 (svn r18782) -Codechange: move the content of callback_table.cpp to network_command.cpp; it's only ever used there. 15 years ago
rubidium 982b8ee5fc (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
rubidium 99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
smatz ce7dff4acc (svn r16269) -Codechange: use gcc's ability to check parameters sent to printf-like functions
-Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
15 years ago
smatz f5316c5cbd (svn r16269) -Codechange: use gcc's ability to check parameters sent to printf-like functions
-Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
15 years ago
smatz 9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
rubidium 78c43297e2 (svn r14916) -Codechange: make it possible to send CommandContainers directly to DoCommand(P). 16 years ago
rubidium e39484e9a8 (svn r14916) -Codechange: make it possible to send CommandContainers directly to DoCommand(P). 16 years ago
rubidium 0e1127e8b5 (svn r14915) -Codechange: unify the receiving and sending of commands, and thus unifying most of the validity checking too. 16 years ago
rubidium 427e2d30c5 (svn r14915) -Codechange: unify the receiving and sending of commands, and thus unifying most of the validity checking too. 16 years ago
belugas da7da4c1c8 (svn r14914) -Documentation: Correct doxygen comment for file name. <nitpicked> by Swallow 16 years ago
belugas 38bd396f90 (svn r14914) -Documentation: Correct doxygen comment for file name. <nitpicked> by Swallow 16 years ago