Commit graph

8613 commits

Author SHA1 Message Date
Robert Müller be45604354 Fix demo file not being closed after showing error message
When entering the name of an existing demo file into the Slice demo dialog and pressing the Ok button twice, the file handle that's used for checking for the demo file's existence is not closed, hence the cut demo file cannot be deleted until the client is closed.
2022-10-24 19:48:44 +02:00
Robert Müller f5a16c1c77 Fix crash in editor when using up/down keys on empty images list 2022-10-21 20:28:30 +02:00
Robert Müller 4a683e024a Fix crash in editor when using up/down keys on empty sounds list 2022-10-21 20:28:00 +02:00
bors[bot] 8feba4ecf6
Merge #5966
5966: Fix duplicate description of cl_default_zoom_level r=heinrich5991 a=def-

Since #5894 is not landing

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

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (especially base/) or added coverage to integration test
- [ ] 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: Dennis Felsing <dennis@felsin9.de>
2022-10-21 11:53:55 +00:00
Dennis Felsing f7bc58b056 Fix duplicate description of cl_default_zoom_level
Since #5894 is not landing
2022-10-21 00:12:07 +02:00
bors[bot] 53080e3e14
Merge #5938
5938: Hex Values in the editor's info feature r=heinrich5991 a=VoxelDoesCode

Add an option when the info button is selected, you can show the hexadecimal values for a tile rather than 1-255. This has some benefits, as it aligns in a perfect grid. Can help with making and test automappers.

![image](https://user-images.githubusercontent.com/95713843/195209286-82dd04d5-f469-4932-bbd7-93ec3fd32f99.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 (especially base/) or added coverage to integration test
- [ ] 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: VoxelDoesCode <bluheadcat@gmail.com>
2022-10-19 22:47:35 +00:00
Jupeyy b70fc39571 fix skin click ptr 2022-10-19 20:18:43 +02:00
Robert Müller c78f71b2b9 Fix client crash when server does not send gameinfo 2022-10-15 19:43:26 +02:00
Zwelf 0e0e55eb43 Fix example name in mapbug description 2022-10-13 11:51:18 +02:00
bors[bot] 6c3d0e999b
Merge #5933 #5941
5933: Inline `Is(GameType)` functions and remove support for legacy 64 player info protocol r=def- a=heinrich5991

## 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 (especially base/) or added coverage to integration test
- [ ] 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)


5941: Get away from vector for skins r=def- a=Jupeyy

most of the time it uses the index just to get the skin, downloaded skins change the index. Now its simply a heap object and downloaded skins load directly. Also the loading might be a bit faster bcs it had a loop lookup .Also O(1) lookup

not 100% tested. also fixes a bug with favorite skins hopefully
## 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 (especially base/) or added coverage to integration test
- [ ] 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>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-10-12 22:08:17 +00:00
Jupeyy a804c3ca5b Get away from vector for skins
most of the time it uses the index just to get the skin, downloaded skins change the index.
Now its simply a heap object and downloaded skins load directly. Also the loading might be a bit faster bcs it had a loop lookup
Also O(1) lookup
2022-10-12 22:32:36 +02:00
VoxelDoesCode 484cb82872 Hex Values in the editor's info feature
Clang format before squash
2022-10-11 19:27:12 -04:00
heinrich5991 a97a597592 Inline Is(GameType) functions
They are used for two purposes, coloring gametypes in the serverbrowser
and enabling backward compatibility. These are independent, we shouldn't
add more stuff to the backward compatibility, hence I split them up and
inlined them.
2022-10-11 16:05:46 +02:00
bors[bot] 8de0247d00
Merge #5909
5909: Add favorite skins r=def- a=Jupeyy

Advantages:
- my friend fokkonaut can mark his favorite vanilla skins
- u can mark skin db skins which auto download if not loaded

untested, bad code, maybe buggy.
but still want feedback :)

