summaryrefslogtreecommitdiff
path: root/src/network/network_command.cpp
AgeCommit message (Collapse)Author
2021-02-20Codechange: rename sound ids to make more sense. (#8701)frosch
2021-01-22Change: Apply some consistency to singleplayer related commentsglx22
2021-01-05Change: move "give money" from client-list to company windowPatric Stout
This is a much better location for this button, as you send money from one company to another company, not from player to player. This is based on work done by JGRPP in: https://github.com/JGRennison/OpenTTD-patches/commit/f82054339124cc6b89c5f4f9dac2d9da62f0108b and surrounding commits, which took the work from estys: https://www.tt-forums.net/viewtopic.php?p=1183311#p1183311 We did modify it to fix several bugs and clean up the code while here anyway. The callback was removed, as it meant a modified client could prevent anyone from seeing money was transfered. The message is now generated in the command itself, making that impossible.
2019-12-21Codechange: Replace network related FOR_ALL with range-based for loopsglx
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
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.
2016-05-22(svn r27571) -Codechange: Consistent naming for command callbacks which play ↵frosch
a sound effect.
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2013-09-14(svn r25770) -Fix [Admin]: the frame of a command packet wasn't set for the ↵rubidium
packets that were sent via de admin interface
2012-04-17(svn r24139) -Add: Creating a new vehicle group by drag and drop. (Based on ↵michi_cc
patch by Juanjo)
2012-01-22(svn r23843) -Fix: minor issue with replaying ;)rubidium
2012-01-17(svn r23821) -Fix-ish: when replaying a command log, ignore the command limitrubidium
2011-12-19(svn r23604) -Add: initial support for GameScriptstruebrain
2011-12-19(svn r23603) -Add: support for control commands in strings, in both network ↵truebrain
and safe/load (Rubidium)
2011-12-01(svn r23384) -Remove: no longer allow a binary to be without AI support; the ↵truebrain
parts some compilers failed at, are integrated in other parts of the code now too
2011-08-26(svn r22845) -Fix [FS#4745]: perform stricter checks on some commands (monoid)rubidium
2011-05-02(svn r22410) -Document: some more bits ;)rubidium
2011-02-20(svn r22123) -Fix [FS#4522]: CommandQueue::Pop() did not update 'last'; ↵frosch
popping the last item caused the queue to disconnect unless there was only one item.
2011-02-20(svn r22121) -Fix: In case of high frame_freq one could get commands ↵rubidium
executed after a new network game was started
2011-01-22(svn r21890) -Cleanup: remove some unneeded includesrubidium
2010-12-30(svn r21668) -Feature: command logging using the admin interface (dihedral)rubidium
2010-12-07(svn r21429) -Fix [FS#3771]: the server didn't check for the paused state ↵rubidium
when allowing to execute commands
2010-11-30(svn r21358) -Codechange: make some network function names conform to coding ↵rubidium
style
2010-10-24(svn r21030) -Codechange: move ClientStatus into the network server socket classrubidium
2010-10-15(svn r20935) -Codechange: only let the server side use a pool of connected ↵rubidium
sockets
2010-10-15(svn r20925) -Codechange: make the client send commands have a slightly more ↵rubidium
sensible name
2010-08-19(svn r20553) -Feature: allow rate limiting of incoming commandsrubidium
2010-08-18(svn r20549) -Codechange: centralise the handling of the incoming commands ↵rubidium
(from clients and the server)
2010-08-18(svn r20548) -Codechange: rename some variables giving them slightly more ↵rubidium
meaningful names
2010-08-15(svn r20510) -Codechange: unify packet queue handling and make insertion ↵rubidium
O(1) instead of O(n)
2010-07-31(svn r20269) -Codechange: Use IsLocalCompany() everywhere, document the ↵alberth
function and two company globals.
2010-06-29(svn r20035) -Fix [FS#3909]: under some circumstances you could get into an ↵rubidium
infinite loop
2010-06-05(svn r19933) -Fix [FS#3804]: Keep _current_company and _local_company in ↵frosch
sync during GUI operation.
2010-04-24(svn r19714) -Feature: ctrl+click on a vehicle to start/stop itsmatz
2010-04-13(svn r19620) -Fix: desync when a command is received and in the queue while ↵rubidium
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).
2010-03-14(svn r19423) -Codechange: Move error message reporting of industry build in ↵alberth
SE to a callback.
2010-02-24(svn r19227) -Codechange: Reorganization of parameters at CmdBuildRoadStop.terkhen
2010-02-10(svn r19081) -Codechange: make it possible to disable compilation of the ↵rubidium
AI+Squirrel
2010-01-15(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, ↵rubidium
if a header require a header make it include that header
2010-01-11(svn r18784) -Codechange: make NetworkSend_Command accept a company instead ↵rubidium
of using _local_company to pass that information, with the whole mess when you don't want the company to be _local_company.
2010-01-11(svn r18782) -Codechange: move the content of callback_table.cpp to ↵rubidium
network_command.cpp; it's only ever used there.
2009-10-04(svn r17693) -Cleanup: remove some unneeded includesrubidium
2009-08-21(svn r17248) -Fix: add GPL license notice where appropriaterubidium
2009-05-10(svn r16269) -Codechange: use gcc's ability to check parameters sent to ↵smatz
printf-like functions -Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
2009-01-31(svn r15299) -Cleanup: remove many redundant includessmatz
2009-01-08(svn r14916) -Codechange: make it possible to send CommandContainers ↵rubidium
directly to DoCommand(P).
2009-01-08(svn r14915) -Codechange: unify the receiving and sending of commands, and ↵rubidium
thus unifying most of the validity checking too.
2009-01-08(svn r14914) -Documentation: Correct doxygen comment for file name. ↵belugas
<nitpicked> by Swallow
2009-01-08(svn r14910) -Codechange: merge the command queue handling into a single ↵rubidium
location