Commit graph

13595 commits

Author SHA1 Message Date
def 40973df7fe Try to fix darwin toolchain 2021-12-20 00:17:38 +01:00
def b91d4bfb89 Support running mac executables from build directory directly 2021-12-20 00:17:38 +01:00
def 28ac9396cc Support libfat directory for macOS, use arm64 libs (fixes #3250)
Builds and runs successfully with:
  cmake -DCMAKE_BUILD_TYPE=Release -GNinja -DPREFER_BUNDLED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
  ninja package_dmg

Tested successfully with native arm64 and rosetta

No discord support for universal binary
2021-12-20 00:17:38 +01:00
bors[bot] 107438bead
Merge #4479
4479:  Fix normal binds (fixes #4477) r=heinrich5991 a=def-

<!-- 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-19 22:56:21 +00:00
def c7fee1135f Keep Ubuntu 18.04, but without sql tests 2021-12-19 23:51:14 +01:00
def d23bd12c03 Don't handle lalt separately 2021-12-19 23:42:34 +01:00
bors[bot] 56aa4d1c76
Merge #4471
4471: Add open_file, works on macOS, safer, Add buttons to open settings file and config directory r=heinrich5991 a=def-

<img width="1790" alt="Screenshot 2021-12-19 at 01 23 12" src="https://user-images.githubusercontent.com/2335377/146659150-2945d3d4-d6e9-41b2-834d-54487a9b91cd.png">
## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] 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: def <dennis@felsin9.de>
2021-12-19 22:42:26 +00:00
def 98df2f25eb Fix normal binds (fixes #4477) 2021-12-19 23:42:19 +01:00
def 7484ffc125 Add buttons to open settings file and config directory
Only tested on macOS
2021-12-19 23:22:08 +01:00
def ffc532a302 Add open_file, works on macOS, safer 2021-12-19 23:22:04 +01:00
def 01b1dbfc2e Fix fancy test to use correct build 2021-12-19 23:04:13 +01:00
def 6feb1a0eee Create connections as unique_ptrs directly
no more leak in test/score.cpp
2021-12-19 23:04:12 +01:00
bors[bot] 79e5703e21
Merge #3638
3638: Revert "Let's not crash the client and server on dbg_assert" r=def- a=heinrich5991

This reverts commit a6e144e.

## 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-19 18:45:38 +00:00
def f464f148ac Add explicit -DTEST_MYSQL
Since the setup is a bit more manual and not as self-contained, so most
probably don't want to test it locally.
2021-12-19 19:40:20 +01:00
def 04594397ca Test MySQL centrally in fancy 2021-12-19 19:40:20 +01:00
def f5d59e8719 Rename CONF_SQL to CONF_MYSQL 2021-12-19 19:40:20 +01:00
def 9ef5849f0c Add MySQL test support 2021-12-19 19:40:20 +01:00
def e569354f3e Fix TeamScore tests 2021-12-19 19:40:20 +01:00
def 20c9141b71 Remove gmock dependency 2021-12-19 19:40:20 +01:00
def d9858c2010 Add more Score tests, shorten tests 2021-12-19 19:40:20 +01:00
def 436fcbcf08 Ubuntu 20.04 in central tests 2021-12-19 19:40:20 +01:00
def 41910ff5fd Add sqliteversion test 2021-12-19 19:40:20 +01:00
def 3a2850b7f7 Add comment for true/false 2021-12-19 19:40:20 +01:00
def aacab812d4 Use at least SQLite version 3.25
Required for Window functions, see https://www.sqlite.org/windowfunctions.html
2021-12-19 19:40:20 +01:00
def 010ecd0868 More output in score test 2021-12-19 19:40:20 +01:00
def 9dc08ca156 True/False don't exist on older SQLite versions 2021-12-19 19:40:20 +01:00
def baf9b94f2c Factor CScoreWorker out of CScore, add SaveScore test 2021-12-19 19:40:20 +01:00
Dennis Felsing f03cb08150
Merge pull request #3961 from fokkonaut/pr-antibot
Add target clientid to antibot OnHammerHit
2021-12-19 19:33:56 +01:00
bors[bot] 3c354eb2d5
Merge #4468
4468: Alternative fix for cut off names (fixes #4463) r=heinrich5991 a=def-

https://github.com/ddnet/ddnet/pull/4465 might have more side effects

<!-- 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-19 17:11:41 +00:00
bors[bot] 72afa17349
Merge #4449 #4461 #4466 #4469 #4470 #4472 #4473
4449: Fix text selection cursor position (fixes #4444) r=heinrich5991 a=def-

after moving window to a screen with different dimensions than the
initial one

<!-- 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
- [x] 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)


4461: Support cl_video_show_direction 2 r=heinrich5991 a=def-

Currently to show your own key presses when recording you need
cl_video_showdirection 1 and cl_show_direction 2 which is kind of
unintuitive.

Also changed the name to be consistent with cl_show_direction

Thanks to hussainx3 for report.

<!-- 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
- [x] 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)


4466: Fix GLEW system lib linking on macOS (fixes #4439) r=heinrich5991 a=def-

Only GLEW::GLEW is provided, GLEW_LIBRARIES is empty by default

<!-- 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)


4469: Consider initial chat delays as normal mutes, implement unmuteid (fixes # 4460) r=heinrich5991 a=def-

<!-- 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)


4470: Support GUI/Cmd key and use it as equivalent to ctrl in default shortcuts r=heinrich5991 a=def-

like ctrl-f / cmd-f

On macOS all these system shortcuts are done with cmd while on Windows
ctrl is used. Support both now

Added support for cmd key as modifier for binds

Fixed missing right variants of modifiers in some places

<!-- 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)


4472: Make /rescue handle switch freeze too r=heinrich5991 a=def-

As reported by RonIn

## 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)


4473: Fix comment in CMakeLists.txt r=heinrich5991 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-19 16:58:46 +00:00
bors[bot] 529c1654da
Merge #4447
4447: Disable gfx_asyncrender_old on macOS (fixes #4435) r=heinrich5991 a=def-

<!-- 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
- [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: def <dennis@felsin9.de>
2021-12-19 16:44:23 +00:00
bors[bot] eea0a95550
Merge #4204
4204: Lower worst/best case frame time calculations r=heinrich5991 a=Jupeyy

1 second is too much, 1 frame of 60 fps is more than enough, dropping a whole frame when using 60fps as limit is already quite alot

## 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: Jupeyy <jupjopjap@gmail.com>
2021-12-19 16:23:52 +00:00
def 84b1108001 Fix comment in CMakeLists.txt 2021-12-19 12:12:26 +01:00
def d479cac089 Rename IsSwitch to GetSwitchType 2021-12-19 12:10:03 +01:00
def 17287de243 Make /rescue handle switch freeze too 2021-12-19 12:10:00 +01:00
def acf199835d Support GUI/Cmd key and use it as equivalent to ctrl in default shortcuts
like ctrl-f / cmd-f

On macOS all these system shortcuts are done with cmd while on Windows
ctrl is used. Support both now

Added support for cmd key as modifier for binds
2021-12-18 12:23:20 +01:00
def 374c5ac64d Implement unmuteid, make it clearer that unmute uses ID from mutes
not player id
2021-12-18 11:28:54 +01:00
def 97f8e29a60 Minor cleanup 2021-12-18 11:20:22 +01:00
def 35d5854e28 Consider initial chat delays as normal mutes (fixes # 4460) 2021-12-18 11:20:16 +01:00
def ea7e39c2f0 Alternative fix for cut off names (fixes #4463)
https://github.com/ddnet/ddnet/pull/4465 might have more side effects
2021-12-18 10:34:20 +01:00
def 522bf75190 Add brew to README 2021-12-18 00:39:52 +01:00
def 4140d936fc Add macOS dependency instructions 2021-12-18 00:39:39 +01:00
bors[bot] 5ec6f0994d
Merge #4410
4410: Fix leak in CLayerTiles::BrushGrab (fixes #4409) r=Learath2 a=def-

<!-- 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-17 23:38:19 +00:00
def a8873b3af7 Fix GLEW system lib linking on macOS
Only GLEW::GLEW is provided, GLEW_LIBRARIES is empty by default
2021-12-18 00:36:33 +01:00
def b445a8aeaf Fix mouse selection after changing window size (on macOS) 2021-12-18 00:12:23 +01:00
bors[bot] b4374b28f1
Merge #4464
4464: Skip the UTF-8 BOM on all read text files r=def- a=heinrich5991

Fixes #4462.

## Checklist

- [ ] 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
- [ ] 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-17 21:18:58 +00:00
heinrich5991 cdbf8ff2d2 Skip the UTF-8 BOM on all read text files
Fixes #4462.
2021-12-17 22:07:01 +01:00
heinrich5991 49c861372a Add a flag to skip a UTF-8 BOM when opening files for reading
https://en.wikipedia.org/w/index.php?title=Byte_order_mark&oldid=1059783325#UTF-8

This allows to read text files created by Windows users transparently,
even if they contain a UTF-8 BOM.
2021-12-17 22:07:01 +01:00
def ef5d3b77a9 Support cl_video_show_direction 2
Currently to show your own key presses when recording you need
cl_video_showdirection 1 and cl_show_direction 2 which is kind of
unintuitive.

Also changed the name to be consistent with cl_show_direction
2021-12-17 10:10:03 +01:00
bors[bot] 625ce302dd
Merge #4443
4443: Swap projectile owners when using /swap r=Learath2 a=def-

Thanks to Soapy Sandwich for responsibly disclosing this issue.
https://user-images.githubusercontent.com/2335377/145693247-c5c1ab2e-6353-4a4a-afab-c73f2d7eebc1.mp4
/swap is currently disabled until this is merged.

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

## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] 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
- [x] 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-16 12:39:00 +00:00