![image](https://user-images.githubusercontent.com/6654924/193877801-6880a4f6-3f42-4e16-ad00-f44583aa2a87.png)


## 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 (especially base/) or added coverage to integration test
- [ ] 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>
2022-10-10 14:42:18 +00:00
bors[bot] 6d7df66448
Merge #5918
5918: Constify snap more (inspired by upstream) r=Robyt3 a=ChillerDragon

Incorporate const added in those upstream commits:
d86d576217
e6b8518b49

## 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 (especially base/) or added coverage to integration test
- [ ] 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: ChillerDragon <ChillerDragon@gmail.com>
2022-10-09 13:53:05 +00:00
ChillerDragon 9982a7bad3 Constify snap more (inspired by upstream)
Incorporate const added in those upstream commits:
d86d576217
e6b8518b49
2022-10-09 15:12:12 +02:00
bors[bot] b7da20826d
Merge #5919
5919: Tweak the running visuals r=def- a=VoxelDoesCode

Sorry for putting this off for so long. Turns out animating with raw code is harder than you'd think.

https://user-images.githubusercontent.com/95713843/194726134-40925aea-6ec4-40ae-9597-b80a28d1b6a2.mp4



## 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 (especially base/) or added coverage to integration test
- [ ] 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: VoxelDoesCode <bluheadcat@gmail.com>
2022-10-08 22:58:13 +00:00
VoxelDoesCode fc09212d43 Tweak the running visuals 2022-10-08 16:07:15 -04:00
bors[bot] 665f829759
Merge #5915
5915: Don't overlap menu + debug messages (fixes #5914) r=Robyt3 a=def-

![Screenshot 2022-10-07 at 19 03 03](https://user-images.githubusercontent.com/2335377/194611779-93062028-0684-4745-b3b9-9949cec074fa.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 (especially base/) or added coverage to integration test
- [ ] 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: Dennis Felsing <dennis@felsin9.de>
2022-10-07 18:48:08 +00:00
Dennis Felsing 774f7a6f33 Don't overlap menu + debug messages (fixes #5914) 2022-10-07 19:03:20 +02:00
def 317b2df7c0 Support multiple values to search/exclude (fixes #4119) 2022-10-07 18:21:14 +02:00
Dennis Felsing c4463a3848 Only show ingame hint in Game tab
Since it looks ugly overlaid over the other tabs
2022-10-06 18:38:32 +02:00
Jupeyy fbc4c9cd6e Add favorite skins 2022-10-05 19:23:03 +02:00
def 361622ec37 Add help text at bottom left when menu is open 2022-10-03 00:11:01 +02:00
def 9e5d830e34 Revert ingame menu close button
Even I got confused by it and accidentally hit power off button. Left
side seems not popular for close either (#5888)

Since opening the menu requires Escape, players can probably figure out
Escape to close it again.

> Revert "Don't show home button ingame"
>
> This reverts commit d3ff903d44.
>
> Revert "Move home button to very right so it is consistent with close button ingame (fixes #5881)"
>
> This reverts commit 9cc08cc9d3.
>
> Revert "Add close button to close ingame menu"
>
> This reverts commit cfcfb7b3f0.
2022-10-02 23:59:48 +02:00
Robert Müller 98848cde70 Use str_comp_filenames to sort maps and demos again
This means that digit characters in filenames will be comparsed as numbers instead of being compared as individual digits.

The use of this function was previously (d2f5714042) removed as it did not sort names case insensitively, whereas now it does.
2022-09-30 14:48:53 +02:00
Robert Müller 3176032a7b Fix spelling seperate -> separate 2022-09-29 18:54:40 +02:00
Dennis Felsing d3ff903d44 Don't show home button ingame
Broken in #5882
2022-09-27 13:03:16 +02:00
def 9cc08cc9d3 Move home button to very right so it is consistent with close button ingame (fixes #5881) 2022-09-26 19:02:41 +02:00
bors[bot] 0f6594f10b
Merge #5875
5875: Move `src/game/bezier.cpp/h` to `src/base/bezier.cpp/h` r=def- a=Robyt3

As those functions are not game specific per se, they can be part of base instead.

Closes #3334.

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

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (especially base/) or added coverage to integration test
- [ ] 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 <robytemueller@gmail.com>
2022-09-24 19:17:10 +00:00
bors[bot] fdf29b5197
Merge #5861
5861: Add close button to close ingame menu r=Jupeyy a=def-

Suggested by cheeser0613 since new players don't know that Escape is the only way to close it again
![Screenshot 2022-09-22 at 09 49 31](https://user-images.githubusercontent.com/2335377/191689168-d401d6e9-f68c-4c53-a905-7ff1cfa0bb9d.png)
![Screenshot 2022-09-22 at 09 49 25](https://user-images.githubusercontent.com/2335377/191689180-581145f5-29cd-4adc-a4ee-4a89ded81534.png)
I'm not sure if I prefer it on left or right side. Left side is like the start menu button, right side is like Windows bar.

## 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 (especially base/) or added coverage to integration test
- [ ] 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: Dennis Felsing <dennis@felsin9.de>
2022-09-24 19:00:28 +00:00
Robert Müller 727b147268 Move src/game/bezier.cpp/h to src/base/bezier.cpp/h
As those functions are not game specific per se, they can be part of base instead.

Closes #3334.
2022-09-24 20:53:59 +02:00
Robert Müller 9625a4e521 Fix skin prefix button container being used for multiple buttons
This meant that only the first skin prefix button could be activated.

Regression from #5633.
2022-09-24 17:43:53 +02:00
bors[bot] c61e5586ff
Merge #5867
5867: Use ddnet.org on manpages r=heinrich5991 a=def-

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

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (especially base/) or added coverage to integration test
- [ ] 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: Dennis Felsing <dennis@felsin9.de>
2022-09-23 23:41:20 +00:00
bors[bot] 4f3a9cbd0d
Merge #5864
5864: refresh serverbrowser when disconnecting / abort r=def- a=luk51

This might be not complete, but this adds the functionality to refresh the server browser list after disconnecting from a server, or after aborting joining a server.

This fixes issue #5863.


## 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 (especially base/) or added coverage to integration test
- [ ] 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: Lukas Kitsche <lukaskitsche@posteo.de>
2022-09-23 23:24:58 +00:00
Dennis Felsing 17960e52b5 Add luk51 in credits 2022-09-24 01:05:00 +02:00
Lukas Kitsche 599eb18245 fix linting, will be squashed later 2022-09-24 00:56:43 +02:00
Lukas Kitsche 43aae1bd82 move refresh logic of browsertab into helper function 2022-09-23 19:59:18 +02:00
Dennis Felsing e290a407d6 Fix other occurences of DDNet.tw 2022-09-23 10:59:36 +02:00
Lukas Kitsche a5a191eb32 Merge branch 'master' of https://github.com/ddnet/ddnet into refresh-serverbrowser-when-disconnecting 2022-09-22 20:56:47 +02:00
Lukas Kitsche e5f3943f6e refresh serverbrowser when disconnecting / abort 2022-09-22 20:55:19 +02:00
Robert Müller 72194d28e7 Replace magic numbers with enum EShowEnvelope 2022-09-22 18:02:07 +02:00
Dennis Felsing cfcfb7b3f0 Add close button to close ingame menu
Suggested by cheeser0613 since new players don't know that Escape is the
only way to close it again
2022-09-22 09:49:54 +02:00
bors[bot] 069e5a7c9d
Merge #5848 #5851
5848: Remove cl_http_map_download r=heinrich5991 a=def-

![screenshot-20220918@010406](https://user-images.githubusercontent.com/2335377/190879092-3ca64914-15c5-4835-9fe6-fd9fe75aa57d.png)
Causes problems with GER3
## 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 (especially base/) or added coverage to integration test
- [ ] 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)


5851: Respect reserved slots in old serverinfo r=heinrich5991 a=def-

Noticed in https://github.com/ddnet/ddnet/pull/5850 that reserved slots were not respected

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

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (especially base/) or added coverage to integration test
- [ ] 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-09-18 11:40:11 +00:00
def 9f4e883906 Remove cl_http_map_download 2022-09-18 01:03:15 +02:00
bors[bot] e61b850364
Merge #5843
5843: Laser menu tweaks; Changed some default colors r=def- a=VoxelDoesCode

fixes #5841 

![image](https://user-images.githubusercontent.com/95713843/190824834-a48913ec-360a-40a8-8b48-d278f5916493.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 (especially base/) or added coverage to integration test
- [ ] 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: VoxelDoesCode <bluheadcat@gmail.com>
2022-09-17 22:16:26 +00:00
VoxelDoesCode 71b073a45f New SG Laser default, Reset to defaults 2022-09-17 17:11:53 -04:00
Robert Müller d34b7a4ea5 Refactor color picker variable names and color conversion 2022-09-17 13:12:12 +02:00
Robert Müller 4fb98f4ec2 Fix UI elements behind color picker background being selectable
Is was previously possible activate UI elements behind an active color picker when hovering the background of the color picker but not the color picker UI elements.
2022-09-17 13:12:12 +02:00
VoxelDoesCode 4c7a29b430 Add Reset All button 2022-09-16 21:06:20 -04:00