Commit graph

15001 commits

Author SHA1 Message Date
Robert Müller ac40efa263 Only apply size and color if changed, when editing multiple layers
To prevent the color of all layers from being reset to zero when changing just the size.
2022-06-27 23:20:09 +02:00
Robert Müller 70866d6d0c Fix names of SCommonPropState member variables 2022-06-27 23:20:09 +02:00
bors[bot] c231084daf
Merge #5515
5515: Include config info in help r=heinrich5991 a=def-

So it is clear what the default is

![screenshot-20220627@000811](https://user-images.githubusercontent.com/2335377/175835563-dd2abc4f-df83-43a7-bb60-7597d498aab7.png)
![screenshot-20220627@000545](https://user-images.githubusercontent.com/2335377/175835566-c983aa93-4a1d-471a-b183-1068050d196f.png)
![screenshot-20220627@000519](https://user-images.githubusercontent.com/2335377/175835569-796bcc4c-f9d2-4949-b1d5-b6dbb03be6d9.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
- [ ] 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-06-27 17:41:08 +00:00
bors[bot] 2603b38528
Merge #5522
5522: Fix unsafe defines r=heinrich5991 a=Chairn

These are unsafe define that should be parenthesized due to operator precedency that can change operation order in expression such as:
```c++
#define ABCD 1 + 2
int foo = 36/ABCD; // foo is actually 38 and not 12
```

I didn't change engine/client/graphics_threaded/h as it is included in https://github.com/ddnet/ddnet/pull/5520

## 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: Chairn <chairn.nq@hotmail.fr>
2022-06-27 17:19:28 +00:00
Chairn a9ee57aeb7 Fix unsafe defines 2022-06-27 18:51:02 +02:00
bors[bot] b6ca8537ae
Merge #5508
5508: Update language files for 16.2-rc4 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-06-27 10:34:37 +00:00
bors[bot] 6ec8bdbc12
Merge #5506
5506: Don't register integration test servers r=heinrich5991 a=def-

Also print out more of the diff

Should help with debugging sporadic failures like https://github.com/ddnet/ddnet/runs/7058704316?check_suite_focus=true

## 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-06-26 23:16:28 +00:00
bors[bot] c61e649081
Merge #5516
5516: Abort skin downloads too (fixes #5505) 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>
2022-06-26 23:00:50 +00:00
def 451644f977 Update language files for 16.2-rc4 2022-06-27 00:57:10 +02:00
def 4733cdc769 Abort skin downloads too (fixes #5505) 2022-06-27 00:39:00 +02:00
bors[bot] 3e54b35955
Merge #5513
5513: Update simplified_chinese.txt r=def- a=Cheeser0613

<!-- 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: Cheeser0613 <54943099+Cheeser0613@users.noreply.github.com>
2022-06-26 22:36:05 +00:00
bors[bot] ca5a69525a
Merge #5512
5512: Update traditional_chinese.txt r=def- a=Cheeser0613

<!-- 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: Cheeser0613 <54943099+Cheeser0613@users.noreply.github.com>
2022-06-26 22:20:50 +00:00
def b89dccab15 Include config info in help
So it is clear what the default is
2022-06-27 00:06:56 +02:00
Cheeser0613 1d1d1fdff9
Update simplified_chinese.txt 2022-06-27 03:58:23 +08:00
Cheeser0613 2c6e9cf464
Update traditional_chinese.txt 2022-06-27 03:56:55 +08:00
bors[bot] 80e6391525
Merge #5507
5507: Fix heap-use-after-free in `CGameWorld::RemoveEntity` r=def- a=Robyt3

Entities have a pointer to their parent entity. If the parent entity is freed first, then freeing the child will cause access to the already freed parent (at `pEnt->m_pParent->m_DestroyTick = GameTick();`).

This is fixed by adding a child pointer and clearing the child and parent pointers when either child or parent is freed.

I can consistently get the crash in `CGameWorld::RemoveEntity` with the integration test at fbfd938f32 (10/10 runs crashed). With these changes I get no crashes anymore (0/10 runs crashed).

Closes #5478. Closes #4317. Closes #4328. Closes #4390. Not sure about #3179.

## 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 <robytemueller@gmail.com>
2022-06-26 18:33:10 +00:00
Robert Müller 8eb1f6888d Refactoring: use CGameWorld::Clear in CGameWorld::CopyWorld 2022-06-26 12:51:17 +02:00
Robert Müller 2df4c4c668 Fix heap-use-after-free in CGameWorld::RemoveEntity
Entities have a pointer to their parent entity. If the parent entity is freed first, then freeing the child will cause access to the already freed parent.

This is fixed by adding a child pointer and clearing the child and parent pointers when either child or parent is freed.
2022-06-26 11:28:23 +02:00
def 3a8c5e31b5 Also copy autoexec_server.cfg to build dir
found by c0d3d3v
2022-06-26 11:13:30 +02:00
bors[bot] 1e31db257f
Merge #5420
5420: Improvments for new HUD r=def- a=C0D3D3V

for testing set `#define CLIENT_VERSIONNR 16020`
Some of the changes are only available in the next version

Impressions: https://youtu.be/E770vGp4KKY

Implements a few of the recommendations from https://github.com/ddnet/ddnet/issues/5159 and Discord
- removes all player capability messages send by the server, that are now displayed in the HUD
- ~~remove `cl_ddrace_hud` and cl_show_freeze_bars~~, 
- Added option `cl_freezebars_alpha_inside_freeze` setting to change the opacity if the player is inside a freeze tile (default visible 100%)
- Added option `cl_show_jumps_indicator`
- We send now the real weapon the player is holding if he is frozen
    -> for that we added a new particle "snow flakes" or frozen flakes :D that are spawned over the tees body, to indicate he is frozen.
    -> new extras.png asset (+ corresponding asset tab, that can potentially be used for all sorts of extras for our mod, e.g. material particles, but in the future maybe also for other mods using a similar structure like it is for entities)
- stars are no longer send to new clients, because it is duplication to the freezebar, and we decided to not allow to disable it 
- also ninja stars are no longer send. They are not vanilla, and we now have a ninja bar in the new HUD.
- display target angle from 0 to 360 (looks mirrored on the x-axis to the normal trigonometry circle, but that is just how the world coordinates are) 
- dummy action display is increased in size ( but only the border margin :D not the icons. so the icons are still the same size as the icons on the left side)
- allow the server to also show old HUD elements (see https://github.com/ddnet/ddnet/pull/5427 for screenshots)


fixes #5149
fixes #198
closes #5159

fixes #2252   ~~(But not clear if we should also display the weapon, still investigating)~~
- we do no longer display a weapon inside freeze, instead we have nice freeze particles

## 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-06-26 07:57:33 +00:00
Dennis Felsing fc2d419050 Version 16.2 2022-06-26 09:48:01 +02:00
def b1d1bb6739 Don't register integration test servers
Also print out more of the diff
2022-06-26 08:59:44 +02:00
bors[bot] 6315af0729
Merge #5504
5504: Remove useless typedef in c++ r=Jupeyy a=Chairn

## 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: Chairn <chairn.nq@hotmail.fr>
2022-06-26 06:49:01 +00:00
bors[bot] 0179dfd5e2
Merge #5499
5499: Use [[fallthrough]] attribute rather than comment r=def- a=Chairn

We could even add implicit fallthrough warning, but it is triggered in external json.c

## 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: Chairn <chairn.nq@hotmail.fr>
2022-06-25 21:49:43 +00:00
bors[bot] c5bf24692b
Merge #5502
5502: Add missing capability for GLES backend r=def- a=Jupeyy

<!-- 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: Jupeyy <jupjopjap@gmail.com>
2022-06-25 21:30:11 +00:00
Chairn a3a85bee5f Remove useless typedef in c++ 2022-06-25 21:05:54 +02:00
bors[bot] fbfd938f32
Merge #5503
5503: Improve rendering of demo list icons, remove duplicate code r=Jupeyy a=Robyt3

I first tried adapting and using `CMenus::DoButton_Icon` like `DoIcon` on upstream to reduce duplicate code in the menus. Later I moved/renamed this method to `CRenderTools::RenderIcon`, to also use it in the editor.

Changes to demo list:
- Show the icons as part of the name column
- Improve spacing/centering of icons in columns
- Grey out icon if demo is not loaded or not valid
- Clamp the number of demo markers to valid range (I have an old version 3 demo that incorrectly shows more than a million markers otherwise, which would not fit the char buffer used for rendering the number)

The visual changes are mostly consistent with upstream. Upstream also renders demo icons in green when the demo has markers, but I don't see a good motivation for that especially with a separate markers column already existing.

Before:

![demo old](https://user-images.githubusercontent.com/23437060/175780176-edbd3d98-a257-4982-b590-f32cdb3b1cf3.png)

After:

![demo new](https://user-images.githubusercontent.com/23437060/175780178-64c694b4-d2ae-4b87-8601-47725355454f.png)

Closes #1576. There's likely more duplicate code but I don't think we need this issue open anymore to remind us of that, unless it list more actionable examples of duplicate code that should be refactored.

## 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 <robytemueller@gmail.com>
2022-06-25 16:49:14 +00:00
Robert Müller 42532f3149 Use CRenderTools::RenderIcon in editor file dialog 2022-06-25 17:16:20 +02:00
Robert Müller fb91881765 Move CMenus::DoIcon to CRenderTools::RenderIcon
As this method only renders and doesn't provide an interactive element, the naming `Render` as well as the placement in `CRenderTools` fits better.

This also allows the method to be used in the editor.
2022-06-25 17:15:55 +02:00
Robert Müller 25ad47bed2 Use DoIcon for ingame player GUI icons 2022-06-25 16:57:25 +02:00
Robert Müller 87cb948166 Clamp number of demo timeline markers to valid range 2022-06-25 16:57:25 +02:00
Robert Müller 5184cf5523 Add greyed out demo icon for invalid or not loaded demos 2022-06-25 16:57:24 +02:00
Robert Müller f727199060 Render demo file icon in name column, remove DoIcon centering 2022-06-25 16:36:09 +02:00
Jupeyy eb3406c4cf Add missing capability for GLES backend 2022-06-25 16:11:04 +02:00
c0d3d3v 706a06d4d4
clamp m_Armor, to prevent value correction on client side 2022-06-25 16:06:22 +02:00
c0d3d3v 4281df2429
Add new textures by ravie; Also add no gun hit for teleport gun 2022-06-25 16:05:38 +02:00
Chairn a50ddb75ff clang-format 2022-06-25 15:30:39 +02:00
Chairn 5f5b80ae57 Use [[fallthrough]] attribute rather than comment 2022-06-25 15:21:44 +02:00
Robert Müller 97e36fa4be Add optional color parameter to DoIcon 2022-06-25 13:43:40 +02:00
Robert Müller a530ce89d6 Rename DoButton_Icon to DoIcon and remove unused return value
As the function renders an icon and not a button.
2022-06-25 13:38:04 +02:00
c0d3d3v d78b3decd5
Revert to using conditions for the version check for capability chat messages; Remove ExcludeClientVersionAndHigher from CGameContext::SendChatTarget 2022-06-25 12:33:49 +02:00
c0d3d3v 6d098d866a
Remove ExcludeClientVersionAndHigher from CGameTeams::TeamMask; Add CGameContext::ClientsMaskExcludeClientVersionAndHigher 2022-06-25 11:16:59 +02:00
bors[bot] a62250792c
Merge #5490
5490: Try to fix dump_local_console (fixes #5488) r=heinrich5991 a=def-

Untested, but my hunch is that by not cutting off the last part the text
file will be correctly recognized as valid utf8

<!-- 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: Dennis Felsing <dennis@felsin9.de>
2022-06-25 09:08:12 +00:00
bors[bot] 937a9cc0e2
Merge #5495
5495: Fix Android build r=heinrich5991 a=Jupeyy

- Video recorder off
- small fix in logger.cpp

Tested on Java-17

## 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>
2022-06-25 08:54:11 +00:00
Jupeyy a22a8dce1c Fix Android build 2022-06-25 10:43:24 +02:00
c0d3d3v dd1cdfcf2c
Add to some of the Sprite Arrays the array prefix 2022-06-25 10:39:39 +02:00
c0d3d3v ed2c514aa7
Change help text of cl_asset_extras 2022-06-25 10:28:54 +02:00
bors[bot] fda0eccf37
Merge #5494
5494: Be upfront about completeness of the autogenerated code documentation 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 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>
2022-06-25 07:37:28 +00:00
heinrich5991 d29b22a96e Be upfront about completeness of the autogenerated code documentation 2022-06-25 02:21:54 +02:00
bors[bot] a0cdefa3b5
Merge #5492 #5493
5492: Mention code browser in readme 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)


5493: integration test: print log diff for easier result check 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: Dennis Felsing <dennis@felsin9.de>
2022-06-25 00:04:01 +00:00