dP
c73b88ddca
Fix: Don't send unused tile field over the network ( #10507 )
2 years ago
dP
b5bc001d42
Codechange: Swap comments for CommandHelper::Post overloads ( #10454 )
2 years ago
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2 years ago
Michael Lutz
dd93244853
Fix: The first tile in commands received from a client wasn't validated properly.
2 years ago
Michael Lutz
2e39637db2
Codechange: Don't use a global for the 'not enough cash' message.
3 years ago
Michael Lutz
3e85e833a7
Codechange: Add support for additional command result values.
3 years ago
Michael Lutz
8503854655
Codechange: Pass unpacked command arguments to command callbacks (except Script).
3 years ago
Michael Lutz
d85348b1d1
Codechange: Template the command callback function type to allow unpacked arguments.
3 years ago
Michael Lutz
de45a8729c
Codechange: Add DoCommand::Post specialization for commands that take no TileIndex.
...
This adds a new Post overloads that still take a TileIndex which
is used to place any error windows or text effects.
3 years ago
Michael Lutz
4f3ea3907e
Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID).
3 years ago
Michael Lutz
ccefa76a46
Codechange: Template DoCommandPInternal.
3 years ago
Michael Lutz
eab18f06a4
Codechange: Pass additional data as byte stream to command callbacks.
3 years ago
Michael Lutz
0f64ee5ce1
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
e740c24eb7
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
c88b104ec6
Codechange: Use wrapper struct to automatically manage command depth tracking.
3 years ago
Michael Lutz
996b16de70
Codechange: Use lambdas instead of CommandContainer to manage station picker commands.
3 years ago
Michael Lutz
a05fd7aa50
Change: [Network] Transfer command data as serialized byte stream without fixed structure.
...
The data will be transmitted as the length followed by the serialized data. This allows the command
data to be different for every command type in the future.
3 years ago
Michael Lutz
123c7f99c3
Codechange: Move command callback declarations to the cmd header files.
3 years ago
Michael Lutz
33ca4f2b99
Codechange: Let the compile generate the master command table out of templated command traits.
...
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
3 years ago
Michael Lutz
a38bbefe1b
Codechange: Untangle command code, flags and error string for DoCommand*.
3 years ago
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
3 years ago
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
3 years ago
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
3 years ago
frosch
d9b4413bc9
Codechange: rename sound ids to make more sense. ( #8701 )
4 years ago
Patric Stout
62cdadb582
Change: move "give money" from client-list to company window
...
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:
f820543391
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.
4 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
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
frosch
9aa33862a7
(svn r27571) -Codechange: Consistent naming for command callbacks which play a sound effect.
8 years ago
michi_cc
37e321044a
(svn r24139) -Add: Creating a new vehicle group by drag and drop. (Based on patch by Juanjo)
13 years ago
truebrain
12aa5b6a58
(svn r23604) -Add: initial support for GameScripts
13 years ago
truebrain
ae8540f5e0
(svn r23361) -Codechange: move multiplayer DoCommand callback code so other script users can call their own
13 years ago
rubidium
f600429424
(svn r23215) -Codechange: stricter type safety for CommandFlags
13 years ago
rubidium
6c9078fd30
(svn r21844) -Codechange: move documentation towards the code to make it more likely to be updates [a-c].
14 years ago
rubidium
e170b1d83e
(svn r21427) -Add: helper function to determine whether a command may be executed
14 years ago
rubidium
b6c2216749
(svn r21358) -Codechange: make some network function names conform to coding style
14 years ago
smatz
e3c89df398
(svn r19714) -Feature: ctrl+click on a vehicle to start/stop it
15 years ago
rubidium
5c7aaf11ba
(svn r19602) -Codechange: add the name of the command to the desync logs
15 years ago
alberth
05d705e077
(svn r19494) -Codechange: Remove _error_message.
15 years ago
alberth
db1c6b7a81
(svn r19423) -Codechange: Move error message reporting of industry build in SE to a callback.
15 years ago
terkhen
524a10b375
(svn r19227) -Codechange: Reorganization of parameters at CmdBuildRoadStop.
15 years ago
rubidium
4d93b704d9
(svn r18866) -Codechange: remove the CmdFailed(ret)/CmdSucceeded(ret) wrapper functions
15 years ago
rubidium
2365819312
(svn r18785) -Codechange: rewrite/rework DoCommandP in order to simplify it, reduce duplication and remove gotos.
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
2b97f38cd1
(svn r18781) -Codechange: pass the CommandCost to the callback instead of whether it succeeded or not.
...
-Fix: AIs did update their last cost incorrectly in network games if the cost of the DC_EXEC phase differed from the ~DC_EXEC phase.
15 years ago
rubidium
833c6f36f3
(svn r18779) -Codechange: merge the command callbacks of the primary vehicles; they are identical
15 years ago
rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
rubidium
d846eef0b6
(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.
16 years ago
Yexo
db3ee34b44
(svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map.
16 years ago
frosch
508fc29221
(svn r15014) -Codechange: Add a helper function to get the needed DC_xxx flags from the result of GetCommandFlags().
16 years ago