Commit graph

10589 commits

Author SHA1 Message Date
Wohoo 0614fce2bb Remove comment 2022-01-07 17:12:57 +01:00
Wohoo 2017464282 Livefreeze implementation with CHARACTERFLAG_NO_MOVEMENTS flag.
Freeze and Unfreeze tiles added to switch layer too.
2022-01-07 16:53:40 +01:00
bors[bot] 571f981394
Merge #4566
4566: Don't crash when no ids are left (fixes #4565) 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>
2022-01-05 23:53:35 +00:00
def d02253da00 Don't crash when no ids are left (fixes #4565) 2022-01-05 23:30:30 +01:00
def 23fdce1aa8 Reduce default ambient volume to 30 (fixes #4567) 2022-01-05 23:27:31 +01:00
bors[bot] a5783e4493
Merge #4529 #4530
4529: Extend DDNet-Server-Launcher, support DDNet-Server from client in dmg (fixes #4441) r=heinrich5991 a=def-

![Screenshot 2021-12-25 at 19 32 08](https://user-images.githubusercontent.com/2335377/147391455-210d90bc-df40-467c-a1dd-4bf49d050c05.png)
The old version would just open the file opener immediately which was quite confusing for new users.

Also removed sqlite3 for mac and mysql entirely since they are not needed.
## 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)


4530: Create custom look for DMG using dmgbuild (fixes #4442) r=heinrich5991 a=def-

This removes cross-building DMG support since dmgbuild requires hdiutil, which is macOS only. Thoughts?

Nice background image by Ravie:
<img width="752" alt="Screenshot 2021-12-27 at 00 29 43" src="https://user-images.githubusercontent.com/2335377/147422479-fb278e53-5017-4176-81e8-7cb2e6c83da4.png">


Co-authored-by: def <dennis@felsin9.de>
2022-01-05 21:26:05 +00:00
bors[bot] 118ae1bb36
Merge #4551 #4557
4551: Revert "Support 32bit color depth, default to it (fixes #4549)" r=heinrich5991 a=def-

This reverts commit ee35097385.

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


4557: Editor: Don't react to server settings shortcuts when dialog is open r=heinrich5991 a=def-

as reported by Sorah

<!-- 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>
2022-01-05 01:42:09 +00:00
bors[bot] 234596784d
Merge #4542
4542: Downgrade SDL 2.0.18 -> 2.0.16 on Windows (fixes #4537) 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>
2022-01-05 01:28:58 +00:00
fokkonaut 8300753fa4 Support 128 players in serverbrowser 2022-01-02 13:41:59 +01:00
def 3b3b2c70af Editor: Don't react to server settings shortcuts when dialog is open
as reported by Sorah
2022-01-01 14:27:39 +01:00
Robert Müller 0726703937 fix undefined behavior in byte packing functions, add tests 2021-12-31 13:18:41 +01:00
def 7ce5b246ec Revert "Support 32bit color depth, default to it (fixes #4549)"
This reverts commit ee35097385.
2021-12-30 11:06:51 +01:00
bors[bot] b3b8096832
Merge #4550
4550: Support 32bit color depth, default to it (fixes #4549) 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-30 02:07:33 +00:00
def ee35097385 Support 32bit color depth, default to it (fixes #4549) 2021-12-30 01:32:57 +01:00
def 0ab7190864 Don't warn on solo server, where no team ranks should exist 2021-12-29 20:36:03 +01: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
def 3805921b65 Version 15.8.1 2021-12-28 20:14:41 +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 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
Robert Müller 07a8d21224 fix argument order in test, use constant 2021-12-27 23:41:52 +01:00
Robert Müller 2ffd0ddae2 fix invalid left shift in CVariableInt::Unpack, add tests 2021-12-27 18:00:15 +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 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 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
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 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
def 51c096777e Display more relevant version numbers on command line (fixes #4511) 2021-12-21 23:05:44 +01:00
bors[bot] 2f44e076c0
Merge #4504 #4507
4504: Swap: Also switch rescue tees for /r r=heinrich5991 a=def-

As reported by cheeser0613:

2player, 1die in freeze
swap 2 player by /swap
the other 1 also go die in freeze
/practice
one of them cant use /r

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


4507: Add cl(|_dummy|_contact)_port for ISPs that throttle specific ports r=heinrich5991 a=def-

As reported by Ryu

Verified with cl_port 12345; cl_dummy_port 12346:
<img width="681" alt="Screenshot 2021-12-21 at 12 48 11" src="https://user-images.githubusercontent.com/2335377/146925435-ef586ffd-29a0-4ab0-9228-aa77761eca0d.png">
<img width="1067" alt="Screenshot 2021-12-21 at 12 49 23" src="https://user-images.githubusercontent.com/2335377/146925438-9ba7819a-d3a9-42a8-821e-9808d15df9ee.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-21 17:44:27 +00:00
Robert Müller 92f53c7a37 reload map when changing sv_sixup 2021-12-21 17:37:04 +01:00
def d7ea3371d6 Swap: Also switch rescue tees for /r
As reported by cheeser0613:

2player, 1die in freeze
swap 2 player by /swap
the other 1 also go die in freeze
/practice
one of them cant use /r
2021-12-21 13:09:06 +01:00
def dd4efe0449 Add cl(|_dummy|_contact)_port for ISPs that throttle specific ports
As reported by Ryu
2021-12-21 12:49:05 +01:00
bors[bot] d4f126810b
Merge #4484 #4486
4484: Add IStorage::FormatTmpPath static method r=heinrich5991 a=def-

Not sure I prefer it, but now it's done. Any opinions?

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


4486: Add .a files to .gitignore r=def- a=heinrich5991

<!-- 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>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-12-21 10:30:12 +00:00
bors[bot] 3490876ee9
Merge #4503
4503: Fix joining pw-protected server via Steam (fixes #4502) r=heinrich5991 a=def-

Tested by copying DDNet executable from package into Steam directory and running it via steam://run/412220//ger2.ddnet.tw:8001/ directly and when client is running already. (UI had another server selected)

## 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-21 10:19:34 +00:00
def cd6cfd2607 Fix joining pw-protected server via Steam (fixes #4502) 2021-12-21 10:31:52 +01:00
bors[bot] 51d930800c
Merge #4497
4497: Fix run_on_join being run on normal player again (fixes #4494) 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-21 03:50:11 +00:00
bors[bot] 53833d2050
Merge #4498 #4499
4498: Respect sv_chat_initial_delay (fixes #4496) 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)


4499: Center cl_show_direction (fixes #4495) r=heinrich5991 a=def-

<img width="1823" alt="Screenshot 2021-12-20 at 23 36 17" src="https://user-images.githubusercontent.com/2335377/146841838-c3a692e5-740f-4295-a885-5439822aab4c.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 03:38:53 +00:00
def 2727c998c2 Fix crash in GetSaves (fixes #4500) 2021-12-21 00:14:15 +01:00
def 57ebf33b1a Center cl_show_direction (fixes #4495) 2021-12-20 23:34:49 +01:00
def 6037bf7ff6 Respect sv_chat_initial_delay (fixes #4496) 2021-12-20 23:20:46 +01:00
def 2963c30755 Fix run_on_join being run on normal player again (fixes #4494) 2021-12-20 23:19:43 +01:00
def d91d20f079 Add a hint for "Run on join"
Otherwise it's not clear if you can run client commands (f1) or chat
commands (/). As reported by cheeser0613
2021-12-20 18:58:15 +01:00
bors[bot] f6baf78e6e
Merge #4489
4489: Don't overwrite player-set refresh rate 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-20 17:10:49 +00:00
def 1261ba4e03 Don't overwrite player-set refresh rate 2021-12-20 17:53:56 +01:00
def a6a0092996 Actually remove gfx_asyncrender_old 2021-12-20 17:27:01 +01:00
def 1a02a20fa6 Add IStorage::FormatTmpPath static method
Not sure I prefer it, but now it's done. Any opinions?
2021-12-20 16:12:15 +01:00
def 440baa17be Support building universal binaries with discord
For now only x86-64 is supported by discord sdk, arm64 we ship without
discord sdk. So players can choose if they want more performance without
discord integration, or less performance with discord integration.
2021-12-20 16:07:00 +01:00
heinrich5991 2fbd0c6c71 Fix formatting in src/test/score.cpp 2021-12-20 14:04:41 +01:00
bors[bot] 473848a19d
Merge #4482
4482: Use temporary file when saving editor file (fixes #4476) 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-20 12:33:05 +00:00
def e2084e1e9d Use temporary file when saving editor file (fixes #4476) 2021-12-20 10:54:46 +01:00
bors[bot] ec0d1172eb
Merge #4481
4481: Don't create cut off UTF-8 sequences on string manipulation r=def- a=heinrich5991

CC #4463
CC #4465 

## 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
- [ ] 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-20 08:58:55 +00:00
heinrich5991 58533cddef Fix string functions not to truncate in the middle of a UTF-8 character
This makes `str_utf8_copy` obsolete.
2021-12-20 02:34:02 +01:00
heinrich5991 27f18824d6 Fix str_utf8_forward to use the same logic as str_utf8_decode 2021-12-20 02:17:10 +01:00
heinrich5991 ae9944550c Add a function to fix UTF-8 truncation at the end of a string
This can be used after truncating at byte boundaries.
2021-12-20 02:05:07 +01:00
bors[bot] 3013466b86
Merge #4392
4392: Add SQL/Score tests 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-20 00:42:03 +00:00
def 3f03d8ee31 Get rid of useless semicolon in SQL queries 2021-12-20 00:50:59 +01:00
def 0c759ae6b6 Deterministic player order in /top5team name
same as in /top5team without name
2021-12-20 00:50:56 +01:00
def 594b4e3d24 Add cl_run_on_join to set command to execute when joining a server 2021-12-20 00:43:49 +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
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 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 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 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
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 b445a8aeaf Fix mouse selection after changing window size (on macOS) 2021-12-18 00:12:23 +01: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
def ddf04c1ff2 Improve interfaces by exposing SwapClients in CEntities 2021-12-14 10:35:00 +01: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
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
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
def e83a7ff96f Fix unsafe usage of CLaser casts
Since CDraggers are also stores as entities of ENTTYPE_LASER:

/media/ddnet/src/game/server/teams.cpp:898:23: runtime error: downcast of address 0x61600003db80 which does not point to an object of type 'CLaser'
0x61600003db80: note: object is of type 'CDragger'
 00 00 00 00  d0 24 3c b2 75 55 00 00  00 00 00 00 00 00 00 00  80 d8 03 00 60 61 00 00  f8 c1 04 5a
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'CDragger'
2021-12-12 00:35:33 +01:00
def 1d22f6b518 Swap laser owners when using /swap
Since they are implemented independently from projectiles (pistol, grenade)
2021-12-12 00:35:12 +01:00
def 84b1b6f92e Swap projectile owners when using /swap
Thanks to Soapy Sandwich for responsibly disclosing this issue.

/swap is currently disabled until this is merged.
2021-12-11 23:18:38 +01:00
def 9965007fa0 Center timer in HUD (fixes #4438) 2021-12-10 18:27:32 +01:00
bors[bot] d862207a73
Merge #4405
4405: Try to use unique_ptr in tests so we can't forget to delete r=heinrich5991 a=def-

Why is the PingCache test failing now???

<!-- 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-10 02:53:55 +00:00
Robert Müller 0ff313b130 adopt vanilla scrollbar colors and code style 2021-12-09 22:57:21 +01:00
Alexander Akulich d832800ebc Server: Implement a 'reason' argument for Console Shutdown
(cherry picked from the upstream commit teeworlds / 6899778b348cce800665e3e320f88a6688168a14)
2021-12-08 20:43:59 +03:00
Alexander Akulich 57e16f3f7b CEntity: Make NetworkClipped() const 2021-12-08 20:35:03 +03:00
Alexander Akulich cad00f7ce1 Add a config var to toggle colors enablement for the console output 2021-12-08 20:35:03 +03:00
Alexander Akulich fa977bbdce Fix UUID messages unpack on demo playing 2021-12-08 18:50:41 +03:00
Zwelf 3db7fca215 Don't shutdown server when there are outstanding sql queries to be executed 2021-12-08 10:09:39 +01:00
Zwelf ac0c935aa1 Skip read requests during shutdown 2021-12-07 13:50:57 +01:00
bors[bot] a46cc81040
Merge #4421 #4423
4421: Swap: Don't spam-protect retrying with local messages only r=heinrich5991 a=def-

As suggested by 冷落:
> I have a advice./swap need wait 30s,and often someone will say /swap
> within 30 seconds,but kept saying it would be muted

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


4423: Fix command line arguments with unicode on windows (without changing existing code) r=heinrich5991 a=Robyt3

#4380 plus the proposed changes. Closes #4369.

## 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
- [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>
Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
2021-12-06 19:17:35 +00:00
Robert Müller f20443b694 fix command line arguments with unicode on windows
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-12-06 19:48:25 +01:00
def 16c748c6b1 Swap: Don't spam-protect retrying with local messages only
As suggested by 冷落:
> I have a advice./swap need wait 30s,and often someone will say /swap
> within 30 seconds,but kept saying it would be muted
2021-12-05 23:11:17 +01:00
Robert Müller a61c45550d rename Init method and move implementation 2021-12-03 20:26:27 +01:00
Robert Müller 2fe5464938 remove delegate functions in CMenus, fix variable names 2021-12-03 20:26:26 +01:00
Robert Müller f334b52d94 use UIEx() consistently 2021-12-03 20:26:26 +01:00
Robert Müller af82a20374 move ms_FontmodHeight to CUI 2021-12-03 20:26:25 +01:00
Robert Müller 8887a3137c move DoClearableEditBox to CUIEx 2021-12-03 20:26:23 +01:00
Robert Müller d948a1e41f fix variable name 2021-12-03 20:26:21 +01:00
Robert Müller 4bdddb7e3a pass correct number of utf8 characters to Manipulate 2021-12-03 20:26:17 +01:00
bors[bot] 2524905d74
Merge #4413
4413: Fix some more undefined behavior with super (fixes #4412) r=edg-l 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
- [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-01 12:43:22 +00:00
def 13044e093c Fix some more undefined behavior with super (fixes #4412) 2021-11-29 17:12:50 +01:00
Robert Müller 083c29f191 fix initialization of CUIEx::m_MouseSlow 2021-11-29 15:43:16 +01:00
def a45829f16d Fix leak in CLayerTiles::BrushGrab (fixes #4409) 2021-11-29 14:29:24 +01:00
def 4ac5ca1449 Try to use unique_ptr in tests so we can't forget to delete 2021-11-29 00:40:10 +01:00
bors[bot] e7fafc5a4f
Merge #4404
4404: test/serverbrowser: delete pConsole r=heinrich5991 a=def-

==235823==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 65632 byte(s) in 1 object(s) allocated from:
    #0 0x563636cc2fc9 in malloc (/media/ddnet/testrunner+0x37afc9)
    #1 0x563636e0fd89 in CHeap::NewChunk() /media/ddnet/src/engine/shared/memheap.cpp:14:17
    #2 0x563636e10aee in CHeap::Reset() /media/ddnet/src/engine/shared/memheap.cpp:63:2
    #3 0x563636d954a5 in CConsole::CExecutionQueue::Reset() /media/ddnet/src/engine/shared/console.h:188:12
    #4 0x563636d4a272 in CConsole::CConsole(int) /media/ddnet/src/engine/shared/console.cpp:937:19
    #5 0x563636d88a98 in CreateConsole(int) /media/ddnet/src/engine/shared/console.cpp:1230:59
    #6 0x563636fbe915 in ServerBrowser_PingCache_Test::TestBody() /media/ddnet/src/test/serverbrowser.cpp:13:23
    #7 0x7f0a2f87fe26 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/usr/lib/libgtest.so.1.11.0+0x54e26)

<!-- 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-11-28 14:53:22 +00:00
def 87a089c4aa test/serverbrowser: delete pConsole
==235823==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 65632 byte(s) in 1 object(s) allocated from:
    #0 0x563636cc2fc9 in malloc (/media/ddnet/testrunner+0x37afc9)
    #1 0x563636e0fd89 in CHeap::NewChunk() /media/ddnet/src/engine/shared/memheap.cpp:14:17
    #2 0x563636e10aee in CHeap::Reset() /media/ddnet/src/engine/shared/memheap.cpp:63:2
    #3 0x563636d954a5 in CConsole::CExecutionQueue::Reset() /media/ddnet/src/engine/shared/console.h:188:12
    #4 0x563636d4a272 in CConsole::CConsole(int) /media/ddnet/src/engine/shared/console.cpp:937:19
    #5 0x563636d88a98 in CreateConsole(int) /media/ddnet/src/engine/shared/console.cpp:1230:59
    #6 0x563636fbe915 in ServerBrowser_PingCache_Test::TestBody() /media/ddnet/src/test/serverbrowser.cpp:13:23
    #7 0x7f0a2f87fe26 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/usr/lib/libgtest.so.1.11.0+0x54e26)
2021-11-28 15:51:31 +01:00
bors[bot] d02ffefa17
Merge #4403
4403: Remove redundant *count >= max_count check r=def- a=Robyt3

`count` and `max_count` don't change after the check in the while loop.

## 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: Robert Müller <robert.mueller@uni-siegen.de>
2021-11-28 10:06:15 +00:00
Robert Müller 06a1d28a7f remove redundant *count >= max_count check 2021-11-28 11:00:49 +01:00
bors[bot] ca558f406d
Merge #4398
4398: Synchronize with upstream and refactor UI scrollbars r=def- a=Robyt3

- Change appearance of all scrollbars to be consistent with upstream.
  - Change the large knob design that was used in some places to the flat design everywhere (except for color pickers).
  - Add consistent margins around scrollbars.
- Implementing clicking on scrollbar rails to instantly change the value.
- Consolidate UI scrollbar functions from menus and editor in `CUIEx`.
- Various minor refactorings.

## Screenshots

### Before

![br_old](https://user-images.githubusercontent.com/23437060/143658193-d9ea0d31-fa92-466e-9f54-099893caf567.png)
![settings_old](https://user-images.githubusercontent.com/23437060/143658198-1cd3ad52-4680-492c-b244-2699cb5b1c84.png)
![color_old](https://user-images.githubusercontent.com/23437060/143658194-3029dac5-eb29-4fed-a7ed-139f9a00803f.png)
![ed_file_old](https://user-images.githubusercontent.com/23437060/143658195-db00a54d-04ae-41cc-b78c-8a04303486d6.png)
![ed_img_old](https://user-images.githubusercontent.com/23437060/143658196-7f83feb6-8e92-4321-a600-d5ea18f117ad.png)

### After

![br_new](https://user-images.githubusercontent.com/23437060/143658211-1cf8bc58-1bc5-49ef-9946-afa75651c53e.png)
![setting_new](https://user-images.githubusercontent.com/23437060/143658210-00fa3b82-66a3-407a-a5d2-4a736f6b6643.png)
![color_new](https://user-images.githubusercontent.com/23437060/143658212-fca3ef8a-1e67-40f0-983a-3ad83b313ee5.png)
![ed_file_new](https://user-images.githubusercontent.com/23437060/143658214-d93fd473-56d6-48f0-81bb-3dea37618922.png)
![ed_img_new](https://user-images.githubusercontent.com/23437060/143658207-7118887a-4046-4779-8c19-6aba64c8c4ad.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: Robert Müller <robert.mueller@uni-siegen.de>
2021-11-28 09:56:44 +00:00
bors[bot] 33be69f0ac
Merge #4402
4402: Fix stack-buffer-overflow in Whisper (fixes #4400) 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-11-28 01:36:18 +00:00
def da7dfda47e Disable connection reuse in curl (fixes #4342)
Thanks to @godwhoa for report and testing the workaround!
2021-11-28 01:56:08 +01:00
def 5be5f1032a Fix stack-buffer-overflow in Whisper (fixes #4400) 2021-11-27 20:58:06 +01:00
Robert Müller 053981ee4c refactor UI scrollbars 2021-11-26 23:03:45 +01:00
bors[bot] 5c46efc892
Merge #4391
4391: Remove ping filter (fixes #4365) r=edg-l a=def-

We had lots of cases of people having ping filter activated. Ping is now
too unreliable to actually filter by it. It can show an old super high
value and then you never see the location again.
![screenshot-20211124@160502](https://user-images.githubusercontent.com/2335377/143262874-0cb93dba-9539-4d0d-8400-399dffd3509b.png)

<!-- 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-11-26 08:21:18 +00:00
bors[bot] c74b0c8536
Merge #4389
4389: Sanitize owner data in client (fixes #4388) r=edg-l a=def-

and don't access out of scope on owner < 0

<!-- 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
- [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-11-26 06:55:48 +00:00
bors[bot] d549c2a0f3
Merge #4396
4396: /swap fix: swap started/finished information r=edg-l a=def-

Thanks to 冷落 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
- [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-11-26 06:45:28 +00:00
bors[bot] 5c5469ba0a
Merge #4395
4395: Update str_utf8_stats documentation, minor refactoring r=heinrich5991 a=Robyt3

This removes the check for the null-terminator from the while loop, as this is also checked in `str_utf8_forward`, which returns an unchanged size in this case. The comparison `new_size != *size` was previously redundant for that reason.

Update comments and add some empty lines for consistency.

`@heinrich5991` 

## 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: Robert Müller <robert.mueller@uni-siegen.de>
2021-11-26 02:39:09 +00:00
def c6a637948a Version 15.7 2021-11-25 23:51:05 +01:00
def 8dce8d0a8c /swap fix: swap started/finished information
Thanks to 冷落 for report
2021-11-25 23:48:29 +01:00
Robert Müller 7578386538 add empty lines to method documentation 2021-11-25 20:01:29 +01:00
Robert Müller 2ada540988 update str_utf8_stats documentation 2021-11-25 19:54:50 +01:00
Robert Müller 0253b6e25c refactor str_utf8_stats 2021-11-25 19:54:32 +01:00
Robert Müller d747edd1cf replace DeleteUntilCursor and DeleteFromCursor with SetRange 2021-11-25 00:05:04 +01:00
Robert Müller dcdea25284 remove unused CLineInput::CCallback 2021-11-25 00:05:04 +01:00
Robert Müller c5ca424675 add CLineInput::Insert 2021-11-25 00:04:59 +01:00
Robert Müller 85236edcde rename CLineInput::Add to Append and refactor 2021-11-25 00:03:44 +01:00
Robert Müller 35a3d8c604 add CLineInput::SetRange 2021-11-25 00:00:20 +01:00
Robert Müller fa8f540108 use str_utf8_stats in CLineInput::Manipulate 2021-11-24 23:39:34 +01:00
Robert Müller 5cf356229b refactor CLineInput::Clear 2021-11-24 23:31:40 +01:00
Robert Müller 350042975b use str_utf8_stats in CLineInput::Set 2021-11-24 23:29:09 +01:00
Robert Müller 84ecbdb9d0 add str_utf8_stats to base system 2021-11-24 23:24:46 +01:00
def 7464785013 Remove ping filter (fixes #4365)
We had lots of cases of people having ping filter activated. Ping is now
too unreliable to actually filter by it. It can show an old super high
value and then you never see the location again.
2021-11-24 16:04:04 +01:00
def a817a2e60f Sanitize owner data in client (fixes #4388)
and don't access out of scope on owner < 0
2021-11-24 15:41:27 +01:00
bors[bot] 2376de500d
Merge #4381 #4382 #4387
4381: Fix enter behavior when creating new folder in editor r=edg-l a=def-

As reported by louis:

> pressing enter while creating a new folder in the editor (while using
> "save as") does not create the folder but instead enters the selected
> folder in the background

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


4382: Fix save typing when server settings are open in editor r=edg-l a=def-

As reported by louis:

> while saving a mapname while having the "Server Settings" tab open,
> pressing "m" while typing the mapname will unfocus the cursor from the
> mapname field onto the server settings field

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


4387: Don't access switchers out of bounds (fixes #4386) r=edg-l a=def-

It's possible that a map was saved with a different amount of switchers
than it has at the moment. Happened on Jao Shooter. I'll check with
mapper if they changed the number of switchers.

<!-- 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-11-24 11:57:19 +00:00
def 2e34f45c50 Don't access switchers out of bounds (fixes #4386)
It's possible that a map was saved with a different amount of switchers
than it has at the moment. Happened on Jao Shooter. I'll check with
mapper if they changed the number of switchers.
2021-11-23 19:01:52 +01:00
def 82ffd1b05b Enable sv_swap, more reasonable default for timeout 2021-11-23 16:58:06 +01:00
def 36a6b39031 Fix save typing when server settings are open in editor
As reported by louis:

> while saving a mapname while having the "Server Settings" tab open,
> pressing "m" while typing the mapname will unfocus the cursor from the
> mapname field onto the server settings field
2021-11-22 18:26:14 +01:00
def b4b9016cf4 Fix enter behavior when creating new folder in editor
As reported by louis:

> pressing enter while creating a new folder in the editor (while using
> "save as") does not create the folder but instead enters the selected
> folder in the background
2021-11-22 18:12:32 +01:00
Robert Müller e37ff4db65 remove unused fs_getmtime in favor of fs_file_time 2021-11-21 11:14:18 +01:00
Robert Müller 4bb5dbc84a do fs_is_dir smarter 2021-11-21 11:14:11 +01:00
Robert Müller b96fc7479e use str_format, improve code format 2021-11-21 10:41:57 +01:00
Robert Müller e1df7669f0 fix incorrect/inconsistent buffer sizes 2021-11-21 10:34:11 +01:00
Robert Müller c9dfbb6f45 fix unicode winsock error messages 2021-11-20 16:37:03 +01:00
bors[bot] c10b9252ca
Merge #4371
4371: No wasd moving when dialog is open (fixes #4370) 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-11-20 13:52:32 +00:00
Robert Müller 00606d1e2a fix open_link with unicode on windows 2021-11-20 13:36:05 +01:00
Robert Müller 30c65dedad add UNICODE defines on windows, misc. unicode fixes 2021-11-20 12:39:52 +01:00
def bd1a2a655f No wasd moving when dialog is open (fixes #4370) 2021-11-20 10:42:28 +01:00
bors[bot] 6df701a34a
Merge #4366
4366: Add sql BindInt64 r=def- a=ChillerDragon

Comes in handy for my downstream

Follow up to https://github.com/ddnet/ddnet/pull/4334

Tested with sqlite3

## 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: ChillerDragon <ChillerDragon@gmail.com>
2021-11-19 12:40:05 +00:00
ChillerDragon 097f718190 Add sql BindInt64 2021-11-19 12:29:24 +01:00