Commit graph

7750 commits

Author SHA1 Message Date
Wohoo e8718df49c clang-format fix 2 2022-01-08 13:14:01 +01:00
Wohoo 68a8bbadbc clang-format fix 2022-01-08 12:30:51 +01:00
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] 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
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
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 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] 768a007eed
Merge #4429 #4517
4429: Pr sql fail fast r=heinrich5991 a=Zwelf

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

## Checklist

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


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

As suggested by Yuzu

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

## Checklist

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


Co-authored-by: Zwelf <zwelf@strct.cc>
Co-authored-by: def <dennis@felsin9.de>
2021-12-27 23:11:09 +00:00
bors[bot] 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 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] 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
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
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] 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
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
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
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 9ef5849f0c Add MySQL test support 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] 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
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
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
heinrich5991 cdbf8ff2d2 Skip the UTF-8 BOM on all read text files
Fixes #4462.
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
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
Robert Müller 8ec50f800b increase scrollbar handle size for small scrollbars 2021-12-13 17:48:17 +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
Robert Müller 0ff313b130 adopt vanilla scrollbar colors and code style 2021-12-09 22:57:21 +01:00
Alexander Akulich 57e16f3f7b CEntity: Make NetworkClipped() const 2021-12-08 20:35:03 +03: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
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
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
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 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
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 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
def bd1a2a655f No wasd moving when dialog is open (fixes #4370) 2021-11-20 10:42:28 +01:00
def 26797274ba Remove duplicate name in credits 2021-11-19 10:38:36 +01:00
trml aba2c66507 Clip network first in CDragger 2021-11-19 00:42:00 +01:00
fokkonaut 3d2df7cfc9 Disallow dummy option (closes #4305, #4316) 2021-11-17 20:35:39 +01:00
bors[bot] 5f17c5360a
Merge #4283
4283: Hopefully crash less with ASAN r=heinrich5991 a=Learath2

<!-- 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
- [ ] 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: Learath <learath2@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2021-11-17 13:50:48 +00:00
def fb23d4637b Add contributors 2021-11-16 18:54:07 +01:00
bors[bot] 7e9f1cc85e
Merge #4306
4306: Small optimization of EntityEx snapping r=def- a=trml

This drops sending entityex to old client versions, and for stationary pickups not in switch layer (since they don't benefit from entity ex for prediction).

It also slightly changes how m_StartTick is snapped for CLight and CGun when EntityEx is present (always sets it to 0, which could reduce network traffic slightly). However, this might cause misprediction (or invisible lights/guns) for clients who have already changed their version to 15.6, so can omit this part if wanted.

## 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: trml <trml@users.noreply.github.com>
2021-11-16 08:07:52 +00:00
bors[bot] 8c49d20cb6
Merge #4315
4315: Use W, A, S, D to navigate in editor r=def- a=ChillerDragon

Sorah requested it on discord

## 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-16 07:56:22 +00:00
def f5eaf393da Increase console backlog size from 64 KB to 1 MB
Can't even list all bot bans currently
2021-11-15 23:26:19 +01:00
bors[bot] cdfc521132
Merge #4340 #4350
4340: Add functions for packing/unpacking int/unsigned using char arrays r=heinrich5991 a=Robyt3

Add `uint_to_bytes_be` and `bytes_be_to_uint` functions from upstream and use them where applicable to reduce duplicate code.

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


4350: Fix map_extract r=heinrich5991 a=def-

Reported by cheeser0613

<!-- 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: Robert Müller <robert.mueller@uni-siegen.de>
Co-authored-by: def <dennis@felsin9.de>
2021-11-15 19:33:45 +00:00
Robert Müller 12699aa3e4 add functions for packing/unpacking int/unsigned using char arrays 2021-11-09 22:19:32 +01:00
bors[bot] 0443a3ef65
Merge #4341
4341: Make laser doors show correctly when spectating other players r=def- a=trml

Makes the server send the switch state of other players while spectating others, otherwise the switch state of your own player (including when spectating in freeview).

Also changed the client a little to both handle situations where the server only sends one SWITCHSTATE netobject (then it just uses that team) or all (then it chooses the team that maintains the above behavior). I'm not sure if the latter would really be useful (but since the netobject contains a team it would be possible to do so).

## 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: trml <trml@users.noreply.github.com>
2021-11-09 08:40:52 +00:00
trml 57387b5965 Fix switch state when spectating other players 2021-11-08 23:51:28 +01:00
def 114acb4887 Version 15.6.2 2021-11-08 17:08:52 +01:00
bors[bot] 455ee32754
Merge #4337
4337: Fix DbgDummy check being at the wrong place r=def- a=heinrich5991

Fixes #4325.

## 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: ChillerDragon <ChillerDragon@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-11-08 15:11:43 +00:00
bors[bot] 959e65d82f
Merge #4326
4326: Fix spacing in HUD settings for 5:4 resolution r=heinrich5991 a=def-

Before:
![screenshot-20211107@112309](https://user-images.githubusercontent.com/2335377/140641210-4e1ba689-4e67-4b1d-a3fc-330dd5cc6218.png)
Now:
![screenshot-20211107@112758](https://user-images.githubusercontent.com/2335377/140641264-84b9b16e-a889-40c2-8b72-87ccce3acf8f.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
- [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-07 23:49:21 +00:00
heinrich5991 210b3d1fb2 Make control flow not depend on preprocessor macros 2021-11-08 00:33:35 +01:00
ChillerDragon de2f820c90 DbgDummy check belongs to check ingame not to sql 2021-11-08 00:33:35 +01:00
bors[bot] ac3d9d0c9a
Merge #4335
4335: Escape skin name when downloading (fixes #4333) r=Jupeyy 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-07 18:03:57 +00:00
def ce10e29351 Escape skin name when downloading (fixes #4333) 2021-11-07 17:01:50 +01:00
def 5acf6e77da Fix spacing in HUD settings for 5:4 resolution 2021-11-07 11:39:22 +01:00
trml 8db53f2a03 Fix sort comparator 2021-11-07 11:00:48 +01:00
bors[bot] 70607b4094
Merge #4311
4311: Fix crash in CDragger (fixes #4307) r=Jupeyy 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-06 23:54:09 +00:00
Jupeyy d0b634216c Don't set cursor on empty text 2021-11-06 23:34:44 +01:00
def e13987bdd3 Fix crash in CDragger (fixes #4307) 2021-11-06 20:07:12 +01:00
Jupeyy d4dd3e6969 Use delete[] for m_pSwitchers 2021-11-06 18:12:07 +01:00
ChillerDragon b5d09ddb6e Use W, A, S, D to navigate in editor 2021-11-06 16:48:25 +01:00
def 146d1d0173 Version 15.6.1 2021-11-06 13:13:51 +01:00
trml ae8ccdf97a Don't send entityex to old clients or for stationary pickups 2021-11-06 12:13:42 +01:00
def 4ddb553355 Fix snd_chat and snd_team_chat (fixes #4302) 2021-11-05 17:00:39 +01:00
bors[bot] 9cb30a8c66
Merge #4287
4287: sv_plasma_per_sec 0 => disable firing r=Jupeyy 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-04 13:45:23 +00:00
def 1bb21e1635 Version 15.6 2021-11-04 14:28:32 +01:00
fokkonaut ae6bb9763d Fix characters disappearing (fixes #4285) 2021-11-04 14:15:24 +01:00
def c96f67ce72 maybe_unused with older compilers 2021-11-04 10:59:25 +01:00
def 5b5afe2b4a GET_SIZE -> MACRO_ALLOC_GET_SIZE 2021-11-04 10:50:39 +01:00
def 5413041104 sv_plasma_per_sec 0 => disable firing 2021-11-03 17:21:51 +01:00
Learath 2c7a8bcb73 Pad to 8b boundary 2021-11-03 16:10:40 +01:00
bors[bot] 82c7b20001
Merge #4286
4286: Don't divide by 0 with sv_plasma_per_sec r=edg-l a=def-

Thread 1 "DDNet-Server" received signal SIGFPE, Arithmetic exception.
0x000055555560d65f in CGun::Tick (this=0x55555583b440) at /media/ddnet/src/game/server/entities/gun.cpp:109
109		if(m_LastFire + Server()->TickSpeed() / g_Config.m_SvPlasmaPerSec <= Server()->Tick())

<!-- 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-03 14:16:27 +00:00
def 469e6ba1af Quick fix quick fix 2021-11-03 15:13:47 +01:00
def a541894d59 Don't divide by 0 with sv_plasma_per_sec
Thread 1 "DDNet-Server" received signal SIGFPE, Arithmetic exception.
0x000055555560d65f in CGun::Tick (this=0x55555583b440) at /media/ddnet/src/game/server/entities/gun.cpp:109
109		if(m_LastFire + Server()->TickSpeed() / g_Config.m_SvPlasmaPerSec <= Server()->Tick())
2021-11-03 14:57:31 +01:00
def 63c4617b9e Quick fix: entity id != player id 2021-11-03 09:15:48 +01:00
def 45827bce80 Simplify 2021-11-03 01:06:15 +01:00
bors[bot] fd6b26fb5c
Merge #4284
4284: Reset selection, if gui element was changed outside of DoEditBox r=def- a=Jupeyy

Changing ui element by hot keys was not visible to DoEditBox, and thus didn't act like selection params were resetted

## 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: Jupeyy <jupjopjap@gmail.com>
2021-11-02 23:51:09 +00:00
Learath 066467f742 Ugly but more portable 2021-11-03 00:51:03 +01:00
Jupeyy 6a98fd163b Reset selection, if gui element was changed outside of DoEditBox 2021-11-03 00:46:36 +01:00