summaryrefslogtreecommitdiff
path: root/src/network/network_gui.cpp
AgeCommit message (Collapse)Author
2021-07-20Feature: allow the use of TURN to connect client and server togetherPatric Stout
TURN is a last resort, used only if all other methods failed. TURN is a relay approach to connect client and server together, where openttd.org (by default) is the middleman. It is very unlikely either the client or server cannot connect to the STUN server, as they are both already connected to the Game Coordinator. But in the odd case it does fail, estabilishing the connection fails without any further possibility to recover.
2021-07-14Add: inform clients what game-script a server is running (#9441)Patric Stout
Co-authored-by: The Dude <thedude@novapolis.net>
2021-07-11Add: allow setting your server visibility to "invite-only" (#9434)Patric Stout
In this mode you do register to the Game Coordinator, but your server will not show up in the public server listing. You can give your friends the invite code of the server with which they can join.
2021-07-11Feature: join servers based on their invite codePatric Stout
This removes the need to know a server IP to join it. Invite codes are small (~7 characters) indentifiers for servers, which can be exchanged with other players to join the servers.
2021-07-10Add: use Game Coordinator to get latest public server listingPatric Stout
2021-07-10Add: use Game Coordinator to annouce public serversPatric Stout
2021-06-28Add: Show the number of clients and companies in the online players window ↵TELK
(#9376)
2021-06-26Codechange: [Network] Remove overload on NetworkValidateClientNamerubidium42
Rename the zero-parameter NetworkValidateClientName to NetworkValidateOurClientName to make it clearer it is performed on our client name, and to make it a non-overloaded function to aid with the variant being added a few commits later
2021-06-15Fix: you could join an AI company in multiplayer via the GUI (#9369)SamuXarick
2021-06-13Fix #9362: Hover in online players window was slightly too big (#9364)TELK
This causes graphical glitches at the bottom of the window.
2021-05-30Codechange: [Network] Use std::string for server side logic of kicking and ↵rubidium42
banning clients
2021-05-29Codechange: Rename window related DeleteXXX to match new behaviourglx22
2021-05-29Fix f6d5c01: Delay deletion when closing windowsglx22
2021-05-29Codechange: [Network] Use std::string in CommandPacketrubidium42
2021-05-29Fix: [Network] Prevent an empty server name to be set anywhererubidium42
2021-05-29Codechange: split Write_ValidateSetting to get separate functions for making ↵rubidium42
strings valid and writing strings
2021-05-27Cleanup: remove unneeded temporary variables and castsrubidium42
2021-05-27Codechange: just pass the SettingDesc to SetSettingValue and remove ↵rubidium42
distinction between (non)company
2021-05-16Codechange: [Network] Let NetworkCompanyInfo use std::stringrubidium42
2021-05-13Codechange: move client name in settings to std::stringrubidium42
2021-05-13Codechange: move server name/id in settings to std::stringrubidium42
2021-05-13Codechange: move hostnames in settings to std::stringrubidium42
2021-05-13Codechange: move passwords in settings to std::stringrubidium42
2021-05-13Change: further support for std::string in settingsrubidium42
2021-05-11Fix: [Network] don't rebuild the host-list during iterating the list (#9240)Patric Stout
Additionally, only rebuild it when we added a new manual server, as otherwise it is a noop anyway.
2021-05-11Fix: [Network] don't mark the last-joined server as manual (#9239)Patric Stout
2021-05-09Fix: lobby window doesn't close if no connection could be established (#9223)Patric Stout
2021-05-06Codechange: [Network] Use std::string for NetworkGameInforubidium42
2021-05-05Codechange: use connection_string in favour of NetworkAddress (#9197)Patric Stout
We now resolve the connection_string to a NetworkAddress in a much later state. This means there are fewer places constructing a NetworkAddress. The main benefit of this is in later PRs that introduce different types of NetworkAddresses. Storing this in things like NetworkGameList is rather complex, especially as NetworkAddress has to be mutable at all times. Additionally, the NetworkAddress is a complex object to store simple information: how to connect to this server.
2021-05-05Codechange: [Network] Use a single NetworkServerGameInfo object at server ↵rubidium42
side and serialize that for the clients
2021-04-30Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed.Peter Nelson
2021-04-30Change: use TCP for everything except for master-server and initial server ↵Patric Stout
scan (#9130) This means that pressing Refresh button and adding servers manually now uses TCP. The master-server and initial scan are still UDP as they will be replaced by Game Coordinator; no need to change this now. If we query a server that is too old, show a proper warning to the user informing him the server is too old.
2021-04-29Codechange: use NetworkAddress instead of two host/port variables where possiblePatric Stout
This also means we no longer need last_host/last_port, but can just use a single last_joined setting.
2021-04-29Codechange: use std::string over stack-based strings if possiblePatric Stout
2021-04-27Change: no longer use UDP when entering the lobby of a serverPatric Stout
The lobby of a server requested some parts via UDP and some via TCP. This is strictly seen fine, but for future extensions it is a lot easier if just one protocol is used.
2021-04-27Codechange: [Network] Do not leak os_abstraction.h via network_funcrubidium42
2021-04-24Change: use icons to indicate you/host in Online Players GUIPatric Stout
2021-04-24Add: move "New Company" inside the Online Players GUIPatric Stout
2021-04-24Change: track hover position on Online Players GUIPatric Stout
Especially if there are many players online, trying to chat with the right one can be a visual challenge. This can be solved by highlighting the row you are on. This visual cue is often enough for humans to find the right row.
2021-04-24Add: ask for confirmation on admin actions in network gamesPatric Stout
2021-04-24Add: admin menu for companies in multiplayer gamesPatric Stout
You can now easily do: - a password reset (unlock) - remove an empty company (reset company)
2021-04-24Feature: rework in-game Online Players GUIPatric Stout
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.
2021-04-24Feature: [Network] Ensure players fill in a name instead of defaulting to ↵rubidium42
"Player"
2021-04-24Codechange: [Network] Introduce function to validate the client namerubidium42
2021-04-21Codechange: merge duplicated logic to scroll in lists by key into a single ↵Rubidium
function
2021-04-20Remove: "language" field from server/clientPatric Stout
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.
2021-04-20Remove: "map_name" from server announcements / listingPatric Stout
The idea back in the days was nice, but it never resulted in anything useful. Most servers either read "(loaded game)" or "Random Map", neither being useful. It was meant for heightmaps, so you could find a server that was using a specific one .. but there are many things wrong with that idea. Mostly, servers tend to save and load savegames from time to time, after which the original heightmap used was lost. All in all, removing map_name all together is just better.
2021-04-17Fix #9042: Make multiplayer server list height auto-fill window.Peter Nelson
#9042 did not fix all combinations of scaling options. This additional change makes the server list automatically fill available height.
2021-04-16Fix: Sizing of Multiplayer server list incorrect when GUI zoom doesn't match ↵Peter Nelson
Font zoom. The server information panel was scaled by GUI scale, which could result in a panel that is longer than the server list. This height difference is then maintained when the window is resized to fill the screen. Instead, specify the minimum size by number of text lines and (summed total) padding.
2021-03-03Fix #8799: NGameAllowedSorter() is not imposing strict weak ordering ↵Patric Stout
relation (#8801) In other words, it should only (!) return true if A comes for B. This promise was broken for the situation where two values are identical. It would return true in these cases too. This is of course not possible: if two values are identical, neither come before the other. As such, the sorter was not imposing strict weak ordering relations. libstdc++ handled this scenario just fine, but libc++ crashes badly on this, as it allowed comparing of [begin, end] instead of [begin, end). libc++ considered this not a bug (and by specs, they are correct; just this way of crashing is of course a bit harsh): https://bugs.llvm.org/show_bug.cgi?id=47903