Commit graph

13325 commits

Author SHA1 Message Date
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 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
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
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
bors[bot] 1d88aef9fe
Merge #4456
4456: Pull some more refactoring from the upstream r=def- a=Kaffeine

The main motivation is making it easier to take (and push) patches to/from `teeworlds`

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

I'm not that familiar with the code. Please let me know if this commit make sense or not:
56900d7644

IIUC two other commits from https://github.com/teeworlds/teeworlds/pull/2594 are not relevant for DDNet (because we're reducing the CPU load differently).

Co-authored-by: Alexander Akulich <akulichalexander@gmail.com>
Co-authored-by: Robert Müller <robert.mueller@student.uni-siegen.de>
2021-12-15 07:51:42 +00:00
Robert Müller 843d021f82 add IServer::ChangeMap to fix change_map command
(cherry picked from commit 97d907304c56f643a9ed99e60c35052f950b27fb)
2021-12-15 03:36:25 +03:00
Robert Müller 019f8b665f set m_MapReload instead of polling sv_map, use bool, remove dead code
(cherry picked from commit dc56ab6d93e60f1a4bf26196a76b9e12df65529c)
2021-12-15 03:36:25 +03:00
Alexander Akulich d46e4a14c1 CServer: Port to Config() upstream API 2021-12-15 03:36:25 +03:00
Alexander Akulich 4d346456c5 CServer: Add a const CConfig getter for const Server instance 2021-12-15 03:36:25 +03:00
Alexander Akulich 0b24888f61 CServer: Init m_pConfig variable with the global instance for now
The case is lie. The variable was not initialized.
2021-12-15 03:36:25 +03:00
Alexander Akulich 9d3594205d Console: Add Config() getter as in other classes 2021-12-15 03:36:19 +03:00
Alexander Akulich 145816b046 IServer: Change GetMapName() type to const char *
Partially follow upstream 77daedc814
2021-12-15 03:04:03 +03:00
bors[bot] f909581545
Merge #4450
4450: Add code formatting instructions 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-14 10:44:48 +00:00
def ddf04c1ff2 Improve interfaces by exposing SwapClients in CEntities 2021-12-14 10:35:00 +01:00
bors[bot] 5f9d8de818
Merge #4454
4454: Don't clear client version on map change r=def- a=heinrich5991

Also still record client version on map changes into teehistorian.

Fixes #4445.

Thanks to `@Kaffeine` for noticing.

## 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: heinrich5991 <heinrich5991@gmail.com>
2021-12-14 07:47:44 +00:00
heinrich5991 3185c75bda Don't clear client version on map change
Also still record client version on map changes into teehistorian.

Fixes #4445.

Thanks to @Kaffeine for noticing.
2021-12-14 06:50:30 +01:00
heinrich5991 4fab7d7500 Remove unused variable m_SupportsMapSha256 2021-12-14 06:49:40 +01:00
def 9496d2697a Disable gfx_asyncrender_old on macOS (fixes #4435) 2021-12-13 19:14:21 +01:00
bors[bot] a818b4573e
Merge #4448
4448: Increase scrollbar handle size for small scrollbars r=def- a=Robyt3

The maximum scrollbar handle size was too small for small scrollbars.

AFAIK, the previous size did not directly affect ddnet client, as there are no scrollbars that small, but they might be used eventually.

See screenshots in https://github.com/teeworlds/teeworlds/pull/2995.

## 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
- [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-13 18:13:19 +00:00
def ac094b5378 Fix text selection cursor position (fixes #4444)
after moving window to a screen with different dimensions than the
initial one
2021-12-13 19:12:37 +01:00
def 065b11e649 Add code formatting instructions 2021-12-13 19:02:07 +01:00
Robert Müller 8ec50f800b increase scrollbar handle size for small scrollbars 2021-12-13 17:48:17 +01:00
def 7d8a142768 Disable gfx_asyncrender_old on macOS (fixes #4435) 2021-12-13 12:30:30 +01:00