Commit Graph
1516 Commits
Author SHA1 Message Date
rubidium42andLoïc Guilloux ff7e8c284a Fix: Update some network documentation to match the new command system (#10657) 2023-06-04 02:13:42 +02:00
Peter Nelsonandrubidium42 4b40e93197 Fix: Network server highlight invisible with RTL layout. 2023-03-31 16:43:32 +02:00
dPandrubidium42 430630e774 Fix: Don't send unused tile field over the network (#10507) 2023-03-31 16:43:32 +02:00
Loïc Guillouxandrubidium42 da9f226f0b Fix #10465: Delay closing of network join progress window (#10466) 2023-03-31 16:43:32 +02:00
RubidiumandMichael Lutz 87d74389fb Fix #10177: company list password padlock showed after switching to single player 2023-01-28 17:10:46 +01:00
PeterNandGitHub 131b7f5127 Fix: Vertically centre chat prompt. (#10250) 2022-12-17 12:22:02 +00:00
dPandGitHub 5e14a20b3b Feature: [GS] Scriptable league tables (#10001) 2022-11-26 18:03:03 +01:00
Peter NelsonandPeterN ecb5393c55 Change: Standardize progress bar layout.
Progress bars are drawn differently depending on when it was added, with
different layouts and sizes.

This change adds a standard padding size to use, and makes all progress
bars visually similar, with scaled padding.
2022-11-12 18:28:39 +00:00
Peter NelsonandPeterN 920e588334 Change: Use standard dimensions instead of custom widths. 2022-11-12 18:28:39 +00:00
Peter NelsonandPeterN 890b2666d3 Change: Use scaled WidgetDimensions. 2022-11-12 18:28:39 +00:00
Peter NelsonandPeterN b6ed595176 Codechange: Prefer suggested widget padding. 2022-11-12 18:28:39 +00:00
Peter NelsonandPeterN dd9f6bc803 Change: Use RectPadding Horizontal()/Vertical() helpers. 2022-11-12 18:28:39 +00:00
Peter NelsonandPeterN 04cbe57d2a Change: Use RectPadding for widget padding/uz_padding. 2022-11-12 18:28:39 +00:00
Peter NelsonandPeterN 6f95e04005 Change: Use Rect helpers for widget drawing.
This replaces repetitive and sometimes unwieldy use of constants.
2022-11-12 18:28:39 +00:00
Rubidiumandrubidium42 d5aafaee15 Codechange: rename and move some strings to make them more consistent with the rest of the strings 2022-11-02 17:58:44 +01:00
Michael LutzandGitHub 35d9cea487 Fix: Too many braces make old gcc sad. (#10116) 2022-11-02 00:53:44 +01:00
froschandMichael Lutz f4e2a462fe Cleanup: Remove unused flag sprites. 2022-10-16 14:56:52 +02:00
Peter NelsonandMichael Lutz dc1b84aa1e Cleanup: Text widgets are capable of drawing text without assistance.
Remove custom text drawing of some widgets in favour of standard text
widgets.
2022-10-16 14:24:51 +02:00
Peter NelsonandMichael Lutz 296af146fb Change: Default widget text colour to black.
TC_FROMSTRING really means blue, and we almost never actually use
blue text.
2022-10-16 14:24:51 +02:00
Peter NelsonandCharles Pigott fa5e2ca276 Cleanup: Tweak panel layout of Online Players window.
This ensures panel borders not hidden behind other widgets.
2022-09-20 07:51:25 +01:00
Peter NelsonandCharles Pigott 8e9ca5ebcb Fix: Online Players list mouse hover behaviour.
Hover highlight was visible even if the mouse pointer was in a different
window, and the window refreshed itself every frame if the mouse pointer
was not over its matrix widget.

Resolved by using OnMouseOver() instead of OnMouseLoop(), and only
redrawing if the hover position has changed.
2022-09-20 07:51:25 +01:00
dPandGitHub 64453cb134 Fix: Incorrect player name in online players window (#10013) 2022-09-12 09:18:41 +01:00
Joel-MilliganandGitHub 3937953f72 Fix #9363: Rebuild client list on reinit event (#9929) 2022-08-30 14:56:19 +02:00
Aaron KatzinandGitHub 148695c571 Fix #9736: Duplicate multiplayer window opens upon canceling password entry (#9842) 2022-04-02 10:37:07 +02:00
Rubidiumandrubidium42 c73f578e8c Codechange: replace magic numbers and C-style arrays with C++-style array for share owners 2022-03-09 18:05:12 +01:00
Michael Lutz b11bd185e3 Fix #9756: Network command unpack proc was not generated in all cases.
The case where the callback proc takes all command results but not any of
the command parameters was not handled properly.
2021-12-20 23:32:23 +01:00
Michael Lutz e67124e174 Change: [Admin] Bump admin port protocol due to command changes.
docs/admin_network.md promised that information in an admin packet
is never removed. It does allow the possibility of using a new packet type
for changed data in combination with a bump of the admin port version.

As the recent command handling changes modified the contents of
ADMIN_PACKET_SERVER_CMD_LOGGING, do exactly that.
2021-12-20 19:30:27 +01:00
Michael Lutz afc3d71fd0 Codechange: Don't generate CommandPacket unpack functions for invalid cmd/callback combinations.
If the arguments of the callback proc don't match with the command parameters,
we can't do the proper command execution anyway. As such, don't even generate
an unpack function in the first place, saving a bit of unnecessary code bloat.

Validate on receive that the cmd/callback combination is supported, rejecting
clients that try to send invalid values.
2021-12-16 22:28:32 +01:00
Michael Lutz 3e85e833a7 Codechange: Add support for additional command result values. 2021-12-16 22:28:32 +01:00
Michael Lutz 8503854655 Codechange: Pass unpacked command arguments to command callbacks (except Script). 2021-12-16 22:28:32 +01:00
Michael Lutz d85348b1d1 Codechange: Template the command callback function type to allow unpacked arguments. 2021-12-16 22:28:32 +01:00
Michael Lutz 13528bfcd0 Codechange: Un-bitstuff all remaining commands. 2021-12-16 22:28:32 +01:00
Michael Lutz 4f3ea3907e Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID). 2021-12-16 22:28:32 +01:00
Michael Lutz ccefa76a46 Codechange: Template DoCommandPInternal. 2021-12-16 22:28:32 +01:00
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.
2021-12-16 22:28:32 +01:00
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.
2021-12-16 22:28:32 +01:00
Michael Lutz 123c7f99c3 Codechange: Move command callback declarations to the cmd header files. 2021-12-16 22:28:32 +01:00
Michael Lutz a38bbefe1b Codechange: Untangle command code, flags and error string for DoCommand*. 2021-12-16 22:28:32 +01:00
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 2021-12-16 22:28:32 +01:00
RubidiumandMichael Lutz ad89601c49 Codechange: do not use all upper case enumerators in a scoped enum 2021-12-05 21:41:43 +01:00
Patric StoutandGitHub ea4f6bb8b2 Fix #9730: [Network] connections can use an invalid socket due to a race condition
A race condition happens when an IPv6 connection takes more than
250ms to report an error, but does return before the IPv4 connection
is established.
In result, an invalid socket might be used for that connection.
2021-12-04 20:56:05 +01:00
Patric StoutandGitHub 9c36c12c85 Codechange: ensure OnConnect() always gets called with a valid socket (#9729)
This should already be the case, but now assert()s will tell us
if this isn't.
2021-12-04 18:32:06 +01:00
Michael Lutz 8c558d74a5 Fix 55a11710: Curly braces need to be double-escaped for (std::)fmt. 2021-11-06 20:21:07 +01:00
dPandGitHub 80e3397f85 Fix 3a1a915: Every 16th client never reconnects after server restart 2021-11-03 21:33:38 +01:00
glx22andCharles Pigott 1c0700e0c0 Fix #9624: compilation with RANDOM_DEBUG 2021-10-19 09:05:00 +01:00
Charles PigottandGitHub 3b7daca832 Change: Don't use 'server address' string in server list when displaying an invite code (#9615) 2021-10-17 18:14:25 +01:00
Patric StoutandGitHub e4ad632989 Add: [Network] Keep the refresh button in lowered state while refreshing (#9600)
This gives user visual feedback that the refresh is still pending, and
prevents people from clicking again and again thinking nothing is
happening. This is especially true for connections that fall back to
TURN, as that takes a few seconds to kick in.

Additionally, prevent clicking on the button again while a refresh
is pending. This is only delaying a successful result.
2021-10-03 11:02:28 +02:00
dPandGitHub 31cf9e888b Add: [Network] external chat messages for remote admins (#9563) 2021-09-19 23:09:06 +02:00
d9f8ed7bdf Add: [Network] On join, log the ClientID + IP + Name clearly (#9558)
Additionally, reword the disconnect to match connect / join messages.

Co-authored-by: Berbe <4251220+Berbe@users.noreply.github.com>
2021-09-19 21:52:46 +01:00
Patric StoutandGitHub a8641ea44a Add: support filtering content entries for patchpacks (#9541)
This changes nothing for us, but allows patchpacks to add the
right pieces of code to start filtering content entries on patchpack
only entries.
2021-09-11 15:34:46 +02:00