Commit graph

13601 commits

Author SHA1 Message Date
def ee35097385 Support 32bit color depth, default to it (fixes #4549) 2021-12-30 01:32:57 +01:00
Dennis Felsing 543aa9df15
Merge pull request #4548 from def-/pr-stop-warning
Don't warn on solo server, where no team ranks should exist
2021-12-29 21:03:40 +01:00
def 0ab7190864 Don't warn on solo server, where no team ranks should exist 2021-12-29 20:36:03 +01:00
Sylvain e9ec025d9c
Fix french typo 2021-12-29 17:57:58 +01:00
bors[bot] f001220e03
Merge #4546
4546: Use power button to quit (fixes #3786) r=edg-l a=def-

<img width="1840" alt="Screenshot 2021-12-29 at 11 16 13" src="https://user-images.githubusercontent.com/2335377/147651881-7363879b-8039-461d-893f-4be2459aa0f9.png">
## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2021-12-29 15:59:20 +00:00
def 11d619e060 Use power button to quit (fixes #3786) 2021-12-29 11:16:41 +01:00
def d7aded177b Revert "Fine tune MySQL timeouts to fail faster"
This reverts commit 541667d00a.
2021-12-29 10:37:19 +01:00
def 18e9faebdb Revert "Skip read requests during shutdown"
This reverts commit ac0c935aa1.
2021-12-29 10:23:46 +01:00
def 77b10ff4cd Revert "Skip over read queries and write into backup database in FailMode"
This reverts commit 8c8b4e5bb4.

Causes database not to work on official servers
2021-12-29 10:16:39 +01:00
bors[bot] 20b49047d4
Merge #4544
4544: Remove compatible version filter r=def- a=heinrich5991

It doesn't do anything right now, all servers advertise a compatible
version.

It might become a compatibility hazard in the future, e.g. DDNet servers
try to advertise a different version string to 0.6 than to 0.7 clients,
because the compatible version filter on 0.6 insists that it starts with
"0.6" and on 0.7 that it starts with "0.7", clearly incompatible.

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-12-28 21:48:09 +00:00
def 3805921b65 Version 15.8.1 2021-12-28 20:14:41 +01:00
heinrich5991 75930ae7ed Remove "Compatible version" string 2021-12-28 15:12:10 +01:00
heinrich5991 228125df4f Remove compatible version filter
It doesn't do anything right now, all servers advertise a compatible
version.

It might become a compatibility hazard in the future, e.g. DDNet servers
try to advertise a different version string to 0.6 than to 0.7 clients,
because the compatible version filter on 0.6 insists that it starts with
"0.6" and on 0.7 that it starts with "0.7", clearly incompatible.
2021-12-28 15:09:38 +01:00
def 9f58aeb6e9 Update ddnet-libs 2021-12-28 12:46:48 +01:00
def af89b31a9d Update ddnet-libs 2021-12-28 12:46:24 +01:00
bors[bot] aff34fc2f5
Merge #4540
4540: Add margin for ping in server browser r=heinrich5991 a=def-

as reported by Izanagi

Old:
<img width="1840" alt="Screenshot 2021-12-28 at 01 06 16" src="https://user-images.githubusercontent.com/2335377/147514748-de5bb347-fc15-4362-83f9-2ec5f90698cd.png">
New:
<img width="1840" alt="Screenshot 2021-12-28 at 01 05 18" src="https://user-images.githubusercontent.com/2335377/147514745-084e955d-ddcc-49df-b4f0-573c779f8eb3.png">

## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2021-12-28 01:01:44 +00:00
def bc184b7198 Add margin for ping in server browser
as reported by Izanagi
2021-12-28 01:05:53 +01:00
bors[bot] b195c75d33
Merge #4528 #4535 #4538
4528: Try to fix SDL2 assertion failure (fixes #4434) r=heinrich5991 a=def-

I can't really reproduce it:

Assertion failure at SDL_GetWindowFlags_REAL (/home/deen/isos/ddnet/debian6/root/mac64/SDL2-2.0.16/src/video/SDL_video.c:1905), triggered 1 time:
'window && window->magic == &_this->window_magic'

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4535: Explicitly disable notch area for fullscreen on macOS (fixes #4533) r=heinrich5991 a=def-

See https://developer.apple.com/documentation/bundleresources/information_property_list/nsprefersdisplaysafeareacompatibilitymode?language=objc

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4538: Add new icons by Ravie r=heinrich5991 a=def-

<img width="752" alt="Screenshot 2021-12-27 at 23 25 59" src="https://user-images.githubusercontent.com/2335377/147511038-9c073c25-8684-4104-96a5-dc1d7ff3e904.png">

## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2021-12-27 23:22:48 +00:00
bors[bot] 768a007eed
Merge #4429 #4517
4429: Pr sql fail fast r=heinrich5991 a=Zwelf

Remaining changes for #4424. Improving sql write times during shutdown and slow mysql responses/timeouts. I still want to test this change, especially for the last commit. Might have time for testing this evening. Thoughts and feedback on this patchset welcome.

## Checklist

- [ ] Tested the change ingame
   - [x] in mysql mod
   - [ ] in sqlite3 mode
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4517: Rename EXPLODING BULLET to BULLET r=heinrich5991 a=def-

As suggested by Yuzu

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Zwelf <zwelf@strct.cc>
Co-authored-by: def <dennis@felsin9.de>
2021-12-27 23:11:09 +00:00
bors[bot] 63c33d2754
Merge #4539
4539: Fix argument order in test, use constant r=def- a=Robyt3

- Use `CVariableInt::MAX_BYTES_PACKED` in two more places.
- Fix order of arguments in a test case.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [X] Considered possible null pointers and out of bounds array indexing
- [X] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
2021-12-27 22:58:47 +00:00
def f9d9c0293e Add new icons by Ravie 2021-12-27 23:42:18 +01:00
Robert Müller 07a8d21224 fix argument order in test, use constant 2021-12-27 23:41:52 +01:00
bors[bot] 584695424f
Merge #4536
4536: Fix invalid left shift in CVariableInt::Unpack, add tests for CVariableInt r=def- a=Robyt3

The last iteration in `CVariableInt::Unpack` is changed from

```cpp
*pInOut |= (*pSrc & (0x1F)) << (6 + 7 + 7 + 7);
```
to
```cpp
*pInOut |= (*pSrc & 0x0F) << (6 + 7 + 7 + 7);
```

which means the last iteration will unpack at most 4 more bits instead of 5, hence invalid left shifts by 27 places that could otherwise occur on this line are prevented (closes #3686). Now at most 31 bits are unpacked, in addition to the sign bit.

Tests are added to ensure correct functionality of all `CVariableInt` functions.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [X] Written a unit test if it works standalone, system.c especially
- [X] Considered possible null pointers and out of bounds array indexing
- [X] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
2021-12-27 22:08:10 +00:00
Robert Müller 2ffd0ddae2 fix invalid left shift in CVariableInt::Unpack, add tests 2021-12-27 18:00:15 +01:00
def 30025ae992 Explicitly disable notch area for fullscreen on macOS (fixes #4533)
See https://developer.apple.com/documentation/bundleresources/information_property_list/nsprefersdisplaysafeareacompatibilitymode?language=objc
2021-12-27 13:01:53 +01:00
def 05222505e4 Add tools to dmg so they are available for macOS users too 2021-12-27 12:05:38 +01:00
bors[bot] a9cd29d624
Merge #4514 #4534
4514: Implement sv_min_team_size (fixes #3720) r=edg-l a=def-

to prevent too small teams counting as team finishes. You can still
finish with a team smaller than sv_min_team_size, but only get regular
ranks, not team ranks.

This will require going through all our maps and setting
sv_min_team_size in map config for maps intended for more than 2
players. We will also need to remove all teamranks with smaller teams
from official database.

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4534: Implement "reset" command r=edg-l a=def-

to reset specific config to default value

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2021-12-27 10:42:41 +00:00
bors[bot] c6b9a57a32
Merge #4521
4521: Support enter and escape in editor when confirming save r=edg-l a=def-

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2021-12-27 10:28:58 +00:00
def b898a868d5 Version 15.8 2021-12-27 01:26:56 +01:00
def d787a4832b Implement "reset" command
to reset specific config to default value
2021-12-27 01:13:11 +01:00
def ccaca2c0f7 Add dmg background image by Ravie 2021-12-27 01:01:20 +01:00
def fec20679f1 Create custom look for DMG using dmgbuild
(nice background image still missing)
2021-12-26 00:24:55 +01:00
def b8fb704952 Improve wording 2021-12-25 19:36:23 +01:00
def 21594a0405 DDNet-Server-Launcher (for macOS): Support running without config 2021-12-25 19:32:43 +01:00
def feb863306a Remove SQLite dependency on macOS, add DDNet-Server to client app 2021-12-25 19:05:15 +01:00
def 7305885f6e Try to fix SDL2 assertion failure (fixes #4434)
I can't really reproduce it:

Assertion failure at SDL_GetWindowFlags_REAL (/home/deen/isos/ddnet/debian6/root/mac64/SDL2-2.0.16/src/video/SDL_video.c:1905), triggered 1 time:
'window && window->magic == &_this->window_magic'
2021-12-25 18:44:46 +01:00
Zwelf 541667d00a Fine tune MySQL timeouts to fail faster 2021-12-25 10:58:38 +01:00
Zwelf 8c8b4e5bb4 Skip over read queries and write into backup database in FailMode 2021-12-25 10:58:38 +01:00
Zwelf d8258fcda9 Add semaphore getvalue functionality 2021-12-25 10:53:26 +01:00
bors[bot] c45b950117
Merge #4526
4526: Add mold linking instructions r=heinrich5991 a=def-

Not sure it's interesting enough, but since I tried it out anyway.

Co-authored-by: def <dennis@felsin9.de>
2021-12-25 01:47:52 +00:00
bors[bot] 5b981e4075
Merge #4527
4527: Don't make score test depend on specific timestamp r=heinrich5991 a=def-

Insert current timestamp instead

Co-authored-by: def <dennis@felsin9.de>
2021-12-25 01:25:31 +00:00
def c76f0f5899 Don't expect "moments ago" string in tests, use regex matcher instead 2021-12-25 02:21:46 +01:00
def 6bb875c660 Don't make score test depend on specific timestamp
Insert current timestamp instead
2021-12-25 01:33:08 +01:00
def 3f537b3463 Add mold linking instructions 2021-12-25 01:06:53 +01:00
def 8625487292 Support enter and escape in editor when confirming save 2021-12-23 11:50:45 +01:00
def f9edeb627b Rename EXPLODING BULLET to BULLET
As suggested by Yuzu
2021-12-22 16:56:21 +01:00
bors[bot] c5ed7f6ec8
Merge #4515
4515: Revert "Use temporary file when saving editor file (fixes #4476)" r=heinrich5991 a=def-

Doesn't work on Windows, not so easy to overwrite a file already open in
editor. Not sure how our old approach works, but apparently it did
better than the new one. As reported by texnonik on Discord

This reverts commit e2084e1e9d.

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2021-12-22 07:50:09 +00:00
def 7d57b80646 Revert "Use temporary file when saving editor file (fixes #4476)"
Doesn't work on Windows, not so easy to overwrite a file already open in
editor. Not sure how our old approach works, but apparently it did
better than the new one. As reported by texnonik on Discord

This reverts commit e2084e1e9d.
2021-12-21 23:31:08 +01:00
def 73d8329c4a Implement sv_min_team_size
to prevent too small teams counting as team finishes. You can still
finish with a team smaller than sv_min_team_size, but only get regular
ranks, not team ranks.

This will require going through all our maps and setting
sv_min_team_size in map config for maps intended for more than 2
players. We will also need to remove all teamranks with smaller teams
from official database.
2021-12-21 23:22:28 +01:00
bors[bot] 4a21f6fb1d
Merge #4513
4513: Display more relevant version numbers on command line (fixes #4511) r=heinrich5991 a=def-

<img width="1838" alt="Screenshot 2021-12-21 at 23 05 20" src="https://user-images.githubusercontent.com/2335377/147003649-64b27082-8e5e-4966-8a15-3af161bbe573.png">
## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2021-12-21 22:11:22 +00:00