Jonathan G Rennison
8a0821c96e
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/network/core/game_info.h
# src/network/core/udp.cpp
# src/network/core/udp.h
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_internal.h
# src/network/network_udp.cpp
3 years ago
Jonathan G Rennison
fda17d25de
Send back a message for rcon and settings_access failures
3 years ago
Jonathan G Rennison
d23720cc60
Fix server crash when client joined during threaded (auto)save
3 years ago
Andreas Schmitt
e1214a6d8b
Fix some type conversion warnings
3 years ago
Jonathan G Rennison
6d58115458
Net: Log sent and received game packets with type and status names
3 years ago
Jonathan G Rennison
7677d2d01a
Fix mishandling of PACKET_SERVER_MAP_BEGIN queuing at server
...
This could result in broken packet framing in the TCP stream
3 years ago
Jonathan G Rennison
f3e0507c54
Network: Include extra info in PACKET_CLIENT_ERROR packets
...
Log more details in server when PACKET_CLIENT_ERROR received
3 years ago
Jonathan G Rennison
e04218b528
Network: Log received packets at log level net=3
3 years ago
William Davis
879de9781b
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
...
(cherry picked from commit 881e1da51d
)
3 years ago
Patric Stout
b3003dd163
Add: ability to retrieve game info from server over TCP
3 years ago
Patric Stout
cb2ef1ea4b
Codechange: move all NetworkGameInfo related functions to a single file
...
It currently was a bit scattered over the place. Part of
NetworkGameInfo is also the GRF Identifiers that goes with it.
3 years ago
Jonathan G Rennison
8eb27e1ac7
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/lang/japanese.txt
# src/network/core/config.h
# src/network/core/packet.cpp
# src/network/core/tcp.cpp
# src/network/network_content.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/toolbar_gui.cpp
# src/vehicle_gui_base.h
3 years ago
Jonathan G Rennison
66fda55ec4
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/network/core/packet.cpp
# src/network/core/packet.h
# src/network/core/tcp.cpp
# src/network/core/udp.cpp
# src/network/network_server.cpp
# src/network/network_server.h
# src/toolbar_gui.cpp
# src/vehicle_gui_base.h
3 years ago
rubidium42
5afb090082
Change: [Network] Remove now defunct savegame transfer packet limiter
3 years ago
Rubidium
21f58ab437
Change: use 32 KiB packets to transfer the savegame
3 years ago
rubidium42
65818db1f4
Fix: [Network] Prevent stalling save game transfer when compression is slow
3 years ago
Jonathan G Rennison
253772e9af
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# COMPILING.md
# src/console.cpp
# src/console_cmds.cpp
# src/console_internal.h
# src/rev.cpp.in
3 years ago
Jonathan G Rennison
ba418f9d0d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/simplified_chinese.txt
# src/network/core/tcp_content.cpp
# src/network/core/udp.cpp
# src/network/network_server.cpp
# src/saveload/linkgraph_sl.cpp
# src/table/gameopt_settings.ini
3 years ago
Patric Stout
ff708c2c65
Add: admin menu for companies in multiplayer games
...
You can now easily do:
- a password reset (unlock)
- remove an empty company (reset company)
3 years ago
Patric Stout
5266359424
Feature: rework in-game Online Players GUI
...
The GUI now more clearly shows some basic information about the
server you joined, your client name (and the ability to change it),
and what players are in which company.
It also contains useful buttons to press to join companies, chat
with other people, and for admins to kick/ban people.
Additionally, renamed "advertised" to "visibility"; this has to
do with future additions, but also because it is more clear in
wording.
3 years ago
Rubidium
450178d780
Codechange: add accessor for the packet type to Packet and make the internal state of Packet private
3 years ago
Rubidium
3abefdf561
Codechange: remove public access to the next pointer in Packet
3 years ago
Rubidium
f71fb0f54a
Codechange: encapsulate reading the size of a Packet
3 years ago
Rubidium
6f161f6559
Codechange: encapsulate the logic about how many bytes can be sent from a buffer in to a Packet
3 years ago
rubidium42
e1cebe0ea0
Add: [Network] Validate the client name server side, so no clients with invalid names can actually join
3 years ago
rubidium42
b14f412117
Codechange: [Network] Introduce function to validate the client name
3 years ago
Jonathan G Rennison
0d262e4d9a
Send network client desync log messages to server
3 years ago
Patric Stout
05612d60ae
Remove: "language" field from server/client
...
The original idea was that people could find a server they could
talk in their native language on. This isn't really used in that
way. There are several reasons for removing this:
- the client also sends his "language" to the server, but nothing
is doing anything with this.
- flags are a bad way to represent languages, and over the years
we had several (rightfully) complaints about this.
- most servers have their language set to "All", and prefix the
servername with the language it is about. This is a much more
efficient way to do the same.
All in all, this feature should go back to the drawing board.
Maybe it could work in another form, but this form is not it.
3 years ago
Jonathan G Rennison
825867f2c5
Fix: [Network] State conditions for sending client info/quit packets ( #8959 )
...
Use status >= STATUS_AUTHORIZED as the state criteria for all cases
where updates about other clients are sent.
This avoids the case where a client is informed that another client
has joined but not informed when it later quits, resulting in
stale entries in the client list window.
4 years ago
Jonathan G Rennison
76624e6f58
Server: Fix client state conditions for sending client info/quit packets
4 years ago
Jonathan G Rennison
4361a6dbf4
Avoid undefined behaviour const_casting std::string c_str()
...
Use non-const data() instead
See: #224
4 years ago
Jonathan G Rennison
f4e29071be
Merge tag '1.11.0-beta2' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/release.yml
# CMakeLists.txt
# src/blitter/32bpp_optimized.cpp
# src/debug.cpp
# src/gfx.cpp
# src/gfx_func.h
# src/lang/czech.txt
# src/lang/english.txt
# src/lang/italian.txt
# src/lang/swedish.txt
# src/lang/ukrainian.txt
# src/network/network_server.cpp
# src/os/windows/crashlog_win.cpp
# src/os/windows/win32.cpp
# src/pathfinder/follow_track.hpp
# src/screenshot.cpp
# src/settings_type.h
# src/spritecache.cpp
# src/vehicle_gui.cpp
# src/video/sdl2_v.cpp
# src/video/video_driver.cpp
# src/video/video_driver.hpp
# src/video/win32_v.cpp
4 years ago
Jonathan G Rennison
c2ae7580e0
Zstd: Use zstd for network joins if supported at both ends
...
See also: https://github.com/OpenTTD/OpenTTD/pull/8773
4 years ago
Patric Stout
d4f208d9c1
Codechange: [Network] replace _realtime_tick with std::chrono
...
(cherry picked from commit 53c28a8ec9
)
4 years ago
Patric Stout
c13c201f72
Fix: [Network] don't show "server doesn't respond" while in queue
...
Send all clients in the queue every game-day a packet that they
are still in the queue.
(cherry picked from commit 13889b6554
)
# Conflicts:
# src/network/network_server.cpp
4 years ago
Patric Stout
7da90af2f4
Fix: [Network] send map to next client if current client disconnects
...
Also terminate creating of the savegame, as the client is gone,
there really is no need for that anymore.
(cherry picked from commit 8d199b1bbc
)
4 years ago
Patric Stout
cfa1612766
Fix: [Network] also count the person downloading the map in the queue
...
Strictly seen, there are "N" people -waiting- in front of you
in the queue, but it is nicer to show "N + 1" for the person that
is currently downloading the map. Avoids it showing:
"0 clients in front of you". That just feels a bit off.
(cherry picked from commit 3677418225
)
4 years ago
Patric Stout
13889b6554
Fix: [Network] don't show "server doesn't respond" while in queue
...
Send all clients in the queue every game-day a packet that they
are still in the queue.
4 years ago
Patric Stout
8d199b1bbc
Fix: [Network] send map to next client if current client disconnects
...
Also terminate creating of the savegame, as the client is gone,
there really is no need for that anymore.
4 years ago
Patric Stout
3677418225
Fix: [Network] also count the person downloading the map in the queue
...
Strictly seen, there are "N" people -waiting- in front of you
in the queue, but it is nicer to show "N + 1" for the person that
is currently downloading the map. Avoids it showing:
"0 clients in front of you". That just feels a bit off.
4 years ago
Pavel Stupnikov
4fd2eecb8b
Change: Improve console warnings on invalid network commands ( #8753 )
4 years ago
Patric Stout
53c28a8ec9
Codechange: [Network] replace _realtime_tick with std::chrono
4 years ago
Patric Stout
d068d61f3c
Fix bddfcaef: don't tell twice that a client left because of a timeout etc ( #8746 )
...
SendError() notifies all clients of the disconnect. This calls
CloseConnection() at the end, which also notified the clients
of the disconnect. Really no need to do it twice.
The status NETWORK_RECV_STATUS_SERVER_ERROR is only set by
SendError(), so in case that is the status, don't let
ClientConnection() send another notification.
4 years ago
Jonathan G Rennison
b7ddd486cf
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/aircraft_cmd.cpp
# src/blitter/32bpp_anim.cpp
# src/cargopacket.cpp
# src/cheat_gui.cpp
# src/company_cmd.cpp
# src/company_gui.cpp
# src/core/pool_func.hpp
# src/date.cpp
# src/economy.cpp
# src/error_gui.cpp
# src/ground_vehicle.cpp
# src/ground_vehicle.hpp
# src/group_gui.cpp
# src/industry_cmd.cpp
# src/lang/dutch.txt
# src/lang/french.txt
# src/lang/german.txt
# src/linkgraph/linkgraph_gui.cpp
# src/linkgraph/mcf.cpp
# src/network/network_content.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/newgrf_engine.cpp
# src/newgrf_station.cpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/pathfinder/follow_track.hpp
# src/pathfinder/yapf/yapf_common.hpp
# src/saveload/saveload.cpp
# src/settings_gui.cpp
# src/station_cmd.cpp
# src/station_kdtree.h
# src/string_func.h
# src/table/settings.ini
# src/tgp.cpp
# src/timetable_cmd.cpp
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/train_gui.cpp
# src/tree_gui.cpp
# src/tunnelbridge_cmd.cpp
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/video/sdl2_v.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
# src/viewport.cpp
# src/viewport_sprite_sorter_sse4.cpp
# src/window.cpp
4 years ago
Jonathan G Rennison
6c3e5642f8
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/crashlog.cpp
# src/fileio.cpp
# src/fileio_func.h
# src/fios_gui.cpp
# src/ini_load.cpp
# src/ini_type.h
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/network/network_client.cpp
# src/order_base.h
# src/order_cmd.cpp
# src/os/windows/win32.cpp
# src/road_cmd.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/settings.cpp
# src/station_cmd.cpp
# src/stdafx.h
# src/table/settings.ini
# src/tree_cmd.cpp
# src/tree_gui.cpp
# src/vehicle_base.h
# src/video/cocoa/cocoa_v.mm
# src/video/cocoa/event.mm
# src/video/cocoa/wnd_quartz.mm
# src/viewport.cpp
# src/widgets/tree_widget.h
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
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
Charles Pigott
860c270c73
Codechange: Replace assert_compile macro with static_assert
4 years ago
Jonathan G Rennison
1f54c8a018
Send vehicle caches to network clients to prevent desyncs due to bad GRFs
4 years ago
Jonathan G Rennison
bbbda0739b
Add third DoCommand parameter p3
4 years ago