Peter Nelson and Peter Nelson
fa1849b855
Codechange: Use std::range::find_if where possible.
2024-11-24 10:36:03 +00:00
Peter Nelson and Peter Nelson
3be0166801
Codechange: Use std::ranges::find where possible.
...
Replace `std::find(range.begin(), range.end(), ...)` with `std::ranges::find(range, ...)`.
2024-11-24 10:36:03 +00:00
Peter Nelson and GitHub
9b6b6d50c3
Fix: Network clients incorrectly truncated all strings to NETWORK_COMPANY_NAME_LENGTH. ( #13102 )
...
This should no longer be necessary since we used std::strings.
2024-11-19 23:44:54 +00:00
Peter Nelson and GitHub
908ee7292b
Codechange: Replace all FILE * with FileHandle RAII class. ( #12718 )
...
This removes the need to manually ensure all files are closed.
2024-09-16 08:45:26 +01:00
Ivan Pravdin and GitHub
da00a62d59
Fix #12856 , e17c82e: Updating network settings does not invalidate data ( #12858 )
2024-07-21 16:59:48 -04:00
Peter Nelson and GitHub
4ee45db51b
Change: [UI] Use scaled sprite sizes and correct matrix padding for content list. ( #12875 )
2024-07-21 14:01:29 +01:00
Peter Nelson and Peter Nelson
ba2b14b075
Change: [UI] Use proper matrix padding for server list test.
...
Text was only positioned correctly at 1x scale due to old pixel-based positioning method.
2024-07-21 10:07:50 +01:00
Peter Nelson and Peter Nelson
d85f4b3ebf
Change: [UI] Use interface scaled sizes for server list.
...
Avoid hardcoded values and use WidgetDimensions to set icon positions.
This fits better with non-power-of-2 interface scale.
2024-07-21 10:07:50 +01:00
Peter Nelson and GitHub
4b6e3f86c2
Cleanup: Remove write-only flag_offset member from server list. ( #12872 )
...
A remnant of language flags, removed from the server list long ago.
2024-07-21 08:18:09 +01:00
Rubidium and rubidium42
4e026e448c
Feature: encrypt admin connection when using secure join
2024-07-01 17:16:55 +02:00
Rubidium and rubidium42
da6900f606
Change: disable the insecure admin login by default
2024-07-01 17:16:55 +02:00
Rubidium and rubidium42
3094b0ce1d
Feature: admin support for password authentication without sending password
...
Using either password authenticated key exchange (PAKE) or authorized keys
2024-07-01 17:16:55 +02:00
Rubidium and rubidium42
b03ae8ad75
Codechange: add Authenticate status to the AdminStatus enum
2024-07-01 17:16:55 +02:00
Rubidium and rubidium42
14200212b7
Codechange: use std::optional<std::string> over char * for text query results
2024-06-29 16:33:16 +02:00
Rubidium and rubidium42
b18d8d6574
Fix: ensure revision mismatch also considers random debugging status
2024-06-15 23:14:45 +02:00
Peter Nelson and GitHub
55314513ce
Codechange: Pass NWidgetParts as span instead of begin/end pointers. ( #12779 )
2024-06-12 23:08:35 +01:00
Peter Nelson and GitHub
4cf6d1dd79
Codechange: Pass WindowDesc by reference instead of pointer. ( #12771 )
...
WindowDesc as passed to Windows is not optional so don't allow to it to be nullptr.
2024-06-11 08:58:03 +01:00
Peter Nelson and GitHub
0f230244fe
Codechange: [UI] Remove redundant SetMinimalSize for WWT_EDITBOX widgets. ( #12733 )
2024-05-30 08:34:26 +01:00
Jonathan G Rennison and rubidium42
b2572c7ca8
Fix #12563 : Race condition setting finish flag in WinHTTP
2024-05-23 19:31:45 +02:00
Rubidium and rubidium42
fea9ffa808
Codechange: also allow removing clients from the company allow lists
2024-05-22 22:20:10 +02:00
Jonathan G Rennison and GitHub
42fc32243d
Fix #12681 : Abstract filetype not set for network client join savegames ( #12701 )
2024-05-22 09:43:01 +01:00
Peter Nelson and GitHub
5442b0dd2d
Fix: Make progress bars obey language direction. ( #12704 )
...
With RTL languages, progress bars should start from the right.
2024-05-21 00:40:08 +01:00
Muxy and rubidium42
486af1a6fc
Fix: [Admin] #12411 Send Network Welcome Packet to admin port after game creation completed
...
WelcomeAll moved into NetworkOnGameStart
Signed-off-by: Muxy <muxy@goulp.net >
2024-05-14 19:24:31 +02:00
Rubidium and rubidium42
f939e81bf0
Fix #12655 , 4f6d75f: inconsistent state in client list and potential crash after client leaves
2024-05-12 07:23:40 +02:00
Rubidium and rubidium42
a313676189
Doc: reason for using ::SendNet over ::Post in few cases
2024-05-09 21:51:26 +02:00
Rubidium and rubidium42
ed888c617b
Codechange: just use ::Post over ::SendNet for creating new companies
2024-05-09 21:51:26 +02:00
Rubidium and rubidium42
849d1fa1b3
Cleanup: remove UI for asking user for company password
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
457d51fc49
Cleanup: remove company password hashing and anything related to it
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
a9318cf653
Cleanup: remove UI for changing the password
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
9dc1fdc385
Cleanup: remove client side password checks when moving to a different company
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
16639939e9
Cleanup: remove command line option for company password
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
ca4bef1504
Cleanup: remove company password related network packets
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
71fc907584
Change: remove company passwords over client allow lists
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
a002803d1c
Remove: autoclean_unprotected settings; all companies will be protected
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
4f3db8eeaf
Feature: authorize specific clients to join network company without password
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
66354ab9eb
Codechange: introduce allow list infrastructure for companies
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
b9c894b717
Fix: for GUI network servers, name the first company the same as any other company
2024-05-05 22:57:50 +02:00
Rubidium and rubidium42
455e202e03
Fix: server's client is shown incorrectly in some cases
2024-05-05 22:57:50 +02:00
Peter Nelson and GitHub
84ebae0bf5
Codechange: Tweak layout of network client list. ( #12624 )
...
Use PIP spacing instead of spacers and more used of standard WidgetDimensions.
2024-05-05 14:57:17 +01:00
Peter Nelson and GitHub
532ce1a907
Codechange: Use Recv/Send_bytes for md5sum. ( #12602 )
...
Use existing functions to handle serialisation of arrays instead of indexed for-loop.
2024-05-01 18:55:54 +01:00
Peter Nelson and Peter Nelson
33aedc43a5
Codechange: Shrink GUIList vectors less often, reserve before use.
...
After sorting and filter lists for GUI, we often shirnk them to reduce size. However this has very little benefit:
1) The memory has already been allocated, so it doesn't prevent that memory being required.
2) It causes a new allocation and copy when the vector is shrunk, actually using more memory.
3) The list is in window state, so the lifetime is only while the window is open.
4) When a filter is clearer, the original size will be needed again, which will cause another allocation.
In fact it is beneficial to reserve to the known maximum in most cases, so do that instead.
2024-04-27 19:25:34 +01:00
Peter Nelson and GitHub
f44d8fa2e4
Codechange: Remove CDECL from filter functions. ( #12578 )
...
These functions are not passed to qsort()...
2024-04-25 22:13:23 +01:00
Peter Nelson and GitHub
5bc9854be2
Codechange: Make sort list function lists safer. ( #12574 )
...
GUIList has a pointer only to the start of each sort/filter func list, which has the potential for UB as it is unable to validate that the selected sort or filter type is in range.
Use a std::span instead and check if the selected type is in range before using it.
2024-04-25 21:00:49 +01:00
Peter Nelson and Peter Nelson
ed2db80990
Codechange: Use map.emplace() instead of map.insert(std::pair).
...
This avoids a copy of the pair into the map.
2024-04-20 10:25:20 +01:00
Peter Nelson and Peter Nelson
16eb17418b
Change: Use aspect ratios for some common widgets.
2024-04-19 22:11:16 +01:00
Peter Nelson and Peter Nelson
d43ff8dc49
Change: Ability to set aspect ratio of a widget.
...
This allows setting the shape of a widget without dealing with absolute pixel sizes.
2024-04-19 22:11:16 +01:00
a28ab8cac2
Codechange: Replace C-style casts to size_t with static_cast. ( #12455 )
...
* Codechange: Replace C-style casts to size_t with static_cast.
This touches only simple value-type casts.
* Codechange: Replace static_cast<size_t>(-1) with SIZE_MAX
Co-authored-by: Rubidium <rubidium@openttd.org >
2024-04-19 20:34:36 +01:00
Patric Stout and GitHub
f7bd080015
Codechange: improve desync documentation ( #12521 )
2024-04-17 20:36:08 +00:00
Patric Stout and GitHub
07b162ffc4
Codechange: skip all commands of the past during desync replay ( #12520 )
2024-04-17 20:05:45 +00:00
Patric Stout and GitHub
a0636d8200
Codechange: use infinite-fast-forward when rerunning command-log ( #12519 )
2024-04-17 20:01:58 +00:00